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

Respect checkpoint size constraints #1220

Open
raulk opened this issue Nov 27, 2024 · 1 comment
Open

Respect checkpoint size constraints #1220

raulk opened this issue Nov 27, 2024 · 1 comment

Comments

@raulk
Copy link
Contributor

raulk commented Nov 27, 2024

The maximum size of checkpoints is limited by several environmental and practical constraints:

  • Payload limits for transactions submittable to parents (e.g. Filecoin defines a max payload size of ? -- can't remember -- need to dig in).
  • (Today) Block gas limit on the parent, which limits the amount of eager execution we can perform through xnet messaging.
  • more?

Currently it is possible to queue messages which, when aggregated into a bundle, end up exceeding the above constraints upon submission within a checkpoint.

Furthermore, as checkpoints grow to include more data within them (e.g. more summaries in activity rollups) this problem is aggravated.

We should consider improving our local checkpoint validation and flushing logic to make it more intelligent, so that:

  1. We never accept single xnet messages that would, in themselves, exceed the parent's tx payload limt.
  2. We flush an early checkpoint when we add a message that would cause an overflow.
  3. We reserve N bytes in checkpoints to carry other data, e.g. activity rollups. In most cases these will have to be worst case scenario estimations.
  4. etc.
@cryptoAtwill
Copy link
Contributor

Regarding the size constraint, I think bottom up cross network message can be part of roll up as well. Only the commitment is needed to be submitted in the bottom up checkpoint. The commitment is just the root of merkle tree over Vec<IPCEnvelop>, and attached as part of the roll up. Then in relayer or anyone, can drive the execution by providing the merkle proof and original IPCEnvelop. The gateway contract can ensure the bottom up nonce is the expected nonce in IPCEnvelop. Practically there is no diff in current mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants