-
Notifications
You must be signed in to change notification settings - Fork 567
Gas Dimension Trace Tests #3229
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement go-ethereum's live tracing feature in Nitro - Add the live tracer to go-ethereum/eth/tracers/live. Rebuild nitro - To activate a tracer pass --node.trace.tracername and optionally --node.vmtrace.jsonconfig - Support --dev and production mode, in both sequencer and non-sequencer mode - Changes made 1. Import the tracers/live directory in cmd/nitro.go to call init() functions on tracers 2. Add config params to the nitro binary to activate a tracer from bash 3. Call LiveDirectory.New() in func GetBlockchain() in gethexec/blockchain.go to activate the tracer based on config. The tracer is attached to vmconfig 4. Read the tracer in executionengine.go. Pass it to block_processor.go 5. Missing hook calls OnBlockStart and OnBlockEnd in block_processor.go 6. If tracer hooks are provided and isMsgForPrefetch is false then attach hooks to the stateDB, pass them to vm.Config to spawn an EVM instance with tracing enabled. - Credits: OffchainLabs#2934
tests, including doing the math for the expected values.
and call function
it was becoming far too unweildy in one file for navigation
The test itself is failing
add boilerplate for the read only opcodes like BALANCE, SLOAD, etc
Adapt tests to take advantage of the now exposed L1GasUsed and L2GasUsed values in the tracer output. Check against it in the gas_dim_tx_op_state tests. Change all the tests to handle child execution gas separately from one dimensional gas for CALL, CALLCODE STATICCALL, DELEGATECALL, CREATE, and CREATE2.
one sstore test is still failing, need to examine further
|
dacccc7
to
9694e90
Compare
9694e90
to
482aede
Compare
4435c05
to
79d975a
Compare
Closing in favor of #3233 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In OffchainLabs/go-ethereum#457 I make a PR that adds native and live tracers for tracking gas consumption by the dimensions of computation, state access, state growth, and history growth.
This PR adds integration-style tests that test that the of the output of those live tracers matches the expectation for each gas dimension(the logger_test.go files), and also tests that the gas dimensions add up to the same value as the one dimensional gas in the transaction receipt (the tx_op_test.go files).
See OffchainLabs/go-ethereum#457 for more details including invocation commands for the tracers. See OffchainLabs/nitro-contracts#345 for the solidity of the contract code that runs the opcodes that are tested in
system_tests