go-ethereum/cmd/evm/internal
fselmo fb2a0b2207 cmd/evm/t8ntool: stream alloc input into StateDB
For file-based alloc input, tokenize the JSON and insert each account
into the pre-state StateDB as it is decoded, instead of materializing
the full GenesisAlloc map first and then iterating it in MakePreState.
Peak memory becomes a single decoded account rather than the whole
alloc map, the decoder's buffer over it, and the StateDB populating
alongside both.

On the same benchmark-scale test that measured the output-streaming
change, this dropped t8n peak heap_sys from ~8 GiB to ~3 GiB and cut
an additional ~20s off wall-clock. The stdin input path still uses
the map-based MakePreState since alloc shares a decoder with env/txs
there; Prestate.AllocPath is how the file path opts in.
2026-04-24 11:52:27 +02:00
..
t8ntool cmd/evm/t8ntool: stream alloc input into StateDB 2026-04-24 11:52:27 +02:00