-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Geth new tracing system/hooks ported to Erigon #10757
base: main
Are you sure you want to change the base?
Geth new tracing system/hooks ported to Erigon #10757
Conversation
… due to conflict with `tracing` package). Maybe we should use the `tracer *tracing.Hooks` instead or `tracingHooks` everywhere.
turbo/jsonrpc/debug_api.go
Outdated
@@ -17,7 +17,7 @@ import ( | |||
"github.com/ledgerwatch/erigon/core/state" | |||
"github.com/ledgerwatch/erigon/core/types/accounts" | |||
"github.com/ledgerwatch/erigon/eth/stagedsync/stages" | |||
"github.com/ledgerwatch/erigon/eth/tracers" | |||
tracerConfig "github.com/ledgerwatch/erigon/eth/tracers/config" |
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.
create separated 1 separated PR for such changes. easy to merge. it will help to reduce size of this PR. tnx.
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.
eth/stagedsync/stage_execute.go
Outdated
} | ||
|
||
callTracer := calltracer.NewCallTracer() | ||
vmConfig.Debug = true | ||
vmConfig.Tracer = callTracer | ||
if vmConfig.Tracer == nil { |
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.
plz add it into into cmd/state/exec3/state.go:RunTxTaskNoLock
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's already handled there via https://github.com/ledgerwatch/erigon/blob/161736348c38281afc9d670a89cc9c6097be8b72/cmd/state/exec3/state.go#L82
…ort cycle This is extracted from erigontech#10757 to make the overall merge more manageable.
…rding This is a split PR off erigontech#10757. In this smaller PR, we introduced the new `core/tracing` package and propagates the `BalanceChange` and `GasChange` reason in the API without being actually used. This is 100% backward compatible.
…rding This is a split PR off erigontech#10757. In this smaller PR, we introduced the new `core/tracing` package and propagates the `BalanceChange` and `GasChange` reason in the API without being actually used. This is 100% backward compatible.
…r interface The 2 new methods are made available in `consensus.ChainHeaderReader` interface to future usage in tracing revamp. This is a split PR off of erigontech#10757.
@AskAlexSharov I've spin-off 3 smaller PRs out of this one (listed below). Once they are merged, I'll update this overarching PR and check what could be split further for easier review/merge management. |
…n-main # Conflicts: # consensus/consensus.go # core/state/state_test.go # core/vm/interpreter.go # polygon/tracer/trace_bor_state_sync_txn.go # turbo/jsonrpc/debug_api.go # turbo/jsonrpc/debug_api_test.go # turbo/jsonrpc/gen_traces_test.go # turbo/jsonrpc/tracing.go # turbo/transactions/tracing.go
- This PR is created to from the #10757 to simplify it's review and merge process. - In this PR, we have plugged tracing hook framework to the consensus engine.
In Geth 1.14.0 release, the overall tracing plugin system has been refactored and augmented quite significantly, here the relevant part from Geth release notes:
This work has been done as a collaboration between the Geth team and StreamingFast team, which had similar tracer in production system. StreamingFast is a core-dev team of The Graph and received various asks from the indexer community to have this new tracing capabilities within Erigon too.
While working on getting the Geth PR merged upstream, we also started the work to port the same set of changes to Erigon. Today, we are ready to open the PR and get the initial feedback. Of course this changes how the overall tracing plugin looks like.
Here a excerpt of the PR description that highlights some of the changes:
Outside of the overall architecture change, here other stuff this PR brings in:
OnEnter/OnExit
This PR is quite big since it touches a lof of places where transaction execution happens. I understand it could be daunting to review and we are open to see how we could make the review easier, splitting in smaller PR is one of the possibilities.
Happy to schedule call with any stakeholder on the Erigon side to see how we can move that PR forward if needed.