Skip to content

core/txpool/legacypool: fix flaky test TestAllowedTxSize #30975 #31836

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevemilk
Copy link
Contributor

Some tests involving transactions near the txMaxSize limit were flaky.
This was due to ECDSA signatures occasionally having leading zeros, which are omitted during RLP encoding — making the final transaction size 1 byte smaller than expected.

To address this, a new helper function pricedDataTransactionWithFixedSignature was added.
It ensures both r and s are exactly 32 bytes (i.e., no leading zeros), producing transactions with deterministic size.

Test result:

9m40s: 715 runs so far, 0 failures
9m45s: 725 runs so far, 0 failures
9m50s: 725 runs so far, 0 failures

@stevemilk stevemilk requested a review from rjl493456442 as a code owner May 15, 2025 17:52
Copy link
Contributor

@jwasinger jwasinger left a comment

Choose a reason for hiding this comment

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

pricedDataTransaction already has a parameter to specify the size. Seems like that function should be fixed instead of creating a wrapper around it?

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