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

Add EIP-4844 transaction and receipt #398

Merged
merged 13 commits into from
Oct 14, 2023
4 changes: 3 additions & 1 deletion src/eth/submit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/schemas/receipt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ ReceiptInfo:
title: gas used
description: The amount of gas used for this specific transaction alone.
$ref: '#/components/schemas/uint'
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
description: The contract address created, if the transaction was a contract creation, otherwise null.
Expand All @@ -109,5 +113,9 @@ 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'
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'
100 changes: 100 additions & 0 deletions src/schemas/transaction.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
Transaction4844Unsigned:
type: object
title: EIP-4844 transaction.
required:
- type
- nonce
- to
- gas
- value
- input
- maxPriorityFeePerGas
- maxFeePerGas
- maxFeePerBlobGas
- accessList
- blobVersionedHashes
- 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
Expand Down Expand Up @@ -164,9 +225,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
Expand Down Expand Up @@ -239,6 +322,7 @@ TransactionLegacySigned:
$ref: '#/components/schemas/uint'
TransactionSigned:
oneOf:
- $ref: '#/components/schemas/Transaction4844Signed'
- $ref: '#/components/schemas/Transaction1559Signed'
- $ref: '#/components/schemas/Transaction2930Signed'
- $ref: '#/components/schemas/TransactionLegacySigned'
Expand Down Expand Up @@ -313,10 +397,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.
Expand Down
Loading