-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
leaf nodes are different for the same files when using balanced and trickle DAG builders #3576
Comments
@whyrusleeping agrees in moving everything to use |
@whyrusleeping what is the historical reason to have both |
https://github.com/ipfs/js-ipfs-unixfs-engine/issues/119 depends on this |
@pgte @diasdavid what is the status of raw-leaves in js world? I wonder if it is worth to smooth out those edge cases if in future we switch to raw-leaves. I don't know the whole scope and the plan itself but it might be worth considering. Changing this would change hashes of repeated operations and could double storage in some instances if done improperly. I would advise some caution. |
@Kubuxu Can the proposed change in the issue be part of the next release? |
To state the obvious: Changing this will also be a backwards incompatible change. I.e. rehashing a node with a newer version could produce a different hash. |
I think the actionable change here is to make the trickledag code use whatever the balanced dag code is using. Trickledag not being the default makes it a bit more okay to change. |
This should be fixed by making |
Version information:
go-ipfs version: 0.4.4-
Repo version: 4
System version: amd64/darwin
Golang version: go1.7
Type:
Bug
Priority:
P1
Description:
When encoding the same file using the balanced and the trickle DAG builders separately, both trees end up not sharing any leaf hash.
@whyrusleeping did a preliminary analysis and it's probably due to the fact that the balanced builder uses UnixFS nodes of type
file
and the trickle builder apparently uses the typeraw
, hence the discrepancy.The text was updated successfully, but these errors were encountered: