You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/data-streams/tutorials/solana-onchain-report-verification.mdx
+26-36Lines changed: 26 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,13 @@ Before you begin, you should have:
86
86
87
87
To complete this tutorial, you'll need:
88
88
89
-
-**Rust and Cargo**: Install the latest version using [rustup](https://rustup.rs/). Run <CopyTexttext="rustc --version"code/> to verify your installation.
89
+
-**Rust and Cargo**: Install Rust 1.79.0 or later using [rustup](https://rustup.rs/). Run <CopyTexttext="rustc --version"code/> to verify your installation.
90
90
91
-
-**Solana CLI tools**: Install the latest version following the [official guide](https://docs.solana.com/cli/install-solana-cli-tools). Run <CopyTexttext="solana --version"code/> to verify your installation.
91
+
-**Solana CLI tools**: Install Solana CLI 2.0 or later following the [official guide](https://docs.solana.com/cli/install-solana-cli-tools). Run <CopyTexttext="solana --version"code/> to verify your installation.
92
92
93
-
-**Anchor Framework**: Follow the [official installation guide](https://www.anchor-lang.com/docs/installation). Run <CopyTexttext="anchor --version"code /> to verify your installation.
93
+
-**Anchor Framework**: Install Anchor 0.31.0 or later following the [official installation guide](https://www.anchor-lang.com/docs/installation). Run <CopyTexttext="anchor --version"code /> to verify your installation.
94
+
95
+
**Important**: Using mismatched Anchor versions between your program and client can cause type incompatibilities and runtime errors.
94
96
95
97
-**Node.js and npm**: [Install Node.js 20 or later](https://nodejs.org/). Verify your installation with <CopyTexttext="node --version"code/>.
96
98
@@ -150,11 +152,9 @@ In your program's manifest file (`programs/example_verify/Cargo.toml`), add the
error: failed to parse lock file at: .../example_verify/Cargo.lock
299
-
300
-
Caused by:
301
-
lock file version 4 requires `-Znext-lockfile-bump`
302
-
```
303
-
304
-
1. Deploy your program to a Solana cluster (devnet in this example) using:
291
+
1. Deploy your program to devnet:
305
292
306
293
```bash
307
294
anchor deploy
@@ -347,11 +334,7 @@ In this section, you'll write a client script to interact with your deployed pro
347
334
anchor.setProvider(provider)
348
335
349
336
// Initialize your program using the IDL and your program ID
350
-
const program =newProgram<ExampleVerify>(
351
-
require("../target/idl/example_verify.json"),
352
-
"<YOUR_PROGRAM_ID>",
353
-
provider
354
-
)
337
+
const program =newProgram<ExampleVerify>(require("../target/idl/example_verify.json"), provider)
355
338
356
339
// Convert the hex string to a Uint8Array
357
340
// This is an example report payload for a crypto stream
@@ -455,13 +438,20 @@ In this section, you'll write a client script to interact with your deployed pro
455
438
456
439
**Note**: The Program IDs and Access Controller Accounts are available on the [Stream Addresses](/data-streams/crypto-streams) page.
457
440
458
-
1. Install the required dependencies for your project. Make sure the client-side `@coral-xyz/anchor` version matches your program's `anchor-lang` version (0.29.0):
441
+
1. Add the `snappy` dependency to your project:
442
+
443
+
```bash
444
+
yarn add snappy
445
+
```
446
+
447
+
Also ensure you have the required TypeScript dependencies:
**Important**: Using mismatched Anchor versions between your program and client can cause type incompatibilities and runtime errors.
454
+
**Note**: `snappy` is a compression library used to compress the report data before sending it to the verifier.
465
455
466
456
1. Execute the test script to interact with your program:
467
457
@@ -501,7 +491,7 @@ In this section, you'll write a client script to interact with your deployed pro
501
491
502
492
#### Program Derived Addresses (PDAs)
503
493
504
-
The verification process relies on two important PDAs that are handled automatically by the [Chainlink Data Streams Solana SDK](https://github.com/smartcontractkit/chainlink-solana/tree/develop/contracts/crates/chainlink-solana-data-streams):
494
+
The verification process relies on two important PDAs that are handled automatically by the [Chainlink Data Streams Solana SDK](https://github.com/smartcontractkit/chainlink-data-streams-solana):
505
495
506
496
-**Verifier config account PDA**:
507
497
- Derived using the verifier program ID as a seed
@@ -540,13 +530,13 @@ When working with different versions of [Data Stream reports](/data-streams/refe
0 commit comments