Skip to content
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

Lesson Feedback%3A Merkle DAGs - Lesson 5 (Merkle DAGs: Verifiability) #806

Open
Blu3Jy opened this issue Jun 6, 2022 · 1 comment
Open
Labels
lesson-feedback Feedback on a specific lesson

Comments

@Blu3Jy
Copy link

Blu3Jy commented Jun 6, 2022

URL of the lesson that's confusing: https://proto.school/merkle-dags/05

What's confusing about this lesson? Quoting the lesson:

And, if we want to embed that subgraph as a part of a larger DAG that’s different from the one we originally found it in, we’re free to, because the DAG’s CID, which is the CID of its root node, depends on the root node’s descendents and not its ancestors.
That last point deserves greater emphasis: with Merkle DAGs, we can take the same DAG and seamlessly embed it in multiple other, larger DAGs simultaneously! This enables a massive, interconnected weave of DAGs, building on top of and borrowing pieces from one another.

As we embed the smaller DAG in a larger different DAG, when the CID of its new root node is re-calculated, is the older CID dropped and never used again or is a different DAG forked from it thus at the end of the process resulting in two DAGs existing?

What is it actually meant by the word "embed"?

@Blu3Jy Blu3Jy added the lesson-feedback Feedback on a specific lesson label Jun 6, 2022
@mitchwagner
Copy link
Collaborator

Hi, Blu3Jy,

Thanks for the feedback! I can understand the confusion. I think it might help to highlight that in this case, we are speaking in the abstract, rather than about implementation of DAGs within the IPFS/Filecoin ecosystem.

As we embed the smaller DAG in a larger different DAG, when the CID of its new root node is re-calculated, is the older CID dropped and never used again or is a different DAG forked from it thus at the end of the process resulting in two DAGs existing?

In this context, we intend the latter meaning - that is, if we have two DAGs, X and Y, and we "embed" X within Y by taking the root node of X and adding it as a child node of one of Y's nodes, then we have, via this operation, defined a new DAG Z whose root node's CID will be different from Y's root node's CID.

In the abstract, these, and the practically-infinite set of all DAGS, co-exist simultaneously, each specified by its unique CID. We don't have to drop or forget the CID of Y to specify Z - they're just mathematical constructs.

In practice, within IPFS, things work much the same. DAGs are not changed/mutated, with the original DAG forgotten, so much as "forked", like you mention in your question. However, the focus of this lesson is not the concrete implementation.

Does that explanation help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lesson-feedback Feedback on a specific lesson
Projects
None yet
Development

No branches or pull requests

2 participants