Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed May 3, 2024
1 parent 3b03d4e commit c9a78bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 5 additions & 7 deletions crates/consensus/src/transaction/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,9 @@ impl TxEip4844Variant {
pub fn validate(
&self,
proof_settings: &c_kzg::KzgSettings,
) -> Result<(), alloy_eips::eip4844::BlobTransactionValidationError> {
) -> Result<(), BlobTransactionValidationError> {
match self {
TxEip4844Variant::TxEip4844(_) => {
Err(alloy_eips::eip4844::BlobTransactionValidationError::MissingSidecar)
}
TxEip4844Variant::TxEip4844(_) => Err(BlobTransactionValidationError::MissingSidecar),
TxEip4844Variant::TxEip4844WithSidecar(tx) => tx.validate_blob(proof_settings),
}
}
Expand Down Expand Up @@ -396,8 +394,8 @@ impl TxEip4844 {
/// Verifies that the given blob data, commitments, and proofs are all valid for this
/// transaction.
///
/// Takes as input the [KzgSettings], which should contain the parameters derived from the
/// KZG trusted setup.
/// Takes as input the [KzgSettings](c_kzg::KzgSettings), which should contain the parameters
/// derived from the KZG trusted setup.
///
/// This ensures that the blob transaction payload has the same number of blob data elements,
/// commitments, and proofs. Each blob data element is verified against its commitment and
Expand All @@ -411,7 +409,7 @@ impl TxEip4844 {
&self,
sidecar: &BlobTransactionSidecar,
proof_settings: &c_kzg::KzgSettings,
) -> Result<(), alloy_eips::eip4844::BlobTransactionValidationError> {
) -> Result<(), BlobTransactionValidationError> {
sidecar.validate(&self.blob_versioned_hashes, proof_settings)
}

Expand Down
3 changes: 1 addition & 2 deletions crates/eips/src/eip4844/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ pub enum BlobTransactionValidationError {
KZGError(c_kzg::Error),
/// The inner transaction is not a blob transaction.
NotBlobTransaction(u8),
/// Using a standalone [TxEip4844] instead of the [TxEip4844WithSidecar] variant, which
/// includes the sidecar for validation.
/// Error variant for thrown by EIP-4844 tx variants without a sidecar.
MissingSidecar,
/// The versioned hash is incorrect.
WrongVersionedHash {
Expand Down

0 comments on commit c9a78bf

Please sign in to comment.