trie: use bitarray for path encoding#562
trie: use bitarray for path encoding#562weiihann wants to merge 10 commits intogballet:archival-state-expiryfrom
Conversation
gballet
left a comment
There was a problem hiding this comment.
There are a lot of methods we don't need, I recommend removing them so that the amount of code to review is smaller, and also if it's merged into geth, we don't get a ton of AI-generated PRs removing dead code one line at a time.
| b.len = n | ||
|
|
||
| switch { | ||
| case n == 0: |
There was a problem hiding this comment.
hmmm, this means that you can not copy the full 256 bits of a bit array, because 0 means copying no bit, and n is in the 0..255 range
There was a problem hiding this comment.
we don't care about it until we change the tree structure, but this is definitely an option for the researchers. So we don't have to fix it right now, but it might be necessary later.
There was a problem hiding this comment.
I'll leave it for now
gballet
left a comment
There was a problem hiding this comment.
Found some potential issues, ptal
|
Most of the comments were applied on unused methods. Although they might be useful in the future, for the sake of time I've removed them for now. We can always add them back later. |
Fixes #559
Mostly ported the implementation from https://github.com/NethermindEth/juno/blob/main/core/trie/bitarray.go (I implemented this 1 year ago).