From 5de0b4b33a4e8f089be0cf508028592f76fad351 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 29 Sep 2023 16:26:25 +0200 Subject: [PATCH 1/9] Testnet phases --- config.ts | 4 + content/module-2/5-testnet.md | 37 ++++++ content/module-2/index.md | 7 +- package-lock.json | 205 +++++++++++++++++++++++++++++----- package.json | 5 +- 5 files changed, 231 insertions(+), 27 deletions(-) create mode 100644 content/module-2/5-testnet.md diff --git a/config.ts b/config.ts index 14ed72c..9c813fb 100644 --- a/config.ts +++ b/config.ts @@ -76,6 +76,10 @@ const config: Config = { { label: 'Topos CLI', path: '/content/module-2/4-cli.html' + }, + { + label: 'Topos Testnet', + path: '/content/module-2/5-testnet.html' } ] }, diff --git a/content/module-2/5-testnet.md b/content/module-2/5-testnet.md new file mode 100644 index 0000000..7dd4af1 --- /dev/null +++ b/content/module-2/5-testnet.md @@ -0,0 +1,37 @@ +--- +title: Topos Testnet +description: The Topos testnet, overview and how-to +--- + +# Topos Testnet + +The Topos protocol is undergoing heavy development and features will be rolled out incrementally over time until mainnet is launched in 2024. The phases outlined below will change as detailed planning progresses. + +- Phase 1: Core Infrastructure + - Basic building blocks, e.g. + - Networking and block production/propagation + - Node synchronization and transactions processing + - Smart Contract deployment and interaction + - Fully working system, ready for early adopters to use <-- YOU ARE HERE! +- Phase 2: Community + - Open the Topos ecosystem to interact with third party testnets + - ZK-related developer tooling + - Refinement and polish of Phase 1 components + - Community on-boarding and involvement +- Phase 3: Ecosystem + - Staking, delegation and token issuance mechanics + - On-chain governance + - Permissionless subnet registration + - Complete tooling suite (e.g. explorer, exchange integration tools, “stdlib” for Smart contract developers etc) +- Phase 4: Advanced features + - Certificates are threshold signed, pubkey as registration key/ID, and key resharing enabled (ICE-FROST) + - Oracle integration + - On-chain protocol upgrades + - zkEVM integration +- Phase 5: Security and stress test + - Penetration Testing + - Bounty Programs + - Network Stress Testing + - Cryptography Audits + - Smart Contract Audits + - TCE Audits diff --git a/content/module-2/index.md b/content/module-2/index.md index da9bb12..89e56f8 100644 --- a/content/module-2/index.md +++ b/content/module-2/index.md @@ -11,7 +11,7 @@ The second chapter of the Topos Developer Portal brings you into contact with th ![](./images/topos_header_handson.png) ## Start experimenting - + If you're ready to go, click below to begin trying out your first cross-subnet token transfer on the Topos `Testnet`. @@ -41,4 +41,9 @@ The second chapter of the Topos Developer Portal brings you into contact with th The Topos CLI is frequently mentioned in this chapter – here you will look at it directly. You will install and test the tool that allows you to collectively start and run the different components you have been exploring. + + + The Topos public testnet is there for our developer community to deploy apps and experiment with the novel interaction model the Topos protocol enables. In this section we present the facilities available to you and provide a few pointers on how to deploy your own work. + + diff --git a/package-lock.json b/package-lock.json index d565220..68e4927 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "topos-docs-platform", "version": "1.0.0", "hasInstallScript": true, + "license": "MIT", "dependencies": { "@docsearch/react": "^3.5.1", "@mdx-js/react": "^2.3.0", @@ -24,13 +25,16 @@ "gatsby-source-filesystem": "^5.11.0", "gatsby-transformer-remark": "^6.11.0", "gatsby-transformer-sharp": "^5.11.0", + "install": "^0.13.0", "jimp": "^0.22.8", "jsx-runtime": "^1.2.0", "katex": "^0.13.24", "prismjs": "^1.29.0", "react": "^18.2.0", "react-cookie": "^4.1.1", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "sharp": "^0.32.6", + "watcher": "^2.3.0" }, "devDependencies": { "@react-spring/web": "^9.7.3", @@ -5831,6 +5835,11 @@ "deep-equal": "^2.0.5" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "node_modules/babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -8470,6 +8479,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/dettle": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dettle/-/dettle-1.0.1.tgz", + "integrity": "sha512-/oD3At60ZfhgzpofJtyClNTrIACyMdRe+ih0YiHzAniN0IZnLdLpEzgR6RtGs3kowxUkTnvV/4t1FBxXMUdusQ==" + }, "node_modules/devcert": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/devcert/-/devcert-1.2.2.tgz", @@ -9926,6 +9940,11 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -13769,6 +13788,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/install": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -20325,6 +20352,11 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -22241,18 +22273,18 @@ "integrity": "sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg==" }, "node_modules/sharp": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz", - "integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "hasInstallScript": true, "dependencies": { "color": "^4.2.3", - "detect-libc": "^2.0.1", + "detect-libc": "^2.0.2", "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.5.0", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" }, "engines": { @@ -22263,9 +22295,9 @@ } }, "node_modules/sharp/node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "engines": { "node": ">=8" } @@ -22287,9 +22319,9 @@ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, "node_modules/sharp/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -22300,6 +22332,26 @@ "node": ">=10" } }, + "node_modules/sharp/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/sharp/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/sharp/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -22693,6 +22745,15 @@ "node": ">=10.0.0" } }, + "node_modules/streamx": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", + "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", @@ -22897,6 +22958,11 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/stubborn-fs": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-1.2.5.tgz", + "integrity": "sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==" + }, "node_modules/style-loader": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", @@ -23451,6 +23517,11 @@ "resolved": "https://registry.npmjs.org/timm/-/timm-1.7.1.tgz", "integrity": "sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw==" }, + "node_modules/tiny-readdir": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tiny-readdir/-/tiny-readdir-2.2.0.tgz", + "integrity": "sha512-bO4IgID5M2x5YQFBru/wREgT30YuA8aoOd/F8Rd6LKRIn1gOe9aREjT74J9EVukHqI/2RB+4SM1RgXM0gwxoWw==" + }, "node_modules/tinycolor2": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", @@ -24330,6 +24401,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/watcher": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/watcher/-/watcher-2.3.0.tgz", + "integrity": "sha512-6hVpT1OhmYTZhsgUND2o2gTL79TosB1rH8DWzDO7KBlyR9Yuxg/LXUGeHJqjjvwpnyHT7uUdDwWczprJuqae9Q==", + "dependencies": { + "dettle": "^1.0.1", + "stubborn-fs": "^1.2.5", + "tiny-readdir": "^2.2.0" + } + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -29088,6 +29169,11 @@ "deep-equal": "^2.0.5" } }, + "b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -31053,6 +31139,11 @@ } } }, + "dettle": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dettle/-/dettle-1.0.1.tgz", + "integrity": "sha512-/oD3At60ZfhgzpofJtyClNTrIACyMdRe+ih0YiHzAniN0IZnLdLpEzgR6RtGs3kowxUkTnvV/4t1FBxXMUdusQ==" + }, "devcert": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/devcert/-/devcert-1.2.2.tgz", @@ -32177,6 +32268,11 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -34930,6 +35026,11 @@ } } }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" + }, "internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -39353,6 +39454,11 @@ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, + "queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -40754,24 +40860,24 @@ "integrity": "sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg==" }, "sharp": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz", - "integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "requires": { "color": "^4.2.3", - "detect-libc": "^2.0.1", + "detect-libc": "^2.0.2", "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.5.0", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" }, "dependencies": { "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==" }, "lru-cache": { "version": "6.0.0", @@ -40787,13 +40893,33 @@ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } }, + "tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "requires": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -41096,6 +41222,15 @@ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" }, + "streamx": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", + "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "requires": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", @@ -41252,6 +41387,11 @@ "peek-readable": "^4.1.0" } }, + "stubborn-fs": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-1.2.5.tgz", + "integrity": "sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==" + }, "style-loader": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", @@ -41658,6 +41798,11 @@ "resolved": "https://registry.npmjs.org/timm/-/timm-1.7.1.tgz", "integrity": "sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw==" }, + "tiny-readdir": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tiny-readdir/-/tiny-readdir-2.2.0.tgz", + "integrity": "sha512-bO4IgID5M2x5YQFBru/wREgT30YuA8aoOd/F8Rd6LKRIn1gOe9aREjT74J9EVukHqI/2RB+4SM1RgXM0gwxoWw==" + }, "tinycolor2": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", @@ -42283,6 +42428,16 @@ "unist-util-stringify-position": "^3.0.0" } }, + "watcher": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/watcher/-/watcher-2.3.0.tgz", + "integrity": "sha512-6hVpT1OhmYTZhsgUND2o2gTL79TosB1rH8DWzDO7KBlyR9Yuxg/LXUGeHJqjjvwpnyHT7uUdDwWczprJuqae9Q==", + "requires": { + "dettle": "^1.0.1", + "stubborn-fs": "^1.2.5", + "tiny-readdir": "^2.2.0" + } + }, "watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/package.json b/package.json index fde5ff4..c12f11f 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,16 @@ "gatsby-source-filesystem": "^5.11.0", "gatsby-transformer-remark": "^6.11.0", "gatsby-transformer-sharp": "^5.11.0", + "install": "^0.13.0", "jimp": "^0.22.8", "jsx-runtime": "^1.2.0", "katex": "^0.13.24", "prismjs": "^1.29.0", "react": "^18.2.0", "react-cookie": "^4.1.1", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "sharp": "^0.32.6", + "watcher": "^2.3.0" }, "devDependencies": { "@react-spring/web": "^9.7.3", From 0e109f3d0df78efac6cebe16de18c88e4243ccc3 Mon Sep 17 00:00:00 2001 From: David Palm Date: Sun, 1 Oct 2023 13:07:30 +0200 Subject: [PATCH 2/9] docs: tweaks, clarifications and some new content about the roadmap --- content/module-2/1-ERC20-Messaging.md | 31 ++++++------ content/module-2/2-explorer.md | 10 ++-- content/module-2/3-topos-playground.md | 22 ++++---- content/module-2/4-cli.md | 26 +++++----- content/module-2/5-testnet.md | 70 +++++++++++++++----------- content/module-2/index.md | 4 +- 6 files changed, 90 insertions(+), 73 deletions(-) diff --git a/content/module-2/1-ERC20-Messaging.md b/content/module-2/1-ERC20-Messaging.md index 8f57da6..b21e11f 100644 --- a/content/module-2/1-ERC20-Messaging.md +++ b/content/module-2/1-ERC20-Messaging.md @@ -5,7 +5,7 @@ description: Test cross-subnet ERC-20 token transfer # ERC20 Messaging dApp -It is time to make your first steps with the Topos `Testnet` and get familiar with it. To do so, you will use a basic dApp provided by Topos: the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**. It is a sample application that allows you to experience Topos as a user. Later, you can find out more about the actions that are triggered and executed on the `Testnet` during your test. +It is time to take your first steps with the Topos Testnet and get familiar with the mechanics of using and developing with Topos. To do so, you will use a basic dApp provided by Topos: the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**. It is a sample application that allows you to experience Topos as a user transfering funds from one soverign blockchain to another. Later, you can find out more about the actions that are triggered and executed on the public testnet during your test. ## Visit the ERC20 Messaging dApp @@ -17,17 +17,17 @@ Please make sure you have installed [MetaMask](https://metamask.io/download/) be With MetaMask installed, you can navigate to [ERC20 Messaging](https://dapp-frontend-erc20.testnet-1.topos.technology/): -![dApp first page](./images/erc20index.png) +![dApp first page](./images/erc20index.png) You are now going to complete a cross-subnet, fungible token transfer from the Topos Subnet to the Incal subnet. -First, you must connect MetaMask with the **ERC20 Messaging dApp**: +First, you must connect MetaMask with the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**: -![dApp connect with MetaMask 1](./images/erc20connect.png) +![dApp connect with MetaMask 1](./images/erc20connect.png) @@ -54,7 +54,7 @@ Add Incal too: ![dApp adds network Incal](./images/erc20incalnetwork.png) -If the network is already added to MetaMask, it will just ask for permission to switch the network if you pick up a subnet. For example, for Topos: +If the network is already added to MetaMask, it will just ask for permission to switch the network. For example, for Topos: ![Switch network to Topos](./images/erc20switchnetworktopos.png) @@ -86,7 +86,7 @@ Register a token, here named `testToken`: -In order to register tokens on the subnets, you will need to pay fees on both subnets. Use the [Topos Faucet](https://faucet.testnet-1.topos.technology): +In order to register tokens on the subnets, you will need to pay fees on both subnets. Use the [Topos Faucet](https://faucet.testnet-1.topos.technology) to get some: ![Get some TOPOS and INCAL](./images/faucetindex.png) @@ -96,7 +96,7 @@ Make sure that the tokens are sent: ![Tokens sent](./images/faucetsuc.png) -Now you can pay the necessary fee for a token registration (e.g., for the Incal subnet): +Now you can pay the necessary fee for a token registration (e.g. for the Incal subnet): ![Pay INCA fee](./images/incafee.png) @@ -162,17 +162,17 @@ It should give you a success message, like the following: -MetaMask remembers the [nonce](https://ethereum.org/en/developers/docs/transactions/) it used for your last transaction. This is an issue if you `clean` and re-`start` your playground, as transaction nonces have to start from `0` on a new network. Follow [this guideline](https://support.metamask.io/hc/en-us/articles/360015488891-How-to-clear-your-account-activity-reset-account). +MetaMask remembers the [nonce](https://ethereum.org/en/developers/docs/transactions/) it used for your last transaction. This is an issue if you `clean` and re-`start` your playground or if the testnet is reset, as transaction nonces have to start from `0` on a new network. Follow [this guideline](https://support.metamask.io/hc/en-us/articles/360015488891-How-to-clear-your-account-activity-reset-account) to reset the nonce. -You can never be too sure that you cleaned your setup enough, so if in doubt you can disconnect your MetaMask account from the frontend. For information on this, follow [this guideline](https://support.metamask.io/hc/en-us/articles/360059535551-Disconnect-wallet-from-a-dapp). +If you need to deep-clean your setup enough, you can disconnect your MetaMask account from the frontend. For information on how to do this this, follow [this guideline](https://support.metamask.io/hc/en-us/articles/360059535551-Disconnect-wallet-from-a-dapp). -Networks may change between Playground versions, while MetaMask may believe that it has the correct information based solely on an ID. To remove the Topos and Incal networks from MetaMask, follow [this guideline](https://support.metamask.io/hc/en-us/articles/4502810252059-How-to-remove-networks). +Networks may change between Playground versions or when the testnet is reset; MetaMask only has a network ID that typically never changes. To remove the Topos and Incal networks from MetaMask, follow [this guideline](https://support.metamask.io/hc/en-us/articles/4502810252059-How-to-remove-networks). @@ -184,10 +184,13 @@ Networks may change between Playground versions, while MetaMask may believe that The following steps describe what actually happened: 1. The ERC20 Messaging frontend deployed a token contract on each subnet for the token you registered on it. -2. It submitted a transaction to the Incal subnet in order to burn the transferred tokens on the Incal subnet. -3. It made a request on the [executor service](https://github.com/topos-protocol/executor-service). It submitted the Merkle proof of the transaction (proof of inclusion of its receipt in the receipt trie of the certified state transition) and the root of the transaction trie to the executor service, which is used by the **ERC20Messaging** contract to retrieve the certificate from the **ToposCore** contract. -4. This certificate was emitted and then stored on-chain by the Topos Subnet. -5. The Topos Subnet minted your transferred tokens. +1. To make a cross-subnet transfer, the dApp submitted a transaction to the Incal subnet to burn the transferred tokens there. +1. Next, the sending subnet (Incal) prepares the input data for the ZK proof and submits it to the prover cluster by way of the Sequencer +1. The sequencer prepares the Certificate, containing the ZK proof and a few other pieces of data and broadcasts it to the TCE network. +1. In parallel, the ERC20 frontend made a request to the [executor service](https://github.com/topos-protocol/executor-service) containing a Merkle proof of the Incal transaction (proof of inclusion of its receipt in the receipt trie of the certified state transition) and the root of the transaction trie, which is used by the **ERC20Messaging** contract to retrieve the certificate from the **ToposCore** contract. +1. Once the receiving side (the Topos Subnet in this case) has taken delivery of the Certificate from its dedicated TCE node and the context-specific information from the executor service, it can proceed to mint the transferred tokens. + +**Note**: In the current iteration of the testnet, no ZK proofs are actually computed and TCE nodes are implemented as part of the Topos Subnet validators. # Up next diff --git a/content/module-2/2-explorer.md b/content/module-2/2-explorer.md index 91378ff..2631f8f 100644 --- a/content/module-2/2-explorer.md +++ b/content/module-2/2-explorer.md @@ -7,7 +7,7 @@ description: Inspect your local network You have tried the **ERC20 Messaging dApp** to see Topos in action and have executed a cross-subnet token transfer. You were presented with a very high-level view of what happened, just like what a user would see. -You can now use the **[Topos Explorer](https://explorer.testnet-1.topos.technology)** to see more details. Because Topos subnets are EVM-based, an explorer for Topos can use the usual exposed Ethereum [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). In addition, the Transmission Control Engine (TCE) will expose a [GraphQL](https://en.wikipedia.org/wiki/GraphQL) endpoint. +You can now use the **[Topos Explorer](https://explorer.testnet-1.topos.technology)** to see more details. Because Topos subnets are EVM-based, an explorer for Topos can use the standard Ethereum [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). In addition, the Transmission Control Engine (TCE) will expose a [GraphQL](https://en.wikipedia.org/wiki/GraphQL) endpoint. {/* include more information about the TCE API if available */} @@ -16,7 +16,7 @@ You can now use the **[Topos Explorer](https://explorer.testnet-1.topos.technolo Navigate to the [Topos Explorer](https://explorer.testnet-1.topos.technology): -![Explorer first page](./images/explorerindex.png) +![Explorer first page](./images/explorerindex.png) @@ -68,7 +68,7 @@ If you look at the **Topos Subnet** by clicking on the *Subnet* tab, you will ob ![Topos Subnet overview](./images/topossubnetoverviewexplorer.png) -The Explorer catches live data in the moment without an indexer running in the background. Nevertheless you can find a link to [all certificates](https://explorer.testnet-1.topos.technology/subnet/certificates) above the latest certificates or search old blocks and certificates. +The Explorer displays live data without an indexer running in the background, meaning that in its current state you do not have access to historical blocks. Nevertheless you can find a link to [all certificates](https://explorer.testnet-1.topos.technology/subnet/certificates) above the latest certificates or search old blocks and certificates. During your tests with the Playground, you created some transactions. Look for the blocks including these transactions: @@ -87,10 +87,10 @@ Here you can see that the cross-subnet token transfer you invoked triggered a ca You learned about the **ERC20Messaging** contract in the [first chapter](../module-1/4-protocol.html#messaging-protocol-smart-contracts). This optional contract is used in the context of the **ERC20 Messaging dApp** for cross-subnet token transfers. -Topos guarantees that certificates are delivered with certain conditions fulfilled, like causal ordering. The execution logic of the transactions included in those certificates is not part of the core protocol. The [Topos executor service](https://github.com/topos-protocol/executor-service) on the other hand is an example implementation for such a logic. You can call the [executor service API endpoint](https://executor-service.testnet-1.topos.technology/api/v1) in your browser in order to receive further information. Note that you will need to [authenticate your request](https://github.com/topos-protocol/executor-service#authentication-auth0). +Topos guarantees that certificates are delivered with certain conditions fulfilled, like causal ordering. The execution logic of the transactions included in those certificates is not part of the core protocol. The [Topos executor service](https://github.com/topos-protocol/executor-service) on the other hand is an example implementation for such a logic. You can call the [executor service API endpoint](https://executor-service.testnet-1.topos.technology/api/v1) in your browser to explore what's on offer. Note that you will need to [authenticate your request](https://github.com/topos-protocol/executor-service#authentication-auth0). # Up next -It is nice to have these kinds of tools to get started with a new protocol. Of course, a lot of details remain hidden. The next section will explain how to run a local network and examine the actions that took place during your test. +It is nice to have these kinds of tools to get started with a new protocol. Of course, we have glossed over a lot of details. The next section will explain how to run a local network and examine the actions performed during your test. diff --git a/content/module-2/3-topos-playground.md b/content/module-2/3-topos-playground.md index a3b8358..881dc91 100644 --- a/content/module-2/3-topos-playground.md +++ b/content/module-2/3-topos-playground.md @@ -5,7 +5,7 @@ description: Install and test cross-subnet ERC-20 locally # Topos Playground -The [Topos Playground](https://github.com/topos-protocol/topos-playground) installs and launches all the elements that compose a local test network. The first part of this section is optional and will let you test locally what you already experienced on `Testnet`. +The [Topos Playground](https://github.com/topos-protocol/topos-playground) installs and launches all the elements that compose a local test network. The first part of this section is optional and will let you test locally what you already experienced on the `Testnet`. ## Component overview @@ -16,7 +16,7 @@ Before you dive in, take a moment to understand the Playground at a high level. * The [Incal Subnet](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/v0.1.6/subnet-incal.yml), a standard subnet, which will demonstrate the execution of cross-subnet messages. * A [TCE network](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/v0.1.6/tce.yml), which will consist of five TCE nodes in order to achieve a [reliable broadcast](../module-1/4-protocol.html#transmission-control-engine-tce-) of the certificates. * A [dApp](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4), to interact with the deployed network and trigger cross-subnet messages. -* An [executor service](https://github.com/topos-protocol/executor-service/tree/v0.2.0), which is an example implementation to execute cross-subnet messages on the receiving subnet. +* An [executor service](https://github.com/topos-protocol/executor-service/tree/v0.2.0), which is an example implementation to execute cross-subnet calls on the receiving subnet. @@ -146,7 +146,7 @@ If everything works correctly, you should see: -With everything running, you can start interacting with the frontend. You should be familiar with the frontend from the [previous section](./1-ERC20-Messaging.html). In addition, you can use the **Topos Explorer** to observe your local network. Just use [your local endpoints instead of the `Testnet`](./2-explorer.html). +With everything running, you can start interacting with the frontend. You should be familiar with the frontend from the [previous section](./1-ERC20-Messaging.html). In addition, you can use the **Topos Explorer** to observe your local network. Just use [your local endpoints instead of the `Testnet`](./2-explorer.html). ## Components in-depth @@ -163,36 +163,36 @@ This section will look at each of them. The Playground first [bootstraps a TCE node](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/c44ee1d46018eaab1e78e092393b3c75aa2ab82d/tce.yml#L11), and then runs [four additional TCE nodes](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/c44ee1d46018eaab1e78e092393b3c75aa2ab82d/tce.yml#L59) alongside it. All five TCE nodes will broadcast certificates – the first one generates keys for testing purposes. These TCE nodes are spawned with the help of the **Topos CLI**, which you will learn about and experiment with in the next section. -{/* update after TCE is able to use ICE-FROST and if the Topos playground includes it */} +{/* update after TCE is useing ICE-FROST */} ## The Topos Subnet [You have already learned](../module-1/4-protocol.html#subnets) that the **Topos Subnet** is a special element of the zkEcosystem. The [underlying Docker Compose file](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/subnet-topos.yml) for it includes: * One container which generates the keys and subnet genesis block, and also sets the consensus to [Istanbul Byzantine Fault Tolerant (IBFT)](https://docs.kaleido.io/kaleido-platform/protocol/polygon) during initialization. This is done with the help of [Polygon Edge](https://www.kaleido.io/polygon-edge). -* Four Polygon Edge node containers, of which the first one exposes the JSON-RPC API. -* One sequencer container, which communicates with the _TCE network_. The sequencer container utilizes the [Topos CLI](https://github.com/topos-protocol/topos) in order to [set up a sequencer node](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/45450c2376a3aa28a2eed7119b59c29f7625b545/subnet-topos.yml#L147). +* Four Polygon Edge node containers, of which the first exposes the JSON-RPC API. +* A sequencer container, which communicates with the TCE network. The sequencer container utilizes the [Topos CLI](https://github.com/topos-protocol/topos) in order to [start a sequencer node](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/45450c2376a3aa28a2eed7119b59c29f7625b545/subnet-topos.yml#L147). ## The Incal Subnet -Because the **Topos Playground** is just a basic tool for demonstration and local testing, the network topology of the subnets it creates is similar. [Incal](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/subnet-incal.yml) consists of four node containers and one sequencer container. In addition, one container creates the keys and the genesis block. If the TCE network is up, the sequencer subscribes to it for the relevant certificates and sends certificates to it. +Because the **Topos Playground** is just a basic tool for demonstration and local testing, the network topology of the subnets it creates is similar. [Incal](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/subnet-incal.yml) consists of four node containers and one sequencer container. In addition, one container creates the keys and the genesis block. When the TCE network is up, the sequencer subscribes to it to receive relevant certificates and to broadcast own certificates to it. -After the subnet is started and is ready, the [Playground starts a container](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/contracts.yml) for the contracts: +After the subnet is ready, the [Playground starts a container](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/contracts.yml) for the contracts: * One container to prepare necessary artifacts in order to deploy the contracts. * One container for the Incal subnet to deploy its [intended contracts](https://github.com/topos-protocol/topos-smart-contracts/tree/main/scripts). -This container also includes some [scripts](https://github.com/topos-protocol/topos-smart-contracts/tree/main/scripts) – for example, for contract deployments and subnet registrations. So, by default, [the Incal subnet is registered](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/45450c2376a3aa28a2eed7119b59c29f7625b545/contracts.yml#L34) on the Topos Subnet. The contract container is meant to run once and exit after the deployment. +This container also includes some [scripts](https://github.com/topos-protocol/topos-smart-contracts/tree/main/scripts) – for example, for contract deployments and subnet registrations. So, by default, [the Incal subnet is registered](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/45450c2376a3aa28a2eed7119b59c29f7625b545/contracts.yml#L34) on the Topos Subnet. The contract container runs once and exit after the deployment. ## The ERC20 Messaging frontend -The ERC20 Messaging frontend for the Playground consists of a [basic web server](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/backend) and the [frontend](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/frontend) you interacted with previously. The frontend utilizes the [ethers.js library](https://docs.ethers.org/v5/) to call the respective contracts. The first action you tried, the registration of a token, invokes a [`deployToken`](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/blob/v0.1.4/packages/frontend/src/hooks/useRegisterToken.ts#L41) call on the [ERC20Messaging contract](https://github.com/topos-protocol/topos-smart-contracts/blob/main/contracts/examples/ERC20Messaging.sol). Similarly, you can see that a token is sent by calling the [`sendToken`](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/blob/v0.1.4/packages/frontend/src/hooks/useSendToken.ts#L34) function of [the contract](https://github.com/topos-protocol/topos-smart-contracts/blob/da41ebbeaeb3ed91b5aa1c6e750f754a7316f721/contracts/examples/ERC20Messaging.sol#L97). +The ERC20 Messaging frontend for the Playground consists of a [basic web server](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/backend) and the [frontend](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/frontend) you interacted with previously. The frontend utilizes the [ethers.js library](https://docs.ethers.org/v5/) to call the respective contracts. The first action you tried, the registration of a token, invokes the [`deployToken`](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/blob/v0.1.4/packages/frontend/src/hooks/useRegisterToken.ts#L41) function on the [ERC20Messaging contract](https://github.com/topos-protocol/topos-smart-contracts/blob/main/contracts/examples/ERC20Messaging.sol). Similarly, you can see that a token is sent by calling the [`sendToken`](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/blob/v0.1.4/packages/frontend/src/hooks/useSendToken.ts#L34) function of [the contract](https://github.com/topos-protocol/topos-smart-contracts/blob/da41ebbeaeb3ed91b5aa1c6e750f754a7316f721/contracts/examples/ERC20Messaging.sol#L97). To be more precise, a cross-subnet token transfer is divided into the [three steps](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/frontend/src/components/steps) that were displayed by the ERC20 Messaging frontend during your test. You can examine the code to better understand the process behind the steps. One thing to mention specifically in relation to the Playground is the [use of the executor service](https://github.com/topos-protocol/dapp-frontend-erc20-messaging/tree/v0.1.4/packages/frontend/src/components/steps/Step2.tsx#L169). What the service essentially does is: -1. [Wait](https://github.com/topos-protocol/executor-service/blob/v0.2.0/src/execute/execute.processor.ts#L84) for the expected certificate to be stored on-chain. +1. [Wait](https://github.com/topos-protocol/executor-service/blob/v0.2.0/src/execute/execute.processor.ts#L84) for the expected certificate to be delivered. 2. [Submit](https://github.com/topos-protocol/executor-service/blob/v0.2.0/src/execute/execute.processor.ts#L99) the transaction payload and Merkle proof of inclusion. # Up next diff --git a/content/module-2/4-cli.md b/content/module-2/4-cli.md index 438eb41..eaa6aed 100644 --- a/content/module-2/4-cli.md +++ b/content/module-2/4-cli.md @@ -11,7 +11,7 @@ The Topos CLI has already been mentioned many times in this chapter. Now it is t ## Install from the source -You will fetch and build the [Topos CLI](https://github.com/topos-protocol/topos) from the source. This may take some time; alternatively, you can [download and run a released version directly](https://github.com/topos-protocol/topos/releases/). This section assumes that you work with [version 0.0.3](https://github.com/topos-protocol/topos/releases/tag/v0.0.3). +You will fetch and build the [Topos CLI](https://github.com/topos-protocol/topos) from the source. This may take some time; alternatively, you can [download and run a released version directly](https://github.com/topos-protocol/topos/releases/). This section assumes that you work with [version 0.0.5](https://github.com/topos-protocol/topos/releases/tag/v0.0.5). @@ -25,7 +25,7 @@ When you are ready, use `cargo` to fetch and compile the CLI: ```sh -$ cargo install topos --git https://github.com/topos-protocol/topos --tag v0.0.3 +$ cargo install topos --git https://github.com/topos-protocol/topos --tag v0.0.5 ``` @@ -38,7 +38,7 @@ FROM rust:1.72.0-bullseye RUN apt-get update RUN apt-get install --yes protobuf-compiler llvm-dev libclang-dev clang -RUN cargo install topos --git https://github.com/topos-protocol/topos --tag v0.0.3 +RUN cargo install topos --git https://github.com/topos-protocol/topos --tag v0.0.5 ENTRYPOINT [ "topos" ] ``` @@ -46,7 +46,7 @@ ENTRYPOINT [ "topos" ] Then create the image: ```sh -$ docker build . -f topos-cli.dockerfile -t topos-cli:v0.0.3 +$ docker build . -f topos-cli.dockerfile -t topos-cli:v0.0.5 ``` @@ -67,7 +67,7 @@ $ topos --help ```sh -$ docker run --rm topos-cli:v0.0.3 --help +$ docker run --rm topos-cli:v0.0.5 --help ``` @@ -87,7 +87,7 @@ Commands: setup Topos CLI subcommand for the setup of various Topos-related components (e.g., installation of Polygon Edge binary) subnet Topos CLI subcommand for the Polygon Edge-related functionalities node Utility to manage your nodes in the Topos network - doctor + doctor help Print this message or the help of the given subcommand(s) Options: @@ -127,7 +127,7 @@ Add to your `topos-cli.dockerfile`: After that, you need to rebuild the image. This should be fast, as it only runs these additional steps: ```sh -$ docker build . -f topos-cli.dockerfile -t topos-cli:v0.0.3 +$ docker build . -f topos-cli.dockerfile -t topos-cli:v0.0.5 ``` @@ -147,7 +147,7 @@ $ topos setup subnet --help ```sh $ docker run --rm \ - topos-cli:v0.0.3 setup subnet --help + topos-cli:v0.0.5 setup subnet --help ``` @@ -180,7 +180,7 @@ $ topos node init --name val-alice ```sh $ docker run --rm \ -v $(pwd)/.config:/root/.config \ - topos-cli:v0.0.3 node init --name val-alice + topos-cli:v0.0.5 node init --name val-alice ``` @@ -256,7 +256,7 @@ $ topos node init --name seq-bob --role sequencer ```sh $ docker run --rm \ -v $(pwd)/.config:/root/.config \ - topos-cli:v0.0.3 node init --name seq-bob --role sequencer + topos-cli:v0.0.5 node init --name seq-bob --role sequencer ``` @@ -287,7 +287,7 @@ $ wget -P $TOPOS_HOME/subnet/topos/ https://gist.githubusercontent.com/gruberb/1 $ docker run --rm \ -v $(pwd)/.config:/root/.config \ --entrypoint wget \ - topos-cli:v0.0.3 -P $TOPOS_HOME/subnet/topos/ https://gist.githubusercontent.com/gruberb/19dbc24e9b2405e7562f63d4032450e6/raw/12499fdc40980209c7acd2146ee84c779dbe9e4d/genesis.json + topos-cli:v0.0.5 -P $TOPOS_HOME/subnet/topos/ https://gist.githubusercontent.com/gruberb/19dbc24e9b2405e7562f63d4032450e6/raw/12499fdc40980209c7acd2146ee84c779dbe9e4d/genesis.json ``` @@ -325,7 +325,7 @@ $ topos node up --name val-alice $ docker run --rm -it \ -v $(pwd)/.config:/root/.config \ --network net-topos-subnet \ - topos-cli:v0.0.3 node up --name val-alice + topos-cli:v0.0.5 node up --name val-alice ``` Do not forget to launch it inside the `net-topos-subnet` network. Be sure to use `-it` so that you can interrupt it with CTRL-C. @@ -349,7 +349,7 @@ $ topos node up --name seq-bob $ docker run --rm -it \ -v $(pwd)/.config:/root/.config \ --network net-topos-subnet \ - topos-cli:v0.0.3 node up --name seq-bob + topos-cli:v0.0.53 node up --name seq-bob ``` As before, do not forget to launch it inside the `net-topos-subnet` network so that it can contact `val-alice`. diff --git a/content/module-2/5-testnet.md b/content/module-2/5-testnet.md index 7dd4af1..0cd47b0 100644 --- a/content/module-2/5-testnet.md +++ b/content/module-2/5-testnet.md @@ -5,33 +5,47 @@ description: The Topos testnet, overview and how-to # Topos Testnet +The Topos testnet is comprised of two subnets, Incal and Topos Subnet, along with a sequencer and an instance of the Executor Service. It provides all the infrastructure needed to deploy Smart Contracts to Incal and interact across subnets. The architecture of the testnet is identical to what you saw in the [Topos Playground Overview](./1-ERC20-Messaging.html). +As mentioned [previously](./2-explorer.md), the Topos testnet explorer is available at [https://explorer.testnet-1.topos.technology](https://explorer.testnet-1.topos.technology). + The Topos protocol is undergoing heavy development and features will be rolled out incrementally over time until mainnet is launched in 2024. The phases outlined below will change as detailed planning progresses. -- Phase 1: Core Infrastructure - - Basic building blocks, e.g. - - Networking and block production/propagation - - Node synchronization and transactions processing - - Smart Contract deployment and interaction - - Fully working system, ready for early adopters to use <-- YOU ARE HERE! -- Phase 2: Community - - Open the Topos ecosystem to interact with third party testnets - - ZK-related developer tooling - - Refinement and polish of Phase 1 components - - Community on-boarding and involvement -- Phase 3: Ecosystem - - Staking, delegation and token issuance mechanics - - On-chain governance - - Permissionless subnet registration - - Complete tooling suite (e.g. explorer, exchange integration tools, “stdlib” for Smart contract developers etc) -- Phase 4: Advanced features - - Certificates are threshold signed, pubkey as registration key/ID, and key resharing enabled (ICE-FROST) - - Oracle integration - - On-chain protocol upgrades - - zkEVM integration -- Phase 5: Security and stress test - - Penetration Testing - - Bounty Programs - - Network Stress Testing - - Cryptography Audits - - Smart Contract Audits - - TCE Audits +## Phase 1: Core Infrastructure + +This is where we are today. Phase 1 provides the basic building blocks and connects them all together, providing the foundation for further work and refinement. Not all components are fully functional (e.g. no ZK proofs, deterministic broadcasts rather than trhe more performant probabilistic flavour described in the whitepaper), but all of the main interfaces are there and operational, ready for developers and early adopters. + +Included in Phase 1: + +- Networking and block production/propagation +- Node synchronization and transactions processing +- Smart Contract deployment and interaction + +## Phase 2: Community + +Phase 2 is where we onboard the community and enable a wider involvment of partners and users across web3 and enterprise. During Phase 2, we will integrate with existing third-party testnets, provide access to the Topos ZK stack to developers, provide a more extensive and polished suite of tools. + +## Phase 3: Ecosystem + +Phase 3 solidifies the community involvment into an actual ecosystem of projects, including the complete staking system (delegation, rewards, token issuance mechanics etc) and on-chain governance, allowing for permissionless subnet registration and collective decision making. In this phase we expect do deliver the full suite of required tooling (explorer, exchange integrationtools, "stdlib" for Smart Contract developers etc). + +## Phase 4: Advanced features +Phase 4 is where it all comes together and the full power of ZK cryptography is made available. + +Included in Phase 4: + +- Certificates are threshold signed, pubkey as registration key/ID, and key resharing enabled (ICE-FROST) +- Oracle integration +- On-chain protocol upgrades +- zkEVM integration + +## Phase 5: Security and stress test +Phase 5 is the last phase before mainnet and dedicated to tying up loose ends, perform audits, performance and stress tests. + +Included in Phase 5: + +- Penetration Testing +- Bounty Programs +- Network Stress Testing +- Cryptography Audits +- Smart Contract Audits +- TCE Audits diff --git a/content/module-2/index.md b/content/module-2/index.md index 89e56f8..46b39d4 100644 --- a/content/module-2/index.md +++ b/content/module-2/index.md @@ -42,8 +42,8 @@ The second chapter of the Topos Developer Portal brings you into contact with th - - The Topos public testnet is there for our developer community to deploy apps and experiment with the novel interaction model the Topos protocol enables. In this section we present the facilities available to you and provide a few pointers on how to deploy your own work. + + The Topos public testnet is there for our developer community to deploy apps and experiment with the novel interaction model the Topos protocol enables. It's an early preview of what is coming. In this section we present the upcoming phases to give interested parties and overview of the remaining phases. From ac4ef45f490a8e1ae3bd11fe48f119c68fd0a955 Mon Sep 17 00:00:00 2001 From: David Palm Date: Mon, 2 Oct 2023 12:07:38 +0200 Subject: [PATCH 3/9] docs: add link to live graphql instance --- content/module-2/2-explorer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/2-explorer.md b/content/module-2/2-explorer.md index 2631f8f..b7e3303 100644 --- a/content/module-2/2-explorer.md +++ b/content/module-2/2-explorer.md @@ -7,7 +7,7 @@ description: Inspect your local network You have tried the **ERC20 Messaging dApp** to see Topos in action and have executed a cross-subnet token transfer. You were presented with a very high-level view of what happened, just like what a user would see. -You can now use the **[Topos Explorer](https://explorer.testnet-1.topos.technology)** to see more details. Because Topos subnets are EVM-based, an explorer for Topos can use the standard Ethereum [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). In addition, the Transmission Control Engine (TCE) will expose a [GraphQL](https://en.wikipedia.org/wiki/GraphQL) endpoint. +You can now use the **[Topos Explorer](https://explorer.testnet-1.topos.technology)** to see more details. Because Topos subnets are EVM-based, an explorer for Topos can use the standard Ethereum [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). In addition, the Transmission Control Engine (TCE) will expose a [GraphQL](https://en.wikipedia.org/wiki/GraphQL) endpoint available ([here](https://graphql.topos-subnet.testnet-1.topos.technology/)). {/* include more information about the TCE API if available */} From 6cd9deb80e45d7e1feff5ccfcd048a3621445907 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:27:11 +0000 Subject: [PATCH 4/9] Update content/module-2/1-ERC20-Messaging.md Co-authored-by: Theo Gauthier --- content/module-2/1-ERC20-Messaging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/1-ERC20-Messaging.md b/content/module-2/1-ERC20-Messaging.md index b21e11f..d319e0a 100644 --- a/content/module-2/1-ERC20-Messaging.md +++ b/content/module-2/1-ERC20-Messaging.md @@ -5,7 +5,7 @@ description: Test cross-subnet ERC-20 token transfer # ERC20 Messaging dApp -It is time to take your first steps with the Topos Testnet and get familiar with the mechanics of using and developing with Topos. To do so, you will use a basic dApp provided by Topos: the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**. It is a sample application that allows you to experience Topos as a user transfering funds from one soverign blockchain to another. Later, you can find out more about the actions that are triggered and executed on the public testnet during your test. +It is time to take your first steps with the Topos Testnet and get familiar with the mechanics of using and developing with Topos. To do so, you will use a basic dApp provided by Topos: the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**. It is a sample application that allows you to experience Topos as a user transfering funds from one blockchain to another. Later, you can find out more about the actions that are triggered and executed on the public testnet during your test. ## Visit the ERC20 Messaging dApp From 4abedea0b1a1a4aacd2019ac0e78cf882502dac2 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:29:11 +0000 Subject: [PATCH 5/9] Update content/module-2/3-topos-playground.md Co-authored-by: Theo Gauthier --- content/module-2/3-topos-playground.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/3-topos-playground.md b/content/module-2/3-topos-playground.md index 881dc91..97676c0 100644 --- a/content/module-2/3-topos-playground.md +++ b/content/module-2/3-topos-playground.md @@ -163,7 +163,7 @@ This section will look at each of them. The Playground first [bootstraps a TCE node](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/c44ee1d46018eaab1e78e092393b3c75aa2ab82d/tce.yml#L11), and then runs [four additional TCE nodes](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/c44ee1d46018eaab1e78e092393b3c75aa2ab82d/tce.yml#L59) alongside it. All five TCE nodes will broadcast certificates – the first one generates keys for testing purposes. These TCE nodes are spawned with the help of the **Topos CLI**, which you will learn about and experiment with in the next section. -{/* update after TCE is useing ICE-FROST */} +{/* update after TCE is using ICE-FROST */} ## The Topos Subnet From d9ef3be3a72da5e2d8a3e99db03771da4a5d64c3 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:30:00 +0000 Subject: [PATCH 6/9] Update content/module-2/3-topos-playground.md Co-authored-by: Theo Gauthier --- content/module-2/3-topos-playground.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/3-topos-playground.md b/content/module-2/3-topos-playground.md index 97676c0..d6504ee 100644 --- a/content/module-2/3-topos-playground.md +++ b/content/module-2/3-topos-playground.md @@ -175,7 +175,7 @@ The Playground first [bootstraps a TCE node](https://github.com/topos-protocol/l ## The Incal Subnet -Because the **Topos Playground** is just a basic tool for demonstration and local testing, the network topology of the subnets it creates is similar. [Incal](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/subnet-incal.yml) consists of four node containers and one sequencer container. In addition, one container creates the keys and the genesis block. When the TCE network is up, the sequencer subscribes to it to receive relevant certificates and to broadcast own certificates to it. +Because the **Topos Playground** is just a basic tool for demonstration and local testing, the network topology of the subnets it creates is similar. [Incal](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/subnet-incal.yml) consists of four node containers and one sequencer container. In addition, one container creates the keys and the genesis block. When the TCE network is up, the sequencer subscribes to it to receive relevant certificates and to broadcast its own certificates to it. After the subnet is ready, the [Playground starts a container](https://github.com/topos-protocol/local-erc20-messaging-infra/blob/main/contracts.yml) for the contracts: From 53d5e7dc45511a35a6e301aae9025abcd179abf3 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:31:13 +0000 Subject: [PATCH 7/9] Update content/module-2/5-testnet.md Co-authored-by: Theo Gauthier --- content/module-2/5-testnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/5-testnet.md b/content/module-2/5-testnet.md index 0cd47b0..c12ae0e 100644 --- a/content/module-2/5-testnet.md +++ b/content/module-2/5-testnet.md @@ -5,7 +5,7 @@ description: The Topos testnet, overview and how-to # Topos Testnet -The Topos testnet is comprised of two subnets, Incal and Topos Subnet, along with a sequencer and an instance of the Executor Service. It provides all the infrastructure needed to deploy Smart Contracts to Incal and interact across subnets. The architecture of the testnet is identical to what you saw in the [Topos Playground Overview](./1-ERC20-Messaging.html). +The Topos testnet currently features two subnets, Incal and Topos Subnet, along with a sequencer and an instance of the Executor Service (as we progress through subsequent phases of the testnet, more subnets will be permissionlessly added). It provides all the infrastructure needed to deploy Smart Contracts to Incal and interact across subnets. The architecture of the testnet is identical to what you saw in the [Topos Playground Overview](./1-ERC20-Messaging.html). As mentioned [previously](./2-explorer.md), the Topos testnet explorer is available at [https://explorer.testnet-1.topos.technology](https://explorer.testnet-1.topos.technology). The Topos protocol is undergoing heavy development and features will be rolled out incrementally over time until mainnet is launched in 2024. The phases outlined below will change as detailed planning progresses. From 1a87f54de4cfa873d092a95796bed780339309ac Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:31:44 +0000 Subject: [PATCH 8/9] Update content/module-2/5-testnet.md Co-authored-by: Theo Gauthier --- content/module-2/5-testnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/5-testnet.md b/content/module-2/5-testnet.md index c12ae0e..2eb37be 100644 --- a/content/module-2/5-testnet.md +++ b/content/module-2/5-testnet.md @@ -12,7 +12,7 @@ The Topos protocol is undergoing heavy development and features will be rolled o ## Phase 1: Core Infrastructure -This is where we are today. Phase 1 provides the basic building blocks and connects them all together, providing the foundation for further work and refinement. Not all components are fully functional (e.g. no ZK proofs, deterministic broadcasts rather than trhe more performant probabilistic flavour described in the whitepaper), but all of the main interfaces are there and operational, ready for developers and early adopters. +This is where we are today. Phase 1 provides the basic building blocks and connects them all together, providing the foundation for further work and refinement. Not all components are fully functional (e.g. no ZK proofs, deterministic broadcasts rather than the more performant probabilistic flavour described in the whitepaper), but all of the main interfaces are there and operational, ready for developers and early adopters. Included in Phase 1: From fafd38c64d9b934a39e2903bb6bdfbfcff854da6 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Oct 2023 22:31:54 +0000 Subject: [PATCH 9/9] Update content/module-2/5-testnet.md Co-authored-by: Theo Gauthier --- content/module-2/5-testnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/module-2/5-testnet.md b/content/module-2/5-testnet.md index 2eb37be..13d9c2f 100644 --- a/content/module-2/5-testnet.md +++ b/content/module-2/5-testnet.md @@ -26,7 +26,7 @@ Phase 2 is where we onboard the community and enable a wider involvment of partn ## Phase 3: Ecosystem -Phase 3 solidifies the community involvment into an actual ecosystem of projects, including the complete staking system (delegation, rewards, token issuance mechanics etc) and on-chain governance, allowing for permissionless subnet registration and collective decision making. In this phase we expect do deliver the full suite of required tooling (explorer, exchange integrationtools, "stdlib" for Smart Contract developers etc). +Phase 3 solidifies the community involvment into an actual ecosystem of projects, including the complete staking system (delegation, rewards, token issuance mechanics, etc.) and on-chain governance, allowing for permissionless subnet registration and collective decision making. In this phase we expect do deliver the full suite of required tooling (explorer, exchange integration tools, "stdlib" for Smart Contract developers, etc.). ## Phase 4: Advanced features Phase 4 is where it all comes together and the full power of ZK cryptography is made available.