import { LodestarError } from "@lodestar/utils";
import { GossipActionError } from "./gossipValidation.js";
export { BlobSidecarErrorCode };
var BlobSidecarErrorCode;
(function (BlobSidecarErrorCode) {
    BlobSidecarErrorCode["INDEX_TOO_LARGE"] = "BLOB_SIDECAR_ERROR_INDEX_TOO_LARGE";
    BlobSidecarErrorCode["INVALID_INDEX"] = "BLOB_SIDECAR_ERROR_INVALID_INDEX";
    /** !bls.KeyValidate(block.body.blob_kzg_commitments[i]) */
    BlobSidecarErrorCode["INVALID_KZG"] = "BLOB_SIDECAR_ERROR_INVALID_KZG";
    /** !verify_kzg_commitments_against_transactions(block.body.execution_payload.transactions, block.body.blob_kzg_commitments) */
    BlobSidecarErrorCode["INVALID_KZG_TXS"] = "BLOB_SIDECAR_ERROR_INVALID_KZG_TXS";
    /** sidecar.beacon_block_slot != block.slot */
    BlobSidecarErrorCode["INCORRECT_SLOT"] = "BLOB_SIDECAR_ERROR_INCORRECT_SLOT";
    /** BLSFieldElement in valid range (x < BLS_MODULUS) */
    BlobSidecarErrorCode["INVALID_BLOB"] = "BLOB_SIDECAR_ERROR_INVALID_BLOB";
    /** !bls.KeyValidate(blobs_sidecar.kzg_aggregated_proof) */
    BlobSidecarErrorCode["INVALID_KZG_PROOF"] = "BLOBS_SIDECAR_ERROR_INVALID_KZG_PROOF";
    // Validation errors when validating against an existing block
    /** Block and sidecars blob count mismatch */
    BlobSidecarErrorCode["INCORRECT_SIDECAR_COUNT"] = "BLOBS_SIDECAR_ERROR_INCORRECT_SIDECAR_COUNT";
    /** Sidecar doesn't match block */
    BlobSidecarErrorCode["INCORRECT_BLOCK"] = "BLOBS_SIDECAR_ERROR_INCORRECT_BLOCK";
    /** Sidecars proofs not valid */
    BlobSidecarErrorCode["INVALID_KZG_PROOF_BATCH"] = "BLOBS_SIDECAR_ERROR_INVALID_KZG_PROOF_BATCH";
    // following errors are adapted from the block errors
    BlobSidecarErrorCode["FUTURE_SLOT"] = "BLOB_SIDECAR_ERROR_FUTURE_SLOT";
    BlobSidecarErrorCode["WOULD_REVERT_FINALIZED_SLOT"] = "BLOB_SIDECAR_ERROR_WOULD_REVERT_FINALIZED_SLOT";
    BlobSidecarErrorCode["ALREADY_KNOWN"] = "BLOB_SIDECAR_ERROR_ALREADY_KNOWN";
    BlobSidecarErrorCode["PARENT_UNKNOWN"] = "BLOB_SIDECAR_ERROR_PARENT_UNKNOWN";
    BlobSidecarErrorCode["NOT_LATER_THAN_PARENT"] = "BLOB_SIDECAR_ERROR_NOT_LATER_THAN_PARENT";
    BlobSidecarErrorCode["PROPOSAL_SIGNATURE_INVALID"] = "BLOB_SIDECAR_ERROR_PROPOSAL_SIGNATURE_INVALID";
    BlobSidecarErrorCode["INCLUSION_PROOF_INVALID"] = "BLOB_SIDECAR_ERROR_INCLUSION_PROOF_INVALID";
    BlobSidecarErrorCode["INCORRECT_PROPOSER"] = "BLOB_SIDECAR_ERROR_INCORRECT_PROPOSER";
})(BlobSidecarErrorCode || (BlobSidecarErrorCode = {}));
export class BlobSidecarGossipError extends GossipActionError {
}
export class BlobSidecarValidationError extends LodestarError {
}
//# sourceMappingURL=blobSidecarError.js.map