Commit graph

16741 commits

Author SHA1 Message Date
weiihann
f91e3b2e26 update benchmark 2026-03-09 21:31:18 +08:00
weiihann
a145150c39 use pebble instead of custom db 2026-03-09 21:19:27 +08:00
weiihann
43b69c4cfb works? 2026-02-13 10:40:05 +08:00
weiihann
036e37809e nomt: optimize Hash() pipeline — pool hashers, eliminate redundant sorts, in-place merge
Performance optimizations to the NOMT storage engine while preserving
correctness (all triecompare cross-validation tests pass at 10K+ scale):

- Pool SHA256 hashers via sync.Pool in HashInternal and HashStem
- Replace allStems map with sorted slice + O(N+M) merge (in-place fast
  path for incremental updates avoids allocation entirely)
- Add UpdateSorted to db.DB, skipping redundant sort of pre-sorted ops
- Simplify canonicalRoot to use pre-sorted allStems directly
- Optimize StemSharedBits with byte-level XOR + bits.LeadingZeros8
- Replace stemLess loops with bytes.Compare in all locations
- Eliminate per-stem map alloc in groupAndHashStems (use [256]bool dirty)
- Use stack-allocated [248]bool for downBits in BuildInternalTree
- Remove unused stemPathCmp function

BenchmarkHash/10000/nomt: 9.8ms → 8.2ms (-16%)
BenchmarkBlockWorkload/nomt: 7.7ms → 6.6ms (-14%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:11:59 +08:00
weiihann
d61dd875d8 nomt: add triecompare package and fix sort.SliceStable bug in stem grouping
Add trie/triecompare/ package with realistic state generation and cross-
validation tests proving NOMT produces identical roots as bintrie at scale
(10K+ accounts, PowerLaw/Uniform/Exponential distributions, multi-block).

Fix a subtle bug in groupAndHashStems: sort.Slice was used instead of
sort.SliceStable, causing non-deterministic results when the same account
is mutated twice in a single block (duplicate stem+suffix entries need
last-writer-wins ordering preserved).

Tests: 5 correctness tests + 4 benchmarks + storage footprint comparison.
All pass with race detector clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 00:07:04 +08:00
weiihann
4a2a10ca7d nomt: Phase F — cross-validation tests proving NOMT root == bintrie root
Two root causes of hash mismatch fixed:

1. Canonical root computation: Hash() now uses BuildInternalTree(skip=0)
   over all known stems instead of the page tree's depth-7 internal root.
   The page tree is still updated for persistent storage, but the canonical
   root bypasses its depth-7 worker split that added extra wrapping levels.

2. Code chunk grouping: UpdateContractCode now matches bintrie's group-based
   key derivation exactly — computing the stem key only at group boundaries
   and using groupOffset as the suffix, instead of computing a separate
   GetBinaryTreeKey per chunk (which produced different stems).

Cross-validation tests (compat_test.go) assert strict equality:
- TestSingleAccountRootMatch
- TestMultiAccountRootMatch
- TestStorageRootMatch
- TestCodeChunkRootMatch
- TestMixedOpsRootMatch
- 4 BuildInternalTree vs bintrie diagnostic tests

48 tests passing, race-detector clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:42:04 +08:00
weiihann
556d6160df nomt: Phase E — NomtTrie integration rewrite with full EIP-7864 ops
Complete implementation of all NomtTrie methods:

Read operations (from stem flat state):
- GetAccount: reads basic data (slot 0) and code hash (slot 1)
- GetStorage: reads packed 32-byte value by stem+suffix

Write operations (accumulate pending stemUpdates):
- UpdateAccount: packs basic data + code hash at account stem
- UpdateStorage: right-aligns value to 32 bytes
- DeleteStorage: writes 32 zero bytes (matching bintrie)
- DeleteAccount: no-op (matching bintrie)
- UpdateContractCode: ChunkifyCode + per-chunk stem updates

Flush (Hash/Commit):
- groupAndHashStems merges updates with flat state, writes back
- nomtDB.Update pushes stem hashes into the page tree
- Returns new root hash

15 new integration tests, all passing with -race.
Full suite: 38 nomttrie + 94 core + 34 merkle + 9 db + 31 bitbox = all green.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:44:21 +08:00
weiihann
fbeb697099 nomt: Phase C — stem hash computation and flat state helpers
Add stem-level flat state storage and the groupAndHashStems pipeline
that bridges NomtTrie's per-slot updates to NOMT's page-tree:

- stemValueDBKey/stemValueDBPrefix: ethdb key format (0x03||stem||suffix)
- loadStemValues: prefix-iteration loader for all 256 slots of a stem
- writeStemValues: batch writer with nil=delete semantics
- groupAndHashStems: sort→group→load→merge→hash→write pipeline
  producing sorted []core.StemKeyValue for the page tree

Cross-validated against bintrie's StemNode.Hash algorithm.
11 new tests, all passing with -race.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:35:23 +08:00
weiihann
84fff73c8f trie/nomttrie: add EIP-7864 key derivation and value encoding (Phase B)
Add stem-aware key encoding wrappers delegating to bintrie for identical
SHA256 key derivation. Add packBasicData/packStorageValue matching
bintrie's exact encoding layout. Stub trie.go with stemUpdate type
pending Phase E implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:30:14 +08:00
weiihann
1051e7be0c nomt/merkle, nomt/db: adapt to EIP-7864 stem-based types (Phase D)
Remove leaf compaction from PageWalker.compactStep, replace KeyValue
with StemKeyValue throughout the merkle engine and worker, and update
DB.Update to accept pre-hashed stem key-value pairs.

Key change: singleThreadedUpdate now uses the same depth-7 child-index
partitioning as the parallel path, ensuring identical intermediate
hashes without leaf compaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:23:57 +08:00
weiihann
2db24e85a3 nomt/core: redesign for EIP-7864 compatibility (Phase A)
Replace Keccak256+MSB tagging with SHA256. Remove leaf nodes entirely,
replacing them with opaque stem hashes. Simplify NodeKind to just
Terminator and Internal. Add HashStem (8-level binary SHA256 tree
matching bintrie StemNode.Hash). Reduce max trie depth from 256 to 248
(31-byte stem path). Replace BuildTrie/LeafOp with
BuildInternalTree/StemKeyValue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 21:59:53 +08:00
weiihann
cb3e13d93d nomt/merkle: add Phase 7 parallel workers for trie updates
Parallelize the PageWalker trie update across multiple goroutines by
partitioning sorted operations by the root page's 64 child subtrees
(first 6 bits of each key path).

Each worker runs an independent PageWalker constrained to child pages
below the root (using parentPage mechanism), producing ChildPageRoots.
After all workers complete, a root walker places the child roots using
AdvanceAndPlaceNode and concludes with the final trie root.

Workers operate on disjoint page subtrees so no synchronization is
needed during computation — only sync.WaitGroup for goroutine join.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:37:42 +08:00
weiihann
53fd00926f triedb/nomtdb, trie/nomttrie: add Phase 6 geth integration for NOMT
Wire the NOMT binary merkle trie engine into geth's triedb/state
framework. This adds two new packages:

- triedb/nomtdb: backend implementing triedb.backend interface, manages
  flat state persistence in ethdb and delegates trie ops to nomt/db
- trie/nomttrie: NomtTrie implementing state.Trie, accumulates LeafOps
  during block execution and flushes to NOMT engine on Hash()/Commit()

Key design choices:
- Single flat keyspace: accounts use keccak256(addr), storage uses
  keccak256(keccak256(addr) || keccak256(slot)) as 256-bit trie paths
- OpenStorageTrie returns the account trie itself (no separate tries)
- Flat state (account/storage values) stored in ethdb with prefixed keys
- NOMT trie stores only hashes; reads delegate to ethdb flat state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:36:57 +08:00
weiihann
cf10f3d997 nomt/db: add Phase 5 unified NOMT trie database
Implement the orchestration layer combining Bitbox storage with the
PageWalker merkle engine:
- DB.Open: creates/opens Bitbox HT file, runs WAL recovery
- DB.Update: sorts ops, runs PageWalker, persists via Bitbox sync
- DB.LoadPage: reads pages from Bitbox for NodeReader compatibility
- BitboxPageSet: PageSet implementation backed by on-disk Bitbox storage

The DB handles only trie structure (merkle pages). Flat key-value
storage stays on geth's PebbleDB via existing infrastructure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:18:31 +08:00
weiihann
859312d1f5 nomt/bitbox: add Phase 4 WAL, sync controller, and crash recovery
Implement crash-safe persistence for the Bitbox hash table:
- wal.go: WAL format with START/CLEAR/UPDATE/END entries, builder/reader
- sync.go: 3-phase sync protocol (BeginSync → WriteWAL → CommitSync)
- recover.go: WAL replay for crash recovery

The WAL records page diffs (not full pages) for compact logging. The
3-phase protocol ensures: WAL fsynced before HT modification, HT fsynced
before WAL truncation, providing at-least-once delivery of page updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:16:29 +08:00
weiihann
fef1ed4c4f nomt/bitbox: add Phase 3 Bitbox on-disk hash table storage
Implement the on-disk open-addressing hash table for storing trie pages:
- htfile.go: HT file layout with header, meta pages, and data pages
- metamap.go: in-memory meta byte map with dirty page tracking
- probe.go: triangular probing with xxhash64 page ID hashing
- db.go: Bitbox DB with StorePage, LoadPage, DeletePage, FlushMeta, Sync

The hash table uses 1-byte meta tags (top 7 bits of hash) for fast
filtering before reading full 4096-byte data pages. Triangular probing
with power-of-2 capacity guarantees all buckets are visited.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:14:20 +08:00
weiihann
88fd10529f nomt/merkle: add Phase 2 merkle engine (PageWalker, PageSet, ElidedChildren)
Implement the in-memory batch update engine for the NOMT binary merkle trie:
- elided.go: ElidedChildren 64-bit bitfield for tracking elided child pages
- pageset.go: PageSet interface + MemoryPageSet in-memory implementation
- pagewalker.go: PageWalker left-to-right walker with partial compaction
  - AdvanceAndReplace: replace terminal nodes with sub-tries
  - AdvanceAndPlaceNode: place pre-computed child page roots
  - Conclude: finalize walk and return new root + updated pages
  - compactUp/compactStep: hash upward with leaf/terminator compaction
- core/triepos.go: add SharedDepth method needed by PageWalker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:10:58 +08:00
weiihann
7aebfb3c71 nomt/core: add Phase 1 core primitives for NOMT binary merkle trie
Implement foundational types and algorithms for the NOMT storage engine:
- node.go: Node/KeyPath/ValueHash types with MSB-based kind discrimination
- hasher.go: Keccak256 hashing with leaf/internal MSB labeling
- page.go: 4096-byte RawPage layout (126 nodes + elided children + pageID)
- pageid.go: PageID encode/decode with shift-then-add encoding
- triepos.go: TriePosition navigation (Down/Up/Sibling/PageID/NodeIndex)
- pagediff.go: 128-bit PageDiff bitfield for tracking changed nodes
- update.go: BuildTrie 3-pointer left-frontier algorithm, LeafOpsSpliced

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:05:00 +08:00
weiihann
f75573751a phase 1
phase 2

reset
2026-02-12 16:25:06 +08:00
weiihann
fa159bdf4f use bitarray
modify keyToPath

add comment

add credit

clean up

more clean up

moree clean up

chore

moreee clean up

delete more unused methods

# Conflicts:
#	trie/bintrie/expired_node.go
#	trie/bintrie/expired_node_test.go
2026-02-12 15:17:10 +08:00
Sina M
9426444825
internal/era: update eraE type IDs to match spec (#33827)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Update to match the spec:
https://github.com/eth-clients/e2store-format-specs/pull/16

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2026-02-11 14:03:08 -07:00
Sina M
995fa79bf5
eth/tracers: tests for bad block tracing (#33821)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Fixes #30833
2026-02-11 16:25:42 +01:00
sashass1315
919b238c82
triedb/pathdb: return nodeLoc by value to avoid heap allocation (#33819) 2026-02-11 22:14:43 +08:00
Felix Lange
3011d83e6f
cmd/evm/internal/t8ntool, core/rawdb: fix RLP iterator error handling (#33820)
This fixes two cases where `Iterator.Err()` was misused. The method will
only return an error after `Next()` has returned false, so it makes no
sense to check for the error within the loop itself.
2026-02-11 14:50:39 +01:00
Felix Lange
341907cdb8
rlp: return Iterator as non-pointer (#33818)
Most uses of the iterator are like this:

    it, _ := rlp.NewListIterator(data)
    for it.Next() {
        do(it.Value())
    }

This doesn't require the iterator to be a pointer and it's better to
have it stack-allocated. AFAIK the compiler cannot prove it is OK to
stack-allocate when it is returned as a pointer because the methods of
`Iterator` use pointer receiver and also mutate the object.

The iterator type was not exported until very recently, so I think it is
still OK to change this API.
2026-02-11 14:50:24 +01:00
phrwlk
30656d714e
trie/bintrie: use correct key mapping in GetStorage and DeleteStorage (#33807)
GetStorage and DeleteStorage used GetBinaryTreeKey to compute the tree
key, while UpdateStorage used GetBinaryTreeKeyStorageSlot. The latter
applies storage slot remapping (header offset for slots <64, main
storage prefix for the rest), so reads and deletes were targeting
different tree locations than writes.

Replace GetBinaryTreeKey with GetBinaryTreeKeyStorageSlot in both
GetStorage and DeleteStorage to match UpdateStorage. Add a regression
test that verifies the write→read→delete→read round-trip for main
storage slots.
2026-02-11 11:42:17 +01:00
Ragnar
15a9e92bbd
ethclient/gethclient: callTracer methods (#31510)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Added methods `TraceCallWithCallTracer` and `TraceTransactionWithCallTracer`.

Fixes #28182

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2026-02-10 17:54:37 +01:00
sashass1315
4d4883731e
trie: fix embedded node size validation (#33803)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
The `decodeRef` function used `size > hashLen` to reject oversized
embedded nodes, but this incorrectly allowed nodes of exactly 32 bytes
through. The encoding side (hasher.go, stacktrie.go) consistently uses
`len(enc) < 32` to decide whether to embed a node inline, meaning nodes
of 32+ bytes are always hash-referenced. The error message itself
already stated `want size < 32`, confirming the intended threshold.
Changed `size > hashLen` to `size >= hashLen` in `decodeRef` to align
the decoding validation with the encoding logic, the Yellow Paper spec,
and the surrounding comments.
2026-02-10 22:05:39 +08:00
vickkkkkyy
e2d21d0e9c
ethdb/pebble: fix CompactionDebtConcurrency comment (#33805) 2026-02-10 21:48:23 +08:00
Felföldi Zsolt
986d115da7
eth: fix targetView==nil case (#33810)
This PR fixes a panic in a corner case situation when a `ChainEvent` is
received by `eth.Ethereum.updateFilterMapsHeads()` but the given chain
section does not exist in `BlockChain` any more. This can happen during
chain rewind because chain events are processed asynchronously. Ignoring
the event in this case is ok, the final event will point to the final
rewound head and the indexer will be updated.
Note that similar issues will not happen once we transition to
https://github.com/ethereum/go-ethereum/pull/32292 and the new indexer
built on top of this. Until then, the current fix should be fine.
2026-02-10 14:15:18 +01:00
Jonny Rhea
bbb1ab8d16
core/vm: 8024 tests should enforce explicit errors (#33787)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
This PR makes `TestEIP8024_Execution` verify explicit error types (e.g.,
`ErrStackUnderflow` vs `ErrInvalidOpCode`) rather than accepting any
error. It also fails fast on unexpected opcodes in the mini-interpreter
to avoid false positives from missing opcode handling.
2026-02-10 10:11:26 +08:00
Galoretka
7faa676b03
core/rawdb: close directory fd on Readdirnames error in cleanup (#33798) 2026-02-10 10:10:56 +08:00
vickkkkkyy
32a35bfcd3
cmd/geth: fix wrong flag names in influxdb metrics error messages (#33804) 2026-02-10 10:01:01 +08:00
shazam8253
c9b7ae422c
internal/era: New EraE implementation (#32157)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Here is a draft for the New EraE implementation. The code follows along
with the spec listed at https://hackmd.io/pIZlxnitSciV5wUgW6W20w.

---------

Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2026-02-09 08:30:19 -07:00
vickkkkkyy
c12959dc8c
core/rawdb: fix incorrect tail value in unindexTransactions log output (#33796)
Some checks are pending
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2026-02-09 15:49:53 +08:00
sashass1315
bc0db302ed
core/vm: add missing PUSH0 handler in EIP-8024 test mini-interpreter (#33785) 2026-02-09 15:39:55 +08:00
GarmashAlex
777265620d
core/rawdb: close freezer table in InspectFreezerTable (#33776)
Some checks failed
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Linux Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
2026-02-06 22:13:37 +08:00
Marius van der Wijden
ad459f4fac
metrics: reduce allocations for metrics (#33699)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
2026-02-06 20:26:31 +08:00
Forostovec
e64c8d8e26
core/rawdb: check pruning tail in HasBody and HasReceipts (#33747)
### Problem

`HasBody` and `HasReceipts` returned `true` for pruned blocks because
they only checked `isCanon()` which verifies the hash table — but
hash/header tables have `prunable: false` while body/receipt tables have
`prunable: true`.

After `TruncateTail()`, hashes still exist but bodies/receipts are gone.
This caused inconsistency: `HasBody()` returns `true`, but `ReadBody()`
returns `nil`.

### Changes

Both functions now check `db.Tail()` when the block is in ancient store.
If `number < tail`, the data has been pruned and the function correctly
returns `false`.

This aligns `HasBody`/`HasReceipts` behavior with
`ReadBody`/`ReadReceipts` and fixes potential issues in
`skeleton.linked()` which relies on these checks during sync.
2026-02-06 20:10:30 +08:00
vickkkkkyy
9967fb7c5c
metrics: add missing ResettingTimer case in GetAll() (#33749)
Follow-up to https://github.com/ethereum/go-ethereum/pull/33748

Same issue - ResettingTimer can be registered via loadOrRegister() but
GetAll() silently drops it during JSON export. The prometheus exporter
handles it fine (collector.go:70), so this is just an oversight in the
JSON path.

Note: ResettingTimer.Snapshot() resets the timer by design, which is
consistent with how the prometheus exporter uses it.
2026-02-06 20:07:55 +08:00
Csaba Kiraly
aa457eda4b
core/txpool/blobpool: reset counters and gapped on Clear (#33775)
Clear was only used in tests, but it was missing some of the cleanup.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2026-02-06 19:48:09 +08:00
Sina M
14c2408957
internal/ethapi: fix error code for revert in eth_simulateV1 (#33007)
The error code for revert should be consistent with eth_call and be 3.
2026-02-06 07:57:41 +01:00
Felix Lange
7b7be249cb
rlp: add RawList for working with un-decoded lists (#33755)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
This adds a new type wrapper that decodes as a list, but does not
actually decode the contents of the list. The type parameter exists as a
marker, and enables decoding the elements lazily. RawList can also be
used for building a list incrementally.
2026-02-04 20:16:24 +01:00
vickkkkkyy
6b82cef68f
metrics: add missing GaugeInfo case in GetAll() (#33748)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
GetAll did not return GaugeInfo metrics, which affects "chain/info" and "geth/info".
2026-02-04 13:19:50 +01:00
Marius van der Wijden
bba41f8072
core/txpool/legacypool: reduce unnecessary allocations during add (#33701)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
Not many allocs we save here, but it also cleans up the logic and should
speed up the process a tiny bit
2026-02-04 04:50:19 +01:00
Felix Lange
8e1de223ad
crypto/keccak: vendor in golang.org/x/crypto/sha3 (#33323)
The upstream libray has removed the assembly-based implementation of
keccak. We need to maintain our own library to avoid a peformance
regression.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2026-02-03 14:55:27 -07:00
Lessa
54a91b3ad8
core/types, internal/ethapi, signer/core/apitypes: avoid copying 128KB blobs in range loops (#33717)
Some checks are pending
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Linux Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
kzg4844.Blob is 131072 bytes. Using `for _, blob := range` copies the
entire blob on each iteration. With up to 6 blobs per transaction, this
wastes ~768KB of memory copies.

Switch to index-based iteration and pass pointers directly.
2026-02-03 21:36:59 +08:00
mmsqe
b9288765a3
accounts/usbwallet: add support for Ledger Nano Gen5 (#33297)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
adds support for the 0x0008 / 0x8000 product ID (Ledger Apex | Nano
Gen5).
2026-02-03 13:11:47 +01:00
Guillaume Ballet
19f37003fb
trie/bintrie: fix debug_executionWitness for binary tree (#33739)
The `Witness` method was not implemented for the binary tree, which
caused `debug_excutionWitness` to panic. This PR fixes that.

Note that the `TransitionTrie` version isn't implemented, and that's on
purpose: more thought must be given to what should go in the global
witness.
2026-02-03 12:19:40 +01:00
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