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

Garbage collect executed checkpoints #227

Closed
Tracked by #231
aakoshh opened this issue Aug 22, 2023 · 1 comment
Closed
Tracked by #231

Garbage collect executed checkpoints #227

aakoshh opened this issue Aug 22, 2023 · 1 comment
Assignees

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Aug 22, 2023

Once a checkpoint is executed in #307 it can be removed from the resolver pool, to stop it from being proposed again.

We can do this in two places: during deliver_tx or during commit. In theory commit would be the natural place for it, which would require that we stage these changes in memory until the end, and only remove if block execution was successful.

However, there is not way in the ABCI to roll back a block execution; commit is separate only so we hold off from making persistent changes to the datastore until we have seen all transactions in the block, so in case the node dies in the middle of block processing we don't end up with inconsistent state. Because of this, we can fully expect commit to follow deliver_tx, and since we are not going to have to re-propose something that we executed because there is no way back from it anyway, we may as well remove the checkpoint from the resolver pool during deliver_tx, and save ourselves the trouble of staging changes.

If the node does end up dying, we have to have a restart strategy anyway, which includes getting the pending checkpoints from the ledger and re-inserting them into memory.

@dnkolegov
Copy link
Contributor

Actor side implemented in consensus-shipyard/ipc-solidity-actors#207

@jsoares jsoares transferred this issue from consensus-shipyard/fendermint Dec 19, 2023
@jsoares jsoares closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants