Skip to content

Commit 6f60421

Browse files
committed
fix: compilation + clippy warnings
1 parent d0369ed commit 6f60421

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

  • aggregation_mode

aggregation_mode/aggregation_programs/sp1/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sp1_zkvm::entrypoint!(main);
33

44
use sha2::{Digest, Sha256};
55
use sha3::Keccak256;
6-
use sp1_aggregation_program::{Input, ProofInput};
6+
use sp1_aggregation_program::{Input, ProofDataInput};
77

88
fn combine_hashes(hash_a: &[u8; 32], hash_b: &[u8; 32]) -> [u8; 32] {
99
let mut hasher = Keccak256::new();
@@ -13,7 +13,7 @@ fn combine_hashes(hash_a: &[u8; 32], hash_b: &[u8; 32]) -> [u8; 32] {
1313
}
1414

1515
/// Computes the merkle root for the given proofs using the vk
16-
fn compute_merkle_root(proofs: &[ProofInput]) -> [u8; 32] {
16+
fn compute_merkle_root(proofs: &[ProofDataInput]) -> [u8; 32] {
1717
let mut leaves: Vec<[u8; 32]> = proofs
1818
.chunks(2)
1919
.map(|chunk| match chunk {
@@ -41,9 +41,9 @@ pub fn main() {
4141
let input = sp1_zkvm::io::read::<Input>();
4242

4343
// Verify the proofs.
44-
for proof in input.proofs.iter() {
44+
for proof in input.proofs_data.iter() {
4545
match proof {
46-
ProofInput::SP1Compressed(proof) => {
46+
ProofDataInput::SP1Compressed(proof) => {
4747
let vkey = proof.vk;
4848
let public_values = &proof.public_inputs;
4949
let public_values_digest = Sha256::digest(public_values);
@@ -52,7 +52,7 @@ pub fn main() {
5252
}
5353
}
5454

55-
let merkle_root = compute_merkle_root(&input.proofs);
55+
let merkle_root = compute_merkle_root(&input.proofs_data);
5656

5757
assert_eq!(merkle_root, input.merkle_root);
5858

aggregation_mode/src/backend/s3.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
use aligned_sdk::core::types::VerificationData;
22

33
#[derive(Debug)]
4+
#[allow(dead_code)]
45
pub enum GetBatchProofsError {
56
FetchingS3Batch(String),
67
Deserialization(String),
78
EmptyBody(String),
8-
StatusFailed(String),
9-
ReqwestClientFailed((u16, String)),
9+
StatusFailed((u16, String)),
10+
ReqwestClientFailed(String),
1011
}
1112

1213
// needed to make S3 bucket work
@@ -28,7 +29,11 @@ pub async fn get_aligned_batch_from_s3(
2829
if !response.status().is_success() {
2930
return Err(GetBatchProofsError::StatusFailed((
3031
response.status().as_u16(),
31-
response.status().canonical_reason(),
32+
response
33+
.status()
34+
.canonical_reason()
35+
.unwrap_or("")
36+
.to_string(),
3237
)));
3338
}
3439

0 commit comments

Comments
 (0)