ethrex_l2_common/
prover.rs1use ethrex_common::types::{
2 Block, blobs_bundle, block_execution_witness::ExecutionWitness, fee_config::FeeConfig,
3};
4use rkyv::{Archive, Deserialize as RDeserialize, Serialize as RSerialize};
5use serde::{Deserialize, Serialize};
6use serde_with::serde_as;
7
8pub use ethrex_common::types::prover::{
11 ProofBytes, ProofData, ProofFormat, ProverOutput, ProverType,
12};
13
14pub fn verifier_getter(prover_type: ProverType) -> Option<&'static str> {
18 match prover_type {
19 ProverType::RISC0 => Some("REQUIRE_RISC0_PROOF()"),
20 ProverType::SP1 => Some("REQUIRE_SP1_PROOF()"),
21 ProverType::TDX => Some("REQUIRE_TDX_PROOF()"),
22 ProverType::Exec => None,
23 }
24}
25
26#[serde_as]
27#[derive(Serialize, Deserialize, RDeserialize, RSerialize, Archive)]
28pub struct ProverInputData {
29 pub blocks: Vec<Block>,
30 pub execution_witness: ExecutionWitness,
31 pub elasticity_multiplier: u64,
32 #[serde_as(as = "[_; 48]")]
33 pub blob_commitment: blobs_bundle::Commitment,
34 #[serde_as(as = "[_; 48]")]
35 pub blob_proof: blobs_bundle::Proof,
36 pub fee_configs: Vec<FeeConfig>,
37}