go-ethereum/trie
Martin HS c8c8d6c403
trie: add edgecase for rangeproof correctness (#31667)
This PR adds checking for an edgecase which theoretically can happen in
the range-prover. Right now, we check that a key does not overwrite a
previous one by checking that the key is increasing. However, if keys
are of different lengths, it is possible to create a key which is
increasing _and_ overwrites the previous key. Example: `0xaabbcc`
followed by `0xaabbccdd`.

This can not happen in go-ethereum, which always uses fixed-size paths
for accounts and storage slot paths in the trie, but it might happen if
the range prover is used without guaranteed fixed-size keys.

This PR also adds some testcases for the errors that are expected.
2025-04-28 14:37:02 +08:00
..
trienode all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
utils all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
bytepool.go trie: reduce allocations in stacktrie (#30743) 2025-01-23 10:17:12 +01:00
committer.go trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
database_test.go
encoding.go trie: reduce allocations in stacktrie (#30743) 2025-01-23 10:17:12 +01:00
encoding_test.go
errors.go
hasher.go trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
iterator.go
iterator_test.go
node.go trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
node_enc.go trie: reduce allocations in stacktrie (#30743) 2025-01-23 10:17:12 +01:00
node_test.go
proof.go trie: add edgecase for rangeproof correctness (#31667) 2025-04-28 14:37:02 +08:00
proof_test.go trie: add edgecase for rangeproof correctness (#31667) 2025-04-28 14:37:02 +08:00
secure_trie.go trie: copy preimage store pointer in StateTrie.Copy (#31158) 2025-02-12 09:55:00 +08:00
secure_trie_test.go
stacktrie.go trie: reduce allocations in stacktrie (#30743) 2025-01-23 10:17:12 +01:00
stacktrie_fuzzer_test.go trie: do not expect ordering in stacktrie during fuzzing (#31170) 2025-02-18 10:48:42 +08:00
stacktrie_test.go trie: reduce allocations in stacktrie (#30743) 2025-01-23 10:17:12 +01:00
sync.go
sync_test.go
tracer.go
tracer_test.go
trie.go trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
trie_id.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
trie_reader.go triedb/pathdb: configure different node hasher in pathdb (#31008) 2025-01-10 20:51:19 +08:00
trie_test.go trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
verkle.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
verkle_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00