-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snark pool batching #5579
snark pool batching #5579
Conversation
() ) ) | ||
|> don't_wait_for ; | ||
r | ||
in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should do this for local_diffs
pipe as well. These come from the snark workers
(* TODO: For now, we must not punish since we batch across messages received from | ||
different senders and we don't isolate the bad proof in a batch, so we cannot | ||
properly attribute blame. | ||
*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error (`Locally_generated (diff, ())) ) | ||
else Error (`Other (Error.of_string reason)) | ||
in | ||
let check_and_add () = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename it to add_to_pool
or something?
src/lib/network_pool/snark_pool.ml
Outdated
@@ -330,15 +330,21 @@ module Make (Transition_frontier : Transition_frontier_intf) : | |||
work ) ] ; | |||
`Statement_not_referenced ) | |||
|
|||
(* At this point, verification already has happened *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean after the function is called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was confused about what the function was doing when I wrote the comment :)
We should prioritize full implementation of #4882 before mainnet. It should address the concern around blaming, and mitigate obvious DDoS attacks that levy batched verification of incoming snark work. |
…a into fix/snark-pool-batching
@deepthiskumar pointed out that we do not currently batch snark verification across different snark pool diffs, which currently means we only do batches of size 2. This puts too much load on nodes in general and the snark worker coordinators in particular.
This PR makes it so that network pool diffs are asynchronously verified before being synchronously applied. For the transaction pool, no change is made. For the snark pool, we now use the batcher to verify across diffs. This has the effect that we can no longer properly attribute blame for punishments, so we will eventually have to figure something out there.