go-ethereum/eth/tracers/internal/tracetest
Matthieu Vachon 95a7b396a8 Fixed backward compatibility ordinals wrongly re-ordered in Firehose
At some point in the Firehose 2.x release lifecycle, a bug was introduced that caused
ordinals within the block to be broken. The problem was that system calls and block level balance changes
were done using a block level ordinals and transactions were done using their own level ordinals.

Then in the console reader, the ordinals were re-ordered correctly. While block level balance changes
were re-ordered correctly, the system calls were not.

Here, we re-apply the same bug to the transactions to ensure that the Firehose 3.x release lifecycle.
First, we are going to reset the ordinal once we detect this is the first transaction.
Then in the end block, we are going to fix balance & code changes ordinals.
2025-02-20 19:31:10 -05:00
..
firehose Fixed backward compatibility ordinals wrongly re-ordered in Firehose 2025-02-20 19:31:10 -05:00
testdata params,core: add max and target value to chain config (#31002) 2025-02-04 15:43:18 +01:00
calltrace_test.go Merge tag 'v1.14.12' into firehose-fh3.0 2024-12-17 16:01:41 -05:00
flat_calltrace_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
makeTest.js all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
prestate_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
README.md eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
supply_test.go consensus/beacon: remove TestingTTDBlock (#31153) 2025-02-11 13:44:25 +01:00
util.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00

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' })