NethermindEth / nethermind

A robust execution client for Ethereum node operators.
https://nethermind.io/nethermind-client
GNU General Public License v3.0
1.24k stars 429 forks source link

[Pectra] EIP-7702 transaction RLP decoding issue #7236

Closed lattejed closed 3 months ago

lattejed commented 3 months ago

Hello!

We're currently testing your pectra branch in a private devnet

We're encountering an RLP decoding issue related to the authorization_list that has been added to EIP-7702 transactions

I believe (looking at https://github.com/NethermindEth/nethermind/pull/7232) you're using a version of the authorization_list from an earlier draft of the EIP

Current version here: https://eips.ethereum.org/EIPS/eip-7702

The current version of the authorization_list is:

authorization_list = [[chain_id, address, [nonce], y_parity, r, s], ...]

The nonce parameter is optional where an empty list is used for 'not required'

We're using the version represented by this (kurtosis):

participants:
  - el_type: nethermind
    el_image: nethermindeth/nethermind:pectra
...
ak88 commented 3 months ago

Hello @lattejed, could you link the test data that was used here?

lattejed commented 3 months ago

raw tx (type 4 with a populated authorization list):

0x04f90175833018240084163ef00185081527974c830186a09417435cce3d1b4fa2e5f8a08ed921d57c6762a18080b8a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005900b4b46bdaa835f8e4b4d8e208b6559cd26785105100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004eeb7286600000000000000c0f85ff85d8330182494b4b46bdaa835f8e4b4d8e208b6559cd267851051c080a03e1ea897d26698d1e342dff293ead942ae41be02549eb54e09ea510eb3c7d5e3a0449653038eb637f928df0d77195be967171afeca5e253dba1159807b23d0bf6d01a053f78d696c02835727cdbb95f67342f08c90487120292fc0defd0941fafb25f5a038e71213689e675b1bd6b04f6d64b68684d78caa55b06cf6bbb336454cd94940
lattejed commented 3 months ago

fyi, we put this together for generating new tx types for testing:

https://github.com/otim-xyz/tx-util

ak88 commented 3 months ago

raw tx (type 4 with a populated authorization list):

0x04f90175833018240084163ef00185081527974c830186a09417435cce3d1b4fa2e5f8a08ed921d57c6762a18080b8a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005900b4b46bdaa835f8e4b4d8e208b6559cd26785105100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004eeb7286600000000000000c0f85ff85d8330182494b4b46bdaa835f8e4b4d8e208b6559cd267851051c080a03e1ea897d26698d1e342dff293ead942ae41be02549eb54e09ea510eb3c7d5e3a0449653038eb637f928df0d77195be967171afeca5e253dba1159807b23d0bf6d01a053f78d696c02835727cdbb95f67342f08c90487120292fc0defd0941fafb25f5a038e71213689e675b1bd6b04f6d64b68684d78caa55b06cf6bbb336454cd94940

Thanks! Looks like the nonce in this tx starts with 0, which is not valid RLP encoding. Did the tx nonce and auth tuple nonce get mixed up?

lattejed commented 3 months ago

@ak88 i believe you're right. we haven't been checking nonces anywhere. i'll double check that raw tx and share a new version with you

lattejed commented 3 months ago

@ak88 keen eye, problem with how we're generating these in a bash script, nonce should be 80

0x04f90175833018248084163ef00185081527974c830186a09417435cce3d1b4fa2e5f8a08ed921d57c6762a18080b8a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005900b4b46bdaa835f8e4b4d8e208b6559cd26785105100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004eeb7286600000000000000c0f85ff85d8330182494b4b46bdaa835f8e4b4d8e208b6559cd267851051c080a03e1ea897d26698d1e342dff293ead942ae41be02549eb54e09ea510eb3c7d5e3a0449653038eb637f928df0d77195be967171afeca5e253dba1159807b23d0bf6d01a053f78d696c02835727cdbb95f67342f08c90487120292fc0defd0941fafb25f5a038e71213689e675b1bd6b04f6d64b68684d78caa55b06cf6bbb336454cd94940
ak88 commented 3 months ago

@ak88 keen eye, problem with how we're generating these in a bash script, nonce should be 80

0x04f90175833018248084163ef00185081527974c830186a09417435cce3d1b4fa2e5f8a08ed921d57c6762a18080b8a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005900b4b46bdaa835f8e4b4d8e208b6559cd26785105100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004eeb7286600000000000000c0f85ff85d8330182494b4b46bdaa835f8e4b4d8e208b6559cd267851051c080a03e1ea897d26698d1e342dff293ead942ae41be02549eb54e09ea510eb3c7d5e3a0449653038eb637f928df0d77195be967171afeca5e253dba1159807b23d0bf6d01a053f78d696c02835727cdbb95f67342f08c90487120292fc0defd0941fafb25f5a038e71213689e675b1bd6b04f6d64b68684d78caa55b06cf6bbb336454cd94940

Just tested this RLP with our decoders on Prague branch and it works fine, creating a null nonce in the authority tuple.

Closing this one as resolved..