From b5f246cb544584dd6321f3061a62eba4b9c2ed9c Mon Sep 17 00:00:00 2001 From: d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Wed, 7 Jun 2023 16:05:26 +0200 Subject: [PATCH 1/2] feat(website): update proving docs --- .../website/pages/docs/concepts/_meta.json | 2 +- .../concepts/proving-taiko-blocks/_meta.json | 11 --- .../concepts/proving-taiko-blocks/provers.mdx | 1 - .../the-oracle-prover.mdx | 1 - .../verified-blocks-and-parallel-proving.mdx | 20 ------ .../website/pages/docs/concepts/proving.mdx | 71 +++++++++++++++++++ .../pages/docs/guides/enable-a-prover.mdx | 2 +- 7 files changed, 73 insertions(+), 35 deletions(-) delete mode 100644 packages/website/pages/docs/concepts/proving-taiko-blocks/_meta.json delete mode 100644 packages/website/pages/docs/concepts/proving-taiko-blocks/provers.mdx delete mode 100644 packages/website/pages/docs/concepts/proving-taiko-blocks/the-oracle-prover.mdx delete mode 100644 packages/website/pages/docs/concepts/proving-taiko-blocks/verified-blocks-and-parallel-proving.mdx create mode 100644 packages/website/pages/docs/concepts/proving.mdx diff --git a/packages/website/pages/docs/concepts/_meta.json b/packages/website/pages/docs/concepts/_meta.json index 25998bbb2d5..3a7076a2e7e 100644 --- a/packages/website/pages/docs/concepts/_meta.json +++ b/packages/website/pages/docs/concepts/_meta.json @@ -5,7 +5,7 @@ "creating-taiko-blocks": { "title": "Creating Taiko blocks" }, - "proving-taiko-blocks": { + "proving": { "title": "Proving Taiko blocks" }, "bridging": { diff --git a/packages/website/pages/docs/concepts/proving-taiko-blocks/_meta.json b/packages/website/pages/docs/concepts/proving-taiko-blocks/_meta.json deleted file mode 100644 index c74e1bd3c27..00000000000 --- a/packages/website/pages/docs/concepts/proving-taiko-blocks/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "provers": { - "title": "Provers" - }, - "the-oracle-prover": { - "title": "The oracle prover" - }, - "verified-blocks-and-parallel-proving": { - "title": "Verified blocks & parallel proving" - } -} diff --git a/packages/website/pages/docs/concepts/proving-taiko-blocks/provers.mdx b/packages/website/pages/docs/concepts/proving-taiko-blocks/provers.mdx deleted file mode 100644 index 6e0d3773759..00000000000 --- a/packages/website/pages/docs/concepts/proving-taiko-blocks/provers.mdx +++ /dev/null @@ -1 +0,0 @@ -The purpose of proving blocks is to allow bridges to withdraw state out of the rollup. To rely on some state that happened inside of the rollup, a bridge will want a proof that everything was done correctly. On Taiko you can [run a node as a prover](/docs/guides/run-a-node) and prove blocks, permissionlessly. This means that you can examine the proposed blocks on the TaikoL1 contract, and generate proofs for them. Currently, any prover can create proofs for proposed blocks. This means that the number of "fork choices" has no upper bound, because we don't know what is the correct state transition yet. Only first prover with a valid proof of the correct fork choice (state transition) will receive the reward of TTKO. diff --git a/packages/website/pages/docs/concepts/proving-taiko-blocks/the-oracle-prover.mdx b/packages/website/pages/docs/concepts/proving-taiko-blocks/the-oracle-prover.mdx deleted file mode 100644 index 7c75790b407..00000000000 --- a/packages/website/pages/docs/concepts/proving-taiko-blocks/the-oracle-prover.mdx +++ /dev/null @@ -1 +0,0 @@ -There is a concept of an oracle prover on Taiko, which will be removed when the circuits are complete and some rollup training wheels have been removed (such as DAO governance and multi-proofs). The oracle prover is a prover that is trusted to provide the correct state transition. If oracle proving is enabled, then the oracle prover will be forced as the first prover for a block and the second will be from a prover. The actual prover (one of you) however will receive the reward of course, this is just a safety mechanism we have in place while the ZK-EVM is still in development. diff --git a/packages/website/pages/docs/concepts/proving-taiko-blocks/verified-blocks-and-parallel-proving.mdx b/packages/website/pages/docs/concepts/proving-taiko-blocks/verified-blocks-and-parallel-proving.mdx deleted file mode 100644 index bcf9416167c..00000000000 --- a/packages/website/pages/docs/concepts/proving-taiko-blocks/verified-blocks-and-parallel-proving.mdx +++ /dev/null @@ -1,20 +0,0 @@ -There are three states that a block can be in on Taiko: -- Proposed -- Proved -- Verified - -We already know what a proposed block is (must pass at least the block-level intrinsic validity tests to be accepted by the TaikoL1 contract). Next, a proposed block can be valid or invalid, depending on whether it passes the transaction list intrinsic validity test. A block is invalid if it fails the transaction list intrinsic validity test, and this block is not created on Taiko. - -Now, a block can be proved, but also further "verified". What's the difference? A block is proved if it has a valid proof which proves a state transition from one state (parent block) to another (current block). However, blocks are proven in parallel by the decentralized provers. So while a block can prove a parent block transitions to the current block, we don't know if the parent block itself has been proven. As you can see, for a block to be "verified", it needs to prove the valid state transition to the current block, but the parent also need to be verified. We assume that the genesis block (which has no parent), is verified. So all the children blocks from genesis to the current block need to have proofs of their state transition for the current block to be "verified". - -For the visual learners here is a visualization of the three stages (proposed -> proved -> verified) - -**Proposed:** -![Proposed](/images/diagrams/concepts/proving-taiko-blocks/proposed.png) - -**Proved:** -![Proved](/images/diagrams/concepts/proving-taiko-blocks/proved.png) - -**Verified:** -![Verified](/images/diagrams/concepts/proving-taiko-blocks/verified.png) - diff --git a/packages/website/pages/docs/concepts/proving.mdx b/packages/website/pages/docs/concepts/proving.mdx new file mode 100644 index 00000000000..9687f6bcc08 --- /dev/null +++ b/packages/website/pages/docs/concepts/proving.mdx @@ -0,0 +1,71 @@ +import Image from "next/image"; + +# Proving Taiko blocks + +## Overview +The purpose of proving blocks is to give certainty to bridges about the execution that happened in the rollup. To rely on some state that happened inside of the rollup, a bridge will want a proof that everything was done correctly. On Taiko you can run a node as a prover and prove blocks, permissionlessly. This means that you can examine the proposed blocks on the TaikoL1 contract, and generate proofs for them. Currently, any prover can create proofs for proposed blocks. This means that the number of "fork choices" has no upper bound, because we don't know what is the correct state transition yet. Only first prover with a valid proof of the correct fork choice (state transition) will receive the reward of TTKO. + +## Verified blocks and parallel proving +There are three states that a block can be in on Taiko: +- Proposed +- Proved +- Verified + +We already know what a proposed block is (must pass at least the block-level intrinsic validity tests to be accepted by the TaikoL1 contract). Next, a proposed block can be valid or invalid, depending on whether it passes the transaction list intrinsic validity test. A block is invalid if it fails the transaction list intrinsic validity test, and this block is not created on Taiko. + +Now, a block can be proved, but also further "verified". What's the difference? A block is proved if it has a valid proof which proves a state transition from one state (parent block) to another (current block). However, blocks are proven in parallel by the decentralized provers. So while a block can prove a parent block transitions to the current block, we don't know if the parent block itself has been proven. As you can see, for a block to be "verified", it needs to prove the valid state transition to the current block, but the parent also need to be verified. We assume that the genesis block (which has no parent), is verified. So all the children blocks from genesis to the current block need to have proofs of their state transition for the current block to be "verified". + +For the visual learners here is a visualization of the three stages (proposed -> proved -> verified) + +**Proposed:** +