-
Notifications
You must be signed in to change notification settings - Fork 529
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
Standalone snarkwork process to submit proofs via graphql #16367
Open
deepthiskumar
wants to merge
2
commits into
feature/graphql-add-snark-work
Choose a base branch
from
feature/snarkworker-standalone
base: feature/graphql-add-snark-work
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Standalone snarkwork process to submit proofs via graphql #16367
deepthiskumar
wants to merge
2
commits into
feature/graphql-add-snark-work
from
feature/snarkworker-standalone
+147
−19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ed proofs to daemon graphql server
svv232
approved these changes
Nov 20, 2024
anne-laure-s
reviewed
Dec 3, 2024
Comment on lines
+49
to
+64
|> Deferred.Or_error.map ~f:(function | ||
| `One (proof1, _) -> | ||
{ Snark_work_lib.Work.Result_without_metrics.proofs = `One proof1 | ||
; statements = | ||
One_or_two.map spec ~f:Snark_work_lib.Work.Single.Spec.statement | ||
; prover = public_key | ||
; fee | ||
} | ||
| `Two ((proof1, _), (proof2, _)) -> | ||
{ Snark_work_lib.Work.Result_without_metrics.proofs = | ||
`Two (proof1, proof2) | ||
; statements = | ||
One_or_two.map spec ~f:Snark_work_lib.Work.Single.Spec.statement | ||
; prover = public_key | ||
; fee | ||
} ) |
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.
Suggested change
|> Deferred.Or_error.map ~f:(function | |
| `One (proof1, _) -> | |
{ Snark_work_lib.Work.Result_without_metrics.proofs = `One proof1 | |
; statements = | |
One_or_two.map spec ~f:Snark_work_lib.Work.Single.Spec.statement | |
; prover = public_key | |
; fee | |
} | |
| `Two ((proof1, _), (proof2, _)) -> | |
{ Snark_work_lib.Work.Result_without_metrics.proofs = | |
`Two (proof1, proof2) | |
; statements = | |
One_or_two.map spec ~f:Snark_work_lib.Work.Single.Spec.statement | |
; prover = public_key | |
; fee | |
} ) | |
|> Deferred.Or_error.map ~f:(fun proofs_and_time -> | |
{ Snark_work_lib.Work.Result_without_metrics.proofs = | |
One_or_two.map proofs_and_time ~f:fst | |
; statements = | |
One_or_two.map spec ~f:Snark_work_lib.Work.Single.Spec.statement | |
; prover = public_key | |
; fee | |
} ) |
anne-laure-s
reviewed
Dec 3, 2024
@@ -811,7 +811,7 @@ module Mutations = struct | |||
| Ok | |||
( `Broadcasted | |||
, Network_pool.Snark_pool.Resource_pool.Diff.Add_solved_work _ | |||
, _ ) -> | |||
, () ) -> |
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.
Suggested change
, () ) -> | |
, _ ) -> |
It looks like this change triggers an error when building:
File "src/lib/mina_graphql/mina_graphql.ml", line 814, characters 14-16:
814 | , () ) ->
^^
Error: This pattern matches values of type unit
but a pattern was expected which matches values of type
Network_pool.Snark_pool.Resource_pool.Diff.rejected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain your changes:
Explain how you tested your changes:
Part of solution described in #16214 (comment)
Checklist: