-
Notifications
You must be signed in to change notification settings - Fork 583
The stateless verification tool #14593
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
Conversation
Problem: delegation stateless verification tool is not usable for submissions on cluster with custum constraints constants. Solution: provide an option to load config file with custom constraints constants. Bonus: code prettified and reformated.
The setup depends on ~/.cassandra/cqlshrc configuration to work.
An empty line sneaks in in particular when Casandra finds no results.
In order to allow for outputting results to Cassandra.
Update Stateless Verifier Input Type
!ci-build-me |
!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.
LGTM apart from nits. Also, lovely readme :)
conf.keyspace from | ||
(match where with None -> "" | Some w -> " WHERE " ^ w) | ||
in | ||
List.slice data 3 (-2) (* skip header and footer *) |
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.
:(
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.
While I agree this is not very elegant, I'm not sure what do you suggest here? I prefer this to ignoring lines which don't parse as records. Another idea would be to match against a regular expression to determine which line contains a record and which does not, but then again if we come by erroneous line in the middle of input, we'll ignore it silently, which is not good. In short, I can't really see a better solution which would retain the merit of being very simple and easy to understand.
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 don't have a better suggestion, I'm just sad
let filesystem_command = | ||
Command.async ~summary:"Verify submissions and block read from the filesystem" | ||
Command.Let_syntax.( | ||
let%map_open block_dir = block_dir_flag |
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.
Style-nit: I generally find it easier to reason about these when they're inline
; submitted_at = meta.created_at | ||
} | ||
|
||
let submitted_at ({ submitted_at; _ } : submission) = submitted_at |
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.
Consider [@@deriving fields]
on submission
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.
Bringing another dependency to the scope just to generate these 3 lines of code seems an overkill to me. I'd rather keep it simple as it is.
!ci-build-me |
!ci-build-me |
!ci-build-me |
!approved-for-mainnet |
This PR implements a stateless block and snark work verifier. It's been originally written for mainnet, but never merged. Then it was proted to
berkeley
and than extended to be able to load inputs and save its results to a Cassandra database, as required by the uptime service.Explain your changes:
Explain how you tested your changes:
Checklist: