go-ethereum/consensus
Marius van der Wijden 16a6531ac2
core: miner: reduce allocations in block building (#33375)
I recently went on a longer flight and started profiling the geth block
production pipeline.
This PR contains a bunch of individual fixes split into separate
commits.
I can drop some if necessary.


Benchmarking is not super easy, the benchmark I wrote is a bit
non-deterministic.
I will try to write a better benchmark later
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/miner
cpu: Intel(R) Core(TM) Ultra 7 155U
                │ /tmp/old.txt │          /tmp/new.txt          │
                │    sec/op    │   sec/op     vs base           │
BuildPayload-14    141.5µ ± 3%   146.0µ ± 6%  ~ (p=0.346 n=200)

                │ /tmp/old.txt │             /tmp/new.txt             │
                │     B/op     │     B/op      vs base                │
BuildPayload-14   188.2Ki ± 4%   177.4Ki ± 4%  -5.71% (p=0.018 n=200)

                │ /tmp/old.txt │            /tmp/new.txt             │
                │  allocs/op   │  allocs/op   vs base                │
BuildPayload-14    2.703k ± 4%   2.453k ± 5%  -9.25% (p=0.000 n=200)
```
2026-02-03 08:19:16 +01:00
..
beacon trie, go.mod: remove all references to go-verkle and go-ipa (#33461) 2025-12-30 20:44:04 +08:00
clique consensus/clique: fix blob gas error message formatting (#33296) 2025-11-27 16:03:21 +08:00
ethash consensus/ethash: fix blob gas error message formatting (#33300) 2025-11-28 12:14:30 +08:00
misc core: miner: reduce allocations in block building (#33375) 2026-02-03 08:19:16 +01:00
consensus.go consensus: remove clique RPC APIs (#31875) 2025-05-23 11:29:01 +02:00
errors.go consensus/beacon: check that only the latest pow block is valid ttd block (#25187) 2022-06-29 15:13:19 +03:00