Skip to content
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

trie.Node type is not compatible with rlp.Extended though used in encode_node #1044

Open
ClementWalter opened this issue Dec 3, 2024 · 0 comments
Labels
A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem.

Comments

@ClementWalter
Copy link

ClementWalter commented Dec 3, 2024

Metadata

  • Hardfork: cancun

What was wrong?

The encode_node function signature is def encode_node(node: Node, storage_root: Optional[Bytes] = None) -> Bytes: with

Node = Union[
    Account, Bytes, LegacyTransaction, Receipt, Uint, U256, Withdrawal, None
]

The None in the Node definition makes it incompatible with the rlp.Extended type used in the body in rlp.encode(node).

Either Extended should have Optional or Node not have None.

See https://github.com/ethereum/execution-specs/blob/master/src/ethereum/cancun/trie.py#L154-L168

@ClementWalter ClementWalter added A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem. labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spec Area: specification C-bug Category: this is a bug, deviation, or other problem.
Projects
None yet
Development

No branches or pull requests

1 participant