-
Notifications
You must be signed in to change notification settings - Fork 21.5k
core: switch EVM tx context in ApplyMessage #30809
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
Changes from all commits
1b79f97
cafdfc6
0e69f7a
beb45ec
57d0f64
96f76a5
f335a50
de82fd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -605,7 +605,7 @@ func (evm *EVM) GetVMContext() *tracing.VMContext { | |
| BlockNumber: evm.Context.BlockNumber, | ||
| Time: evm.Context.Time, | ||
| Random: evm.Context.Random, | ||
| GasPrice: evm.TxContext.GasPrice, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @s1na it might be an incompatible change, but I feel like it's the right direction. The effectiveGasPrice could be derived with BaseFee (block context) and tx gas price. Originally, we must to invoke evm.SetTxContext before the TxStartHook, with this change, the requirement is gone
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm.. Why not just move the tracer stuff a bit? We ought to be able to get the tx-specific stuff into
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait a minute. The TxStart hook: It has the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For info, in our case, we indeed take the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @maoueh Just want to mention that the GasPrice taken from the transaction object is the different with one in the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rjl493456442 Yes thanks for the info. We are handling the different tx types to pick the correct gas values.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should bring it back in another tracing API version. The tracer implementation should not have to compute the effective gas price by itself. It should be handled by the tracing infrastructure. |
||
| BaseFee: evm.Context.BaseFee, | ||
| StateDB: evm.StateDB, | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.