go-ethereum/core/state/partial
CPerezz b5d9b12e70
core/state/partial: fix storage value encoding in trie updates
Trim leading zeros from storage values before passing to UpdateStorage,
matching the upstream BALStateTransition behavior. UpdateStorage
RLP-encodes the value internally, so passing untrimmed 32-byte values
(e.g. [0,0,...,5]) produces different trie nodes than trimmed values
([5]), causing systematic state root mismatches on every BAL-processed
block.

BuildStateSet already correctly trimmed values for the pathdb layer;
this fix aligns the trie update path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 12:13:05 +02:00
..
filter.go core/state: add hash-based filter methods and NewPartialStateSync 2026-04-17 11:09:19 +02:00
filter_test.go core/state: add hash-based filter methods and NewPartialStateSync 2026-04-17 11:09:19 +02:00
history.go core, eth: PR review fixes and remove stateRoot field from PartialState 2026-04-17 12:12:46 +02:00
state.go core/state/partial: fix storage value encoding in trie updates 2026-04-17 12:13:05 +02:00
state_test.go core, eth: PR review fixes and remove stateRoot field from PartialState 2026-04-17 12:12:46 +02:00