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

Cross-msgs: Integrate IPLD Resolver and IPC BitswapStore #440

Closed
adlrocha opened this issue Mar 10, 2023 · 1 comment
Closed

Cross-msgs: Integrate IPLD Resolver and IPC BitswapStore #440

adlrocha opened this issue Mar 10, 2023 · 1 comment
Assignees
Labels

Comments

@adlrocha
Copy link
Contributor

The IPLD resolver is implemented as a general protocol that can be leveraged by several subsystems, and it needs to be integrated for its use for IPC cross-net messages. Mainly:

  • Client-side: It needs to be integrated in the cross-msg subsystem to resolve bottom-up messages from checkpoints.
  • Service-side: An IPC-specific BitswapStore able to inspect the state of a subnet through the IPC agent to resolve Bitswap requests for cross-net messages needs to be implemented.
@aakoshh
Copy link
Contributor

aakoshh commented Mar 13, 2023

As Alfonso said, the IPLD Resolver is more general than originally envisaged in that it is content agnostic, it operates on the level of CIDs, without knowledge of what they are for, and it is recursive, if the data structure is recursive as well. This means that in theory the a peer can ask for the root CID of the state tree and get everything under it transferred to them.

If you want to restrict the content to the checkpoints, and your data structures are recursive (e.g. an AMT), then I think what you'd need to do is decide how far back you are willing to serve checkpoints for (e.g. after 24 hours the data should have been replicated on the parent and can be distributed through its own blocks), read those checkpoints into the agent's storage, or at least index the CIDs they contain. Then, when a request comes, you can reject it if it's not part of the CIDs you anticipated you had to serve.

@jsoares jsoares closed this as completed May 11, 2023
@jsoares jsoares transferred this issue from consensus-shipyard/ipc-libs Dec 19, 2023
@jsoares jsoares added the s:ipc label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants