You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 duringcommit
. In theorycommit
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 expectcommit
to followdeliver_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 duringdeliver_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.
The text was updated successfully, but these errors were encountered: