Skip to content

Commit 974ce6a

Browse files
Fixes in the ProofAggregator builder
1 parent 9e3936d commit 974ce6a

File tree

1 file changed

+6
-13
lines changed
  • aggregation_mode/src/backend

1 file changed

+6
-13
lines changed

aggregation_mode/src/backend/mod.rs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub enum AggregatedProofSubmissionError {
5656
ZKVMAggregation(ProofAggregationError),
5757
BuildingMerkleRoot,
5858
MerkleRootMisMatch,
59-
BuildingVKHash(String),
6059
}
6160

6261
pub struct ProofAggregator {
@@ -106,22 +105,16 @@ impl ProofAggregator {
106105
ethrex_l2_rpc::signer::Signer::Local(EthrexLocalSigner::new(secret_key));
107106

108107
let sp1_chunk_aggregator_vk_hash_bytes: Bytes =
109-
hex::decode(self.config.sp1_chunk_aggregator_vk_hash.clone())
110-
.map_err(|e| AggregatedProofSubmissionError::BuildingVKHash(e.to_string()))?
108+
hex::decode(config.sp1_chunk_aggregator_vk_hash.clone())
109+
.expect("Failed to decode SP1 chunk aggregator VK hash")
111110
.try_into()
112-
.map_err(|_| {
113-
AggregatedProofSubmissionError::BuildingVKHash("VK hash is not 32 bytes".into())
114-
})?;
111+
.expect("VK hash is not 32 bytes");
115112

116113
let risc0_chunk_aggregator_image_id_bytes: Bytes =
117-
hex::decode(self.config.risc0_chunk_aggregator_image_id.clone())
118-
.map_err(|e| AggregatedProofSubmissionError::BuildingVKHash(e.to_string()))?
114+
hex::decode(config.risc0_chunk_aggregator_image_id.clone())
115+
.expect("Failed to decode Risc0 chunk aggregator image id")
119116
.try_into()
120-
.map_err(|_| {
121-
AggregatedProofSubmissionError::BuildingVKHash(
122-
"Risc0 image id is not 32 bytes".into(),
123-
)
124-
})?;
117+
.expect("Risc0 image id is not 32 bytes");
125118

126119
Self {
127120
engine,

0 commit comments

Comments
 (0)