Skip to content

chore(state): improve validation of ResponsePrepare/ProcessProposal ExecTxResults#477

Merged
lklimek merged 4 commits intov0.10-devfrom
sbe-todos
Oct 21, 2022
Merged

chore(state): improve validation of ResponsePrepare/ProcessProposal ExecTxResults#477
lklimek merged 4 commits intov0.10-devfrom
sbe-todos

Conversation

@lklimek
Copy link
Collaborator

@lklimek lklimek commented Oct 11, 2022

Issue being fixed or feature implemented

TxResults returned by ABCI PrepareProposal/ProcessProposal are not validated.

Also, state.AppHash should be renamed to state.LastAppHash to follow naming of other fields from last committed block.

What was done?

  1. Added validation of ExecTxResults - number of records there must be the same as the number of transactions included in the block.
  2. Renamed state/state.AppHash to LastAppHash

How Has This Been Tested?

Unit tests

Breaking Changes

none

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Copy link
Collaborator

@shotonoff shotonoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@lklimek lklimek changed the title refactor(state): rename AppHash to LastAppHash chore(state): add validation of TxResults and small refactor Oct 21, 2022
@lklimek lklimek marked this pull request as ready for review October 21, 2022 08:37
@lklimek lklimek changed the title chore(state): add validation of TxResults and small refactor chore(state): improve validation of ResponsePrepare/ProcessProposal ExecTxResults Oct 21, 2022
@lklimek lklimek merged commit 885ee43 into v0.10-dev Oct 21, 2022
@lklimek lklimek deleted the sbe-todos branch October 21, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants