Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Aggregate child checkpoints in a single CID #217

Open
adlrocha opened this issue Jul 1, 2022 · 0 comments
Open

Aggregate child checkpoints in a single CID #217

adlrocha opened this issue Jul 1, 2022 · 0 comments

Comments

@adlrocha
Copy link
Collaborator

adlrocha commented Jul 1, 2022

In the current implementation, we include inside ChildChecks a list of the CIDs for children for a specific checkpoint period. If the number of children is large, or if any of them uses a high-throughput consensus algorithm (like Mir) we may end up with a large number of CIDs in this list.

type ChildCheck struct {
Source string
// NOTE: Same problem as below, checks is
// []cid.Cid, but we are hiding it behind a bunch
// of bytes to prevent the VM from trying to fetch the
// cid from the state tree. We still want to use IPLD
// for now. We could fix this by setting an empty AMT
// with the list of Cids, but it may be too complex just
// for the sake of using CBOR.
Checks [][]byte //[]cid.Cid
}

We should aggregate the number of child checkpoints in a single CID to prevent a state explosion. For this, we can either use a single CID aggregating all ChildChecks; we can include this data into the CrossMsgs information and propagate it inside the CrossMsgMeta; or keep a list of ChildChecks with a single CID for each source.

In the process we need to also switch to cbor-gen for serialization instead of IPLD schema, and fix the interoperability of checkpoint signatures

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant