generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitswap move providing responsabilities from the server to blockservice & reprovider #528
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We always had a very weird relationship between bitswap and providing. Bitswap took care of doing the initial provide and then reprovider did it later. The Bitswap server had a complicated providing workflow where it slurped thing into memory. Reprovide accepts provides and is able to queue them in a database, such as on disk, this is much better. I'll add options to hook initial provide logic from the blockservice to the reprovider queue so consumers don't have to do this themselves.
Jorropo
force-pushed
the
bitswap/request-response
branch
2 times, most recently
from
December 28, 2023 22:12
cf417f4
to
3b17bf2
Compare
Codecov ReportAttention:
@@ Coverage Diff @@
## main #528 +/- ##
==========================================
- Coverage 65.62% 65.19% -0.44%
==========================================
Files 207 206 -1
Lines 25549 25232 -317
==========================================
- Hits 16766 16449 -317
+ Misses 7317 7307 -10
- Partials 1466 1476 +10
|
…bilities to an option of the client Given that the previous commit remove the content advertising from the server, it did not made sense to share these paths on the network. The code has been reworked: - addresses aren't magically added to the peerstore as a side-effect of calling `Network.FindProvidersAsync`. Instead they are passed as hints to ConnectTo which copies libp2p `host.ConnectTo` API. - the providerquerymanager is completely shutdown when not using `WithContentSearch` option, this helps usecase where `routinghelpers.Null` is used for content routing and the consumer exclusively rely on broadcast, like networks where most peoples have all the content (Filecoin, Celestia, ...).
Jorropo
force-pushed
the
bitswap/request-response
branch
from
December 28, 2023 23:03
3b17bf2
to
6d5475f
Compare
Jorropo
changed the title
bitswap improvements
bitswap move providing responsabilities from the server to blockservice & reprovider
Dec 29, 2023
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
added a commit
to Jorropo/lassie
that referenced
this pull request
Dec 29, 2023
This allows to recreate the behavior of advertising added blocks the bitswap server used to do.
blockservice is explicitely tolerent to having a nil exchange. The constructor even logs that as running an offline blockservice. Everything is except close, which panics. It is confusing for consumers to only have to call close based on if it's online or offline. They could also instead call close directly on the exchange (then we could remove blockservice's Close method). Anyway here is as a simple fix, add a nil check.
Jorropo
force-pushed
the
bitswap/request-response
branch
from
December 29, 2023 07:57
6a85bee
to
4bfdb6b
Compare
Closed
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
force-pushed
the
bitswap/request-response
branch
from
December 29, 2023 10:45
44421af
to
d705aa3
Compare
Closes: #172 See #172 (comment) too. providerQueryManager took care of: - Deduping multiple sessions doing find providers for the same CID. - limiting global find providers. None of which we care: - This is rare, if this happens it's fine to run the same query twice. If we care then we should make a deduping content router so we can inject it anywhere a content router is needed. - It's fine to allow one concurrent find peer per session. No need to limit this at 6 globally after that, it's a great way to stall nodes doing many queries.
Jorropo
force-pushed
the
bitswap/request-response
branch
from
December 29, 2023 10:53
d705aa3
to
a04b38e
Compare
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Jorropo
added a commit
to ipfs/kubo
that referenced
this pull request
Dec 29, 2023
Keeps in sync with ipfs/boxo#528
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
merge with merge commit, I have an other branch based on this.
Thx