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

Allow frontier simulation when Base Fee is present #7965

Conversation

Gabriel-Trintinalia
Copy link
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia commented Dec 2, 2024

PR Description

This PR resolves an issue where simulating a legacy transaction in a post-frontier fork environment was impossible. The current logic defaults to using maxFeePerGas and maxPriorityFeePerGas, which incorrectly identifies the transaction type as EIP-1559.

Changes in TransactionSimulator:

  • Modified the buildTransaction method to conditionally set maxFeePerGas and maxPriorityFeePerGas only if they are provided. This ensures proper handling of both legacy transactions and EIP-1559 transactions.

Changes in Test Cases:

  • Introduced a new test case, shouldSimulateLegacyTransactionWhenBaseFeeNotZero, to confirm that the transaction simulator correctly processes legacy transactions when the base fee is not zero.

Signed-off-by: Gabriel-Trintinalia <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia added bug Something isn't working mainnet labels Dec 2, 2024
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as draft December 3, 2024 02:25
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review December 3, 2024 02:50
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

changelog?

@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) December 6, 2024 07:43
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia merged commit a3592a7 into hyperledger:main Dec 6, 2024
43 checks passed
daniellehrner pushed a commit to daniellehrner/besu that referenced this pull request Dec 18, 2024
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Daniel Lehrner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants