Skip to content

Commit 9aef548

Browse files
0xMimirtizoc
andauthored
Update node/src/snark_pool/candidate/snark_pool_candidate_reducer.rs
Co-authored-by: Bruno Deferrari <[email protected]>
1 parent da83a61 commit 9aef548

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

node/src/snark_pool/candidate/snark_pool_candidate_reducer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ impl SnarkPoolCandidatesState {
160160
reason: P2pDisconnectionReason::SnarkPoolVerifyError,
161161
});
162162

163-
// TODO: this is incorrect, only one snark in batch could be invalid but we would reject that whole batch
163+
// TODO: This is not correct. We are rejecting all snark messages, but the fact that the batch
164+
// failed to verify means that there is at least one invalid snark in the batch, not that all of them
165+
// are invalid.
166+
// Instead, what should happen here is that we split the batch in two and try to verify the two batches
167+
// again. Repeating until batches don't fail to verify anymore, or each batch is of size 1.
168+
// It may also be worth capping the batch sizes to 10.
164169
for snark_job_id in batch {
165170
dispatcher.push(P2pNetworkPubsubAction::RejectMessage {
166171
message_id: Some(BroadcastMessageId::Snark {

0 commit comments

Comments
 (0)