use ethrex_common::types::{
Block, blobs_bundle, block_execution_witness::ExecutionWitness, fee_config::FeeConfig,
};
use rkyv::{Archive, Deserialize as RDeserialize, Serialize as RSerialize};
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
pub use ethrex_common::types::prover::{
ProofBytes, ProofData, ProofFormat, ProverOutput, ProverType,
};
pub fn verifier_getter(prover_type: ProverType) -> Option<&'static str> {
match prover_type {
ProverType::RISC0 => Some("REQUIRE_RISC0_PROOF()"),
ProverType::SP1 => Some("REQUIRE_SP1_PROOF()"),
ProverType::TDX => Some("REQUIRE_TDX_PROOF()"),
ProverType::Exec => None,
}
}
#[serde_as]
#[derive(Serialize, Deserialize, RDeserialize, RSerialize, Archive)]
pub struct ProverInputData {
pub blocks: Vec<Block>,
pub execution_witness: ExecutionWitness,
pub elasticity_multiplier: u64,
#[serde_as(as = "[_; 48]")]
pub blob_commitment: blobs_bundle::Commitment,
#[serde_as(as = "[_; 48]")]
pub blob_proof: blobs_bundle::Proof,
pub fee_configs: Vec<FeeConfig>,
}