celestia-app
celestia-app copied to clipboard
Prune the QGB state after the unbonding period ends
For the QGB, we only care about the state of the current unbonding period. That is due to the following:
- If no signatures are posted during this period, then the orchestrator will be slashed (upcoming ADR).
- After the unbonding period ends, even if the orchestrator doesn't sign, there is nothing to be done about them. Thus, we can get rid of the old state and only keep the one related to the current unbonding period.
what state is left to prune after ADR005?
We have the attestations requests that can be pruned. However, I guess we decided to dump them into block space. So, we will need to write an ADR about that
oh shoot, did we? that does sound familiar but I at least didn't write it down anywhere :sweat_smile:. I actually think its ok to keep those, as that will make it quite a bit easier to do slashing, and its really not that much state.
We can still prune them though, even if its not that much state, it will just continue to grow forever for no reason.
Then, we will not be able to sync QGB from genesis. Okey, makes sense. Thanks a lot
Then, we will not be able to sync QGB from genesis.
ahh yeah! that was it.
they could using an archive node, but also from another evm chain that has already synced I think
Cool then, let's prune then the attestations :fire:
related to #683 now that the only state that we're keeping is requests
Per sync, we need to prune every unbonding period and if it's number of attestations is below 100, don't prune
@evan-forbes For this, I am thinking of creating a value in store: LastPrunedAttestationNonce
to keep record of the last pruned nonce. Do we need to have this parameter as a gov upgradable? or for now, we can just hard code it?
I think it's easier to hard code it + we can update it in an upgrade if needed.
Final decision: Implement time based pruning