Class Transaction4844
java.lang.Object
org.web3j.crypto.transaction.type.LegacyTransaction
org.web3j.crypto.transaction.type.Transaction2930
org.web3j.crypto.transaction.type.Transaction1559
org.web3j.crypto.transaction.type.Transaction4844
- All Implemented Interfaces:
ITransaction
EIP-4844 blob transaction (also extended for EIP-7594 / Fusaka PeerDAS).
Wire format variants:
- EIP-4844 network wrapper (Cancun/Prague):
rlp([tx_payload_body, blobs, commitments, proofs]) - EIP-7594 network wrapper (Fusaka/Osaka):
rlp([tx_payload_body, wrapper_version, blobs, commitments, cell_proofs])
EIP-7594 cell_proofs is a flat list of CELLS_PER_EXT_BLOB ×
len(blobs) 48-byte KZG proofs. CELLS_PER_EXT_BLOB = 128
(FIELD_ELEMENTS_PER_EXT_BLOB=8192 / FIELD_ELEMENTS_PER_CELL=64).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNumber of cells in an extended blob (EIP-7594 / PeerDAS).static final intExpected byte length of each KZG proof / commitment (G1 compressed point).static final intMaximum number of blobs per transaction (EIP-7594 spec requirement).static final BigIntegerOnly supported wrapper_version value per EIP-7594. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransaction4844(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) protectedTransaction4844(List<Blob> blobsData, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) protectedTransaction4844(List<Blob> blobsData, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList) protectedTransaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) protectedTransaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) protectedTransaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) -
Method Summary
Modifier and TypeMethodDescriptionList<org.web3j.rlp.RlpType> asRlpValues(Sign.SignatureData signatureData) Returns the RLP field list for the transaction payload body only (tx_payload_body).static Transaction4844createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create an EIP-7594 (Osaka/Fusaka) transaction directly from raw blobs.static Transaction4844createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) transaction directly from raw blobs, with an access list.static Transaction4844createTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create a tx-only EIP-4844 transaction (no sidecar, versioned hashes only).static Transaction4844createTransaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create a blob transaction with auto-computed commitments/proofs.static Transaction4844createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-4844 transaction with an explicit blob sidecar.static Transaction4844createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) Create an EIP-4844 transaction with an explicit blob sidecar and access list.static Transaction4844createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-7594 (Osaka/Fusaka) transaction with PeerDAS cell proofs.static Transaction4844createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) getBlobs()Returns the flat cell_proofs list for EIP-7594 transactions.List<org.web3j.rlp.RlpType> List<org.web3j.rlp.RlpType> Returns the RLP encoding of cell_proofs as a flat list of RlpStrings.List<org.web3j.rlp.RlpType> List<org.web3j.rlp.RlpType> List<org.web3j.rlp.RlpType> getType()List<org.apache.tuweni.bytes.Bytes> Methods inherited from class org.web3j.crypto.transaction.type.Transaction1559
createEtherTransaction, createTransaction, createTransaction, getGasPrice, getMaxFeePerGas, getMaxPriorityFeePerGasMethods inherited from class org.web3j.crypto.transaction.type.Transaction2930
createEtherTransaction, createTransaction, getAccessList, getChainId, rlpAccessListRlpMethods inherited from class org.web3j.crypto.transaction.type.LegacyTransaction
createContractTransaction, createEtherTransaction, createTransaction, createTransaction, getData, getGasLimit, getNonce, getTo, getValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.web3j.crypto.transaction.type.ITransaction
getData, getGasLimit, getGasPrice, getNonce, getTo, getValue
-
Field Details
-
CELLS_PER_EXT_BLOB
public static final int CELLS_PER_EXT_BLOBNumber of cells in an extended blob (EIP-7594 / PeerDAS).- See Also:
-
KZG_PROOF_BYTE_LENGTH
public static final int KZG_PROOF_BYTE_LENGTHExpected byte length of each KZG proof / commitment (G1 compressed point).- See Also:
-
WRAPPER_VERSION_1
Only supported wrapper_version value per EIP-7594. -
MAX_BLOBS_PER_TRANSACTION
public static final int MAX_BLOBS_PER_TRANSACTIONMaximum number of blobs per transaction (EIP-7594 spec requirement).- See Also:
-
-
Constructor Details
-
Transaction4844
protected Transaction4844(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) -
Transaction4844
protected Transaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) -
Transaction4844
protected Transaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) -
Transaction4844
protected Transaction4844(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) -
Transaction4844
protected Transaction4844(List<Blob> blobsData, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) -
Transaction4844
protected Transaction4844(List<Blob> blobsData, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList)
-
-
Method Details
-
asRlpValues
Returns the RLP field list for the transaction payload body only (tx_payload_body). When signatureData is not null, includes v/r/s and then delegates tobuildNetworkWrapper(Sign.SignatureData)to append the blob sidecar.- Specified by:
asRlpValuesin interfaceITransaction- Overrides:
asRlpValuesin classTransaction1559
-
createTransaction
public static Transaction4844 createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-4844 transaction with an explicit blob sidecar.- Parameters:
blobs- list of blobs (one per versioned hash)kzgCommitments- KZG commitments matching blobskzgProofs- one KZG proof per blobversionedHashes- blob versioned hashes derived from commitments
-
createTransaction
public static Transaction4844 createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> kzgProofs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) Create an EIP-4844 transaction with an explicit blob sidecar and access list.- Parameters:
blobs- list of blobs (one per versioned hash)kzgCommitments- KZG commitments matching blobskzgProofs- one KZG proof per blobversionedHashes- blob versioned hashes derived from commitmentsaccessList- optional EIP-2930 access list
-
createTransaction
public static Transaction4844 createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create an EIP-7594 (Osaka/Fusaka) transaction with PeerDAS cell proofs.- Parameters:
blobs- list of blobskzgCommitments- KZG commitments matching blobs (one per blob)cellProofs- flat list of cell proofs:CELLS_PER_EXT_BLOB * len(blobs)48-byte proofs in blob-major orderwrapperVersion- must beWRAPPER_VERSION_1(BigInteger.ONE)versionedHashes- blob versioned hashes derived from commitments
-
createTransaction
public static Transaction4844 createTransaction(List<Blob> blobs, List<org.apache.tuweni.bytes.Bytes> kzgCommitments, List<org.apache.tuweni.bytes.Bytes> cellProofs, BigInteger wrapperVersion, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes, List<AccessListObject> accessList) -
createTransaction
public static Transaction4844 createTransaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create a blob transaction with auto-computed commitments/proofs. -
createEip7594Transaction
public static Transaction4844 createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas) Create an EIP-7594 (Osaka/Fusaka) transaction directly from raw blobs. The KZG commitments, the flatCELLS_PER_EXT_BLOB * len(blobs)cell proofs, and the blob versioned hashes are all computed automatically viaBlobUtils.- Parameters:
blobs- the raw blobs
-
createEip7594Transaction
public static Transaction4844 createEip7594Transaction(List<Blob> blobs, long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<AccessListObject> accessList) Create an EIP-7594 (Osaka/Fusaka) transaction directly from raw blobs, with an access list. The KZG commitments, flat cell proofs, and versioned hashes are computed automatically.- Parameters:
blobs- the raw blobsaccessList- optional EIP-2930 access list
-
createTransaction
public static Transaction4844 createTransaction(long chainId, BigInteger nonce, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, BigInteger gasLimit, String to, BigInteger value, String data, BigInteger maxFeePerBlobGas, List<org.apache.tuweni.bytes.Bytes> versionedHashes) Create a tx-only EIP-4844 transaction (no sidecar, versioned hashes only). -
getMaxFeePerBlobGas
-
getVersionedHashes
-
getBlobs
-
getKzgCommitments
-
getKzgProofs
-
getWrapperVersion
-
getCellProofs
Returns the flat cell_proofs list for EIP-7594 transactions. Size =CELLS_PER_EXT_BLOB * len(blobs)when present. -
getRlpVersionedHashes
-
getRlpKzgCommitments
-
getRlpKzgProofs
-
getRlpBlobs
-
getRlpCellProofs
Returns the RLP encoding of cell_proofs as a flat list of RlpStrings. Each element is one 48-byte proof. EIP-7594 spec:cell_proofsis a flat list, NOT a list of lists. -
getType
- Specified by:
getTypein interfaceITransaction- Overrides:
getTypein classTransaction1559
-