This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
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
returns 5fcbddf3030d1a261b80f5a069b731f1f5e90c52df4b18036b43434cda8f3305 regardless of data
Fails on chunksize*128^2 Also hangs on smaller tree pool in bmt
alt filehasher hangs on dangling chunk, wip fix
Hangs intermittently, review concurrency in write state vars
84dd25e
to
4759c5c
Compare
This was referenced Nov 29, 2018
3fc60bb
to
55b331c
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR outlines prototypes for the next generation content hashing engine in swarm.
It includes:
FileHasher
- A doubly linked object chain of levels, batches and chunks, where batches are in pools that can be reserved and released at need. Hashes asynchronously.FileSplitter
,FilePadder
,FileChunker
that attempt to demonstrate the chained writing concept that the end result should culminate in.FileSplitter
also tries a different approach for async writing thanAltFileHasher
andFileHasher
AltFileHasher
- A linear, finite size state object where hashing is done in one batch-size buffer for each level. Hashes asynchronously, and currently performs the tests at about 1/3 the speed ofFileHasher
ReferenceFileHasher
- A single buffer object where hashes of higher levels are prepended to the buffer as hashing is performed. Hashes synchronously (only for correctness).NOTE: During this work a bug was found in the previous hasher implementations, leading to incorrect hashes in "danglig chunk" configuations. Currently
ReferenceFileHasher
from this branch is considered to be the source of truth for file hashing in Swarm (perhaps we should merge that to the codebase separately).TODO: Add a thorough and legible description of how all this actually works.