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 '--fork=' to EvmTool #4913

Merged
merged 5 commits into from Jan 13, 2023
Merged

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Jan 12, 2023

PR description

Add a CLI '--fork' option to allow code to be evaluated in specific forks.

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

Add a CLI '--fork' option to allow code to be evaluated in specific
forks.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
@shemnon shemnon added the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 12, 2023
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
@shemnon
Copy link
Contributor Author

shemnon commented Jan 12, 2023

docs change

a new --fork= option added to the EVM tool (if that tool is documented)

Samples:

$ ./ethereum/evmtool/build/install/evmtool/bin/evm --fork FutureEips --code "0xEF0001 01000C 020003 000b 0002 0008 030000 00 00000002 02010002 01000002 60016002b00001b00002b1 01b1 60005360106000f3" --json
$ ./ethereum/evmtool/build/install/evmtool/bin/evm --code "0xEF0001 01000C 020003 000b 0002 0008 030000 00 00000002 02010002 01000002 60016002b00001b00002b1 01b1 60005360106000f3" --json

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
@Override
BlockHeaderFunctions blockHashFunction() {
return new MainnetBlockHeaderFunctions();
public static Map<String, Supplier<HeaderBasedProtocolSchedule>> createSchedules() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a new place to remember to update when we create new forks. I wish we had a way of discovering these places without resorting to some kind of rigid static analysis/annotation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main issue here is that it crosses module barriers. EVM has configurations that need to be set up, and so does the mainnet client. Throw in if we do things like separate out the block and tx data validation that those also have different rules based on different forks.

But if we had all EVM changes come from one source that would be good. Will think about it once EOF settles down.

@shemnon shemnon enabled auto-merge (squash) January 13, 2023 21:14
@shemnon
Copy link
Contributor Author

shemnon commented Jan 13, 2023

One big change I want to do with EVM tool is remove the ability to interface with a production database and move those features into another tool that can also do things like extract contract code and storage values.

@shemnon shemnon merged commit 1cd15a8 into hyperledger:main Jan 13, 2023
@bgravenorst bgravenorst removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 16, 2023
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
* Add '--fork=' to EvmTool

Add a CLI '--fork' option to allow code to be evaluated in specific
forks.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* Add '--fork=' to EvmTool

Add a CLI '--fork' option to allow code to be evaluated in specific
forks.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
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.

None yet

3 participants