Skip to content

Add support for movePrecompileToAddress in State Overrides (eth_call)#8115

Merged
Gabriel-Trintinalia merged 17 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:move-precompile-to-address
Jan 15, 2025
Merged

Add support for movePrecompileToAddress in State Overrides (eth_call)#8115
Gabriel-Trintinalia merged 17 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:move-precompile-to-address

Conversation

@Gabriel-Trintinalia
Copy link
Copy Markdown
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia commented Jan 14, 2025

This pull request introduces support for the movePrecompileToAddress feature in the StateOverrides for methods associated with Transaction Call Object and refactors the MainnetTransactionProcessor class to use a builder pattern. Additionally, it includes updates to the associated test cases and JSON-RPC resources to accommodate these changes.

fixes: #8031

Changes

  • New Feature: movePrecompileToAddress Support
  • Refactoring: MainnetTransactionProcessor Builder Pattern
  • Test Cases and JSON-RPC Resources

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 added the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 14, 2025
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review January 14, 2025 01:40
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
"movePrecompileToAddress":null
"0x0000000000000000000000000000000000000001": {
"comment" : "Move ECREC Precompiled to address",
"movePrecompileToAddress": "0xc000000000000000000000000000000000000001"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we also need a test that moves the precompile AND changes the code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wait, what is this testing, if the address and the movePrecompileToAddress are the same?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This tests if the original behaviour of the precompile can be called at the new address

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

maybe we also need a test that moves the precompile AND changes the code?

Done

@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as draft January 14, 2025 06:44
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review January 14, 2025 09:05
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.

looking pretty good, few nitpicking comments

"params": [
{
"from": "0xc100000000000000000000000000000000000000",
"comment": "Call to precompile ECREC (0x01), but code was modified to add 1 to input",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

Gabriel-Trintinalia and others added 6 commits January 15, 2025 12:50
…saction/SimulationTransactionProcessorFactoryTest.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…sonrpc/internal/methods/EthCallTest.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…sonrpc/internal/methods/EthCallTest.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) January 15, 2025 02:00
@Gabriel-Trintinalia Gabriel-Trintinalia merged commit 5cc309a into besu-eth:main Jan 15, 2025
siladu pushed a commit to daniellehrner/besu that referenced this pull request Jan 16, 2025
…besu-eth#8115)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 16, 2025
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
…besu-eth#8115)

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulation - implement movePrecompileToAddress in account overrides

4 participants