-
-
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
Rework go-ipfs to use content IDs version 0 #3187
Conversation
b2cf42c
to
30f7aa9
Compare
3d3b96a
to
11c7561
Compare
if err == nil { | ||
for _, block := range bs { | ||
b.bloom.AddTS([]byte(block.Key())) | ||
for _, blk := range good { |
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.
This is resolved in #3162
I went over it, can't find anything wrong with it at first sight but I would love if @lgierth went over it too. (also it is in conflict with master now, probably due to changes in the blockstore code I pointed out). |
License: MIT Signed-off-by: Jeromy <[email protected]>
11c7561
to
c8fe495
Compare
License: MIT Signed-off-by: Jeromy <[email protected]>
One change i could probably do separately is the Other than that, I think that the pin code changes should be looked over closely. @lgierth if you could pay special attention there that would be great :) |
Is the following accurate? It doesn't replace all usage of key.Key -- from the block layer on inwards we assume raw data (where s/Data/RawData). The layer above that will be the one dealing with the different semantics of various CIDs (soon). I'm looking over // an Object is simply a typed block
type Object interface {
Cid() *cid.Cid
blocks.Block
} 👍 |
@lgierth yeah, youre right. the |
parent, err := p.dserv.Get(context.Background(), parentKey) | ||
if err != nil { | ||
return err | ||
} | ||
for _, lnk := range parent.Links { | ||
k := key.Key(lnk.Hash) | ||
c := cid.NewCidV0(lnk.Hash) |
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.
I assume this is explicitly v0 because we don't wanna start using v1 right now already
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.
Yeah, but thinking about it, we could change that to just be a cid.Cast
and it would work just fine
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.
Nah it's fine, one silly mistake and we'll have to maintain it :D:D
LGTM 👍
|
And I guess this PR has the nice side-effect of reducing the overall dependency on the blocks package :) |
This is a refactor to replace all object identifiers code with content ID version 0. This is a drop in replacement for the existing key.Key and will not change any outward behaviour. This is just a preparatory refactor for the switchover to CIDv1 and ipld