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 for txpool loosing txs #210

Merged
merged 8 commits into from
Apr 26, 2024
Merged

Fix for txpool loosing txs #210

merged 8 commits into from
Apr 26, 2024

Conversation

oliverbundalo
Copy link

Description

During proposal build a proposer removes txs from the accounts.promoted with accounts.promoted.pop. That leads to possible problem because those txs are permanently removed and in the case if that round fails the proposer can't take part in the consensus and further more there is a high possibility of nonce too high error for future proposals on that particular validator.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Run EOA load test in local.

Copy link
Collaborator

@goran-ethernal goran-ethernal left a comment

Choose a reason for hiding this comment

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

Leaving some small comments, but in general LGTM.

consensus/polybft/consensus_runtime_test.go Show resolved Hide resolved
txpool/account.go Show resolved Hide resolved
@goran-ethernal
Copy link
Collaborator

goran-ethernal commented Apr 25, 2024

Can we add some unit tests for this? It looks like it can be easily tested in various scenarios on the txpool and account level.

@oliverbundalo
Copy link
Author

Can we add some unit tests for this? It looks like it can be easily tested in various scenarios on the txpool and account level.

Yes, 4 UTs have been added to txpool UTs

Copy link

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

Generally LGTM, left a couple of considerations.

consensus/polybft/consensus_runtime_test.go Outdated Show resolved Hide resolved
consensus/polybft/consensus_runtime.go Outdated Show resolved Hide resolved
consensus/polybft/consensus_runtime.go Show resolved Hide resolved
txpool/txpool.go Show resolved Hide resolved
txpool/txpool.go Show resolved Hide resolved
txpool/account.go Outdated Show resolved Hide resolved
@oliverbundalo oliverbundalo merged commit b9f6de8 into develop Apr 26, 2024
9 of 10 checks passed
@oliverbundalo oliverbundalo deleted the bug/txpool-keep-txs branch April 26, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants