Skip to content
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

Merged
merged 12 commits into from
Aug 7, 2020
Merged

snark pool batching #5579

merged 12 commits into from
Aug 7, 2020

Conversation

imeckler
Copy link
Member

@imeckler imeckler commented Aug 5, 2020

@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.

@imeckler imeckler requested a review from a team as a code owner August 5, 2020 22:53
() ) )
|> don't_wait_for ;
r
in
Copy link
Member

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.
*)
Copy link
Member

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?

Copy link
Member Author

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 () =
Copy link
Member

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?

@@ -330,15 +330,21 @@ module Make (Transition_frontier : Transition_frontier_intf) :
work ) ] ;
`Statement_not_referenced )

(* At this point, verification already has happened *)
Copy link
Member

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?

Copy link
Member Author

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 :)

@deepthiskumar deepthiskumar added this to the TestNet 3.3 milestone Aug 6, 2020
@nholland94
Copy link
Member

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.

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.

@deepthiskumar deepthiskumar added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Aug 6, 2020
@mergify mergify bot merged commit d754977 into develop Aug 7, 2020
@mergify mergify bot deleted the fix/snark-pool-batching branch August 7, 2020 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants