From 8e34a59eee2e19551fbfc406580fccfaaa49997d 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 8134fd58b..de2cee0a8 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 7105a08cb88c9df72b18d12084ac69d551c24764 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 de2cee0a8..c1fdfcf2f 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 c92a5d5df22930a4fff0ff4c18b6033218e8f372 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 7972d811620172b56374fd7edec432a2d815bb5a 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 c1fdfcf2f..bd875b249 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: @@ -409,6 +415,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 d3b70ce5ebee596b7f3a8e5470915ee2ebb8192c 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 bd875b249..d7ce387ed 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. @@ -141,13 +149,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 4135379a6144bf965c4ef621eab4c9b9f3da22e8 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 d7ce387ed..f894bff99 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 ed4db39199c8ec1e452c4a7422fdb84090fa0209 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 f894bff99..c48fa597c 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 53c536630c02900694cff69aa19b05451b472e57 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 c48fa597c..d0c366687 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 336e5490a4866ec4f104ce06bf105c93f8cc352f 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 d0c366687..9cfdf180c 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 4fd85a53cceb329570bdfa3f2b007599b5e9fd90 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 07:10:00 -0600 Subject: [PATCH 10/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 9cfdf180c..f16661f35 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: @@ -316,10 +316,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 46762e548b225dd6eb5e6987a397419c95a3799b Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 10 Oct 2024 07:18:03 -0600 Subject: [PATCH 11/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 f16661f35..401ae7b07 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -535,3 +535,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 a2026d5065b018e1294f34f410a4449b7d29697c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 18 Dec 2024 19:45:21 +0100 Subject: [PATCH 12/13] update types of authorization signature values --- src/schemas/transaction.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 401ae7b07..9560c2050 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -71,13 +71,13 @@ AuthorizationList: yParity: title: yParity description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' r: title: r - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/uint256' s: title: s - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/uint256' required: - chainId - nonce From d2078b85ce6a3bf9bea888339df044a9f36f2cd5 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 18 Dec 2024 20:15:51 +0100 Subject: [PATCH 13/13] add back 'v' and 'gasPrice' for backwards-compatibility --- src/schemas/transaction.yaml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 9560c2050..38afc0a1d 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -41,6 +41,10 @@ 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. + $ref: '#/components/schemas/uint' accessList: title: accessList description: EIP-2930 access lists @@ -133,6 +137,10 @@ Transaction4844Unsigned: 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' + 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 list @@ -335,7 +343,11 @@ Transaction7702Signed: yParity: title: yParity description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' + v: + title: v + description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`. + $ref: '#/components/schemas/byte' r: title: r $ref: '#/components/schemas/uint' @@ -356,7 +368,11 @@ Transaction4844Signed: yParity: title: yParity description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' + v: + title: v + description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`. + $ref: '#/components/schemas/byte' r: title: r $ref: '#/components/schemas/uint' @@ -377,11 +393,11 @@ Transaction1559Signed: yParity: title: yParity description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' v: title: v description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' r: title: r $ref: '#/components/schemas/uint' @@ -402,11 +418,11 @@ Transaction2930Signed: yParity: title: yParity description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' v: title: v description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/byte' r: title: r $ref: '#/components/schemas/uint'