Repository navigation
refactor: remove abci commit call - #461
Conversation
| FinalizeBlock: finalizeBlockResponse, | ||
| FinalizeBlock: fbResp, | ||
| } | ||
| if err := blockExec.store.SaveABCIResponses(block.Height, abciResponses); err != nil { |
There was a problem hiding this comment.
This means the app can be ahead of tenderdash if sth goes wrong (app already finalized the block, but tenderdash crashes). But in #460 we have the following comment:
// the app should never be ahead of the store (but this is under app's control)
Please double-check this and ensure we support this case in replay
There was a problem hiding this comment.
this case is already supported,
there is a unit-test here
There was a problem hiding this comment.
If I'm not mistaken, the order in which we save data is as follows:
- Save block to store
- FinalizeBlock
- Save state
So, the cases to check are:
- Block Store is at height H, app H-1, state at H-1
- Block Store is at height H, app H, and state at H-1
- Block Store is at height H, app H, and state at H
The test case you linked points to:
// state-height is one ahead of store-height and app-height is equal to store-height
In my terms above - this is: block store at H-1, App at H-1, state at H.
But block store will never be behind state, as it is saved first (except for crashes).
There was a problem hiding this comment.
all the test cases you noted are supported in a test
shotonoff
left a comment
There was a problem hiding this comment.
made the changes by PR feedback
…execution (#457) * fix(abci/types): panic in ValidatorSetUpdate.MarshalJSON() * refactor(kvstore): separate state from application * feat(kvstore): allow setting of persistence store and interval * feat(kvstore): app state can be marshaled to JSON (with DB content) * refactor(kvstore): merge kvstore with e2e app * chore: rewrite kvstore and e2e - "single" e2e test pass * fix(kvstore,e2e): kvstore state import breaks state * refactor(e2e): Move vote extension logic back to e2e app As we add a tx to each block as part of vote extension logic, we break other tests. * refactor(kvstore): self-review * test(consensus): fix invalid vote extension test * chore(e2e): re-add e2e app Rollback() to fix test * chore(kvstore): mv helpers.go helpers_test.go * test(kvstore): add snapshots test * refactor: remove abci commit call (#461) * refactor: remove commit ABCI call * fix(statesync): verify light block should use current height * refactor(kvstore): remove persistentkvstore app, rename New* funcs and return error, refactor state store * fix(kvstore): bytes.Buffer should be a pointer * chore: apply code review feedback * test(consensus): use t.Cleanup to rm test dir and cleanup state * chore(abci/types): fix val update json marshal returns nil on nil input * chore(kvstore): apply code review feedback * chore(consensus): fix build issues after merge * fix(state): correctly save validators at genesis * test(consensus): fix TestBlockReplayerReplay * Revert "fix(state): correctly save validators at genesis" This reverts commit a8cd027. * fix(consensus): validators from InitChain should replace genesis validators * fix(consensus): quorum type removed when processing initChain validators * test(rpc/client): minor test improvements * fix(state): last height validator changed handled incorrectly in initChain * chore(state): remove unused GetProcessProposalResponse * fix: some fixes after refactoring kvstore (#463) * fix: TestKVStoreKV, TestClientServer in kvstore_test.go * chore: remove Application.chainLockUpdate as unused functionality * chore: moved back chain-lock update to kvstore * chore: fix lint issues * fix: abci-client tests * fix: sbe unit tests (#464) * fix: replace state.LastCoreChainLockedBlockHeight with InitialCoreHeight * refactor: leave one save-validators-info * chore: minor code improvements based on feedback Co-authored-by: Dmitrii Golubev <[email protected]>
Issue being fixed or feature implemented
same-block executionapproach allows us to deprecate ABCIcommitcall, as this is now already done by thefinalizeBlockcall.What was done?
ABCI method
commitwas removedHow Has This Been Tested?
Tests
Breaking Changes
N/A
Checklist:
For repository code-owners and collaborators only