-
Notifications
You must be signed in to change notification settings - Fork 104
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
fix!: replace dag walkers with generic CID extraction from blocks #447
Conversation
Replace the codec-specific `.dagWalkers` property with a generic dag walker internally that uses the `Block` interface from the `multicodecs` module. - Removes the `.dagWalkers` property from the Helia interface - Adds `getCodec` and `getHasher` to retrieve codecs and hashers by code - Adds `loadCodec` and `loadHasher` options to allow sync or async loading of extra codecs/hashes in addition to staticlly configured ones in the `codecs`/`hashers` keys BREAKING CHANGE: the `.dagWalkers` property has been removed
I think the pinning benchmarks should be re-run with this PR before merging. The This could potentially be more expensive than deserializing a block, collecting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few things that could be changed, not sure if the networked-storage accepting an additional arg was done explicitly for some reason though
9bb948d
to
c31f5e1
Compare
we need to run benchmarks to ensure no perf regression |
Updates all deps to the latest libp2p version. BREAKING CHANGE: helia now uses [email protected]
da1386a
to
d071a30
Compare
Perf seems fine - the benchmark added by #633 shows comparable performance between this branch and main. |
Replace the codec-specific
.dagWalkers
property with a generic dag walker internally that uses theBlock
interface from themulticodecs
module..dagWalkers
property from the Helia interfacegetCodec
andgetHasher
to retrieve codecs and hashers by codeloadCodec
andloadHasher
options to allow sync or async loading of extra codecs/hashes in addition to staticlly configured ones in thecodecs
/hashers
keysBREAKING CHANGE: the
.dagWalkers
property has been removedChange checklist