Skip to content

Commit 676e6e8

Browse files
authored
fix(zkquiz): update ELF and redeploy verifier contract (#1610)
1 parent b8c8108 commit 676e6e8

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

docs/3_guides/2_build_your_first_aligned_application.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ Next, we will see how to execute ZKQuiz to get your own ZKQuiz NFT!
2727

2828
### Requirements
2929

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

33+
{% hint style="info" %}
34+
ELF commitment was generated with Rust v1.80.1 and SP1 v3.0.0.
35+
{% endhint %}
36+
3337
### Usage
3438

3539
#### 1. Clone the repository

examples/zkquiz/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ SHELL := /bin/bash
33
deploy_verifier:
44
@. ./contracts/.env && . ./contracts/deploy.sh
55

6-
CONTRACT_ADDRESS=0x6376d142582F2Ec76D6bf3d47020e0A163c51874
6+
deploy_verifier_devnet:
7+
. ./contracts/.devnet.env && . ./contracts/deploy.sh
8+
9+
CONTRACT_ADDRESS=0x1adFb00CC74Ff26bB05419953006c66B1abFCD45
710
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
8-
VERIFICATION_DATA=./aligned_verification_data/0a1fab5df88a71e48633cbdeedc8d1a234b790d15a8a2fd04cd6a03c1e05b5ef_212.json
911

1012
answer_quiz:
1113
@cd quiz/script && cargo run -r -- \

examples/zkquiz/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ Next, we will see how to execute ZKQuiz, so you can get your own ZKQuiz NFT!
1414

1515
## Requirements
1616

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

20+
> [!INFO]
21+
> ELF commitment was generated with Rust v1.80.1 and SP1 v3.0.0.
22+
2023
## Usage
2124

2225
### 1 - Create Keystore

examples/zkquiz/contracts/src/VerifierContract.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ contract VerifierContract is ERC721URIStorage {
1010
address public alignedServiceManager;
1111
address public paymentServiceAddr;
1212

13-
bytes32 public elfCommitment = 0x3f99615fdf3b67a01e41b38eee75a32c778ee2fa631bd74e01c89afc2f70f5de;
13+
bytes32 public elfCommitment = 0x34fdfec89da610d255d326bc440bb5754e1eb70a694f3f1dc967b3dd6c4c7033;
1414

1515
error InvalidElf(bytes32 submittedElf); // c6d95066
1616

-8 Bytes
Binary file not shown.

examples/zkquiz/quiz/script/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ async fn claim_nft_with_verified_proof(
219219
.to_vec(),
220220
);
221221

222+
let proving_system_aux_data_commitment_hex: String = aligned_verification_data
223+
.verification_data_commitment
224+
.proving_system_aux_data_commitment.iter().map(|byte| format!("{:02x}", byte)).collect();
225+
println!("ELF Commitment: {}", proving_system_aux_data_commitment_hex);
226+
222227
let receipt = verifier_contract
223228
.verify_batch_inclusion(
224229
aligned_verification_data

0 commit comments

Comments
 (0)