From eb249d4763d85284657c9827a26a2b12ff7e176a Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:26:15 -0500 Subject: [PATCH 01/13] Add dataGasUsed to receipt --- src/schemas/receipt.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index aeb192c90..a32a9ab5c 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -48,6 +48,7 @@ ReceiptInfo: - transactionHash - transactionIndex - effectiveGasPrice + - dataGasUsed additionalProperties: false properties: type: @@ -84,6 +85,13 @@ ReceiptInfo: title: gas used description: The amount of gas used for this specific transaction alone. $ref: '#/components/schemas/uint' + dataGasUsed: + title: data gas used + description: The amount of data gas used for this specification transaction alone + oneOf: + - $ref: '#/components/schemas/uint' + - name: Null + type: "null" contractAddress: title: contract address description: The contract address created, if the transaction was a contract creation, otherwise null. From d27889d66e91b4522fbe533db6031697482366e2 Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:45:26 -0500 Subject: [PATCH 02/13] Make dataGasUsed optional --- src/schemas/receipt.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index a32a9ab5c..a8246465c 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -48,7 +48,6 @@ ReceiptInfo: - transactionHash - transactionIndex - effectiveGasPrice - - dataGasUsed additionalProperties: false properties: type: @@ -87,11 +86,8 @@ ReceiptInfo: $ref: '#/components/schemas/uint' dataGasUsed: title: data gas used - description: The amount of data gas used for this specification transaction alone - oneOf: - - $ref: '#/components/schemas/uint' - - name: Null - type: "null" + description: The amount of data gas used for this specification transaction + $ref: '#/components/schemas/uint' contractAddress: title: contract address description: The contract address created, if the transaction was a contract creation, otherwise null. From 74baadd693db5d7c5bed13cae6f59da42cbbc199 Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:47:54 -0400 Subject: [PATCH 03/13] Add dataGasPrice --- src/schemas/receipt.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index a8246465c..16215a57a 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -86,7 +86,7 @@ ReceiptInfo: $ref: '#/components/schemas/uint' dataGasUsed: title: data gas used - description: The amount of data gas used for this specification transaction + description: The amount of data gas used for this specification transaction. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' contractAddress: title: contract address @@ -115,3 +115,7 @@ ReceiptInfo: title: effective gas price description: The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas). $ref: '#/components/schemas/uint' + dataGasPrice: + title: data gas price + description: The actual value per gas deducted from the senders account for data gas. Only specified for blob transactions as defined by EIP-4844. + $ref: '#/components/schemas/uint' From 3d659f2c10911e033b6c593df617428a847e8d6c Mon Sep 17 00:00:00 2001 From: acolytec3 Date: Wed, 21 Jun 2023 21:59:22 -0400 Subject: [PATCH 04/13] Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane --- src/schemas/receipt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 16215a57a..268a4c033 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -86,7 +86,7 @@ ReceiptInfo: $ref: '#/components/schemas/uint' dataGasUsed: title: data gas used - description: The amount of data gas used for this specification transaction. Only specified for blob transactions as defined by EIP-4844. + description: The amount of data gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' contractAddress: title: contract address From 7c6470c4e8241df0b790780ad02f1b7b6ed04b33 Mon Sep 17 00:00:00 2001 From: acolytec3 Date: Wed, 21 Jun 2023 21:59:28 -0400 Subject: [PATCH 05/13] Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane --- src/schemas/receipt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 268a4c033..c01c4bd92 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -113,7 +113,7 @@ ReceiptInfo: $ref: '#/components/schemas/uint' effectiveGasPrice: title: effective gas price - description: The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas). + description: The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas). $ref: '#/components/schemas/uint' dataGasPrice: title: data gas price From b84f421e02e37470c3d96356c2b92414d2958ff6 Mon Sep 17 00:00:00 2001 From: acolytec3 Date: Wed, 21 Jun 2023 21:59:39 -0400 Subject: [PATCH 06/13] Update src/schemas/receipt.yaml Co-authored-by: Sally MacFarlane --- src/schemas/receipt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index c01c4bd92..5af277c28 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -117,5 +117,5 @@ ReceiptInfo: $ref: '#/components/schemas/uint' dataGasPrice: title: data gas price - description: The actual value per gas deducted from the senders account for data gas. Only specified for blob transactions as defined by EIP-4844. + description: The actual value per gas deducted from the sender's account for data gas. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' From 42bcd11e4b41ed3b36ae890711d31224b2282a63 Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Fri, 28 Jul 2023 08:52:04 -0400 Subject: [PATCH 07/13] rename data gas to blob gas - eip 7354 --- src/schemas/receipt.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 5af277c28..41a1b0f19 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -84,9 +84,9 @@ ReceiptInfo: title: gas used description: The amount of gas used for this specific transaction alone. $ref: '#/components/schemas/uint' - dataGasUsed: - title: data gas used - description: The amount of data gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844. + blobGasUsed: + title: blob gas used + description: The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844. $ref: '#/components/schemas/uint' contractAddress: title: contract address @@ -115,7 +115,7 @@ ReceiptInfo: title: effective gas price description: The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas). $ref: '#/components/schemas/uint' - dataGasPrice: - title: data gas price - description: The actual value per gas deducted from the sender's account for data gas. Only specified for blob transactions as defined by EIP-4844. + blobGasPrice: + 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 a4ec5998c5a5743acbb5b73ac52c8e4331aac9fe Mon Sep 17 00:00:00 2001 From: lightclient Date: Tue, 5 Sep 2023 07:56:08 -0600 Subject: [PATCH 08/13] schemas/tx: add 4844 tx --- src/schemas/transaction.yaml | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index a1c2342a9..92cb87ac8 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -1,3 +1,63 @@ +Transaction4844Unsigned: + type: object + title: EIP-4844 transaction. + required: + - type + - nonce + - address + - gas + - value + - input + - maxPriorityFeePerGas + - maxFeePerGas + - maxFeePerBlobGas + - accessList + - chainId + properties: + type: + title: type + $ref: '#/components/schemas/byte' + nonce: + title: nonce + $ref: '#/components/schemas/uint' + to: + title: to 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' + 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 list + $ref: '#/components/schemas/AccessList' + blobVersionedHashes: + title: blobVersionedHashes + 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. + $ref: '#/components/schemas/uint' AccessListEntry: title: Access list entry type: object @@ -164,9 +224,31 @@ TransactionLegacyUnsigned: $ref: '#/components/schemas/uint' TransactionUnsigned: oneOf: + - $ref: '#/components/schemas/Transaction4844Unsigned' - $ref: '#/components/schemas/Transaction1559Unsigned' - $ref: '#/components/schemas/Transaction2930Unsigned' - $ref: '#/components/schemas/TransactionLegacyUnsigned' +Transaction4844Signed: + title: Signed 4844 Transaction + type: object + allOf: + - $ref: '#/components/schemas/Transaction4844Unsigned' + - title: EIP-4844 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' Transaction1559Signed: title: Signed 1559 Transaction type: object @@ -239,6 +321,7 @@ TransactionLegacySigned: $ref: '#/components/schemas/uint' TransactionSigned: oneOf: + - $ref: '#/components/schemas/Transaction4844Signed' - $ref: '#/components/schemas/Transaction1559Signed' - $ref: '#/components/schemas/Transaction2930Signed' - $ref: '#/components/schemas/TransactionLegacySigned' From eca7487bfa51fa620aed9fcbf7ec0fe51d5fda3a Mon Sep 17 00:00:00 2001 From: lightclient Date: Tue, 5 Sep 2023 07:56:36 -0600 Subject: [PATCH 09/13] schemas/tx: add 4844 blob fields to generic transaction --- src/schemas/transaction.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 92cb87ac8..7fcaf8a19 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -396,10 +396,26 @@ GenericTransaction: 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 list $ref: '#/components/schemas/AccessList' + blobVersionedHashes: + title: blobVersionedHashes + description: List of versioned blob hashes associated with the transaction's EIP-4844 data blobs. + type: array + items: + $ref: '#/components/schemas/hash32' + blobs: + title: blobs + description: Raw blob data. + type: array + items: + $ref: '#/components/schemas/bytes' chainId: title: chainId description: Chain ID that this transaction is valid on. From b2002ee23166c2b4a75c39cc36f6c9a04890920f Mon Sep 17 00:00:00 2001 From: lightclient Date: Tue, 5 Sep 2023 09:20:16 -0600 Subject: [PATCH 10/13] eth/submit: make note that 4844 txs must be in network form for sendRawTransaction --- src/eth/submit.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eth/submit.yaml b/src/eth/submit.yaml index 000e2bfe6..eec5b1d78 100644 --- a/src/eth/submit.yaml +++ b/src/eth/submit.yaml @@ -10,7 +10,9 @@ schema: $ref: '#/components/schemas/hash32' - name: eth_sendRawTransaction - summary: Submits a raw transaction. + summary: Submits a raw transaction. For EIP-4844 transactions, the raw form + must be the network form. This means it includes the blobs, KZG + commitments, and KZG proofs. params: - name: Transaction required: true From db28871c7d3ff4002845493d916c6103bd472a30 Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 13 Oct 2023 20:10:49 -0600 Subject: [PATCH 11/13] schemas: fix typo in 4844 tx uint ref --- src/schemas/transaction.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 7fcaf8a19..cce465014 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -43,7 +43,7 @@ Transaction4844Unsigned: 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' + $ref: '#/components/schemas/uint' accessList: title: accessList description: EIP-2930 access list @@ -399,7 +399,7 @@ GenericTransaction: 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' + $ref: '#/components/schemas/uint' accessList: title: accessList description: EIP-2930 access list From 66cffd38b3ad8bfad004d07d36824a7c498d3761 Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 13 Oct 2023 20:18:38 -0600 Subject: [PATCH 12/13] schemas: remove some extra spacing --- src/schemas/receipt.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/receipt.yaml b/src/schemas/receipt.yaml index 41a1b0f19..eb7b8ced5 100644 --- a/src/schemas/receipt.yaml +++ b/src/schemas/receipt.yaml @@ -87,7 +87,7 @@ ReceiptInfo: blobGasUsed: title: blob gas used description: The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844. - $ref: '#/components/schemas/uint' + $ref: '#/components/schemas/uint' contractAddress: title: contract address description: The contract address created, if the transaction was a contract creation, otherwise null. @@ -118,4 +118,4 @@ ReceiptInfo: blobGasPrice: 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' + $ref: '#/components/schemas/uint' From de766b3f4179ba50f98b2bb9456da88c4c61c44d Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 13 Oct 2023 20:24:31 -0600 Subject: [PATCH 13/13] schema: update required fields for blob tx repr --- src/schemas/transaction.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index cce465014..52a9b5928 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -4,7 +4,7 @@ Transaction4844Unsigned: required: - type - nonce - - address + - to - gas - value - input @@ -12,6 +12,7 @@ Transaction4844Unsigned: - maxFeePerGas - maxFeePerBlobGas - accessList + - blobVersionedHashes - chainId properties: type: