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 post-run allocation output to EVMTool #4709

Merged
merged 5 commits into from
Dec 23, 2022

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Nov 18, 2022

PR description

Add a CLI flag --json-alloc that will output the post-execution state of the allocations the EVM Tool executed in. As well as post-execution state for state-tests.

Signed-off-by: Danno Ferrin [email protected]

Fixed Issue(s)

Documentation

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

Changelog

@shemnon shemnon requested a review from diega November 18, 2022 22:10
@shemnon shemnon added the doc-change-required Indicates an issue or PR that requires doc to be updated label Nov 18, 2022
@shemnon
Copy link
Contributor Author

shemnon commented Nov 18, 2022

Doc change:

EVM Tool adds a new --json-alloc flag that will output the post-execution state to the standard out for both running execution and statetest execution. The format of the file follows the ehereum-test "T8n" format here - https://ethereum-tests.readthedocs.io/en/latest/t8ntool-ref.html#allocation-files - this is also the genesis file format used by besu for the "alloc" section.

This flag is specified in the same places --json can be specified.

@diega
Copy link
Contributor

diega commented Nov 20, 2022

Quick question, couldn't Jackson be used to serialize the alloc?

Add a CLI flag --json-alloc that will output the post-execution state of
the allocations the EVM Tool executed in. As well as post-execution
state for state-tests.

Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
@shemnon
Copy link
Contributor Author

shemnon commented Dec 22, 2022

Why not jackson? Jackson is in-memory whereas printstream/printwriter allows us to stream the results, reducing the required memory footprint. In theory if hooked up to a on-disk database it could walk the whole data stream too.

Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

🚢

@shemnon shemnon enabled auto-merge (squash) December 23, 2022 01:20
@shemnon shemnon merged commit 0c5b36b into hyperledger:main Dec 23, 2022
@rolandtyler rolandtyler removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 5, 2023
macfarla pushed a commit to jflo/besu that referenced this pull request Jan 10, 2023
* Add post-run allocation output to EVMTool

Add a CLI flag --json-alloc that will output the post-execution state of
the allocations the EVM Tool executed in. As well as post-execution
state for state-tests.

Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* Add post-run allocation output to EVMTool

Add a CLI flag --json-alloc that will output the post-execution state of
the allocations the EVM Tool executed in. As well as post-execution
state for state-tests.

Signed-off-by: Danno Ferrin <[email protected]>
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.

5 participants