This removes the method `TestingTTDBlock` introduced by #30744. It was added to make the beacon consensus engine aware of the merge block in tests without relying on the total difficulty. However, tracking the merge block this way is very annoying. We usually configure forks in the `ChainConfig`, but the method is on the consensus engine, which isn't always created in the same place. By sidestepping the `ChainConfig` we don't get the usual fork-order checking, so it's possible to enable the merge before the London fork, for example. This in turn can lead to very hard-to-debug outputs and validation errors. So here I'm changing the consensus engine to check the `MergeNetsplitBlock` instead. Alternatively, we assume a network is merged if it has a `TerminalTotalDifficulty` of zero, which is a very common configuration in tests. |
||
---|---|---|
.. | ||
testdata | ||
README.md | ||
calltrace_test.go | ||
flat_calltrace_test.go | ||
makeTest.js | ||
prestate_test.go | ||
supply_test.go | ||
util.go |
README.md
Filling test cases
To fill test cases for the built-in tracers, the makeTest.js
script can be used. Given a transaction on a dev/test network, makeTest.js
will fetch its prestate and then traces with the given configuration.
In the Geth console do:
let tx = '0x...'
loadScript('makeTest.js')
makeTest(tx, { tracer: 'callTracer' })