Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit V.S. DeliverTx #381

Answered by creachadair
pcpLiu asked this question in Q&A
Dec 22, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @pcpLiu. In general, it isn't safe for the application to update its state until a block is fully committed. The application can execute and stage delivered transactions to persistent storage if it wants, but the effects of those transactions should not be exposed to users of the application until after a successful commit.

Otherwise, suppose the consensus node or the application itself fail during delivery: After restart, a node will replay the block(s) from the last-known-good application height. Unless the transactions are idempotent, replaying the same transactions may change the application's state differently than the original transactions would have done.

So the safe answer is c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pcpLiu
Comment options

Answer selected by pcpLiu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants