Skip to content

Commit c6e7bee

Browse files
committed
fix: agg mode batcher use agg mode sdk
1 parent bb0e9ac commit c6e7bee

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

aggregation_mode/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aggregation_mode/batcher/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77
serde = { workspace = true }
88
serde_json = { workspace = true }
99
serde_yaml = { workspace = true }
10+
agg_mode_sdk = { path = "../sdk"}
1011
aligned-sdk = { workspace = true }
1112
sp1-sdk = { workspace = true }
1213
tracing = { version = "0.1", features = ["log"] }

aggregation_mode/batcher/src/server/http.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use actix_web::{
88
web::{self, Data},
99
App, HttpRequest, HttpResponse, HttpServer, Responder,
1010
};
11-
use aligned_sdk::aggregation_layer::{self, AggregationModeProvingSystem};
11+
use aligned_sdk::aggregation_layer::AggregationModeProvingSystem;
1212
use alloy::signers::Signature;
1313
use sp1_sdk::{SP1ProofWithPublicValues, SP1VerifyingKey};
1414
use sqlx::types::BigDecimal;
@@ -111,13 +111,14 @@ impl BatcherServer {
111111
.json(AppResponse::new_unsucessfull("Internal server error", 500));
112112
};
113113

114-
let msg = aggregation_layer::gateway::types::SubmitSP1ProofMessage::new(
114+
// reconstruct message and recover address
115+
let msg = agg_mode_sdk::gateway::types::SubmitSP1ProofMessage::new(
115116
data.nonce.0,
116117
proof_content.clone(),
117118
vk_content.clone(),
118119
);
119120
let Ok(recovered_address) = signature.recover_address_from_prehash(
120-
&msg.eip712_hash(&aligned_sdk::common::types::Network::Devnet)
121+
&msg.eip712_hash(&agg_mode_sdk::types::Network::Devnet)
121122
.into(),
122123
) else {
123124
return HttpResponse::InternalServerError()

0 commit comments

Comments
 (0)