Skip to content
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

hotfix: Bump sp1 version in validating public inputs example #1634

Merged
merged 6 commits into from
Dec 21, 2024
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
27 changes: 19 additions & 8 deletions examples/validating-public-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This example is designed to do either with SP1 or risc0 proofs these are the com

### Risc0

> [NOTE]
> In running on MacOS you may need to install xcode or update `metal` dependencies.

1. `make generate_risc0_fibonacci_proof`

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

```
##### anvil-hardhat
✅ [Success]Hash: 0xe0c216a3a24d5bd0551924592e42c6d96a889e3082ba3d7fff413336fba66815
Contract Address: 0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f
Block: 585
Paid: 0.000000000005889224 ETH (736153 gas * 0.000000008 gwei)
✅ [Success]Hash: 0xbdb6bbe9403b59de6d960dd231dae658b401735506feb0745eebe76d5f95e8f4
Contract Address: 0x90d6A3E189C70E1Cce16c29151077cB9Badb2448
Block: 2963688
Paid: 0.000727925005095475 ETH (727925 gas * 1.000000007 gwei)
```

> [NOTE]
> The `Contract Address` listed above corresponds to a current valid deployment of the examples contract on the `holesky` testnet.

save the contract address for the next command.

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

### SP1

> [NOTE]
> In running on MacOS you may need to install xcode or update `metal` dependencies.

1. `make generate_sp1_fibonacci_proof`

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

```
##### anvil-hardhat
✅ [Success]Hash: 0xe0c216a3a24d5bd0551924592e42c6d96a889e3082ba3d7fff413336fba66815
Contract Address: 0x5081a39b8A5f0E35a8D959395a630b68B74Dd30f
Block: 585
Paid: 0.000000000005889224 ETH (736153 gas * 0.000000008 gwei)
✅ [Success]Hash: 0xbdb6bbe9403b59de6d960dd231dae658b401735506feb0745eebe76d5f95e8f4
Contract Address: 0x90d6A3E189C70E1Cce16c29151077cB9Badb2448
Block: 2963688
Paid: 0.000727925005095475 ETH (727925 gas * 1.000000007 gwei)
```
> [NOTE]
> The `Contract Address` listed above corresponds to a current valid deployment of the examples contract on the `holesky` testnet.

save the contract address for the next command.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ async fn main() -> Result<(), SubmitError> {
}
};

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

let nonce = get_nonce_from_ethereum(&args.rpc_url, wallet.address(), network)
.await
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ contract FibonacciValidator {
address public paymentServiceAddr;

bytes32 public fibonacciProgramIdCommitmentSp1 =
0xb9fd43bd969f26da100354ebceefd56dd4c068f81cba2f152742c7ddbd9bb97e;
0x588277d2461159223e7a688895a8e8529ce33f54730d1528c960d3c67e468520;

bytes32 public fibonacciProgramIdCommitmentRisc0 =
0x1894c0448514623e9de57947fdf3945eab49dc46ff2e72d0b5fb3fb41ed56db4;
0x52075f80c0b914b6cb8d86a2827b30b1252b58f2aa0173b993188650a538d5c5;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ pub_input=$(jq -r '.pub_input' "../aligned-integration/batch_inclusion_data/$DAT

cast send --rpc-url $RPC_URL $FIBONACCI_VALIDATOR_ADDRESS \
"verifyBatchInclusion(bytes32,bytes32,bytes32,bytes20,bytes32,bytes,uint256, bytes, string)" \
$proof_commitment \
$pub_input_commitment \
$program_id_commitment \
$proof_generator_addr \
$batch_merkle_root \
$merkle_proof \
$verification_data_batch_index \
$pub_input \
0x$proof_commitment \
0x$pub_input_commitment \
0x$program_id_commitment \
0x$proof_generator_addr \
0x$batch_merkle_root \
0x$merkle_proof \
0x$verification_data_batch_index \
0x$pub_input \
$VERIFIER_ID \
--private-key $PRIVATE_KEY
Loading