Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
khadni committed Dec 17, 2024
1 parent 6c7e76e commit 7c235e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ To verify a Data Streams report, you must confirm the report integrity signed by

You have two options to verify Data Streams reports on Solana:

1. **Onchain verification**: Verify reports directly within your Solana program using [Cross-Program Invocation (CPI)](https://solana.com/docs/core/cpi) to the verifier program. Learn more about this method in the [onchain verification guide](/data-streams/tutorials/streams-direct/solana-onchain-report-verification).
1. **Onchain integration**: Verify reports directly within your Solana program using [Cross-Program Invocation (CPI)](https://solana.com/docs/core/cpi) to the verifier program. Learn more about this method in the [onchain verification guide](/data-streams/tutorials/streams-direct/solana-onchain-report-verification).

1. **Offchain verification**: Verify reports client-side using an SDK. You'll learn how to implement this method in this guide.
1. **Offchain integration**: Verify reports client-side using an SDK. You'll learn how to implement this method in this guide.

Both methods use the same underlying verification logic and security guarantees, differing only in where the verification occurs.

## Offchain verification
## Offchain integration

Offchain verification allows you to verify the authenticity of Data Streams reports from your client-side application. While this method requires sending a transaction to the verifier program, the verification logic and processing of results happens in your client application rather than in a Solana program.
The offchain integration allows you to verify the authenticity of Data Streams reports from your client-side application. While this method requires sending a transaction to the verifier program, the verification logic and processing of results happens in your client application rather than in a Solana program.

In this guide, you'll learn how to:

- Set up an Anchor project for offchain verification
- Set up an Anchor project
- Configure the necessary dependencies
- Create a command-line tool to verify reports
- Process and display the verified report data
Expand Down Expand Up @@ -83,7 +83,7 @@ To complete this guide, you'll need:

- **Allowlisted Account**: Your account must be allowlisted in the Data Streams Access Controller.

> **Note**: While this guide uses the Anchor framework for project structure, you can implement offchain verification using any Rust-based Solana project setup. The verifier SDK and client libraries are written in Rust, but you can integrate them into your preferred Rust project structure.
> **Note**: While this guide uses the Anchor framework for project structure, you can integrate the verification using any Rust-based Solana project setup. The verifier SDK and client libraries are written in Rust, but you can integrate them into your preferred Rust project structure.
### Implementation guide

Expand Down Expand Up @@ -313,7 +313,7 @@ fn main() {

### Best practices

When implementing offchain verification in production:
When implementing verification in production:

1. **Error Handling**:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ To verify a Data Streams report, you must confirm the report integrity signed by

You have two options to verify Data Streams reports on Solana:

1. **Onchain verification**: Verify reports directly within your Solana program using [Cross-Program Invocation (CPI)](https://solana.com/docs/core/cpi) to the Verifier program. You'll learn how to implement this method in this guide.
1. **Onchain integration**: Verify reports directly within your Solana program using [Cross-Program Invocation (CPI)](https://solana.com/docs/core/cpi) to the Verifier program. You'll learn how to implement this method in this guide.

1. **Offchain verification**: Verify reports client-side using an SDK. Learn more about this method in the [offchain verification guide](/data-streams/tutorials/streams-direct/solana-offchain-report-verification).
1. **Offchain integration**: Verify reports client-side using an SDK. Learn more about this method in the [offchain verification guide](/data-streams/tutorials/streams-direct/solana-offchain-report-verification).

Both methods use the same underlying verification logic and security guarantees, differing only in where the verification occurs.

## Onchain verification
## Onchain integration

You can verify Data Streams reports directly within your Solana program using onchain verification. This method ensures atomic verification and processing of report data.
You can verify Data Streams reports directly within your Solana program using this integration. This method ensures atomic verification and processing of report data.

In this guide, you'll learn how to:

Expand Down Expand Up @@ -85,7 +85,7 @@ To complete this guide, you'll need:

- **Devnet SOL**: You'll need devnet SOL for deployment and testing. Use the [Solana CLI](https://docs.solana.com/cli/transfer-tokens#airdrop-some-tokens-to-get-started) or the [Solana Faucet](https://faucet.solana.com/) to get devnet SOL.

> **Note**: While this guide uses the Anchor framework for project structure, you can implement onchain verification using any Rust-based Solana program framework. The verifier SDK is written in Rust, but you can integrate it into your preferred Rust program structure.
> **Note**: While this guide uses the Anchor framework for project structure, you can integrate the verification using any Rust-based Solana program framework. The verifier SDK is written in Rust, but you can integrate it into your preferred Rust program structure.
### Implementation guide

Expand Down Expand Up @@ -499,7 +499,7 @@ The SDK's `VerifierInstructions::verify` helper method performs these steps:

#### Best practices

This guide provides a basic implementation of onchain verification. When you implement onchain verification, consider the following best practices:
This guide provides a basic example on how to verify reports. When you implement reports verification, consider the following best practices:

- Implement robust error handling:
- Handle verification failures and invalid reports comprehensively
Expand Down

0 comments on commit 7c235e8

Please sign in to comment.