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(eip7702): Add correct rlp decode/encode #1034

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Conversation

rakita
Copy link
Contributor

@rakita rakita commented Jul 10, 2024

eip7702 AuthorizationList rlp format is not correct.

The format that gets encoded is: 0xf85ed801940000000000000000000000000000000000000006c101f8431ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804
That decoded is:
[["0x01","0x0000000000000000000000000000000000000006",["0x01"]],["0x1b","0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353","0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"]]
https://toolkit.abdk.consulting/ethereum#rlp

There are two inner lists that should not be there.

Removed Generic over SignedAuthorization as it seems it is not needed. We default to Signature (can revert back if this is not the case)

@rakita rakita changed the title chore: add failing test fix(eip7702): Add correct rlp decode/encode Jul 11, 2024
@rakita rakita marked this pull request as ready for review July 11, 2024 00:28
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

removing the generic seems appropriate

@mattsse mattsse merged commit 5d8dce4 into main Jul 11, 2024
22 checks passed
@mattsse mattsse deleted the rakita/auth_list_rlp_test branch July 11, 2024 05:40
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* chore: add failing test

* fix(eip7702): Add correct rlp decode/encode

* clippy fmt

* fmt

* can be const
j75689 pushed a commit to bnb-chain/alloy that referenced this pull request Aug 1, 2024
* chore: add failing test

* fix(eip7702): Add correct rlp decode/encode

* clippy fmt

* fmt

* can be const
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.

2 participants