-
Notifications
You must be signed in to change notification settings - Fork 588
miner: disable tracer in vm.Config to prevent conflicts during block synchronization #2206
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
base: develop
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -2372,6 +2372,12 @@ func (w *worker) clearPending(number uint64) { | |
| // vmConfig returns the VM config. | ||
| func (w *worker) vmConfig() vm.Config { | ||
| cfg := *w.chain.GetVMConfig() | ||
| // The miner copies its vm.Config from the chain instance, which may include | ||
| // a vm.Config.Tracer intended only for live tracing, not for mining. Clear | ||
| // the tracer here to prevent the miner from tracing block production and | ||
| // conflicting with live tracing. | ||
| cfg.Tracer = nil | ||
|
|
||
|
Comment on lines
2374
to
+2380
|
||
| return cfg | ||
| } | ||
|
|
||
|
|
||
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.
This change alters miner EVM behavior when the chain VM config has a tracer set, but there’s no regression test to ensure the worker always strips the tracer from its vm.Config. Please add a unit test in miner/worker_test.go that sets a non-nil tracer on backend.chain.GetVMConfig(), calls w.vmConfig(), and asserts the returned config has Tracer == nil (and ideally that the chain’s VM config tracer remains unchanged).