Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(abci)!: move Events from FinalizeBlock to ResponseProcessProposal #770

Merged
merged 7 commits into from
Mar 27, 2024

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Mar 21, 2024

Issue being fixed or feature implemented

There is a scenario where the App (Drive) has already finalized the block, while Tenderdash State didn’t record it before crash. It means that AppState.Height == TenderdashState.Height+1.

When recovering after crash/error, this sometimes causes ERROR: failed to start node: error on replay: could not find results for height #157.

What was done?

  1. Moved Events to from ResponseFinalizeBlock to ResponseProcessProposal.
  2. Saving ABCIResponses before calling ResponseFinalizeBlock.

How Has This Been Tested?

  1. Add panic() to reproduce error on replay: could not find results for height on local devnet, running v0.14-dev branch - reproduced
  2. Added similar panic() on this branch - cannot reproduce
  3. Pass tests in Github Actions

Breaking Changes

  1. Events field moved from ResponseProcessProposal to ResponseFinalizeBlock.

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

@lklimek lklimek marked this pull request as ready for review March 21, 2024 13:43
@lklimek lklimek enabled auto-merge (squash) March 27, 2024 13:33
@lklimek lklimek disabled auto-merge March 27, 2024 13:41
@lklimek lklimek merged commit bc91645 into v0.14-dev Mar 27, 2024
19 checks passed
@lklimek lklimek deleted the fix/replay_no_results_for_height branch March 27, 2024 15:32
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.

None yet

2 participants