-
Notifications
You must be signed in to change notification settings - Fork 527
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
Work selector: add a function to fetch user command work #16035
base: compatible
Are you sure you want to change the base?
Conversation
3735f92
to
bdcef15
Compare
!ci-build-me |
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.
This change enables a new graphql endpoint for querying specific type of work, and custom snark workers that only process user commands. I think this is a step in the right direction for a more granular snark work interface.
Note: I'm in favor of changing the transferts to transfers to stick with the english spelling.
Co-authored-by: sai <[email protected]>
Co-authored-by: sai <[email protected]>
bdcef15
to
cd158f3
Compare
let is_user_transaction : t -> bool = function | ||
| Command (Signed_command _) -> | ||
true | ||
| Command (Zkapp_command _) | Fee_transfer _ | Coinbase _ -> |
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.
Note that a Zkapp_command
is a user_transaction
let pending_user_work_statements ~snark_pool ~fee_opt (state : State.t) = | ||
let work_filter (witness : Inputs.Transaction_witness.t option) = | ||
match witness with | ||
| None -> | ||
false | ||
| Some witness -> | ||
Inputs.Transaction.is_user_transaction |
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'm not sure I understand the goal here. All of the snark work needs to be done (and ideally thus should be available from the GraphQL command)
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 thought the goal was just too eventually filter queries based on certain characteristics i.e fetch snark work like <trait1,trait2 …> . I saw this change as poc for this concept with just signed commands. I don’t think the intention is to replace functionality for querying all work.
This PR is a first step for to https://www.notion.so/o1labs/Advanced-Snark-Coordinator-Logic-for-fetching-work-f289471a34614cf18d5bc834eaaf1060.
It adds a new function in the work selection method module to select work that correspond to simple transferts.