-
Notifications
You must be signed in to change notification settings - Fork 35
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
IPLD Resolver: Content #466
Closed
Labels
Comments
This was referenced Dec 19, 2023
Closed
This was referenced Mar 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of #475
IPC agents running on the parent subnet need to pull data from IPC agents (also) running on the child subnet(s). To do so, we have multiple options:
Bitswap
protocol instance either fromlibp2p-bitswap
oriroh-bitswap
(which I haven't yet looked at; it's potentially more feature rich but bigger), in which case the parent agent asks the protocol instance to recursively resolve a CID and insert the whole sub-graph into the Blockstore.In this issue, I would like to start with option 2 as it's more general purpose and seems to fit the situation:
To support Bitswap, the child agent will need a way to pull arbitrary CIDs from the blockchain node it is connected to. If this is not desired, if we want to limit it to just checkpoint content, then we can potentially keep using the Gateway actor to only resolve CIDs if they are checkpoint related.
Ideally the parent agent can also check if it has a CID already, to avoid asking if it does, which is part of the recursion, by implementing
BitswapStore::missing_blocks
. Naively we could let the agent use a memory based store that always has nothing in it and pull all CIDs, but the parent might already have the messages - for example if they ran nodes across multiple subnets and shared the storage, or if we usedGossipsub
to pre-load the CIDs onto the parent agents.In this issue, create a
Content
behaviour wrapping aBitswap
behaviour that:resolve
method to fetch a CID from a list of peer IDs. TheRequestResponse
protocol underlying theBitswap
will try to connect to any peer IDs it isn't connected to at the moment, for which theSwarm
will ask Add sorting imports #34 for addresses.resolve
method with a list of peer IDs based on what IPLD Resolver: Membership #467 knows are agents serving data in a subnet.Bitswap
behaviour and when it signals that a query is completed, raise an event to show that a CID is ready in the block store.The implementation of the
BitswapStore
is out of scope here, that will be the integration point with the IPC agent, or Fendermint.The text was updated successfully, but these errors were encountered: