Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/3_guides/2_build_your_first_aligned_application.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ Next, we will see how to execute ZKQuiz to get your own ZKQuiz NFT!

### Requirements

1. [Rust](https://www.rust-lang.org/tools/install)
1. [Rust v1.80.0](https://www.rust-lang.org/tools/install)
2. [Foundry](https://getfoundry.sh)

{% hint style="info" %}
ELF commitment was generated with Rust v1.80.1 and SP1 v3.0.0.
{% endhint %}

### Usage

#### 1. Clone the repository
Expand Down
6 changes: 4 additions & 2 deletions examples/zkquiz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ SHELL := /bin/bash
deploy_verifier:
@. ./contracts/.env && . ./contracts/deploy.sh

CONTRACT_ADDRESS=0x6376d142582F2Ec76D6bf3d47020e0A163c51874
deploy_verifier_devnet:
. ./contracts/.devnet.env && . ./contracts/deploy.sh

CONTRACT_ADDRESS=0x1adFb00CC74Ff26bB05419953006c66B1abFCD45
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
VERIFICATION_DATA=./aligned_verification_data/0a1fab5df88a71e48633cbdeedc8d1a234b790d15a8a2fd04cd6a03c1e05b5ef_212.json

answer_quiz:
@cd quiz/script && cargo run -r -- \
Expand Down
5 changes: 4 additions & 1 deletion examples/zkquiz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ Next, we will see how to execute ZKQuiz, so you can get your own ZKQuiz NFT!

## Requirements

1. [Rust](https://www.rust-lang.org/tools/install)
1. [Rust v1.80.1](https://www.rust-lang.org/tools/install)
2. [Foundry](https://getfoundry.sh)

> [!INFO]
> ELF commitment was generated with Rust v1.80.1 and SP1 v3.0.0.

## Usage

### 1 - Create Keystore
Expand Down
2 changes: 1 addition & 1 deletion examples/zkquiz/contracts/src/VerifierContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract VerifierContract is ERC721URIStorage {
address public alignedServiceManager;
address public paymentServiceAddr;

bytes32 public elfCommitment = 0x3f99615fdf3b67a01e41b38eee75a32c778ee2fa631bd74e01c89afc2f70f5de;
bytes32 public elfCommitment = 0x34fdfec89da610d255d326bc440bb5754e1eb70a694f3f1dc967b3dd6c4c7033;

error InvalidElf(bytes32 submittedElf); // c6d95066

Expand Down
Binary file modified examples/zkquiz/quiz/program/elf/riscv32im-succinct-zkvm-elf
Binary file not shown.
5 changes: 5 additions & 0 deletions examples/zkquiz/quiz/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ async fn claim_nft_with_verified_proof(
.to_vec(),
);

let proving_system_aux_data_commitment_hex: String = aligned_verification_data
.verification_data_commitment
.proving_system_aux_data_commitment.iter().map(|byte| format!("{:02x}", byte)).collect();
println!("ELF Commitment: {}", proving_system_aux_data_commitment_hex);

let receipt = verifier_contract
.verify_batch_inclusion(
aligned_verification_data
Expand Down