Skip to content

test(tests): add RLP canonical Uint decoding test#3210

Open
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:test/rlp-uint-leading-zeros
Open

test(tests): add RLP canonical Uint decoding test#3210
Kumarutkarsh9470 wants to merge 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:test/rlp-uint-leading-zeros

Conversation

@Kumarutkarsh9470

Copy link
Copy Markdown

Cover decoding RLP into Uint: canonical encodings (including 0 as the empty byte string) decode to the expected value, and encodings that carry a non-canonical leading zero byte raise DecodingError. This locks in the strict, client-matching behavior of the ethereum-rlp dependency.

Fixes #2202.

Description

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

coala bear

Cover decoding RLP into `Uint`: canonical encodings (including `0` as
the empty byte string) decode to the expected value, and encodings that
carry a non-canonical leading zero byte raise `DecodingError`. This
locks in the strict, client-matching behavior of the `ethereum-rlp`
dependency.

Fixes ethereum#2202.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test for decoding RLP -> Uint with leading zeros

1 participant