feat: use BitArray for bit-packed trie node path encoding#21
Draft
weiihann wants to merge 1 commit into
Draft
Conversation
Port the key encoding optimization from go-ethereum's binary trie (go-ethereum@c01a0eaa) to state-actor. Trie node DB keys now use bit-packed paths (ceil(depth/8) bytes) instead of byte-per-bit (depth bytes), reducing key size up to 8x. Changes: - makePath uses bintrie.BitArray for bit-packed path construction - regroupTrieNodes rewritten with DFS-based depth tracking and BitArray child navigation (bit-packed paths are depth-ambiguous) - Stem move batch ordering: deletes before puts to prevent key collisions across depths - go.mod: replace directive for local go-ethereum with BitArray - Rename EnableVerkleAtGenesis -> EnableUBTAtGenesis (upstream API) - Update golden hashes for upstream big-endian slot key hashing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the key encoding optimization from go-ethereum's binary trie (go-ethereum@c01a0eaa) to state-actor. Trie node DB keys now use bit-packed paths (ceil(depth/8) bytes) instead of byte-per-bit (depth bytes), reducing key size up to 8x.
Changes:
Depends on ethereum/go-ethereum#34772