Summary
The bintrie flat state implementation (stemData / per-stem KV storage in triedb/pathdb) has no reverse-diff representation in history_state.go. When a bintrie block is reverted (reorg, sidechain winner), the reverse diff only contains MPT-shaped accountOrigin / storageOrigin entries — there is no mechanism to roll back the corresponding stem entries in the bintrie flat state. The bintrie flat state and the actual state root silently diverge after any revert.
Summary
The bintrie flat state implementation (
stemData/ per-stem KV storage intriedb/pathdb) has no reverse-diff representation inhistory_state.go. When a bintrie block is reverted (reorg, sidechain winner), the reverse diff only contains MPT-shapedaccountOrigin/storageOriginentries — there is no mechanism to roll back the corresponding stem entries in the bintrie flat state. The bintrie flat state and the actual state root silently diverge after any revert.