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

fix(consensus): valid/locked block incorrectly marked as not timely #762

Merged
merged 23 commits into from
Mar 13, 2024

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Mar 12, 2024

Issue being fixed or feature implemented

Due to invalid handling of ValidBlock/LockedBlock receive time, Tenderdash interprets some blocks as not timely.
It causes unnecessary PrepareProposal calls when previous block should be reused but is not due to "not timely" issue, as well as rejecting blocks as "not timely" during voting.

This can also trigger issues if ABCI App response prepare proposal changes between rounds.

What was done?

  1. Fixed valid block and locked block update logic
  2. Fixed "timely proposal" condition
  3. Fire "valid block" event only when block really changed
  4. Detect non-deterministic responses to PrepareProposal

How Has This Been Tested?

Github Actions + tested during Dash Platform load 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

Base automatically changed from refactor/move-channel-definitions to v0.14-dev March 12, 2024 16:07
@lklimek lklimek changed the title fix(consensus): proposal creation regenerates blocks too often fix(consensus): valid/locked block incorrectly marked as not timely Mar 12, 2024
@lklimek lklimek marked this pull request as ready for review March 13, 2024 08:55
@lklimek lklimek enabled auto-merge (squash) March 13, 2024 08:55
Copy link
Member

@shumkov shumkov 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 merged commit 220c648 into v0.14-dev Mar 13, 2024
15 checks passed
@lklimek lklimek deleted the fix/valid-block branch March 13, 2024 14:17
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