Skip to content

Commit d4a7b13

Browse files
PatStilesJuArce
andauthored
hotfix: Bump sp1 version in validating public inputs example (#1634)
Co-authored-by: Julian Arce <[email protected]>
1 parent 5143bd5 commit d4a7b13

File tree

9 files changed

+1243
-8289
lines changed

9 files changed

+1243
-8289
lines changed

examples/validating-public-input/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This example is designed to do either with SP1 or risc0 proofs these are the com
88

99
### Risc0
1010

11+
> [NOTE]
12+
> In running on MacOS you may need to install xcode or update `metal` dependencies.
13+
1114
1. `make generate_risc0_fibonacci_proof`
1215

1316
2. `make submit_fibonacci_risc0_proof_devnet`
@@ -28,12 +31,15 @@ The command will log the address where the validator was deployed:
2831

2932
```
3033
##### anvil-hardhat
31-
✅ [Success]Hash: 0xe0c216a3a24d5bd0551924592e42c6d96a889e3082ba3d7fff413336fba66815
32-
Contract Address: 0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f
33-
Block: 585
34-
Paid: 0.000000000005889224 ETH (736153 gas * 0.000000008 gwei)
34+
✅ [Success]Hash: 0xbdb6bbe9403b59de6d960dd231dae658b401735506feb0745eebe76d5f95e8f4
35+
Contract Address: 0x90d6A3E189C70E1Cce16c29151077cB9Badb2448
36+
Block: 2963688
37+
Paid: 0.000727925005095475 ETH (727925 gas * 1.000000007 gwei)
3538
```
3639

40+
> [NOTE]
41+
> The `Contract Address` listed above corresponds to a current valid deployment of the examples contract on the `holesky` testnet.
42+
3743
save the contract address for the next command.
3844

3945
4. `make verify_risc0_batch_inclusion_devnet FIBONACCI_VALIDATOR_ADDRESS=<FIBONACCI_VALIDATOR_ADDRESS> DATA_FILE_NAME=<DATA_FILE_NAME>`
@@ -52,6 +58,9 @@ transactionHash <TX_HASH>
5258

5359
### SP1
5460

61+
> [NOTE]
62+
> In running on MacOS you may need to install xcode or update `metal` dependencies.
63+
5564
1. `make generate_sp1_fibonacci_proof`
5665

5766
2. `make submit_fibonacci_sp1_proof_devnet`
@@ -72,11 +81,13 @@ The command will log the address where the validator was deployed:
7281

7382
```
7483
##### anvil-hardhat
75-
✅ [Success]Hash: 0xe0c216a3a24d5bd0551924592e42c6d96a889e3082ba3d7fff413336fba66815
76-
Contract Address: 0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f
77-
Block: 585
78-
Paid: 0.000000000005889224 ETH (736153 gas * 0.000000008 gwei)
84+
✅ [Success]Hash: 0xbdb6bbe9403b59de6d960dd231dae658b401735506feb0745eebe76d5f95e8f4
85+
Contract Address: 0x90d6A3E189C70E1Cce16c29151077cB9Badb2448
86+
Block: 2963688
87+
Paid: 0.000727925005095475 ETH (727925 gas * 1.000000007 gwei)
7988
```
89+
> [NOTE]
90+
> The `Contract Address` listed above corresponds to a current valid deployment of the examples contract on the `holesky` testnet.
8091
8192
save the contract address for the next command.
8293

examples/validating-public-input/aligned-integration/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ async fn main() -> Result<(), SubmitError> {
125125
}
126126
};
127127

128-
// Set a fee of 0.1 Eth
129-
let max_fee = U256::from(5) * U256::from(100_000_000_000_000_000u128);
128+
// Set a fee of 0.01 Eth
129+
let max_fee = U256::from(100_000_000_000_000u128);
130130

131131
let nonce = get_nonce_from_ethereum(&args.rpc_url, wallet.address(), network)
132132
.await

examples/validating-public-input/contracts/src/FibonacciValidator.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ contract FibonacciValidator {
66
address public paymentServiceAddr;
77

88
bytes32 public fibonacciProgramIdCommitmentSp1 =
9-
0xb9fd43bd969f26da100354ebceefd56dd4c068f81cba2f152742c7ddbd9bb97e;
9+
0x588277d2461159223e7a688895a8e8529ce33f54730d1528c960d3c67e468520;
1010

1111
bytes32 public fibonacciProgramIdCommitmentRisc0 =
12-
0x1894c0448514623e9de57947fdf3945eab49dc46ff2e72d0b5fb3fb41ed56db4;
12+
0x52075f80c0b914b6cb8d86a2827b30b1252b58f2aa0173b993188650a538d5c5;
1313

1414
error InvalidProgramID(string verifier, bytes32 submitted, bytes32 required); //051ce67c
1515

examples/validating-public-input/contracts/validate_batch_inclusion.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ pub_input=$(jq -r '.pub_input' "../aligned-integration/batch_inclusion_data/$DAT
3737

3838
cast send --rpc-url $RPC_URL $FIBONACCI_VALIDATOR_ADDRESS \
3939
"verifyBatchInclusion(bytes32,bytes32,bytes32,bytes20,bytes32,bytes,uint256, bytes, string)" \
40-
$proof_commitment \
41-
$pub_input_commitment \
42-
$program_id_commitment \
43-
$proof_generator_addr \
44-
$batch_merkle_root \
45-
$merkle_proof \
46-
$verification_data_batch_index \
47-
$pub_input \
40+
0x$proof_commitment \
41+
0x$pub_input_commitment \
42+
0x$program_id_commitment \
43+
0x$proof_generator_addr \
44+
0x$batch_merkle_root \
45+
0x$merkle_proof \
46+
0x$verification_data_batch_index \
47+
0x$pub_input \
4848
$VERIFIER_ID \
4949
--private-key $PRIVATE_KEY

0 commit comments

Comments
 (0)