-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
ipfs object diff: check object contents #4775
Comments
But the What I meant in the comment was to use the |
Also, care should also be taken in the checks to ensure that
I'll add this case to the tests. |
@whyrusleeping Could you confirm that |
So, FYI, IIRC, the plan is to deprecate these commands anyways. We really should have an |
@Stebalien Thanks for the heads up, in your opinion is it worth working on this? The main problem with this command is already address with #4767, this issue was about some more specific corner cases. |
Meh. I'm not that interested in putting too much work into the |
Ok, closing this then. |
As explained by @magik6k in a comment, the command
ipfs object diff
doesn't specifically check the data of the objects, just the hash (CID) of its links. My question, in order to work on a solution, is what is an object? (in the context at least of theipfs object
command).The command
ipfs object put
handles theProtoNode
structure while the commandipfs object diff
handles the IPLDNode
interface, which is implemented byProtoNode
, but I don't see thatNode
gives access to thedata
of theProtoNode
, justRawData
(through theBlock
interface), but that also includes the bytes from the serialized links (besidesdata
).Should the
Diff
function check the underlying type of the interface to specifically look atdata
(and if so, it should have to look for all the particularities of each type that implements the interface to perform a correct comparison)? Is there anEquals
/Compare
function that already abstracts these details? I would really appreciate if someone could point me to more documentation (PR/issue/spec) of how the different data types of IPFS are stacked and interact (e.g., the blocks are one layer below, unixfs is above, etc.)The text was updated successfully, but these errors were encountered: