- 18 Nov, 2020 1 commit
-
-
dirkmc authored
-
- 24 Sep, 2020 1 commit
-
-
Tomasz Zdybał authored
* Add WireTap interface WireTap interface can be used to access all messages send and received by Bitswap. This can be used to implement advanced statistics/analysis logic, which is beyond scope of Bitswap, but can be implemented as IPFS plugin. Some examples of potential applications: - per CID bandwidth tracker (see: https://gitcoin.co/issue/PinataCloud/apollo/2/100023631) - detailed per peer stats - intrusion detection system (IDS) implementation * Add test for WireTap
-
- 03 Sep, 2020 1 commit
-
-
Paul Wolneykien authored
* Separate decision engine ledger on two parts: score and the wantlist This is the first step to make external decision logic (tagging peers with score values) possible. The wantlist still resides in the original `ledger` struct while sent/received byte accounting and scores are extracted to the new `scoreledger` struct managed by the original `scoreWorker()` logic. The accounting is integrated into the `Engine` via `ScoreLedger` interface making it possible to replace the original `scoreWorker()` with some other logic. The interface, however, doesn't allow a score logic to directly touch peer tags: the logic may decide about score values while tagging itself is still under control of Engine. Note: with this commit it's yet not possible to replace the original score logic because there is no public methods for that. * Added "WithScoreLedger" Bitswap option New `WithScoreLedger(decision.ScoreLedger)` option in the `bitswap` package is the way to connect a custom `ScoreLedger` implementation to the decision engine. The `Engine` now has the corresponding `UseScoreLedger(ScoreLedger)` method. The `ScoreLedger` and `ScorePeerFunc` types are exposed from the internal `decision` package to the public one. Because its options are processed by the `Bitswap` after construction of its parts but before starting of the engine, the default `scoreLedger` initialization is moved from `newEngine()` to `StartWorkers()`. New `TestWithScoreLedger` test is added. The test checks for start and stop of the testing score ledger implementation that is specified via `WithScoreLedger` option. * Combine score ledger start with initialization of the score function Having a separate `Init(ScoreFunc)` method seems redundant (thx @dirkmc for pointing about that). As a bonus, the two-step ledger starting process is now enclosed in the `startScoreLedger()` function. * Let's call Stop() to stop a ScoreLedger The `Close()` method was there to stop the ledger. Let call it `Stop()` now. * Get return of the blank Receipt out of conditional block Explicitly form it as the final resort. Co-authored-by: Paul Wolneykien <manowar@altlinux.org>
-
- 01 May, 2020 1 commit
-
-
dirkmc authored
* fix: use one less go-routine per session * fix: send cancel when GetBlocks() is cancelled (#383) * fix: send cancel when GetBlocks() is cancelled * fix: in SessionManager shutdown nil out sessions * fix: sessionWantSender perf * make sessionWantSender.SignalAvailability() non-blocking * Refactor SessionInterestManager (#384) * refactor: customize SessionInterestManager * refactor: SessionInterestManager perf
-
- 30 Apr, 2020 1 commit
-
-
Dirk McCormick authored
-
- 29 Apr, 2020 1 commit
-
-
Dirk McCormick authored
-
- 23 Apr, 2020 2 commits
-
-
Dirk McCormick authored
-
Dirk McCormick authored
-
- 26 Mar, 2020 1 commit
-
-
Steven Allen authored
Also, reduce the overhead from logging.
-
- 16 Mar, 2020 1 commit
-
-
Steven Allen authored
And expose a separate function for _just_ getting want-blocks. When the user runs `ipfs bitswap wantlist`, they expect to see everything the node is currently looking for. Co-Authored-By: dirkmc <dirkmdev@gmail.com>
-
- 10 Mar, 2020 1 commit
-
-
Dirk McCormick authored
-
- 03 Mar, 2020 1 commit
-
-
Dirk McCormick authored
-
- 12 Feb, 2020 2 commits
-
-
Steven Allen authored
-
dirkmc authored
-
- 30 Jan, 2020 2 commits
-
-
Steven Allen authored
This makes reading the docs much easier as it's clear what's "private" and what's not. fixes #238
-
dirkmc authored
This commit extends the bitswap protocol with two additional wantlist properties: * WANT_HAVE/HAVE: Instead of asking for a block, a node can specify that they want to know if any peers "have" the block. * WANT_HAVE_NOT/HAVE_NOT: Instead of waiting for a timeout, a node can explicitly request to be told immediately if their peers don't currently have the given block. Additionally, nodes now tell their peers how much data they have queued to send them when sending messages. This allows peers to better distribute requests, keeping all peers busy but not overloaded. Changes in this PR are described in: https://github.com/ipfs/go-bitswap/issues/186
-
- 28 Oct, 2019 1 commit
-
-
dirkmc authored
* feat: parallelize reads * feat: concurent engine task workers and concurrent bstore reads * fix: lint * fix: address review comments * refactor: in BlockstoreManager wait for process.Closing() instead of Context.Done() * fix: use channel size 0 for BlockstoreManager reads * fix: change blockstore error logs from warnings to errors * fix: flaky test * fix: lint
-
- 20 Aug, 2019 3 commits
-
-
dirkmc authored
-
Dirk McCormick authored
-
Dirk McCormick authored
-
- 15 Aug, 2019 3 commits
-
-
Dirk McCormick authored
-
Dirk McCormick authored
-
Dirk McCormick authored
-
- 13 Aug, 2019 1 commit
-
-
dirkmc authored
feat: process response message blocks as a batch
-
- 04 Jul, 2019 1 commit
-
-
hannahhoward authored
send duplicate responses to the session peer manager to track latencies
-
- 10 Jun, 2019 1 commit
-
-
Jakub Sztandera authored
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
-
- 04 Jun, 2019 1 commit
-
-
hannahhoward authored
Re-setup provider search delay and rebroadcast delay on a per bitswap instance basis
-
- 31 May, 2019 1 commit
-
-
Raúl Kripalani authored
-
- 22 May, 2019 1 commit
-
-
hannahhoward authored
tag peers in connection manager as they have outstanding requests for blocks to serve fix #114
-
- 20 May, 2019 1 commit
-
-
Michael Avila authored
-
- 10 May, 2019 1 commit
-
-
hannahhoward authored
Add comments to all exported functions, extract the utils for creating instances in testnet.go, moves integration tests to bitswap_test BREAKING CHANGE: removed one constant -- rebroadcastDelay -- which I believe was unused
-
- 30 Apr, 2019 1 commit
-
-
Michael Avila authored
-
- 29 Apr, 2019 2 commits
-
-
Steven Allen authored
-
Steven Allen authored
* HasBlockBufferSize and provideKeysBufferSize no longer matter as we have an infinite in-memory buffer. * provideWorkersMax now defaults to 6 so changing this to 16 actually _increases memory consumption.
-
- 26 Apr, 2019 1 commit
-
-
Steven Allen authored
And remove all locks.
-
- 27 Mar, 2019 2 commits
-
-
Steven Allen authored
15 will _never_ succeed
-
Steven Allen authored
This'll back up the queue but take a large load off the DHT.
-
- 20 Feb, 2019 3 commits
-
-
Steven Allen authored
Fixes #50.
-
hannahhoward authored
Seperate want list into differentiated types - session tracking and regular fix #13
-
hannahhoward authored
fix race conditions while setting up wantlists by creating peer queues on demand BREAKING CHANGE: PeerManager SendMessage signature changed fix #51
-