You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@slotted_freezable
@dataclass
class LeafNode:
"""Leaf node in the Merkle Trie"""
rest_of_key: Bytes
value: rlp.Extended
@slotted_freezable
@dataclass
class ExtensionNode:
"""Extension node in the Merkle Trie"""
key_segment: Bytes
subnode: rlp.Extended
rest_of_key and key_segment should be Nibble (type to create) instead of Bytes, as it's not true that any bytes. can be in (see for example encode_internal_node where it crashes in nibble_list_to_compact(node.rest_of_key, True)
The text was updated successfully, but these errors were encountered:
similar indeed, the idea is that one should be able to check nibble at "compile" time. But I'd go with what you have already with FixedUint and use a Nibble or Nibbles = List[Uint4]
Metadata
What was wrong?
https://github.com/ethereum/execution-specs/blob/master/src/ethereum/cancun/trie.py#L80-L95
rest_of_key
andkey_segment
should beNibble
(type to create) instead ofBytes
, as it's not true that any bytes. can be in (see for exampleencode_internal_node
where it crashes innibble_list_to_compact(node.rest_of_key, True)
The text was updated successfully, but these errors were encountered: