Skip to content

Commit e3aac58

Browse files
committed
Add verification to non-payers
1 parent 86b2548 commit e3aac58

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

batcher/aligned-batcher/src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ impl Batcher {
823823
.await;
824824
} else {
825825
// Can't add new entry with less priority to the batch queue
826-
info!("Can't add new entry, the batcher queue is full");
826+
error!("Can't add new entry, the batcher queue is full");
827827
send_message(
828828
ws_conn_sink.clone(),
829829
SubmitProofResponseMessage::BatchQueueLimitExceededError,
@@ -1767,6 +1767,16 @@ impl Batcher {
17671767

17681768
let batch_state_lock = self.batch_state.lock().await;
17691769

1770+
if batch_state_lock.batch_queue.len() == self.max_queue_size {
1771+
error!("Can't add new entry, the batcher queue is full");
1772+
send_message(
1773+
ws_sink.clone(),
1774+
SubmitProofResponseMessage::BatchQueueLimitExceededError,
1775+
)
1776+
.await;
1777+
return Ok(());
1778+
}
1779+
17701780
let nonced_verification_data = NoncedVerificationData::new(
17711781
client_msg.verification_data.verification_data.clone(),
17721782
client_msg.verification_data.nonce,

config-files/config-batcher-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ batcher:
2424
max_proof_size: 67108864 # 64 MiB
2525
max_batch_byte_size: 268435456 # 256 MiB
2626
max_batch_proof_qty: 3000 # 3000 proofs in a batch
27+
max_queue_size: 10000
2728
pre_verification_is_enabled: true
2829
metrics_port: 9093
2930
telemetry_ip_port_address: localhost:4001

config-files/config-batcher-ethereum-package.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ batcher:
2222
max_proof_size: 67108864 # 64 MiB
2323
max_batch_byte_size: 268435456 # 256 MiB
2424
max_batch_proof_qty: 3000 # 3000 proofs in a batch
25+
max_queue_size: 10000
2526
pre_verification_is_enabled: true
2627
metrics_port: 9093
2728
telemetry_ip_port_address: localhost:4001

0 commit comments

Comments
 (0)