Skip to content

Commit

Permalink
Merge pull request #865 from oasisprotocol/kostko/rofl
Browse files Browse the repository at this point in the history
docs: Add ROFL
  • Loading branch information
kostko authored Sep 11, 2024
2 parents b3dc460 + 683e7f0 commit 7138acc
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docs/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ The part also covers other ParaTimes such as the non-confidential
[Oasis Emerald]: dapp/emerald/README.mdx
[Oasis Cipher]: dapp/emerald/README.mdx

## Build ROFL

Runtime OFfchain Logic (ROFL) enables you to build secure applications running
offchain in a trusted environment (TEE) and that seamlessly communicate with
Oasis Sapphire. This is ideal for trusted oracles, compute-expensive tasks
in AI or as a backend for interactive games.

<DocCard item={findSidebarItem('/rofl/')} />

## Get Involved

Contains information on official channels to get in touch with the Oasis Network
Expand Down
30 changes: 30 additions & 0 deletions docs/rofl/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
description: Build your own ROFL app
---

import DocCardList from '@theme/DocCardList';
import {findSidebarItem} from '@site/src/sidebarUtils';

# Build ROFL App

Runtime OFf-chain Logic (ROFL) apps are a mechanism to augment the deterministic
on-chain backend with verifiable off-chain applications. These applications are
stateless, have access to the network and can perform expensive and/or
non-deterministic computation.

ROFL apps run in Trusted Execution Environments (TEEs), similar to the on-chain
confidential runtimes. This enables them to securely authenticate to the
on-chain backend which is handled transparently by the framework. Together they
allow one to implement secure decentralized oracles, bridges, AI agents and
more.

This chapter will teach you how to build your own ROFL app with the help of the
[Oasis Runtime SDK].

<DocCardList items={[
findSidebarItem('/rofl/prerequisites'),
findSidebarItem('/rofl/app'),
]} />

[Oasis Runtime SDK]:
https://github.com/oasisprotocol/oasis-sdk/tree/main/runtime-sdk
1 change: 1 addition & 0 deletions docs/rofl/app.md
1 change: 1 addition & 0 deletions docs/rofl/prerequisites.md
1 change: 1 addition & 0 deletions docs/rofl/rofl.svg
1 change: 1 addition & 0 deletions docs/rofl/trust-root.md
6 changes: 6 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ const config: Config = {
activeBaseRegex: '/dapp/',
position: 'left',
},
{
label: 'Build ROFL',
to: '/rofl/',
activeBaseRegex: '/rofl/',
position: 'left',
},
{
label: 'Get Involved',
to: '/get-involved/',
Expand Down
2 changes: 1 addition & 1 deletion external/oasis-sdk
Submodule oasis-sdk updated 307 files
14 changes: 14 additions & 0 deletions sidebarRofl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {SidebarsConfig} from '@docusaurus/plugin-content-docs';

export const sidebarROFL: SidebarsConfig = {
rofl: [
{
type: 'doc',
label: 'Overview',
id: 'rofl/README',
},
'rofl/prerequisites',
'rofl/app',
'rofl/trust-root',
],
};
2 changes: 2 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {sidebarGeneral} from './sidebarGeneral';
import {sidebarGetInvolved} from './sidebarGetInvolved';
import {sidebarNode} from './sidebarNode';
import {sidebarParaTime} from './sidebarParatime';
import {sidebarROFL} from './sidebarRofl';

const sidebars: SidebarsConfig = {
...sidebarAdrs,
Expand All @@ -16,6 +17,7 @@ const sidebars: SidebarsConfig = {
...sidebarGetInvolved,
...sidebarNode,
...sidebarParaTime,
...sidebarROFL,
};

export default sidebars;
4 changes: 2 additions & 2 deletions src/remark/cross-repo-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const oasisSdkContractRegex = /https:\/\/github\.com\/oasisprotocol\/oasis-sdk\/
const oasisSdkRuntimeRegex = /https:\/\/github\.com\/oasisprotocol\/oasis-sdk\/blob\/main\/docs\/runtime\/(.*)\.mdx?(#.*)?/;
const oasisCoreRegex = /https:\/\/github\.com\/oasisprotocol\/oasis-core\/blob\/master\/docs\/(.*)\.mdx?(#.*)?/;
const adrsRegex = /https:\/\/github\.com\/oasisprotocol\/adrs\/blob\/main\/(.*)\.mdx?(#.*)?/;
const sapphireParatimeRegex = /https:\/\/github\.com\/oasisprotocol\/sapphire-paratime\/blob\/main\/(.*)\.mdx?(#.*)?/;
const sapphireParatimeRegex = /https:\/\/github\.com\/oasisprotocol\/sapphire-paratime\/blob\/main\/docs\/(.*)\.mdx?(#.*)?/;
const docsRegex = /https:\/\/github\.com\/oasisprotocol\/docs\/blob\/main\/docs\/(.*)\.mdx?(#.*)?/;

const indexReadmeRegex = /(index|README)($|#)/;
Expand Down Expand Up @@ -38,7 +38,7 @@ export default function plugin(): Transformer {
} else if (adrsRegex.test(node.url)) {
node.url = node.url.replace(adrsRegex, '/adrs/$1$2');
} else if (sapphireParatimeRegex.test(node.url)) {
node.url = node.url.replace(sapphireParatimeRegex, '/sapphire-paratime/$1$2');
node.url = node.url.replace(sapphireParatimeRegex, '/dapp/sapphire/$1$2');
} else if (docsRegex.test(node.url)) {
node.url = node.url.replace(docsRegex, '/$1$2');
} else {
Expand Down

0 comments on commit 7138acc

Please sign in to comment.