-
Notifications
You must be signed in to change notification settings - Fork 871
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
base: main
Are you sure you want to change the base?
Add support for movePrecompileToAddress in State Overrides (eth_call) #8115
Conversation
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]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
…el-Trintinalia/besu into move-precompile-to-address
...in/java/org/hyperledger/besu/ethereum/transaction/SimulationTransactionProcessorFactory.java
Outdated
Show resolved
Hide resolved
...in/java/org/hyperledger/besu/ethereum/transaction/SimulationTransactionProcessorFactory.java
Outdated
Show resolved
Hide resolved
...in/java/org/hyperledger/besu/ethereum/transaction/SimulationTransactionProcessorFactory.java
Outdated
Show resolved
Hide resolved
"movePrecompileToAddress":null | ||
"0x0000000000000000000000000000000000000001": { | ||
"comment" : "Move ECREC Precompiled to address", | ||
"movePrecompileToAddress": "0xc000000000000000000000000000000000000001" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.../main/java/org/hyperledger/besu/evm/processor/ModifiablePrecompilesMessageCallProcessor.java
Outdated
Show resolved
Hide resolved
.../main/java/org/hyperledger/besu/evm/processor/ModifiablePrecompilesMessageCallProcessor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
There was a problem hiding this 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
...pi/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java
Outdated
Show resolved
Hide resolved
...pi/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java
Outdated
Show resolved
Hide resolved
"params": [ | ||
{ | ||
"from": "0xc100000000000000000000000000000000000000", | ||
"comment": "Call to precompile ECREC (0x01), but code was modified to add 1 to input", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
...ava/org/hyperledger/besu/ethereum/transaction/SimulationTransactionProcessorFactoryTest.java
Outdated
Show resolved
Hide resolved
…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]>
…el-Trintinalia/besu into move-precompile-to-address
This pull request introduces support for the
movePrecompileToAddress
feature in theStateOverrides
for methods associated withTransaction Call Object
and refactors theMainnetTransactionProcessor
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
movePrecompileToAddress
SupportMainnetTransactionProcessor
Builder Pattern