consensus-shipyard / ipc

🌳 Spawn multi-level trees of customized, scalable, EVM-compatible networks with IPC. L2++ powered by FVM, Wasm, libp2p, IPFS/IPLD, and CometBFT.
https://ipc.space
Apache License 2.0
44 stars 39 forks source link

Revamp bottom-up interaction timing #954

Open maciejwitowski opened 5 months ago

maciejwitowski commented 5 months ago

From @raulk

We discussed straightening out the bottom-up interactions in the Tue 12 Mar huddle. Key takeaways and inline CTAs, feel free to dispute/comment if you disagree with something.

Checkpoint trigger. Checkpoints can be sent either:

Timer reset. Releasing an opportunistic checkpoint resets the timer.

Naming. bottom_up_check_period should be renamed to max_checkpoint_delay, as it represents the maximum amount of time the subnet can go without a checkpoint.

Bottom-up message batching. We should have a dedicated policy for accumulation/batching and release (by generating a checkpoint). Suggesting these policy attributes:

Ack configuration change. We should release acks to configuration changes immediately. These are rather infrequent and can be time-sensitive (e.g. subnet is under active attack from a malicious validator, and we want to ban them).

See also https://github.com/consensus-shipyard/ipc/issues/648#issue-2109230463

Task list

maciejwitowski commented 5 months ago

From @cryptoAtwill

Just to clarify, so when a user submits a bottom up message, it's first stored in the epoch of the last_checkpoint_height + max_checkpoint_delay, then if the batch is full, i.e. immediate_release_threshold is reached, we shift the batch to the current epoch, like how we are doing it now. There is no change to this logic.