From 2e59f8d0c0f369f6fe7337ce2d6a5977f82acbac Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Tue, 10 Sep 2024 13:25:55 +0200 Subject: [PATCH 1/3] Fix sapphire-paratime repository link rewriting --- src/remark/cross-repo-links.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remark/cross-repo-links.ts b/src/remark/cross-repo-links.ts index 31a921957d..8b582b6646 100644 --- a/src/remark/cross-repo-links.ts +++ b/src/remark/cross-repo-links.ts @@ -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)($|#)/; @@ -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 { From 7afc742cc1e81adadea842a999cf3edb950a3cef Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Thu, 4 Jul 2024 10:18:30 +0200 Subject: [PATCH 2/3] docs: Add ROFL --- docs/rofl/README.mdx | 30 ++++++++++++++++++++++++++++++ docs/rofl/app.md | 1 + docs/rofl/prerequisites.md | 1 + docs/rofl/rofl.svg | 1 + docs/rofl/trust-root.md | 1 + docusaurus.config.ts | 6 ++++++ external/oasis-sdk | 2 +- sidebarRofl.ts | 14 ++++++++++++++ sidebars.ts | 2 ++ 9 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 docs/rofl/README.mdx create mode 120000 docs/rofl/app.md create mode 120000 docs/rofl/prerequisites.md create mode 120000 docs/rofl/rofl.svg create mode 120000 docs/rofl/trust-root.md create mode 100644 sidebarRofl.ts diff --git a/docs/rofl/README.mdx b/docs/rofl/README.mdx new file mode 100644 index 0000000000..44812b02ea --- /dev/null +++ b/docs/rofl/README.mdx @@ -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]. + + + +[Oasis Runtime SDK]: + https://github.com/oasisprotocol/oasis-sdk/tree/main/runtime-sdk diff --git a/docs/rofl/app.md b/docs/rofl/app.md new file mode 120000 index 0000000000..50a112030a --- /dev/null +++ b/docs/rofl/app.md @@ -0,0 +1 @@ +../../external/oasis-sdk/docs/rofl/app.md \ No newline at end of file diff --git a/docs/rofl/prerequisites.md b/docs/rofl/prerequisites.md new file mode 120000 index 0000000000..4de79acf45 --- /dev/null +++ b/docs/rofl/prerequisites.md @@ -0,0 +1 @@ +../../external/oasis-sdk/docs/rofl/prerequisites.md \ No newline at end of file diff --git a/docs/rofl/rofl.svg b/docs/rofl/rofl.svg new file mode 120000 index 0000000000..08856b30e0 --- /dev/null +++ b/docs/rofl/rofl.svg @@ -0,0 +1 @@ +../../external/oasis-sdk/docs/rofl/rofl.svg \ No newline at end of file diff --git a/docs/rofl/trust-root.md b/docs/rofl/trust-root.md new file mode 120000 index 0000000000..5b666d55c0 --- /dev/null +++ b/docs/rofl/trust-root.md @@ -0,0 +1 @@ +../../external/oasis-sdk/docs/rofl/trust-root.md \ No newline at end of file diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 5f5b1a3864..f602c4ec4b 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -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/', diff --git a/external/oasis-sdk b/external/oasis-sdk index 385af35781..bb693c137c 160000 --- a/external/oasis-sdk +++ b/external/oasis-sdk @@ -1 +1 @@ -Subproject commit 385af35781072dbe3d5e29f93951972f8ed71e92 +Subproject commit bb693c137cb20c5044a810a9e471204182b27885 diff --git a/sidebarRofl.ts b/sidebarRofl.ts new file mode 100644 index 0000000000..06add668ed --- /dev/null +++ b/sidebarRofl.ts @@ -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', + ], +}; diff --git a/sidebars.ts b/sidebars.ts index dbec4e54fb..0e6781e1a9 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -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, @@ -16,6 +17,7 @@ const sidebars: SidebarsConfig = { ...sidebarGetInvolved, ...sidebarNode, ...sidebarParaTime, + ...sidebarROFL, }; export default sidebars; From 683e7f0b133d7032ea4d740b3ff30abee0cc6cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Wed, 11 Sep 2024 13:02:51 +0200 Subject: [PATCH 3/3] docs: Add Build ROFL to the landing page --- docs/README.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/README.mdx b/docs/README.mdx index 069c4e0eab..8a17612dab 100644 --- a/docs/README.mdx +++ b/docs/README.mdx @@ -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. + + + ## Get Involved Contains information on official channels to get in touch with the Oasis Network