064f37d6f6
Here we add a Go API for running tracing plugins within the main block import process. As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within that file register your custom tracer implementation. Then recompile geth and select your tracer on the command line. Hooks defined in the tracer will run whenever a block is processed. The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of requiring an interface, for several reasons: - We plan to keep this API stable long-term. The core/tracing hook API does not depend on on deep geth internals. - There are a lot of hooks, and tracers will only need some of them. Using a struct allows you to implement only the hooks you want to actually use. All existing tracers in eth/tracers/native have been rewritten to use the new hook system. This change breaks compatibility with the vm.EVMLogger interface that we used to have. If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM. --------- Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: Martin HS <martin@swende.se>
20 lines
822 B
JSON
20 lines
822 B
JSON
{
|
|
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
|
"currentNumber" : "0x01",
|
|
"currentTimestamp" : "0x03e8",
|
|
"currentGasLimit" : "0x1000000000",
|
|
"previousHash" : "0xe4e2a30b340bec696242b67584264f878600dce98354ae0b6328740fd4ff18da",
|
|
"currentDataGasUsed" : "0x2000",
|
|
"parentTimestamp" : "0x00",
|
|
"parentDifficulty" : "0x00",
|
|
"parentUncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
|
"parentBeaconBlockRoot" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
|
"currentRandom" : "0x0000000000000000000000000000000000000000000000000000000000020000",
|
|
"withdrawals" : [
|
|
],
|
|
"parentBaseFee" : "0x08",
|
|
"parentGasUsed" : "0x00",
|
|
"parentGasLimit" : "0x1000000000",
|
|
"parentExcessBlobGas" : "0x1000",
|
|
"parentBlobGasUsed" : "0x2000"
|
|
} |