Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

feat: stdio parallel proving #109

Merged
merged 22 commits into from
Jun 14, 2024
Merged

feat: stdio parallel proving #109

merged 22 commits into from
Jun 14, 2024

Conversation

atanmarko
Copy link
Member

@atanmarko atanmarko commented Jun 13, 2024

  • Updated rpc tool to easily extract multiple blocks from jerigon
  • simple_test.sh -> prove_stdio.sh
  • prove_blocks.sh -> prove_jerigon.sh
  • Added json witness files to tools/artifacts
  • Add parallel proving for stdio usecase

Resolves #105
Resolves #107

Now the following can be done:

  1. Extract multi block witness from jerigon node and dump it to file
cargo run --bin rpc -- fetch --start-block 1 --end-block 5 --rpc-url http://127.0.0.1:8546 | jq > witness_b1_b5.json
  1. Generate proof from witness json file input and verify it
./tools/prove_stdio.sh witness_b1_b5.json

@atanmarko atanmarko self-assigned this Jun 13, 2024
@atanmarko atanmarko marked this pull request as ready for review June 13, 2024 19:13
@atanmarko atanmarko changed the title WIP: feat: stdio parallel proving feat: stdio parallel proving Jun 13, 2024
@atanmarko atanmarko force-pushed the feat/stdio-parallel-proving branch from de27024 to 630e2f6 Compare June 14, 2024 11:49
@atanmarko atanmarko changed the base branch from develop to fix/discard-intermediary-proofs June 14, 2024 11:50
@atanmarko atanmarko force-pushed the feat/stdio-parallel-proving branch from 630e2f6 to e96fbdf Compare June 14, 2024 12:04
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just having one question regarding the use of Option. Related to this point actually, I wonder if we don't want the stdio mode to also have the keep_intermediate_proofs argument, which currently is a jerigon specific one.

prover/src/lib.rs Show resolved Hide resolved
@atanmarko
Copy link
Member Author

@Nashtare Lets first merge #106, as stdio parrallel proving and discarding intermediate proofs are two separate features I would say :)

@Nashtare
Copy link
Collaborator

Nashtare commented Jun 14, 2024

Also minor nit, but I ran the tools/prove_stdio.sh script in test_only mode and the display is a bit off: (the first line being the last line of the concatenation of all the proofs being printed to stdout).

[11231279981102658236,17674471959883319489,17252979625291653014,5508296138543908121]}]}]]},"steps":[]}],"final_poly":{"coeffs":[[8326671574015352282,18322989663851758183],[18444328255417511852,11587992679316513830],[13145008028612993865,17194453877708302593],[0,0]]},"pow_witness":1152921504338412293}},"public_inputs":[]}}]2024-06-14T16:37:46.645937Z  INFO prover: Successfully generated witness for block 2.
2024-06-14T16:37:46.771867Z  INFO prover: Successfully generated witness for block 3.
2024-06-14T16:37:46.891788Z  INFO prover: Successfully generated witness for block 4.
2024-06-14T16:37:47.008929Z  INFO prover: Successfully generated witness for block 5.
2024-06-14T16:37:47.119542Z  INFO prover: Successfully generated witness for block 6.
2024-06-14T16:37:47.234381Z  INFO prover: Successfully generated witness for block 7.

We may want to have the print be done at the outer prove function.

Base automatically changed from fix/discard-intermediary-proofs to develop June 14, 2024 17:34
@atanmarko atanmarko force-pushed the feat/stdio-parallel-proving branch from 7bffadb to ba9a855 Compare June 14, 2024 17:41
leader/src/jerigon.rs Outdated Show resolved Hide resolved
leader/src/stdio.rs Outdated Show resolved Hide resolved
@atanmarko atanmarko merged commit ef943b4 into develop Jun 14, 2024
5 checks passed
@atanmarko atanmarko deleted the feat/stdio-parallel-proving branch June 14, 2024 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
2 participants