-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #982 from oasisprotocol/rube/revamp-opl-section
docs: seperate OPL and OPL sdk
- Loading branch information
Showing
16 changed files
with
826 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
sequenceDiagram | ||
User ->> Home Contract: Transaction | ||
Home Contract -->> SGN: SGN Watches Events | ||
participant User | ||
participant Home as Home Contract<br/>(Host) | ||
participant SGN | ||
participant Executor | ||
participant Sapphire as Sapphire Contract<br/>(Enclave) | ||
User ->> Home: Transaction | ||
Home -->> SGN: SGN Watches Events | ||
SGN -->> Executor: Waits for SGN Approval | ||
Executor ->> Sapphire Contract: Submit Proof Tx | ||
Executor ->> Sapphire: Submit Proof Tx |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
description: Integrating privacy into dApps on other blockchains | ||
--- | ||
|
||
import DocCard from '@theme/DocCard'; | ||
import DocCardList from '@theme/DocCardList'; | ||
import {findSidebarItem} from '@site/src/sidebarUtils'; | ||
|
||
# Oasis Privacy Layer (OPL) | ||
|
||
The Oasis Privacy Layer (OPL) is a powerful solution that enables developers | ||
to integrate privacy features into their decentralized applications (dApps) | ||
across multiple EVM-compatible networks. | ||
|
||
- **Privacy-First**: OPL leverages the [Sapphire]'s privacy features to ensure | ||
that contract data and computation remains confidential. | ||
- **Cross-Chain Compatibility**: OPL is compatible with multiple blockchains | ||
through message bridging protocols, making it easy to integrate privacy | ||
regardless of the chain your dApp is built on. | ||
|
||
For more information about OPL and to catch the latest news, please visit the | ||
[official OPL page]. | ||
|
||
[official OPL page]: https://oasisprotocol.org/opl | ||
[Sapphire]: ../sapphire/README.mdx | ||
|
||
## How OPL Works | ||
|
||
The OPL is made possible through message bridges, which enable secure | ||
communication between OPL-enabled contracts on Sapphire and smart contracts on | ||
other chains. This allows dApps to access privacy-preserving capabilities while | ||
keeping their main logic on their primary chain. | ||
|
||
![Oasis Privacy Layer diagram](../images/opl/privacy-layer-diagram.png) | ||
|
||
:::info | ||
|
||
For how to use use signed messages with the GSN to trigger a cross-chain | ||
messages, please visit our [Gasless Transactions chapter]. | ||
|
||
::: | ||
|
||
[Gasless Transactions chapter]: ../sapphire/gasless.md | ||
|
||
## Message Bridges | ||
|
||
You can integrate message bridges into your dApps using one of these three | ||
methods: | ||
|
||
- **[OPL SDK]**: A wrapper provided by the Oasis Protocol that simplifies the | ||
integration of message bridging with Oasis’s privacy features. | ||
- **[Celer Inter-Chain Messaging (IM)][celer]**: A generalized message bridging solution | ||
by Celer, which lets you build more complex solutions. | ||
- **[Router Protocol CrossTalk][router]**: An extensible cross-chain framework that | ||
enables seamless state transitions across multiple chains. | ||
|
||
### Comparison | ||
|
||
| Protocol | Validator Network | Relayer | Fees | | ||
| --------------- | ----------------- | ------ | ------ | | ||
| **[OPL SDK]** | SGN (Celer) | Executor (self-hosted or hosted service by Celer) | SGN Fee: Paid via `msg.value` <br/> Executor Fee: Charged externally (Free on testnet) | | ||
| **[Celer IM][celer]** | SGN (Celer) | Executor (self-hosted or hosted service by Celer) | SGN Fee: Paid via `msg.value` <br/> Executor Fee: Charged externally (Free on testnet) | | ||
| **[Router Protocol][router]** | Orchestrators (Router Chain) | Relayer (run by 3rd party) | Paid by the approved feepayer on the Routerchain | | ||
|
||
## Examples | ||
|
||
<DocCardList items={[ | ||
findSidebarItem('/dapp/opl/secret-ballot-example/'), | ||
findSidebarItem('/dapp/opl/opl-sdk/ping-example'), | ||
findSidebarItem('/dapp/opl/celer/ping-example'), | ||
findSidebarItem('/dapp/opl/router-protocol/pingpong-example'), | ||
]} /> | ||
|
||
[OPL SDK]: ./opl-sdk/README.md | ||
[celer]: ./celer/README.md | ||
[router]: ./router-protocol/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
description: A message bridge by Celer | ||
--- | ||
|
||
# Celer Inter-Chain Messaging (IM) | ||
|
||
**Celer Inter-Chain Messaging (IM)** is a message passing protocol that | ||
facilitates the seamless transfer of any type of generic message, including | ||
function calls, across multiple blockchains via a single source-chain | ||
transaction. Celer IM currently supports message passing between Oasis Sapphire | ||
and all other IM-supported chains. The message-passing support enables | ||
developers to build entirely new privacy-centric dApps or add confidentiality | ||
to existing dApps on popular EVM networks using Sapphire as a privacy layer. | ||
|
||
**Celer IM** offers two design patterns: | ||
|
||
- Cross-chain logic execution without fund transfer | ||
- Cross-chain logic execution with accompanying fund transfer | ||
|
||
This documentation focuses on cross-chain logic execution **without** fund | ||
transfer. For information on using Celer IM with fund transfer, please refer | ||
to the [Celer IM documentation]. | ||
|
||
[Celer IM documentation]: https://im-docs.celer.network/ | ||
|
||
## Architecture | ||
|
||
![Celer IM Architecture](../../images/opl/celer-e2e.png) | ||
*Architecture diagram for Celer IM[^1]* | ||
|
||
[^1]: The Celer IM architecture diagram is courtesy of [Celer documentation][celer-architecture]. | ||
|
||
[celer-architecture]: https://im-docs.celer.network/developer/architecture-walkthrough/end-to-end-workflow | ||
|
||
Celer IM’s architecture is composed of several core components that work | ||
together to facilitate secure and reliable cross-chain messaging: | ||
|
||
- **MessageBus**: The primary component managing message transmission between | ||
source and destination blockchains. It ensures proper formatting and routing | ||
of messages through the Celer network. | ||
- **State Guardian Network (SGN)**: A decentralized network of validators that | ||
manage the state of cross-chain messages. SGN validators sign off on messages | ||
and coordinate their secure delivery, providing security and availability for | ||
cross-chain interactions. | ||
- **[Executor](#executor)**: An off-chain component that listens to the SGN for | ||
validated messages ready for execution on the destination chain. Once a | ||
message is verified, the Executor sends transactions to the MessageBus on the | ||
destination chain, triggering the execution of the specified logic. | ||
|
||
## Executor | ||
|
||
The [Executor][Message Executor] is a crucial part of the Celer IM framework. | ||
It performs two main functions: | ||
|
||
- Monitors the Celer State Guardian Network (SGN) for messages ready to be | ||
submitted (with sufficient validator signatures). | ||
- Submits message execution transactions to the MessageBus contract on the | ||
destination chain. | ||
|
||
It is necessary a [Message Executor] runs for you dapp. To set up an executor, | ||
you have two options | ||
|
||
- Follow the [documentation] to set up your own executor. | ||
- Fill out this [form][celer-form] for Celer to set up a hosted executor | ||
service for you. | ||
|
||
For Hackathon or Grant participants, we recommend filling out the | ||
[relay request form][celer-form] to use the shared Message Executor. | ||
|
||
In most cases, Celer advises dApp developers to use the shared executor | ||
services provided by the Celer Network team to avoid server configuration and | ||
operation concerns. | ||
|
||
:::info | ||
|
||
Oasis is running an executor for the Sapphire Testnet, which is okay to rely on | ||
for a test, for a faster execution it's recommended to run your own or use the | ||
hosted service. | ||
|
||
::: | ||
|
||
[Message Executor]: https://im-docs.celer.network/developer/development-guide/message-executor | ||
[documentation]: https://im-docs.celer.network/developer/development-guide/message-executor/integration-guide | ||
[celer-form]:https://form.typeform.com/to/RsiUR9Xz | ||
|
||
## Fees | ||
|
||
The cross-chain messaging process involves fees paid to two parties: | ||
|
||
- **SGN Fee**: Paid as `msg.value` to the *MessageBus* contract by | ||
the entity calling `sendMessge`. | ||
- **Executor Fee**: Charged by the Executor for submitting execute message | ||
transactions. | ||
|
||
## Monitoring | ||
|
||
The Celer IM Scan API can be used to retrieve status and message details by | ||
providing the globally unique transaction ID from the chain which originated the | ||
message. | ||
|
||
https://api.celerscan.com/scan/searchByTxHash?tx=0x... | ||
|
||
For details of the response format, see the [Query IM Tx Status] page of the | ||
Celer-IM documentation. Using this API lets you to check if messages have been | ||
delivered. | ||
|
||
[Query IM Tx Status]: https://im-docs.celer.network/developer/development-guide/query-im-tx-status |
Oops, something went wrong.