-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
eth/tracers: add onSystemTxEnd hook for system tx gasused. #2768
eth/tracers: add onSystemTxEnd hook for system tx gasused. #2768
Conversation
84adc43
to
4643564
Compare
@@ -150,8 +150,7 @@ type ( | |||
// beacon block root. | |||
OnSystemCallEndHook = func() | |||
|
|||
// TODO(Nathan,Eric): refine this func | |||
OnCaptureSystemTxEndHook = func(uint64) | |||
OnSystemTxEndHook = func(uint64) |
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.
add some comments to explain it's usage is better IMO
db357bf
into
bnb-chain:merge_geth_v1.13.15_v1.14.11
@buddh0 @zlacfzy Shouldn't there be here a paired The For info, I'm on of the contributor that worked with Geth team to revamp the tracing API. You can see how we have currently instrumented our "old" BSC tracing code: https://github.com/streamingfast/go-ethereum/blob/release/bsc-1.x-fh2.5/consensus/parlia/parlia.go#L1970-L1973. Right now the I would like to help shape the BSC tracing API to ensure it does correctly covers BSC cases. I would be happy to schedule a call with you guys and collaborate on this just like we did for Ethereum Mainnet. |
@maoueh Actually, the function name: |
Yeah agreed, it's the right time to change it! I have further questions about it. I'm actually questioning this hook a lot. I've noticed it was present from some time now, so there is always a backward compatibility question, but I'll describe what I see as problematic from this hook. I'm starting to even question if my current tracing solution is affected. I see it's only called in traceTx and seems to account for intrinsic gas when we are in a system transaction situation. But where is the intrinsic gas billed/charged when the node is syncing live and goes through the Parlia engine? I imagine I've missed it but I've look in the code back between state process and the I'm asking about the live syncing code path and its importance because Geth 1.14 introduced live tracers, tracers that are not invoked through the JSON-RPC but when the node syncs block which we use. Thus, I want to ensure that everything is properly traced. Here the other griefs I have on the current
Is there opening to change
Indeed, but it's not traced like other normal BSC transactions that are processed in
Yes, I want that the I'll open a PR and we can discuss implementation details on it. |
Description
eth/tracers: add onSystemTxEnd hook for system transaction gas used.
Rationale
system transaction don't include intrinsic gas
Example
add an example CLI or API response...
Changes
Notable changes: