-
Notifications
You must be signed in to change notification settings - Fork 403
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
feat: update verifier contract templates #963
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
# Building Plonk BN254 Artifacts | ||
|
||
To build the Plonk Bn254 artifacts from scratch, you can use the `Makefile` inside the `prover` directory. | ||
To build the production Plonk Bn254 artifacts from scratch, you can use the `Makefile` inside the `prover` directory. | ||
|
||
```shell,noplayground | ||
RUST_LOG=info make plonk-bn254 | ||
``` | ||
cd prover | ||
RUST_LOG=info make build-plonk-bn254 | ||
``` | ||
|
||
## Non-production builds | ||
|
||
For quickly building the plonk artifacts, you can run `cargo test` with additional flags to speed up the build process. | ||
|
||
```shell,noplayground | ||
SP1_DEV=true FRI_QUERIES=1 cargo test --release test_e2e_prove_plonk | ||
``` | ||
|
||
The generated artifacts should only be used for development and testing purposes. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
pragma solidity ^0.8.20; | ||
|
||
/// @title SP1 Verifier Interface | ||
/// @author Succinct Labs | ||
/// @notice This contract is the interface for the SP1 Verifier. | ||
interface ISP1Verifier { | ||
/// @notice Returns the version of SP1 this verifier corresponds to. | ||
function VERSION() external pure returns (string memory); | ||
|
||
/// @notice Returns the hash of the verification key. | ||
function VKEY_HASH() external pure returns (bytes32); | ||
|
||
/// @notice Verifies a proof with given public values and vkey. | ||
/// @param vkey The verification key for the RISC-V program. | ||
/// @dev It is expected that the first 4 bytes of proofBytes must match the first 4 bytes of | ||
/// target verifier's VERIFIER_HASH. | ||
/// @param programVKey The verification key for the RISC-V program. | ||
/// @param publicValues The public values encoded as bytes. | ||
/// @param proofBytes The proof of the program execution the SP1 zkVM encoded as bytes. | ||
function verifyProof( | ||
bytes32 vkey, | ||
bytes32 programVKey, | ||
bytes calldata publicValues, | ||
bytes calldata proofBytes | ||
) external view; | ||
} | ||
|
||
interface ISP1VerifierWithHash is ISP1Verifier { | ||
/// @notice Returns the SHA-256 hash of the verifier. | ||
/// @dev This is automatically generated by taking hash of the VKey file. | ||
function VERIFIER_HASH() external pure returns (bytes32); | ||
} |
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
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
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
Oops, something went wrong.
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.
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.
nit: received
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.
fixed