-
Notifications
You must be signed in to change notification settings - Fork 276
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(api): use overridden chainConfig in standardTraceBlockToFile
#871
base: develop
Are you sure you want to change the base?
Conversation
standardTraceBlockToFile
standardTraceBlockToFile
standardTraceBlockToFile
@@ -769,7 +769,7 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block | |||
// Execute the transaction and flush any traces to disk | |||
vmenv := vm.NewEVM(vmctx, txContext, statedb, chainConfig, vmConf) | |||
statedb.SetTxContext(tx.Hash(), i) | |||
l1DataFee, err := fees.CalculateL1DataFee(tx, statedb, api.backend.ChainConfig(), block.Number()) | |||
l1DataFee, err := fees.CalculateL1DataFee(tx, statedb, chainConfig, block.Number()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the only override that we might apply is BerlinBlock
, is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- that's the only one override i find in this file
- the override code (L733~734) is from 3-year-ago upstream, not made by us.
- in L770, the original code uses
chainConfig
, but L772 is introduced by use and it's usingapi.backend.ChainConfig()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make it more generic? https://github.com/ethereum/go-ethereum/blob/master/eth/tracers/api.go#L761-L769 Or is that a lot of extra work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes on "upstream" branch it's more generic, we can also update here on develop
branch. I can update.
1. Purpose or design rationale of this PR
chainCfg
has been overridden, we should use the overridden one.2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?