diff --git a/README.md b/README.md index 27bf7b8..c7d0543 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,16 @@ run_verify_instruction(groth16_proof).await; 3. Using the [`solana-program-test`](https://docs.rs/solana-program-test/latest/solana_program_test/) framework, send the `SP1Groth16Proof` to the [`fibonacci-verifier-contract`](./example/program). This smart contract will verify the proof using the `sp1-solana` -crate against the fibonacci SP1 program vkey and print out the public inputs. Here is a snippet that demonstrates -how to perform the verification and read the public inputs on chain. +crate against the fibonacci SP1 program vkey and print out the public inputs. + +> [!NOTE] +> In this example, a Groth16 proof and public values are directly passed into the contract as transaction data. +> In real use cases, this may not be reasonable, since the upper limit for transaction data is 1232 bytes. +> Groth16 proofs themselves are already 260 bytes, and public inputs can potentially be very large. +> See [this article](https://solana.com/developers/courses/program-optimization/lookup-tables) for a discussion +> on how to handle this. + +Here is a snippet that demonstrates how to perform the verification and read the public inputs on chain. ```rust // Derived by running `vk.bytes32()` on the program's vkey. diff --git a/example/program/src/lib.rs b/example/program/src/lib.rs index f713e0e..24b8b7d 100644 --- a/example/program/src/lib.rs +++ b/example/program/src/lib.rs @@ -20,7 +20,7 @@ entrypoint!(process_instruction); /// let vkey_hash = vk.bytes32(); /// ``` const FIBONACCI_VKEY_HASH: &str = - "0x0083e8e370d7f0d1c463337f76c9a60b62ad7cc54c89329107c92c1e62097872"; + "0x0054c0e58911dd8b993c6d8f249aa50a2e523114ec4b7ef9dd355c5f6bfbf3ce"; /// The instruction data for the program. #[derive(BorshDeserialize, BorshSerialize)] diff --git a/proofs/fibonacci_proof.bin b/proofs/fibonacci_proof.bin index 9764445..385d535 100644 Binary files a/proofs/fibonacci_proof.bin and b/proofs/fibonacci_proof.bin differ