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

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

Gabriel-Trintinalia
Copy link
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 <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@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
"movePrecompileToAddress":null
"0x0000000000000000000000000000000000000001": {
"comment" : "Move ECREC Precompiled to address",
"movePrecompileToAddress": "0xc000000000000000000000000000000000000001"
Copy link
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
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
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
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 <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review January 14, 2025 09:05
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.

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
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 <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
…sonrpc/internal/methods/EthCallTest.java

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
…sonrpc/internal/methods/EthCallTest.java

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) January 15, 2025 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-change-required Indicates an issue or PR that requires doc to be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simulation - implement movePrecompileToAddress in account overrides
3 participants