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

fix: set trace results root trace's gas used to execution results gas #4506

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Sep 7, 2023

ref #4262

gas accounting during inspecting the gas limit already has the init costs deducted, leading to wrong gasUsed values for the root trace call.

I'm entirely sure that this could be solved by manually adding the init costs back during tracing, which would be more expensive than simply using the final gasUsed of the execution result.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #4506 (d720f50) into main (6851481) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
...revm/revm-inspectors/src/tracing/builder/parity.rs 0.00% <0.00%> (ø)
crates/rpc/rpc-types/src/eth/trace/parity.rs 57.79% <0.00%> (-8.52%) ⬇️
crates/rpc/rpc/src/trace.rs 40.63% <ø> (ø)

... and 10 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.72% <0.00%> (-0.01%) ⬇️
unit-tests 63.81% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 29.71% <ø> (ø)
blockchain tree 83.58% <ø> (ø)
pipeline 90.56% <ø> (ø)
storage (db) 75.06% <ø> (ø)
trie 94.88% <ø> (ø)
txpool 47.50% <ø> (ø)
networking 77.42% <ø> (-0.02%) ⬇️
rpc 57.39% <0.00%> (-0.09%) ⬇️
consensus 63.32% <ø> (-0.09%) ⬇️
revm 31.68% <0.00%> (-0.06%) ⬇️
payload builder 6.34% <ø> (ø)
primitives 86.30% <ø> (-0.02%) ⬇️

@mattsse mattsse force-pushed the matt/set-root-trace-gas-used-to-execution-res branch from 8ea2eda to d720f50 Compare September 7, 2023 10:45
@mattsse mattsse added A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior labels Sep 7, 2023
@0xSt1ng3R
Copy link

wen merge? :'(

@mattsse mattsse merged commit 3cc169f into main Sep 10, 2023
24 checks passed
@mattsse mattsse deleted the matt/set-root-trace-gas-used-to-execution-res branch September 10, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants