Skip to content

Commit d09103d

Browse files
committed
Align prover_type changes with PR #6157 to avoid merge conflicts: use todo!()
for ZisK and OpenVM backends (no ProverType variant exists for them yet) and call self.backend.prover_type() directly instead of storing it as a field.
1 parent 2f6108e commit d09103d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

crates/l2/prover/src/backend/openvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl ProverBackend for OpenVmBackend {
6565
type SerializedInput = StdIn;
6666

6767
fn prover_type(&self) -> ProverType {
68-
ProverType::Exec
68+
todo!("No ProverType variant exists for OpenVM yet")
6969
}
7070

7171
fn serialize_input(&self, input: &ProgramInput) -> Result<Self::SerializedInput, BackendError> {

crates/l2/prover/src/backend/zisk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl ProverBackend for ZiskBackend {
114114
type SerializedInput = ();
115115

116116
fn prover_type(&self) -> ProverType {
117-
ProverType::Exec
117+
todo!("No ProverType variant exists for ZisK yet")
118118
}
119119

120120
fn serialize_input(&self, input: &ProgramInput) -> Result<Self::SerializedInput, BackendError> {

crates/l2/prover/src/prover.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
};
55
use ethrex_guest_program::input::ProgramInput;
66
use ethrex_l2::sequencer::utils::get_git_commit_hash;
7-
use ethrex_l2_common::prover::{BatchProof, ProofData, ProofFormat, ProverType};
7+
use ethrex_l2_common::prover::{BatchProof, ProofData, ProofFormat};
88
use std::time::Duration;
99
use tokio::{
1010
io::{AsyncReadExt, AsyncWriteExt},
@@ -62,18 +62,15 @@ struct Prover<B: ProverBackend> {
6262
proof_coordinator_endpoints: Vec<Url>,
6363
proving_time_ms: u64,
6464
commit_hash: String,
65-
prover_type: ProverType,
6665
}
6766

6867
impl<B: ProverBackend> Prover<B> {
6968
pub fn new(backend: B, cfg: &ProverConfig) -> Self {
70-
let prover_type = backend.prover_type();
7169
Self {
7270
backend,
7371
proof_coordinator_endpoints: cfg.proof_coordinators.clone(),
7472
proving_time_ms: cfg.proving_time_ms,
7573
commit_hash: get_git_commit_hash(),
76-
prover_type,
7774
}
7875
}
7976

@@ -121,7 +118,8 @@ impl<B: ProverBackend> Prover<B> {
121118

122119
async fn request_new_input(&self, endpoint: &Url) -> Result<Option<ProverData>, String> {
123120
// Request the input with the correct batch_number
124-
let request = ProofData::batch_request(self.commit_hash.clone(), self.prover_type);
121+
let request =
122+
ProofData::batch_request(self.commit_hash.clone(), self.backend.prover_type());
125123
let response = connect_to_prover_server_wr(endpoint, &request)
126124
.await
127125
.map_err(|e| format!("Failed to get Response: {e}"))?;

0 commit comments

Comments
 (0)