-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move trie key utils methods from besu to besu-verkle-trie #80
move trie key utils methods from besu to besu-verkle-trie #80
Conversation
Signed-off-by: Karim Taam <[email protected]>
|
return Bytes32.wrap(CODE_OFFSET.add(UInt256.fromBytes(chunkId)).divide(VERKLE_NODE_WIDTH)); | ||
} | ||
|
||
public static List<Bytes32> getCodeChunkTrieKeyIndexes(final Bytes code) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: getCodeChunkKeyTrieIndexes
?
To be consistent with other methods.
Or drop the Trie
altogether from the methods because it's irrelevant since they are already inside a class called TrieKeyUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modifed the name and used getCodeChunkKeyTrieIndexes
} | ||
} | ||
|
||
public static List<Bytes32> getStorageKeyTrieIndexes(final List<Bytes32> storageSlotKeys) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in Besu there was an Optional
check to get the actual slotKey (Bytes32
) out of a SlotStorageKey
object, but I guess you'll handle that in Besu?
From Besu:
public List<Bytes32> generateStorageKeyIds(final Set<StorageSlotKey> storageSlotKeys) {
return storageSlotKeys.stream()
.map(
// --> storageSlotKey ->
// --> trieKeyAdapter.getStorageKeyTrieIndex(storageSlotKey.getSlotKey().orElseThrow()))
.map(Bytes32::wrap)
.toList();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I will handle that in besu
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
PR description
Another small cleaning by moving methods from Besu to Besu-verkle-trie
Fixed Issue(s)