issues
search
ipfs
/
helia
An implementation of IPFS in JavaScript
https://helia.io
Other
812
stars
81
forks
source link
fix: improve sessions implementation
#495
Closed
achingbrain
closed
2 months ago
achingbrain
commented
2 months ago
Sessions are created synchronously
The root CID of a session is filled on the first CID retrieval for zero-delay session creation
Providers are found and queried for the root block directly, any that have it are added to the session
Further peers are added to the session as more CIDs are requested
Further peers are searched for when no current peers have the block for a requested CID
Providers that have errored (e.g. protocol selection failure) are excluded from the session
Bitswap only queries provider peers, not directly connected peers
HTTP Gatways are loaded from the routing
When providers are returned without multiaddrs we try to load them without blocking yielding of other providers
Common session code has been moved into an abstract superclass to remove duplication.
Change checklist
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation if necessary (this includes comments as well)
[x] I have added tests that prove my fix is effective or that my feature works
Change checklist