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

fix: ensure consumed == payload_length #15

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Oct 23, 2024

Motivation

Looks like without this check we may decode incorrectly encoded authorization list

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@klkvr
Copy link
Member Author

klkvr commented Oct 23, 2024

e.g right now we decode this as correct EIP-7702 tx:

04f901348501a3ca344a0884ee6b280e8477359407019400000000000000000000000000000000000000008080c0f8c5f8628501a3ca344a9415d34aaf54267db7d7c367839aaf71a00a2c6a650901a0d3bd4308956e27ad3ef72df1f9d20ecb4fcd37c3b1231e6f4d36eaf6cc4594e2a00aad7f9aa92f746f9caa747297bb16fdeae69f9ba5a094332a6c6bfaa3e3f135f86288f85f8501a3ca344a9423618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f0a01a0ebcd9cc4aa22a9e6850277016d5e786fbfb7c5589969273becb16c929d5fde95a03a9b35cfdcbf75484c9c238625d76ddc782e7c2fbda9c0ee3db029d47facd7fa01a00784b0750730f2344129cf4c708c5282e3756a629df2537dc89bff4bda328729a04a97c3ad41675cdc0320676ca2699e55f30ada0ac65a15fe801a1ee49582770c

while it is actually invalid rlp

unsure if we might be missing those checks anywhere else

@mattsse mattsse merged commit c89466b into main Oct 23, 2024
26 checks passed
@mattsse mattsse deleted the klkvr/rlp-check-len branch October 23, 2024 09:25
@klkvr klkvr self-assigned this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants