Skip to content

Allow frontier simulation when Base Fee is present#7965

Merged
Gabriel-Trintinalia merged 10 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:allow-frontier-simulation
Dec 6, 2024
Merged

Allow frontier simulation when Base Fee is present#7965
Gabriel-Trintinalia merged 10 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:allow-frontier-simulation

Conversation

@Gabriel-Trintinalia
Copy link
Copy Markdown
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 <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia added bug Something isn't working mainnet labels Dec 2, 2024
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as draft December 3, 2024 02:25
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review December 3, 2024 02:50
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Copy link
Copy Markdown
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?

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) December 6, 2024 07:43
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia merged commit a3592a7 into besu-eth:main Dec 6, 2024
daniellehrner pushed a commit to daniellehrner/besu that referenced this pull request Dec 18, 2024
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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