From 158169f87b332692cc9c5b8846d294f7773eca08 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Sun, 1 Sep 2024 16:45:30 +0530 Subject: [PATCH 01/13] added eip 7702 schema and authlist in receipt schema --- src/schemas/receipt.yaml | 23 +++++++++++++ src/schemas/transaction.yaml | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 68261104b..b5fc2400d 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -119,3 +119,26 @@ ReceiptInfo: title: blob gas price description: The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' +AuthorizationList: + type: object + title: Authorizations List + + chainId: + title: chainId + description: Chain ID that this transaction is valid on. + $ref: '#/components/schemas/uint' + nonce: + title: nonce + $ref: '#/components/schemas/uint64' + address: + $ref: '#/components/schemas/address' + yParity: + title: yParity + description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + $ref: '#/components/schemas/uint' + r: + title: r + $ref: '#/components/schemas/uint' + s: + title: s + $ref: '#/components/schemas/uint' diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 52a9b5928..7c158527d 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -1,3 +1,68 @@ +Transaction7702Unsigned: + type: object + title: EIP-7702 transaction. + required: + - type + - nonce + - gas + - value + - input + - maxFeePerGas + - maxPriorityFeePerGas + - gasPrice + - chainId + - accessList + - authorization list + properties: + type: + title: type + type: string + pattern: ^0x2$ + nonce: + title: nonce + $ref: '#/components/schemas/uint' + to: + title: to address + oneOf: + - title: Contract Creation (null) + type: 'null' + - title: Address + $ref: '#/components/schemas/address' + gas: + title: gas limit + $ref: '#/components/schemas/uint' + value: + title: value + $ref: '#/components/schemas/uint' + input: + title: input data + $ref: '#/components/schemas/bytes' + maxPriorityFeePerGas: + title: max priority fee per gas + description: Maximum fee per gas the sender is willing to pay to miners in wei + $ref: '#/components/schemas/uint' + maxFeePerGas: + title: max fee per gas + description: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei + $ref: '#/components/schemas/uint' + gasPrice: + title: gas price + description: The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward. + $ref: '#/components/schemas/uint' + accessList: + title: accessList + description: EIP-2930 access lists + $ref: '#/components/schemas/AccessList' + chainId: + title: chainId + description: Chain ID that this transaction is valid on. + $ref: '#/components/schemas/uint' + authorization list: + title: authorization list + description: List of authorizations associated with the transaction. + type: array + items: + $ref: '#/components/schemas/AuthorizationList' Transaction4844Unsigned: type: object title: EIP-4844 transaction. From 0ecc040c3d62083b145018dba8d38ea21b88c2d6 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Mon, 2 Sep 2024 13:48:22 +0530 Subject: [PATCH 02/13] lightclient suggestions applied --- src/schemas/receipt.yaml | 24 +------------------- src/schemas/transaction.yaml | 44 +++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index b5fc2400d..074684a39 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -119,26 +119,4 @@ ReceiptInfo: title: blob gas price description: The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' -AuthorizationList: - type: object - title: Authorizations List - - chainId: - title: chainId - description: Chain ID that this transaction is valid on. - $ref: '#/components/schemas/uint' - nonce: - title: nonce - $ref: '#/components/schemas/uint64' - address: - $ref: '#/components/schemas/address' - yParity: - title: yParity - description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. - $ref: '#/components/schemas/uint' - r: - title: r - $ref: '#/components/schemas/uint' - s: - title: s - $ref: '#/components/schemas/uint' + diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 7c158527d..648ffe28d 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -1,17 +1,19 @@ -Transaction7702Unsigned: +Transaction7702Signed: type: object title: EIP-7702 transaction. required: - type - nonce + - to - gas - value - input - - maxFeePerGas - maxPriorityFeePerGas - - gasPrice - - chainId + - maxFeePerGas + - maxFeePerBlobGas - accessList + - blobVersionedHashes + - chainId - authorization list properties: type: @@ -45,9 +47,9 @@ Transaction7702Unsigned: title: max fee per gas description: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei $ref: '#/components/schemas/uint' - gasPrice: - title: gas price - description: The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward. + maxFeePerBlobGas: + title: max fee per blob gas + description: The maximum total fee per gas the sender is willing to pay for blob gas in wei $ref: '#/components/schemas/uint' accessList: title: accessList @@ -57,12 +59,28 @@ Transaction7702Unsigned: title: chainId description: Chain ID that this transaction is valid on. $ref: '#/components/schemas/uint' - authorization list: - title: authorization list - description: List of authorizations associated with the transaction. - type: array - items: - $ref: '#/components/schemas/AuthorizationList' + authorizationList: + type: object + title: Authorizations List + chainId: + title: chainId + description: Chain ID that this transaction is valid on. + $ref: '#/components/schemas/uint' + nonce: + title: nonce + $ref: '#/components/schemas/uint64' + address: + $ref: '#/components/schemas/address' + yParity: + title: yParity + description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + $ref: '#/components/schemas/uint' + r: + title: r + $ref: '#/components/schemas/uint' + s: + title: s + $ref: '#/components/schemas/uint' Transaction4844Unsigned: type: object title: EIP-4844 transaction. From 132e169ca3fe1135351c62aea1da67282a537a48 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Mon, 2 Sep 2024 13:50:00 +0530 Subject: [PATCH 03/13] space removed --- src/schemas/receipt.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 074684a39..68261104b 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -119,4 +119,3 @@ ReceiptInfo: title: blob gas price description: The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' - From 8d43c26207bf3c8463b457527ff9f808f7c37489 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Tue, 3 Sep 2024 09:36:36 +0530 Subject: [PATCH 04/13] added authlist type and applied suggestion --- src/schemas/transaction.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 648ffe28d..abf8b043a 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -14,7 +14,7 @@ Transaction7702Signed: - accessList - blobVersionedHashes - chainId - - authorization list + - authorizationlist properties: type: title: type @@ -60,15 +60,21 @@ Transaction7702Signed: description: Chain ID that this transaction is valid on. $ref: '#/components/schemas/uint' authorizationList: - type: object + title: authorizationList + $ref: '#/components/schemas/AuthorizationList' +AuthorizationList: + title: Authorization List + description: List of authorizations for the transaction. + type: array + items: title: Authorizations List chainId: title: chainId - description: Chain ID that this transaction is valid on. + description: Chain ID on which this transaction is valid. $ref: '#/components/schemas/uint' nonce: title: nonce - $ref: '#/components/schemas/uint64' + $ref: '#/components/schemas/uint' address: $ref: '#/components/schemas/address' yParity: @@ -405,6 +411,7 @@ TransactionLegacySigned: $ref: '#/components/schemas/uint' TransactionSigned: oneOf: + - $ref: '#/components/schemas/Transaction7702Signed' - $ref: '#/components/schemas/Transaction4844Signed' - $ref: '#/components/schemas/Transaction1559Signed' - $ref: '#/components/schemas/Transaction2930Signed' From eee7971f6df1ab64be0f4152db5b5b822bd02ac6 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Tue, 3 Sep 2024 15:03:55 +0530 Subject: [PATCH 05/13] fixed issues and made it tuple --- src/schemas/transaction.yaml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index abf8b043a..906d5263b 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -1,6 +1,6 @@ Transaction7702Signed: type: object - title: EIP-7702 transaction. + title: EIP-7702 transaction required: - type - nonce @@ -57,20 +57,21 @@ Transaction7702Signed: $ref: '#/components/schemas/AccessList' chainId: title: chainId - description: Chain ID that this transaction is valid on. + description: Chain ID that this transaction is valid on $ref: '#/components/schemas/uint' authorizationList: - title: authorizationList - $ref: '#/components/schemas/AuthorizationList' + title: authorizationList + $ref: '#/components/schemas/AuthorizationList' AuthorizationList: title: Authorization List - description: List of authorizations for the transaction. + description: List of authorizations for the transaction type: array - items: - title: Authorizations List + items: + type: object + properties: chainId: title: chainId - description: Chain ID on which this transaction is valid. + description: Chain ID on which this transaction is valid $ref: '#/components/schemas/uint' nonce: title: nonce @@ -79,7 +80,7 @@ AuthorizationList: $ref: '#/components/schemas/address' yParity: title: yParity - description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature $ref: '#/components/schemas/uint' r: title: r @@ -87,6 +88,13 @@ AuthorizationList: s: title: s $ref: '#/components/schemas/uint' + required: + - chainId + - nonce + - address + - yParity + - r + - s Transaction4844Unsigned: type: object title: EIP-4844 transaction. @@ -140,13 +148,13 @@ Transaction4844Unsigned: $ref: '#/components/schemas/AccessList' blobVersionedHashes: title: blobVersionedHashes - description: List of versioned blob hashes associated with the transaction's EIP-4844 data blobs. + description: List of versioned blob hashes associated with the transaction's EIP-4844 data blobs type: array items: $ref: '#/components/schemas/hash32' chainId: title: chainId - description: Chain ID that this transaction is valid on. + description: Chain ID that this transaction is valid on $ref: '#/components/schemas/uint' AccessListEntry: title: Access list entry From 9501466dd347322822a975d3c321fba3a210b68a Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Tue, 10 Sep 2024 02:28:18 +0530 Subject: [PATCH 06/13] suggestion applied --- src/schemas/transaction.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 906d5263b..5c7401d4f 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -59,7 +59,7 @@ Transaction7702Signed: title: chainId description: Chain ID that this transaction is valid on $ref: '#/components/schemas/uint' - authorizationList: + authList: title: authorizationList $ref: '#/components/schemas/AuthorizationList' AuthorizationList: From 030f607ee8ea6a6dcdca3017162bc12d16d624ae Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Mon, 30 Sep 2024 20:27:04 +0530 Subject: [PATCH 07/13] jochem-brouwer suggestions applied --- src/schemas/transaction.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 5c7401d4f..b8f9b2e57 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -12,24 +12,19 @@ Transaction7702Signed: - maxFeePerGas - maxFeePerBlobGas - accessList - - blobVersionedHashes - chainId - authorizationlist properties: type: title: type type: string - pattern: ^0x2$ + pattern: ^0x4$ nonce: title: nonce $ref: '#/components/schemas/uint' to: title: to address - oneOf: - - title: Contract Creation (null) - type: 'null' - - title: Address - $ref: '#/components/schemas/address' + $ref: '#/components/schemas/address' gas: title: gas limit $ref: '#/components/schemas/uint' From f68d03d9abf5d5de4efb7e97781a42da695723c0 Mon Sep 17 00:00:00 2001 From: Md Amaan <114795592+Redidacove@users.noreply.github.com> Date: Tue, 8 Oct 2024 21:38:26 +0530 Subject: [PATCH 08/13] fixed typo in authorizationlist Co-authored-by: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com> --- src/schemas/transaction.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index b8f9b2e57..9f2d2d67c 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -13,7 +13,7 @@ Transaction7702Signed: - maxFeePerBlobGas - accessList - chainId - - authorizationlist + - authorizationList properties: type: title: type From ba7f6efaf224651a847005da47f6dbe5c9215853 Mon Sep 17 00:00:00 2001 From: Md Amaan Date: Wed, 9 Oct 2024 08:45:10 +0530 Subject: [PATCH 09/13] removed maxfeePerBlob --- src/schemas/transaction.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 9f2d2d67c..c2ca77854 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -10,7 +10,6 @@ Transaction7702Signed: - input - maxPriorityFeePerGas - maxFeePerGas - - maxFeePerBlobGas - accessList - chainId - authorizationList @@ -42,10 +41,6 @@ Transaction7702Signed: title: max fee per gas description: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei $ref: '#/components/schemas/uint' - maxFeePerBlobGas: - title: max fee per blob gas - description: The maximum total fee per gas the sender is willing to pay for blob gas in wei - $ref: '#/components/schemas/uint' accessList: title: accessList description: EIP-2930 access lists From d0be264010d651139852079f5465145018953bca Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 06:52:24 -0600 Subject: [PATCH 10/13] tests: add 7702 tests Co-authored-by: pellekrab <78560773+PelleKrab@users.noreply.github.com> --- tests/eth_getTransactionByHash/get-authlist-tx.io | 3 +++ tests/eth_getTransactionReceipt/get-auth-list.io | 3 +++ tests/eth_sendRawTransaction/send-authorization-list-tx.io | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 tests/eth_getTransactionByHash/get-authlist-tx.io create mode 100644 tests/eth_getTransactionReceipt/get-auth-list.io create mode 100644 tests/eth_sendRawTransaction/send-authorization-list-tx.io diff --git a/tests/eth_getTransactionByHash/get-authlist-tx.io b/tests/eth_getTransactionByHash/get-authlist-tx.io new file mode 100644 index 000000000..8820d070a --- /dev/null +++ b/tests/eth_getTransactionByHash/get-authlist-tx.io @@ -0,0 +1,3 @@ +// gets a authorization list transaction +>> {"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e"]} +<< {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x5204c8e7c8a14bcbd6031520d70b2531999f4f8d587603659f1fb1c82935bcd4","blockNumber":"0x3","from":"0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f","gas":"0x186a0","gasPrice":"0x281d620e","maxFeePerGas":"0x281d620e","maxPriorityFeePerGas":"0x1","hash":"0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e","input":"0x3f446a7c4145b1f0656d6974","nonce":"0x9","to":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","transactionIndex":"0x1","value":"0x3","type":"0x4","accessList":[{"address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","storageKeys":["0x0000000000000000000000000000000000000000000000000000000000000000","0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456"]}],"chainId":"0xc72dd9d5e883e","authorizationList":[{"chainId":"0x1","address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","nonce":"0x1","v":"0x0","r":"0xb9a9724fca45b21dbc84ac9c0be479e2780a83c96b579877eaf256c5005811c0","s":"0x36e39cca69a5256235f38cb2f8cd7a61829aff39439fca1c1cf5b55dfbb116a"}],"v":"0x1","r":"0xcd2bc1d83a0aed04c06b641e5c93a3112c29a45edab4b12f834b2f41c269e0d5","s":"0xcd7d25d1c29fa7f722865ba3aae5a88651eddfeadc88dc37d6c0ec6b9be77d7","yParity":"0x1"}} diff --git a/tests/eth_getTransactionReceipt/get-auth-list.io b/tests/eth_getTransactionReceipt/get-auth-list.io new file mode 100644 index 000000000..989e81245 --- /dev/null +++ b/tests/eth_getTransactionReceipt/get-auth-list.io @@ -0,0 +1,3 @@ +// gets an authorization list transaction +>> {"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e"]} +<< {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x5204c8e7c8a14bcbd6031520d70b2531999f4f8d587603659f1fb1c82935bcd4","blockNumber":"0x3","contractAddress":null,"cumulativeGasUsed":"0x1f6e0","effectiveGasPrice":"0x281d620e","from":"0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f","gasUsed":"0x12c44","logs":[{"address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","topics":["0x00000000000000000000000000000000000000000000000000000000656d6974","0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456"],"data":"0x0000000000000000000000000000000000000000000000000000000000000003","blockNumber":"0x3","transactionHash":"0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e","transactionIndex":"0x1","blockHash":"0x5204c8e7c8a14bcbd6031520d70b2531999f4f8d587603659f1fb1c82935bcd4","logIndex":"0x1","removed":false}],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000200000000000000004000000000002000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000","status":"0x1","to":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","transactionHash":"0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e","transactionIndex":"0x1","type":"0x4"}} diff --git a/tests/eth_sendRawTransaction/send-authorization-list-tx.io b/tests/eth_sendRawTransaction/send-authorization-list-tx.io new file mode 100644 index 000000000..557f90bcc --- /dev/null +++ b/tests/eth_sendRawTransaction/send-authorization-list-tx.io @@ -0,0 +1,3 @@ +// sends a authorization list transaction +>> {"jsonrpc":"2.0","id":1,"method":"eth_sendRawTransaction","params":["0x04f90131870c72dd9d5e883e808201f48404419d3e83013880947dcd17433742f4c0ca53122ab541d0ba67fc27df8080f85bf859947dcd17433742f4c0ca53122ab541d0ba67fc27dff842a00000000000000000000000000000000000000000000000000000000000000000a00100000000000000000000000000000000000000000000000000000000000000f863f861870c72dd9d5e883e947dcd17433742f4c0ca53122ab541d0ba67fc27df8080a08074cb63170a7bd4df6c3a6d9a16c11fab4fa036c9ae75d3b66b1d91672f9757a00dcf14df506fe8e636266602e0f95be6c61f52b316d7c4ebece6ddc25079d56e80a0b60ff0cda09fd67894d4f9923badc8a8efa82a3d0f09c8fb954b70d5d2de614ea04cf7436b81a664533d3c912c54d2300dbb9d326716302a382068a62af1244ad3"]} +<< {"jsonrpc":"2.0","id":1,"result":"0x69b856be7b1ee3c82820bf8b8f98a1d69b5b1d9574c87995091cc7d755464504"} From b45ec2e7986b26dfcb099077669418d7ff791379 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 07:10:00 -0600 Subject: [PATCH 11/13] add unsigned 7702 tx --- src/schemas/transaction.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index c2ca77854..25cabcb11 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -1,4 +1,4 @@ -Transaction7702Signed: +Transaction7702Unsigned: type: object title: EIP-7702 transaction required: @@ -49,7 +49,7 @@ Transaction7702Signed: title: chainId description: Chain ID that this transaction is valid on $ref: '#/components/schemas/uint' - authList: + authorizationList: title: authorizationList $ref: '#/components/schemas/AuthorizationList' AuthorizationList: @@ -312,10 +312,32 @@ TransactionLegacyUnsigned: $ref: '#/components/schemas/uint' TransactionUnsigned: oneOf: + - $ref: '#/components/schemas/Transaction7702Unsigned' - $ref: '#/components/schemas/Transaction4844Unsigned' - $ref: '#/components/schemas/Transaction1559Unsigned' - $ref: '#/components/schemas/Transaction2930Unsigned' - $ref: '#/components/schemas/TransactionLegacyUnsigned' +Transaction7702Signed: + title: Signed 7702 Transaction + type: object + allOf: + - $ref: '#/components/schemas/Transaction7702Unsigned' + - title: EIP-7702 transaction signature properties. + required: + - yParity + - r + - s + properties: + yParity: + title: yParity + description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + $ref: '#/components/schemas/uint' + r: + title: r + $ref: '#/components/schemas/uint' + s: + title: s + $ref: '#/components/schemas/uint' Transaction4844Signed: title: Signed 4844 Transaction type: object From d8cc5061e852e4e4446450a2253dd33e229b9c28 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 07:18:03 -0600 Subject: [PATCH 12/13] eth: add authorization list to generic tx --- src/schemas/transaction.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 25cabcb11..56cfde356 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -531,3 +531,7 @@ GenericTransaction: title: chainId description: Chain ID that this transaction is valid on. $ref: '#/components/schemas/uint' + authorizationList: + title: authorizationList + description: EIP-7702 authorization list + $ref: '#/components/schemas/AuthorizationList' From 0f0de96208d5a301e3b3dc583dc13b925125a714 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 07:18:23 -0600 Subject: [PATCH 13/13] tests: fixup v value to use name yParity --- tests/eth_getTransactionByHash/get-authlist-tx.io | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/eth_getTransactionByHash/get-authlist-tx.io b/tests/eth_getTransactionByHash/get-authlist-tx.io index 8820d070a..31de43743 100644 --- a/tests/eth_getTransactionByHash/get-authlist-tx.io +++ b/tests/eth_getTransactionByHash/get-authlist-tx.io @@ -1,3 +1,3 @@ // gets a authorization list transaction >> {"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e"]} -<< {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x5204c8e7c8a14bcbd6031520d70b2531999f4f8d587603659f1fb1c82935bcd4","blockNumber":"0x3","from":"0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f","gas":"0x186a0","gasPrice":"0x281d620e","maxFeePerGas":"0x281d620e","maxPriorityFeePerGas":"0x1","hash":"0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e","input":"0x3f446a7c4145b1f0656d6974","nonce":"0x9","to":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","transactionIndex":"0x1","value":"0x3","type":"0x4","accessList":[{"address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","storageKeys":["0x0000000000000000000000000000000000000000000000000000000000000000","0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456"]}],"chainId":"0xc72dd9d5e883e","authorizationList":[{"chainId":"0x1","address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","nonce":"0x1","v":"0x0","r":"0xb9a9724fca45b21dbc84ac9c0be479e2780a83c96b579877eaf256c5005811c0","s":"0x36e39cca69a5256235f38cb2f8cd7a61829aff39439fca1c1cf5b55dfbb116a"}],"v":"0x1","r":"0xcd2bc1d83a0aed04c06b641e5c93a3112c29a45edab4b12f834b2f41c269e0d5","s":"0xcd7d25d1c29fa7f722865ba3aae5a88651eddfeadc88dc37d6c0ec6b9be77d7","yParity":"0x1"}} +<< {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x5204c8e7c8a14bcbd6031520d70b2531999f4f8d587603659f1fb1c82935bcd4","blockNumber":"0x3","from":"0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f","gas":"0x186a0","gasPrice":"0x281d620e","maxFeePerGas":"0x281d620e","maxPriorityFeePerGas":"0x1","hash":"0x3025fd75c0ac8a05f4c50fb15225d7d8ce17ba0aa60b560d02805ae97b6c033e","input":"0x3f446a7c4145b1f0656d6974","nonce":"0x9","to":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","transactionIndex":"0x1","value":"0x3","type":"0x4","accessList":[{"address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","storageKeys":["0x0000000000000000000000000000000000000000000000000000000000000000","0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456"]}],"chainId":"0xc72dd9d5e883e","authorizationList":[{"chainId":"0x1","address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","nonce":"0x1","yParity":"0x0","r":"0xb9a9724fca45b21dbc84ac9c0be479e2780a83c96b579877eaf256c5005811c0","s":"0x36e39cca69a5256235f38cb2f8cd7a61829aff39439fca1c1cf5b55dfbb116a"}],"v":"0x1","r":"0xcd2bc1d83a0aed04c06b641e5c93a3112c29a45edab4b12f834b2f41c269e0d5","s":"0xcd7d25d1c29fa7f722865ba3aae5a88651eddfeadc88dc37d6c0ec6b9be77d7","yParity":"0x1"}}