Skip to content

Commit a51d234

Browse files
committed
julian's comments
1 parent a43e0bb commit a51d234

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

batcher/aligned-batcher/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ impl Batcher {
628628
return Ok(());
629629
}
630630

631-
// If there is one invalid proof we send message with one out of batch and send rejected one.
632631
if !zk_utils::verify(verification_data).await {
633632
error!("Invalid proof detected. Verification failed");
634633
send_message(
@@ -661,7 +660,7 @@ impl Batcher {
661660
// last_valid_nonce = client_msg.verification_data.nonce - 1.
662661
SubmitProofResponseMessage::InsufficientBalance(
663662
addr,
664-
nonced_verification_data.nonce,
663+
nonced_verification_data.nonce - 1,
665664
),
666665
)
667666
.await;

batcher/aligned-sdk/src/communication/messaging.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,8 @@ pub async fn receive(
127127
Ok(data) => data,
128128
Err(e) => {
129129
warn!("Error while handling batcher response: {:?}", e);
130-
// In the case of submitting multiple proofs we can have an multiple proofs be submitted but there
131-
// insufficient balance we still want to read and return the `batch_inclusion_data` of the proofs that were approved.
132-
// `last_valid_nonce` corresponds to the nonce of the proof that triggered InsufficientBalance.
133-
// Therefore the other proofs are in order and we set the last_proof_nonce to the nonce of the InsufficientBalance.
134130
if let SubmitError::InsufficientBalance(_, last_valid_nonce) = e {
135131
aligned_submitted_data.push(Err(e));
136-
// last_valid_nonce = last_nonce - 1. In the case
137-
info!("last_proof_nonce: {}", last_proof_nonce);
138-
info!("last_valid_nonce: {}", last_valid_nonce);
139-
// In the case all proofs are insufficient balance we go over them.
140-
//last_proof_nonce -= U256::from(1);
141132
if last_valid_nonce < last_proof_nonce {
142133
last_proof_nonce = last_valid_nonce;
143134
}

0 commit comments

Comments
 (0)