Skip to content

Conversation

@s1na
Copy link
Contributor

@s1na s1na commented Dec 18, 2020

This PR replaces #21553 (fixes #20537). It exposes two new parameters gasPrice and intrinsicGas to js tracers. Using these two and the already exposed gasUsed they can calculate how much the sender spent on gas.

gballet and others added 5 commits December 18, 2020 13:31
eth/tracers: include tx gas in tracers usedGas

eth/tracers: fix prestate tracer's sender balance

eth/tracers: rm unnecessary import

eth/tracers: pass intrinsicGas separately to tracer

eth/tracers: fix tests broken by lack of txdata

eth, eth/tracers: minor fix
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM -- I pushed a commit to un-export the struct used in testing, and also added a testcase for some basic sanity-checking of the feature.

Strikes me now though that the tests can be simplified even more...

@holiman
Copy link
Contributor

holiman commented Dec 21, 2020

Pushed another commit to remove some of the boilerplate

@holiman
Copy link
Contributor

holiman commented Dec 21, 2020

Ok, perfection achieved
Screenshot_2020-12-21 eth, eth tracers expose gas used in tx to js tracer by s1na · Pull Request #22038 · ethereum go-ether

gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jul 26, 2025
gzliudan added a commit to XinFinOrg/XDPoSChain that referenced this pull request Jul 26, 2025
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.

PrestateTracer returns wrong balance for tx sender

3 participants