Skip to content

Commit 3f5a56c

Browse files
committed
Increase constant size buffer, add function call to handle proof
1 parent d1e2170 commit 3f5a56c

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

crates/batcher/src/lib.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,22 +2398,9 @@ impl Batcher {
23982398
client_msg: &SubmitProofMessage,
23992399
ws_conn_sink: &WsMessageSink,
24002400
) -> bool {
2401-
let verification_data = match cbor_serialize(&client_msg.verification_data) {
2402-
Ok(data) => data,
2403-
// This should never happened, the user sent all his data serialized
2404-
Err(_) => {
2405-
error!("Proof serialization error");
2406-
send_message(
2407-
ws_conn_sink.clone(),
2408-
SubmitProofResponseMessage::Error("Proof serialization error".to_string()),
2409-
)
2410-
.await;
2411-
self.metrics.user_error(&["proof_serialization_error", ""]);
2412-
return false;
2413-
}
2414-
};
2401+
let verification_data_size = client_msg.verification_data.cbor_size_upper_bound();
24152402

2416-
if verification_data.len() > self.max_proof_size {
2403+
if verification_data_size > self.max_proof_size {
24172404
error!("Proof size exceeds the maximum allowed size.");
24182405
send_message(
24192406
ws_conn_sink.clone(),

0 commit comments

Comments
 (0)