From 97513ef518c002b272d9807a8f164d058942a1a9 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Mon, 17 Jun 2024 11:10:15 -0700 Subject: [PATCH 01/14] add alt-da technical explainer doc --- pages/stack/protocol/features/_meta.json | 3 +- pages/stack/protocol/features/alt-da-mode.mdx | 42 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 pages/stack/protocol/features/alt-da-mode.mdx diff --git a/pages/stack/protocol/features/_meta.json b/pages/stack/protocol/features/_meta.json index 3871d9f9c..bcc657416 100644 --- a/pages/stack/protocol/features/_meta.json +++ b/pages/stack/protocol/features/_meta.json @@ -1,3 +1,4 @@ { - "custom-gas-token": "Custom Gas Token" + "custom-gas-token": "Custom Gas Token", + "alt-da-mode": "Alt-DA Mode" } \ No newline at end of file diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx new file mode 100644 index 000000000..7ab1600d9 --- /dev/null +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -0,0 +1,42 @@ +--- +title: Alt-DA Mode Explainer +lang: en-US +description: Learn the basic process, benefits, and considerations for running an Alt-DA mode chain. +--- + +import { Callout } from 'nextra/components' + +# Alt-DA Mode Explainer + +Alt-DA Mode allows any arbitrary DA Layer with any commitment type to seamlessly integrate into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. + +## Sustainably Low Costs +EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won’t get congested, but is still stable and minimizes security and decentralization tradeoffs. + +## How it works +Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing wtih a DA Layer node, etc. + +This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. +Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a future-proof solution compatible with upcoming OP Stack features. + +## Future improvements +Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: +* Integration with Fault Proofs +* Plasma Data Availability Challenges support for more DA Layers (currently only supports DA Layers with a `keccak256` commitment type) +* DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) +* Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) + + + +## Next Steps + +* Ready to get started? Read our guide on how to [deploy your Alt-DA Mode chain](/builders/chain-operators/management/alt-da-mode). +* For more info about how Alt-DA Mode works under the hood, [check out the specs](https://specs.optimism.io/experimental/alt-da.html). + +## FAQs + +### Can I deploy a chain using Ethereum L1 DA and later switch to Alt-DA? + +### Can I deploy a chain using Alt-DA and then later switch to Ethereum L1 DA? + +### Can I switch between Alt-DA layers when using Alt-DA Mode? \ No newline at end of file From 9dea0d8783e75337a33aa400cc92b060d843a439 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:03:03 -0700 Subject: [PATCH 02/14] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- pages/stack/protocol/features/alt-da-mode.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index 7ab1600d9..ebd935ab6 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -8,23 +8,23 @@ import { Callout } from 'nextra/components' # Alt-DA Mode Explainer -Alt-DA Mode allows any arbitrary DA Layer with any commitment type to seamlessly integrate into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. +Alt-DA Mode enables seamless integration of various DA Layers, regardless of their commitment type, into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. ## Sustainably Low Costs EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won’t get congested, but is still stable and minimizes security and decentralization tradeoffs. ## How it works -Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing wtih a DA Layer node, etc. +Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a future-proof solution compatible with upcoming OP Stack features. ## Future improvements -Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: -* Integration with Fault Proofs -* Plasma Data Availability Challenges support for more DA Layers (currently only supports DA Layers with a `keccak256` commitment type) -* DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) -* Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) +Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost-effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: + * Integration with Fault Proofs + * Plasma Data Availability Challenges support for more DA Layers (currently only supports DA Layers with a `keccak256` commitment type) + * DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) + * Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) From 5cb0051f037fa31c343bb865f5e2cdb719116461 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Tue, 18 Jun 2024 06:30:24 -0700 Subject: [PATCH 03/14] add FAQ to alt-da mode explainer --- pages/stack/protocol/features/alt-da-mode.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index 7ab1600d9..890d32cd9 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -37,6 +37,13 @@ Just like with the Rollup configuration of the OP Stack, core contributors are c ### Can I deploy a chain using Ethereum L1 DA and later switch to Alt-DA? +* While it is a future goal to spec out a migration path from Ethereum L1 DA to Alt-DA Mode, the migration path has not been scoped out yet. + ### Can I deploy a chain using Alt-DA and then later switch to Ethereum L1 DA? -### Can I switch between Alt-DA layers when using Alt-DA Mode? \ No newline at end of file +* Same as above, it is a future goal to spec out this migration path, but the migration path has not been scoped out yet. + +### Can I switch between Alt-DA layers when using Alt-DA Mode? + +* This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. +* If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) From 482d4d212c26198fa7a8cf70f0d0fa92f07e10c8 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Tue, 18 Jun 2024 06:47:56 -0700 Subject: [PATCH 04/14] add alt-da mode docs for chain operators --- .../management/alt-da-mode.mdx | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 pages/builders/chain-operators/management/alt-da-mode.mdx diff --git a/pages/builders/chain-operators/management/alt-da-mode.mdx b/pages/builders/chain-operators/management/alt-da-mode.mdx new file mode 100644 index 000000000..de01f0b18 --- /dev/null +++ b/pages/builders/chain-operators/management/alt-da-mode.mdx @@ -0,0 +1,109 @@ +--- +title: How to Run an Alt-DA Mode Chain +lang: en-US +description: Learn how to run an Alt-DA mode chain. +--- + +import { Callout, Steps } from 'nextra/components' + +# How to Run an Alt-DA Mode Chain + + +The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective’s core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + + +This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/stack/protocol/features/alt-de-mode) for a general overview of this OP Stack configuration. +An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to any alternative data availability layer that has built a functioning OP Stack DA Server. + + + +### Compatible op-node & op-* Versions + +You should use at least the following versions when running your chain. + +- op-node/v1.8.0-rc.1 +- op-proposer/v1.8.0-rc.1 +- op-batcher/v1.8.0-rc.1 +- [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) + +For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/management/custom-gas-token.mdx) + +### Step 1: Set up your DA Server + + +DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. + + +- Celestia’s docs on how to run the Celestia DA server: + - https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md +- EigenDA’s docs on how to run the EigenDA DA server: + - https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md +- Avail’s docs on how to run the AvailDA DA Server: + - https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server + +### Step 2: Configuring your op-node + +Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. + +```go + Alt-DA (EXPERIMENTAL) + + + --altda.da-server value ($OP_NODE_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.enabled (default: false) ($OP_NODE_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_NODE_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service + +``` + +### Step 3: Configuring your Batcher + +``` + --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.da-service (default: false) ($OP_BATCHER_ALTDA_DA_SERVICE) + Use DA service type where commitments are generated by the DA server + + --altda.enabled (default: false) ($OP_BATCHER_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_BATCHER_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service +``` + +- Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` + +After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. + +### Step 4: Setting Your Fee Configuration + +- Chain operators are not posting everything to Ethereum, just commitments, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. +- Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. + + ``` + // Set in Deploy Config + "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost + "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now + ``` + +- Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. + + + + +# For Node Operators (Full and Archive nodes) +- Run a DA server as laid out in Step 1 +- Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 + +## Next Steps + +* Additional questions? See the FAQ section in the [Alt-DA Mode Explainer](/stack/protocol/features/alt-da-mode#faqs). +* For more detailed info on Alt-DA Mode, see the [specs](https://specs.optimism.io/experimental/alt-da.html). +* If you experience any problems, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). From 55598ff3abb868f1edf6a17c7b47429e7c762087 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Tue, 18 Jun 2024 06:58:37 -0700 Subject: [PATCH 05/14] add docs on integrating a new DA Layer --- .../chain-operators/tutorials/_meta.json | 3 +- .../tutorials/integrating-da-layer.mdx | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 pages/builders/chain-operators/tutorials/integrating-da-layer.mdx diff --git a/pages/builders/chain-operators/tutorials/_meta.json b/pages/builders/chain-operators/tutorials/_meta.json index d87ca536b..5db2c3141 100644 --- a/pages/builders/chain-operators/tutorials/_meta.json +++ b/pages/builders/chain-operators/tutorials/_meta.json @@ -3,5 +3,6 @@ "sdk": "Using the Optimism SDK", "adding-derivation-attributes": "Adding Attributes to the Derivation Function", "adding-precompiles": "Adding a Precompile", - "modifying-predeploys": "Modifying Predeployed Contracts" + "modifying-predeploys": "Modifying Predeployed Contracts", + "integrating-da-layer": "Integrating a new DA Layer" } \ No newline at end of file diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx new file mode 100644 index 000000000..9651376f8 --- /dev/null +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -0,0 +1,36 @@ +--- +title: Integrating a new DA Layer +lang: en-US +description: Learn how to add suppoer for a new DA Layer to the OP Stack +--- + +import { Callout, Steps } from 'nextra/components' + +# Integrating a new DA Layer + + + +The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective’s core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + + +[Alt-DA Mode](pages/stack/protocol/features/alt-da-mode.mdx) enables seamless integration of any DA Layer, regardless of their commitment type, into the OP Stack. After a DA Server is built for a DA Layer, any chain operator can launch an OP Stack chain using that DA Layer for sustainably low costs. + +### Building your DA Server +Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open sourced and MIT Licensed. + +1. Design your commitment binary encoding. + 1. It must point to the data on your layer (like block height / hash) + 2. It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). + 3. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#input-commitment-submission) +2. Claim your da_layer byte [here](https://github.com/ethereum-optimism/specs/discussions/135) +3. Implement the DA Server + 1. Need to write a simple HTTP server which supports `get` and `put` + 2. `put` is used by the batcher & can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer + 3. `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. + 4. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#da-server) +4. See an example DA server here: https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go + +### Spinning up an Alt-DA Mode chain + +Follow [our guide on how to operate an Alt-DA Mode chain](pages/builders/chain-operators/management/alt-da-mode.mdx) + From 2f334765aaeb6f1bc8a4fa05093771eaa5ed9896 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:03:57 -0700 Subject: [PATCH 06/14] Apply suggestions from code review Co-authored-by: Axel Kingsley --- pages/builders/chain-operators/management/alt-da-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/builders/chain-operators/management/alt-da-mode.mdx b/pages/builders/chain-operators/management/alt-da-mode.mdx index de01f0b18..a43ed1e53 100644 --- a/pages/builders/chain-operators/management/alt-da-mode.mdx +++ b/pages/builders/chain-operators/management/alt-da-mode.mdx @@ -82,7 +82,7 @@ After completing steps 1-3 above, you will have an Alt-DA mode chain up and runn ### Step 4: Setting Your Fee Configuration -- Chain operators are not posting everything to Ethereum, just commitments, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. +- Alt-DA submits only Commitments to data to L1, which is considerably smaller than the raw Inputs, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. - Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. ``` From fa2891b97d49f04215d9d5c6854ca40cc9035096 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:07:59 -0700 Subject: [PATCH 07/14] lint fixes --- .../chain-operators/features/_meta.json | 3 +- .../chain-operators/features/alt-da-mode.mdx | 108 +++++++++++++ .../management/alt-da-mode.mdx | 153 +++++++++--------- .../tutorials/integrating-da-layer.mdx | 27 ++-- pages/stack/protocol/features/alt-da-mode.mdx | 16 +- words.txt | 14 +- 6 files changed, 214 insertions(+), 107 deletions(-) create mode 100644 pages/builders/chain-operators/features/alt-da-mode.mdx diff --git a/pages/builders/chain-operators/features/_meta.json b/pages/builders/chain-operators/features/_meta.json index b7df45618..ca817c890 100644 --- a/pages/builders/chain-operators/features/_meta.json +++ b/pages/builders/chain-operators/features/_meta.json @@ -1,3 +1,4 @@ { - "preinstalls": "Preinstalls" + "preinstalls": "Preinstalls", + "alt-da-mode": "Run an Alt-DA Mode Chain" } \ No newline at end of file diff --git a/pages/builders/chain-operators/features/alt-da-mode.mdx b/pages/builders/chain-operators/features/alt-da-mode.mdx new file mode 100644 index 000000000..8cc844fc4 --- /dev/null +++ b/pages/builders/chain-operators/features/alt-da-mode.mdx @@ -0,0 +1,108 @@ +--- +title: How to Run an Alt-DA Mode Chain +lang: en-US +description: Learn how to configure and run an Alt-DA mode chain within the OP Stack. +--- + +import { Callout, Steps } from 'nextra/components' + +# How to Run an Alt-DA Mode Chain + + + The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + + +This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/stack/protocol/features/alt-da-mode) for a general overview of this OP Stack configuration. +An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to any alternative data availability layer that has built a functioning OP Stack DA Server. + + + ### Compatible op-\* Versions + + You should use at least the following versions when running your chain. + + * op-node/v1.8.0-rc.1 + * op-proposer/v1.8.0-rc.1 + * op-batcher/v1.8.0-rc.1 + * [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) + + For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/features/custom-gas-token.mdx). + + ### Step 1: Set up your DA Server + + + DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. + + + * Celestia's docs on how to run the Celestia DA server: + * [https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md](https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md) + * EigenDA's docs on how to run the EigenDA DA server: + * [https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md](https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md) + * Avail's docs on how to run the AvailDA DA Server: + * [https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server](https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server) + + ### Step 2: Configuring your op-node + + Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. + + ```go + Alt-DA (EXPERIMENTAL) + + + --altda.da-server value ($OP_NODE_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.enabled (default: false) ($OP_NODE_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_NODE_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service + + ``` + + ### Step 3: Configuring your Batcher + + ``` + --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.da-service (default: false) ($OP_BATCHER_ALTDA_DA_SERVICE) + Use DA service type where commitments are generated by the DA server + + --altda.enabled (default: false) ($OP_BATCHER_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_BATCHER_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service + ``` + + * Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` + + After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. + + ### Step 4: Setting Your Fee Configuration + + * Chain operators are not posting everything to Ethereum, just commitments, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. + * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. + * Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. + + ``` + // Set in Deploy Config + "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost + "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now + ``` + + + Some initial scalar values must be set early on in the deploy config in Step 2. And then at a later point, chain operators can update the scalar values with an L1 transaction. + + + +# For Node Operators (Full and Archive nodes) + +* Run a DA server as laid out in Step 1 +* Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 + +## Next Steps + +* Additional questions? See the FAQ section in the [Alt-DA Mode Explainer](/stack/protocol/features/alt-da-mode#faqs). +* For more detailed info on Alt-DA Mode, see the [specs](https://specs.optimism.io/experimental/alt-da.html). +* If you experience any problems, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/pages/builders/chain-operators/management/alt-da-mode.mdx b/pages/builders/chain-operators/management/alt-da-mode.mdx index a43ed1e53..78dbcb693 100644 --- a/pages/builders/chain-operators/management/alt-da-mode.mdx +++ b/pages/builders/chain-operators/management/alt-da-mode.mdx @@ -9,98 +9,99 @@ import { Callout, Steps } from 'nextra/components' # How to Run an Alt-DA Mode Chain -The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective’s core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/stack/protocol/features/alt-de-mode) for a general overview of this OP Stack configuration. An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to any alternative data availability layer that has built a functioning OP Stack DA Server. + ### Compatible op-node & op-\* Versions -### Compatible op-node & op-* Versions + You should use at least the following versions when running your chain. -You should use at least the following versions when running your chain. + * op-node/v1.8.0-rc.1 + * op-proposer/v1.8.0-rc.1 + * op-batcher/v1.8.0-rc.1 + * [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) -- op-node/v1.8.0-rc.1 -- op-proposer/v1.8.0-rc.1 -- op-batcher/v1.8.0-rc.1 -- [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) + For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/management/custom-gas-token.mdx) -For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/management/custom-gas-token.mdx) + ### Step 1: Set up your DA Server -### Step 1: Set up your DA Server + + DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. + - -DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. - + * Celestia's docs on how to run the Celestia DA server: + * [https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md](https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md) + * EigenDA's docs on how to run the EigenDA DA server: + * [https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md](https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md) + * Avail's docs on how to run the AvailDA DA Server: + * [https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server](https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server) + + ### Step 2: Configuring your op-node + + Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. + + ```go + Alt-DA (EXPERIMENTAL) + + + --altda.da-server value ($OP_NODE_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.enabled (default: false) ($OP_NODE_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_NODE_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service + + ``` + + ### Step 3: Configuring your Batcher + + ``` + --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) + HTTP address of a DA Server + + --altda.da-service (default: false) ($OP_BATCHER_ALTDA_DA_SERVICE) + Use DA service type where commitments are generated by the DA server + + --altda.enabled (default: false) ($OP_BATCHER_ALTDA_ENABLED) + Enable Alt-DA mode + + --altda.verify-on-read (default: true) ($OP_BATCHER_ALTDA_VERIFY_ON_READ) + Verify input data matches the commitments from the DA storage service + ``` -- Celestia’s docs on how to run the Celestia DA server: - - https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md -- EigenDA’s docs on how to run the EigenDA DA server: - - https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md -- Avail’s docs on how to run the AvailDA DA Server: - - https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server - -### Step 2: Configuring your op-node - -Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. - -```go - Alt-DA (EXPERIMENTAL) - - - --altda.da-server value ($OP_NODE_ALTDA_DA_SERVER) - HTTP address of a DA Server - - --altda.enabled (default: false) ($OP_NODE_ALTDA_ENABLED) - Enable Alt-DA mode - - --altda.verify-on-read (default: true) ($OP_NODE_ALTDA_VERIFY_ON_READ) - Verify input data matches the commitments from the DA storage service - -``` - -### Step 3: Configuring your Batcher - -``` - --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) - HTTP address of a DA Server - - --altda.da-service (default: false) ($OP_BATCHER_ALTDA_DA_SERVICE) - Use DA service type where commitments are generated by the DA server - - --altda.enabled (default: false) ($OP_BATCHER_ALTDA_ENABLED) - Enable Alt-DA mode - - --altda.verify-on-read (default: true) ($OP_BATCHER_ALTDA_VERIFY_ON_READ) - Verify input data matches the commitments from the DA storage service -``` - -- Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` - -After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. - -### Step 4: Setting Your Fee Configuration - -- Alt-DA submits only Commitments to data to L1, which is considerably smaller than the raw Inputs, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. -- Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. - - ``` - // Set in Deploy Config - "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost - "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now - ``` - -- Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. - - + * Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` + + After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. + + ### Step 4: Setting Your Fee Configuration + + * Alt-DA submits only Commitments to data to L1, which is considerably smaller than the raw Inputs, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. + + * Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. + + ``` + // Set in Deploy Config + "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost + "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now + ``` + + * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. + + # For Node Operators (Full and Archive nodes) -- Run a DA server as laid out in Step 1 -- Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 + +* Run a DA server as laid out in Step 1 +* Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 ## Next Steps diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx index 9651376f8..9e5765331 100644 --- a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -8,29 +8,28 @@ import { Callout, Steps } from 'nextra/components' # Integrating a new DA Layer - -The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective’s core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. [Alt-DA Mode](pages/stack/protocol/features/alt-da-mode.mdx) enables seamless integration of any DA Layer, regardless of their commitment type, into the OP Stack. After a DA Server is built for a DA Layer, any chain operator can launch an OP Stack chain using that DA Layer for sustainably low costs. ### Building your DA Server + Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open sourced and MIT Licensed. -1. Design your commitment binary encoding. - 1. It must point to the data on your layer (like block height / hash) - 2. It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). - 3. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#input-commitment-submission) -2. Claim your da_layer byte [here](https://github.com/ethereum-optimism/specs/discussions/135) -3. Implement the DA Server - 1. Need to write a simple HTTP server which supports `get` and `put` - 2. `put` is used by the batcher & can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer - 3. `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. - 4. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#da-server) -4. See an example DA server here: https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go +1. Design your commitment binary encoding. + 1. It must point to the data on your layer (like block height / hash) + 2. It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). + 3. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#input-commitment-submission) +2. Claim your da\_layer byte [here](https://github.com/ethereum-optimism/specs/discussions/135) +3. Implement the DA Server + 1. Need to write a simple HTTP server which supports `get` and `put` + 2. `put` is used by the batcher & can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer + 3. `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. + 4. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#da-server) +4. See an example DA server here: [https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go](https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go) ### Spinning up an Alt-DA Mode chain Follow [our guide on how to operate an Alt-DA Mode chain](pages/builders/chain-operators/management/alt-da-mode.mdx) - diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index b69b356b8..a616898f9 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -11,22 +11,24 @@ import { Callout } from 'nextra/components' Alt-DA Mode enables seamless integration of various DA Layers, regardless of their commitment type, into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. ## Sustainably Low Costs -EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won’t get congested, but is still stable and minimizes security and decentralization tradeoffs. + +EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won't get congested, but is still stable and minimizes security and decentralization tradeoffs. ## How it works + Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a future-proof solution compatible with upcoming OP Stack features. ## Future improvements -Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost-effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: - * Integration with Fault Proofs - * Plasma Data Availability Challenges support for more DA Layers (currently only supports DA Layers with a `keccak256` commitment type) - * DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) - * Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) +Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost-effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: +* Integration with Fault Proofs +* Plasma Data Availability Challenges support for more DA Layers (currently only supports DA Layers with a `keccak256` commitment type) +* DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) +* Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) ## Next Steps @@ -45,5 +47,5 @@ Just like with the Rollup configuration of the OP Stack, core contributors are c ### Can I switch between Alt-DA layers when using Alt-DA Mode? -* This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. +* This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. * If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) diff --git a/words.txt b/words.txt index 4b51f6d5e..8a5289edc 100644 --- a/words.txt +++ b/words.txt @@ -9,7 +9,6 @@ airgap Allocs allocs ANDI -Ankr Apeworx Arweave authrpc @@ -22,6 +21,7 @@ BLEZ BLOBBASEFEE BLOBPOOL blobpool +blobspace blocklists BLOCKLOGS blocklogs @@ -41,6 +41,7 @@ Callouts callouts CCIP Celestia +Celestia's Chainlink Chainlink's chainlist @@ -69,6 +70,7 @@ disabletxpoolgossip Discv discv DIVU +Eigen ENABLEDEPRECATEDPERSONAL enabledeprecatedpersonal Erigon @@ -119,7 +121,6 @@ Holesky holesky IGNOREPRICE ignoreprice -Immunefi implicity Inator inator @@ -166,7 +167,6 @@ minsuggestedpriorityfee Mintable Mintplex MIPSEVM -Mitigations Moralis Mordor MOVN @@ -245,8 +245,6 @@ productionized Protip proxyd pseudorandomly -Pyth -Pyth's Quicknode quicknode quickstarts @@ -262,14 +260,12 @@ reproven REQUIREDBLOCKS requiredblocks Rollups +rollups rpckind RPCPREFIX rpcprefix RPGF SELFDESTRUCT -SEPOLIA -Sepolia -sepolia seqnr SEQUENCERHTTP sequencerhttp @@ -297,6 +293,7 @@ Superchain superchain Superchain's Superchains +suppoer SYNCMODE syncmode SYNCTARGET @@ -325,7 +322,6 @@ VMDEBUG vmdebug VMODULE vmodule -voxel wagmi XORI xtensibility From 3138c6b74c864ee419bf7fb5cc443f76bc375c8a Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:08:04 -0700 Subject: [PATCH 08/14] lint fixes, lang updates --- .../chain-operators/features/alt-da-mode.mdx | 55 ++++++++++--------- .../tutorials/integrating-da-layer.mdx | 54 +++++++++++------- pages/stack/protocol/features/alt-da-mode.mdx | 35 +++++++++--- words.txt | 3 +- 4 files changed, 90 insertions(+), 57 deletions(-) diff --git a/pages/builders/chain-operators/features/alt-da-mode.mdx b/pages/builders/chain-operators/features/alt-da-mode.mdx index 8cc844fc4..40c53dbef 100644 --- a/pages/builders/chain-operators/features/alt-da-mode.mdx +++ b/pages/builders/chain-operators/features/alt-da-mode.mdx @@ -9,40 +9,42 @@ import { Callout, Steps } from 'nextra/components' # How to Run an Alt-DA Mode Chain - The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing and may have bugs or other issues. This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/stack/protocol/features/alt-da-mode) for a general overview of this OP Stack configuration. An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to any alternative data availability layer that has built a functioning OP Stack DA Server. - - ### Compatible op-\* Versions +## Prerequisite + +You should use at least the following compatible op\* versions when running your chain. - You should use at least the following versions when running your chain. +* op-node/v1.8.0-rc.1 +* op-proposer/v1.8.0-rc.1 +* op-batcher/v1.8.0-rc.1 +* [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) - * op-node/v1.8.0-rc.1 - * op-proposer/v1.8.0-rc.1 - * op-batcher/v1.8.0-rc.1 - * [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) +For deploying your contracts, use the latest release. - For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/features/custom-gas-token.mdx). + + If you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/features/custom-gas-token.mdx). + - ### Step 1: Set up your DA Server + + ### Setup Your DA Server DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. - * Celestia's docs on how to run the Celestia DA server: - * [https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md](https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md) - * EigenDA's docs on how to run the EigenDA DA server: - * [https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md](https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md) - * Avail's docs on how to run the AvailDA DA Server: - * [https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server](https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server) + * Celestia's docs on how to run the [Celestia DA server](https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md) + * EigenDA's docs on how to run the [EigenDA DA server](https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md) + * Avail's docs on how to run the [AvailDA DA Server](https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server) - ### Step 2: Configuring your op-node + ### Configure Your `op-node` - Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. + * Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. + * No configuration changes are required for `op-geth` or `op-proposer`. ```go Alt-DA (EXPERIMENTAL) @@ -59,7 +61,10 @@ An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to ``` - ### Step 3: Configuring your Batcher + ### Configure Your Batcher + + * Set `--altda.enabled=true` and `--altda.da-service=true`. + * Provide the URL for `--atlda.da-server=$DA_SERVER_HTTP_URL`. ``` --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) @@ -75,11 +80,9 @@ An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to Verify input data matches the commitments from the DA storage service ``` - * Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` - After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. - ### Step 4: Setting Your Fee Configuration + ### Set Your Fee Configuration * Chain operators are not posting everything to Ethereum, just commitments, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. @@ -92,14 +95,14 @@ An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to ``` - Some initial scalar values must be set early on in the deploy config in Step 2. And then at a later point, chain operators can update the scalar values with an L1 transaction. + Some initial scalar values must be set early on in the deploy config in [Step 2](#configure-your-op-node). And then at a later point, chain operators can update the scalar values with an L1 transaction. -# For Node Operators (Full and Archive nodes) +## For Node Operators (Full and Archive Nodes) -* Run a DA server as laid out in Step 1 -* Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 +* Run a DA server as laid out in [Step 1](#setup-your-da-server) +* Provide the same `--altda.enabled=true, --altda.da-server...` on `op-node` as listed in [Step 2](#configure-your-op-node) ## Next Steps diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx index 9e5765331..7107e8d3e 100644 --- a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -1,35 +1,49 @@ --- title: Integrating a new DA Layer lang: en-US -description: Learn how to add suppoer for a new DA Layer to the OP Stack +description: Learn how to add support for a new DA Layer within the OP Stack. --- import { Callout, Steps } from 'nextra/components' -# Integrating a new DA Layer +# Integrating a New DA Layer - The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. + The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing and may have bugs or other issues. -[Alt-DA Mode](pages/stack/protocol/features/alt-da-mode.mdx) enables seamless integration of any DA Layer, regardless of their commitment type, into the OP Stack. After a DA Server is built for a DA Layer, any chain operator can launch an OP Stack chain using that DA Layer for sustainably low costs. +[Alt-DA Mode](/stack/protocol/features/alt-da-mode) enables seamless integration of any DA Layer, regardless of their commitment type, into the OP Stack. After a DA Server is built for a DA Layer, any chain operator can launch an OP Stack chain using that DA Layer for sustainably low costs. -### Building your DA Server +## Building Your DA Server Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open sourced and MIT Licensed. -1. Design your commitment binary encoding. - 1. It must point to the data on your layer (like block height / hash) - 2. It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). - 3. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#input-commitment-submission) -2. Claim your da\_layer byte [here](https://github.com/ethereum-optimism/specs/discussions/135) -3. Implement the DA Server - 1. Need to write a simple HTTP server which supports `get` and `put` - 2. `put` is used by the batcher & can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer - 3. `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. - 4. [Specification here](https://github.com/ethereum-optimism/specs/blob/main/specs/experimental/plasma.md#da-server) -4. See an example DA server here: [https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go](https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go) - -### Spinning up an Alt-DA Mode chain - -Follow [our guide on how to operate an Alt-DA Mode chain](pages/builders/chain-operators/management/alt-da-mode.mdx) + + ### Design your commitment binary encoding + + * It must point to the data on your layer (like block height / hash). + * It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). + + + See the [specs](https://specs.optimism.io/experimental/alt-da.html?highlight=input-commitment-submission#input-commitment-submission) for more info on commitment submission. + + + ### Claim your da\_layer byte + + * Claim your [byte](https://github.com/ethereum-optimism/specs/discussions/135) + + ### Implement the DA Server + + * Write a simple HTTP server which supports `get` and `put` + * `put` is used by the batcher and can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer. + * `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. + + + For more info on implementing the DA Server, [see the specification](https://specs.optimism.io/experimental/alt-da.html#da-server). + + + +## Next Steps + +* Want to explore more? See an [example DA server](https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go) +* Ready for next steps? Follow our guide on [how to operate an Alt-DA Mode chain](/builders/chain-operators/features/alt-da-mode) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index a616898f9..494049c3e 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -12,16 +12,33 @@ Alt-DA Mode enables seamless integration of various DA Layers, regardless of the ## Sustainably Low Costs -EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won't get congested, but is still stable and minimizes security and decentralization tradeoffs. +EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. +Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won't get congested but remains stable and minimizes security and decentralization tradeoffs. -## How it works +## How It Works Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. +```mermaid + sequenceDiagram + participant User + participant Configuration + participant OP Stack + participant DA Layer + participant Batcher + + User->>Configuration: Add "alt-da-mode" setting + Configuration-->>OP Stack: Updated configuration with Alt-DA Mode + OP Stack->>+DA Layer: Integrate different DA Layers + DA Layer-->>-OP Stack: Provide cost-efficient data availability + User->>Batcher: Configure batcher with DA settings + Batcher-->>OP Stack: Batching transactions for Alt-DA Mode + OP Stack-->>User: Operational Alt-DA Mode for enhanced flexibility +``` This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. -Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a future-proof solution compatible with upcoming OP Stack features. +Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a solution compatible with upcoming OP Stack features. -## Future improvements +## Future Improvements Just like with the Rollup configuration of the OP Stack, core contributors are continuously improving the decentralization, security, and cost-effectiveness of Alt-DA Mode. Some of the future features that core contributors are looking to build are: @@ -32,20 +49,20 @@ Just like with the Rollup configuration of the OP Stack, core contributors are c ## Next Steps -* Ready to get started? Read our guide on how to [deploy your Alt-DA Mode chain](/builders/chain-operators/management/alt-da-mode). +* Ready to get started? Read our guide on how to [deploy your Alt-DA Mode chain](/builders/chain-operators/features/alt-da-mode). * For more info about how Alt-DA Mode works under the hood, [check out the specs](https://specs.optimism.io/experimental/alt-da.html). ## FAQs ### Can I deploy a chain using Ethereum L1 DA and later switch to Alt-DA? -* While it is a future goal to spec out a migration path from Ethereum L1 DA to Alt-DA Mode, the migration path has not been scoped out yet. +While it is a future goal to spec out a migration path from Ethereum L1 DA to Alt-DA Mode, the migration path has not been scoped out yet. ### Can I deploy a chain using Alt-DA and then later switch to Ethereum L1 DA? -* Same as above, it is a future goal to spec out this migration path, but the migration path has not been scoped out yet. +Same as above, it is a future goal to spec out this migration path, but the migration path has not been scoped out yet. ### Can I switch between Alt-DA layers when using Alt-DA Mode? -* This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. -* If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) +This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. +If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) diff --git a/words.txt b/words.txt index 4044aeb21..9afd48b9f 100644 --- a/words.txt +++ b/words.txt @@ -40,8 +40,8 @@ BOOTNODES Bootnodes bootnodes bottlenecked -brotli Brotli +brotli Callouts callouts CCIP @@ -310,7 +310,6 @@ Superchain superchain Superchain's Superchains -suppoer SYNCMODE syncmode SYNCTARGET From 9244f58d4fecdccb85e838cc11f054b086e5f54a Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:29:53 -0700 Subject: [PATCH 09/14] several updates --- .../deploy/smart-contracts.mdx | 2 +- .../management/alt-da-mode.mdx | 110 ------------------ .../builders/chain-operators/self-hosted.mdx | 1 + .../chain-operators/tutorials/_meta.json | 2 +- .../tutorials/integrating-da-layer.mdx | 16 +-- 5 files changed, 11 insertions(+), 120 deletions(-) delete mode 100644 pages/builders/chain-operators/management/alt-da-mode.mdx diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index 1e835c237..ecae8d2f1 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -27,7 +27,7 @@ JSON file. For the full set of options, you can see the [rollup configuration pa The smart contracts are deployed using [foundry](https://github.com/foundry-rs) and you can find the script's source code in the monorepo at -[packages/contracts-bedrock/scripts/Deploy.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/Deploy.s.sol). +[packages/contracts-bedrock/scripts/Deploy.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol). ### State Diff diff --git a/pages/builders/chain-operators/management/alt-da-mode.mdx b/pages/builders/chain-operators/management/alt-da-mode.mdx deleted file mode 100644 index 78dbcb693..000000000 --- a/pages/builders/chain-operators/management/alt-da-mode.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: How to Run an Alt-DA Mode Chain -lang: en-US -description: Learn how to run an Alt-DA mode chain. ---- - -import { Callout, Steps } from 'nextra/components' - -# How to Run an Alt-DA Mode Chain - - - The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. Features in beta are built and reviewed by the Optimism Collective's core contributors, and provide developers with early access to highly requested configurations. These features may experience stability issues, and we encourage feedback from our early users. - - -This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/stack/protocol/features/alt-de-mode) for a general overview of this OP Stack configuration. -An Alt-DA Mode OP Stack chain enables a chain operator to post and read data to any alternative data availability layer that has built a functioning OP Stack DA Server. - - - ### Compatible op-node & op-\* Versions - - You should use at least the following versions when running your chain. - - * op-node/v1.8.0-rc.1 - * op-proposer/v1.8.0-rc.1 - * op-batcher/v1.8.0-rc.1 - * [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest) - - For deploying your contracts, use the latest release - if you are trying to launch an Alt-DA Mode Chain using a custom gas token, follow the contract deployment instructions in our [Custom Gas Token docs](/builders/chain-operators/management/custom-gas-token.mdx) - - ### Step 1: Set up your DA Server - - - DA Servers are not built or maintained by Optimism Collective Core Contributors. They are often maintained by the team that built the DA Layer that the DA Server enables access to. Please reach out to the team who built the DA Server you are trying to run with any questions or issues. - - - * Celestia's docs on how to run the Celestia DA server: - * [https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md](https://github.com/celestiaorg/op-plasma-celestia/blob/main/README.md) - * EigenDA's docs on how to run the EigenDA DA server: - * [https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md](https://github.com/Layr-Labs/op-plasma-eigenda/blob/main/README.md) - * Avail's docs on how to run the AvailDA DA Server: - * [https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server](https://docs.availproject.org/docs/build-with-avail/Optimium/op-stack/op-stack#setup-avail-da-server) - - ### Step 2: Configuring your op-node - - Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. No configuration changes are required for `op-geth` or `op-proposer`. - - ```go - Alt-DA (EXPERIMENTAL) - - - --altda.da-server value ($OP_NODE_ALTDA_DA_SERVER) - HTTP address of a DA Server - - --altda.enabled (default: false) ($OP_NODE_ALTDA_ENABLED) - Enable Alt-DA mode - - --altda.verify-on-read (default: true) ($OP_NODE_ALTDA_VERIFY_ON_READ) - Verify input data matches the commitments from the DA storage service - - ``` - - ### Step 3: Configuring your Batcher - - ``` - --altda.da-server value ($OP_BATCHER_ALTDA_DA_SERVER) - HTTP address of a DA Server - - --altda.da-service (default: false) ($OP_BATCHER_ALTDA_DA_SERVICE) - Use DA service type where commitments are generated by the DA server - - --altda.enabled (default: false) ($OP_BATCHER_ALTDA_ENABLED) - Enable Alt-DA mode - - --altda.verify-on-read (default: true) ($OP_BATCHER_ALTDA_VERIFY_ON_READ) - Verify input data matches the commitments from the DA storage service - ``` - - * Provide `--altda.enabled=true, --atlda.da-server=$DA_SERVER_HTTP_URL --altda.da-service=true` - - After completing steps 1-3 above, you will have an Alt-DA mode chain up and running. - - ### Step 4: Setting Your Fee Configuration - - * Alt-DA submits only Commitments to data to L1, which is considerably smaller than the raw Inputs, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. - - * Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. - - ``` - // Set in Deploy Config - "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost - "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now - ``` - - * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. - - - - -# For Node Operators (Full and Archive nodes) - -* Run a DA server as laid out in Step 1 -* Provide the same `--altda.enabled=true, --altda.da-server...` on op-node as listed in Step 2 - -## Next Steps - -* Additional questions? See the FAQ section in the [Alt-DA Mode Explainer](/stack/protocol/features/alt-da-mode#faqs). -* For more detailed info on Alt-DA Mode, see the [specs](https://specs.optimism.io/experimental/alt-da.html). -* If you experience any problems, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/pages/builders/chain-operators/self-hosted.mdx b/pages/builders/chain-operators/self-hosted.mdx index 655c55e49..4ef78fd33 100644 --- a/pages/builders/chain-operators/self-hosted.mdx +++ b/pages/builders/chain-operators/self-hosted.mdx @@ -96,6 +96,7 @@ They'll help you get a head start deploying your first OP Stack chain. | [Adding a Precompile](tutorials/adding-precompiles) | Learn how to run an EVM with a new precompile for OP Stack chain operations to speed up calculations that are not currently supported. | 🟢 Easy | | [Modifying Predeployed Contracts](tutorials/modifying-predeploys) | Learn how to modify predeployed contracts for an OP Stack chain by upgrading the proxy. | 🟢 Easy | | [Pause and Unpause the Bridge](/stack/security/pause) | Learn how to pause `OptimismPortal` as a backup safety mechanism on your OP Stack chain. | 🟢 Easy | +| [Integrating a DA Layer](tutorials/integrating-da-layer) | Learn how to integrate a new DA Layer with Alt-DA | 🟢 Easy | You can also [suggest a new tutorial](https://github.com/ethereum-optimism/docs/issues/new?assignees=\&labels=tutorial%2Cdocumentation%2Ccommunity-request\&projects=\&template=suggest_tutorial.yaml\&title=%5BTUTORIAL%5D+Add+PR+title) if you have something specific in mind. We'd love to grow this list! diff --git a/pages/builders/chain-operators/tutorials/_meta.json b/pages/builders/chain-operators/tutorials/_meta.json index 5db2c3141..465ec6d7b 100644 --- a/pages/builders/chain-operators/tutorials/_meta.json +++ b/pages/builders/chain-operators/tutorials/_meta.json @@ -4,5 +4,5 @@ "adding-derivation-attributes": "Adding Attributes to the Derivation Function", "adding-precompiles": "Adding a Precompile", "modifying-predeploys": "Modifying Predeployed Contracts", - "integrating-da-layer": "Integrating a new DA Layer" + "integrating-da-layer": "Integrating a New DA Layer" } \ No newline at end of file diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx index 7107e8d3e..5e48fc372 100644 --- a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -1,12 +1,12 @@ --- -title: Integrating a new DA Layer +title: Integrating a New DA Layer with Alt-DA lang: en-US description: Learn how to add support for a new DA Layer within the OP Stack. --- import { Callout, Steps } from 'nextra/components' -# Integrating a New DA Layer +# Integrating a New DA Layer with Alt-DA The Alt-DA Mode feature is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing and may have bugs or other issues. @@ -14,7 +14,7 @@ import { Callout, Steps } from 'nextra/components' [Alt-DA Mode](/stack/protocol/features/alt-da-mode) enables seamless integration of any DA Layer, regardless of their commitment type, into the OP Stack. After a DA Server is built for a DA Layer, any chain operator can launch an OP Stack chain using that DA Layer for sustainably low costs. -## Building Your DA Server +## Build Your DA Server Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open sourced and MIT Licensed. @@ -22,7 +22,7 @@ Our suggestion is for every DA Layer to build and maintain their own DA Server, ### Design your commitment binary encoding * It must point to the data on your layer (like block height / hash). - * It must be able to validate the data returned from the data (i.e. include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). + * It must be able to validate the data returned from the data (i.e., include a cryptographic commitment to the data like a hash, merkle proof, or polynomial commitment, this could be done against the block hash with a complex proof). See the [specs](https://specs.optimism.io/experimental/alt-da.html?highlight=input-commitment-submission#input-commitment-submission) for more info on commitment submission. @@ -38,12 +38,12 @@ Our suggestion is for every DA Layer to build and maintain their own DA Server, * `put` is used by the batcher and can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer. * `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. - - For more info on implementing the DA Server, [see the specification](https://specs.optimism.io/experimental/alt-da.html#da-server). - +## Run Alt-DA +Follow our guide on [how to operate an Alt-DA Mode chain](/builders/chain-operators/features/alt-da-mode), except instead of using the S3 DA server, use the DA server that you built. + ## Next Steps * Want to explore more? See an [example DA server](https://github.com/ethereum-optimism/optimism/blob/develop/op-plasma/daserver.go) -* Ready for next steps? Follow our guide on [how to operate an Alt-DA Mode chain](/builders/chain-operators/features/alt-da-mode) +* For more detail on implementing the DA Server, [see the specification](https://specs.optimism.io/experimental/alt-da.html#da-server). From b62c0de2fb6b88ae6ceaf3ceba43a5df24b33826 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:32:23 -0700 Subject: [PATCH 10/14] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../builders/chain-operators/tutorials/integrating-da-layer.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx index 5e48fc372..373110168 100644 --- a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -36,7 +36,7 @@ Our suggestion is for every DA Layer to build and maintain their own DA Server, * Write a simple HTTP server which supports `get` and `put` * `put` is used by the batcher and can return the commitment to the batcher in the body. It should not return until the data is known to be submitted to your DA layer. - * `get` should fetch the data. If the data is not be available, it should return a `404` not found. If there are other errors, a different error should be returned. + * `get` should fetch the data. If the data is not available, it should return a `404` not found. If there are other errors, a different error should be returned. From 3389ef3f210b388779c3c55666d59376e3689370 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Wed, 19 Jun 2024 07:17:59 -0700 Subject: [PATCH 11/14] address comment feedback --- .../chain-operators/features/alt-da-mode.mdx | 10 +++--- .../tutorials/integrating-da-layer.mdx | 2 +- pages/stack/protocol/features/alt-da-mode.mdx | 32 ++++++------------- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/pages/builders/chain-operators/features/alt-da-mode.mdx b/pages/builders/chain-operators/features/alt-da-mode.mdx index 40c53dbef..50d34c2ac 100644 --- a/pages/builders/chain-operators/features/alt-da-mode.mdx +++ b/pages/builders/chain-operators/features/alt-da-mode.mdx @@ -43,10 +43,10 @@ For deploying your contracts, use the latest release. ### Configure Your `op-node` - * Spin up your OP chain as usual but set the `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. + * Spin up your OP chain as usual but set `--altda.enabled=true` and point both `op-batcher` and `op-node` to the DA server. * No configuration changes are required for `op-geth` or `op-proposer`. - ```go + ``` Alt-DA (EXPERIMENTAL) @@ -85,13 +85,13 @@ For deploying your contracts, use the latest release. ### Set Your Fee Configuration * Chain operators are not posting everything to Ethereum, just commitments, so chain operators will need to determine fee scalars values to charge users. The fee scalar values are network throughput dependent, so values will need to be adjusted by chain operators as needed. - * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and the submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. - * Set scalar values inside the deploy config. The example below shows some possible fee scalar values, assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput. + * Cost structure for Alt-DA Mode: The transaction data is split up into 128kb chunks and then submitted to your DA Layer. Then, 32 byte commitments are submitted (goes to batch inbox address) to L1 for each 128kb chunk. Then, figure out how much that costs relative to the amount of transactions your chain is putting through. + * Set scalar values inside the deploy config. The example below shows some possible fee scalar values, calculated assuming negligible DA Layer costs, but will need to be adjusted up or down based on network throughput - as a reminder of how to set your scalar values, see [this section](https://docs.optimism.io/builders/chain-operators/management/blobs#update-your-scalar-values-for-blobs) of the docs. ``` // Set in Deploy Config "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost - "gasPriceOracleBlobBaseFeeScalar": 0, // blobs are off for now + "gasPriceOracleBlobBaseFeeScalar": 0, // blobs aren't used for submitting the small data commitments ``` diff --git a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx index 373110168..a2f629751 100644 --- a/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx +++ b/pages/builders/chain-operators/tutorials/integrating-da-layer.mdx @@ -16,7 +16,7 @@ import { Callout, Steps } from 'nextra/components' ## Build Your DA Server -Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open sourced and MIT Licensed. +Our suggestion is for every DA Layer to build and maintain their own DA Server, with support from the OP Labs team along the way. The DA Server will need to be run by every node operator, so we highly recommend making your DA Server open source and MIT licensed. ### Design your commitment binary encoding diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index 494049c3e..ac942fc1d 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -8,33 +8,17 @@ import { Callout } from 'nextra/components' # Alt-DA Mode Explainer -Alt-DA Mode enables seamless integration of various DA Layers, regardless of their commitment type, into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. +Alt-DA Mode enables seamless integration of various Data Availability (DA) Layers, regardless of their commitment type, into the OP Stack. This allows any chain operator to launch an OP Stack chain using their favorite DA Layer for sustainably low costs. ## Sustainably Low Costs -EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. -Alternative DA Layers allow OP Stack chains to post data to a place that is cheap and won't get congested but remains stable and minimizes security and decentralization tradeoffs. +In order to function securely, OP Stack chains need to ensure that L2 transaction data is available to all node operators. EIP-4844 has massively reduced Ethereum L1 data costs for OP Stack rollups, but blobspace is on the path to congestion, which will lead to higher blob fees and increased chain operator costs. +Over the past few years, alternative DA Layers have been built as an alternative place for L2s to post L2 data that is cheap, with more throughput, but remains stable and minimizes security and decentralization tradeoffs. ## How It Works -Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own DA Server to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. - -```mermaid - sequenceDiagram - participant User - participant Configuration - participant OP Stack - participant DA Layer - participant Batcher - - User->>Configuration: Add "alt-da-mode" setting - Configuration-->>OP Stack: Updated configuration with Alt-DA Mode - OP Stack->>+DA Layer: Integrate different DA Layers - DA Layer-->>-OP Stack: Provide cost-efficient data availability - User->>Batcher: Configure batcher with DA settings - Batcher-->>OP Stack: Batching transactions for Alt-DA Mode - OP Stack-->>User: Operational Alt-DA Mode for enhanced flexibility -``` +Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own (DA Server)[https://specs.optimism.io/experimental/alt-da.html#da-server] to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. + This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a solution compatible with upcoming OP Stack features. @@ -47,6 +31,10 @@ Just like with the Rollup configuration of the OP Stack, core contributors are c * DA Bridge integrations (like Celestia Blobstream and Eigen DA Cert Verification) * Increasing the amount of data that can be committed to in a single commitment (potentially with merklization) +## Tradeoffs of Alt-DA Mode + +Alt-DA Mode will always have more trust assumptions than simply posting data to L1 Ethereum. In its current initial iteration, Alt-DA Mode with generic commitments fully trusts the chain operator to make data available by both posting all data to the DA Layer and posting corresponding commitments to L1 Ethereum. If a chain operator posts incorrect commitments or does not post data to the DA Layer, it will not be accessible by node operators. The future improvements mentioned above are intended to address this trust assumption. After DA Bridges are integrated, then as long as the DA Layer and its DA Bridge are decentralized and functioning as intended, then once data is posted to the DA Layer, the L1 commitments would be bridged without relying on a aingly trusted party. It is important to remember that, even after integrating the DA Bridges and Fault Proofs, there will still be an added trust assumption that the DA Layer and DA Bridge are secure and functioning as intended. + ## Next Steps * Ready to get started? Read our guide on how to [deploy your Alt-DA Mode chain](/builders/chain-operators/features/alt-da-mode). @@ -65,4 +53,4 @@ Same as above, it is a future goal to spec out this migration path, but the migr ### Can I switch between Alt-DA layers when using Alt-DA Mode? This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. -If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) +If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) \ No newline at end of file From e0a49c4512f73c9ee909284f028a6e727f98ae14 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Wed, 19 Jun 2024 07:25:02 -0700 Subject: [PATCH 12/14] fix link format --- pages/stack/protocol/features/alt-da-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index ac942fc1d..85bcce1e5 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -17,7 +17,7 @@ Over the past few years, alternative DA Layers have been built as an alternative ## How It Works -Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own (DA Server)[https://specs.optimism.io/experimental/alt-da.html#da-server] to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. +Alt-DA Mode introduces a standard interface for reading and writing data to Alt-DA Layers and allows any DA Layer team to build and maintain their own [DA Server](https://specs.optimism.io/experimental/alt-da.html#da-server) to enable the OP Stack to communicate with their DA Layer. The DA Server handles any of the custom DA Layer logic, such as key management, interfacing with a DA Layer node, etc. This abstraction ensures that new features and improvements to Alt-DA Mode will come to all chains using Alt-DA Mode, regardless of the DA Layer they choose to use. Although the Data Availability Challenge (DA Challenge) will be disabled at launch, this integration provides a solution compatible with upcoming OP Stack features. From 52b3e010aff72c1b0d1680468d76840790a8bfe0 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Wed, 19 Jun 2024 07:26:28 -0700 Subject: [PATCH 13/14] add new line at end of file --- pages/stack/protocol/features/alt-da-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index 85bcce1e5..659898e2f 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -53,4 +53,4 @@ Same as above, it is a future goal to spec out this migration path, but the migr ### Can I switch between Alt-DA layers when using Alt-DA Mode? This is technically possible today. A chain operator can start posting data to two DA Layers simultaneously during a transition period and coordinates their node operators to switch the DA Server they operate during that time. -If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) \ No newline at end of file +If assistance is needed here, please reach out [via Github](https://github.com/ethereum-optimism/developers/discussions) From b99da6c0596535ee4178ccb59499409d61e73b14 Mon Sep 17 00:00:00 2001 From: Kevin Ho Date: Wed, 19 Jun 2024 07:27:58 -0700 Subject: [PATCH 14/14] fix typo --- pages/stack/protocol/features/alt-da-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/stack/protocol/features/alt-da-mode.mdx b/pages/stack/protocol/features/alt-da-mode.mdx index 659898e2f..3ff7b2d03 100644 --- a/pages/stack/protocol/features/alt-da-mode.mdx +++ b/pages/stack/protocol/features/alt-da-mode.mdx @@ -33,7 +33,7 @@ Just like with the Rollup configuration of the OP Stack, core contributors are c ## Tradeoffs of Alt-DA Mode -Alt-DA Mode will always have more trust assumptions than simply posting data to L1 Ethereum. In its current initial iteration, Alt-DA Mode with generic commitments fully trusts the chain operator to make data available by both posting all data to the DA Layer and posting corresponding commitments to L1 Ethereum. If a chain operator posts incorrect commitments or does not post data to the DA Layer, it will not be accessible by node operators. The future improvements mentioned above are intended to address this trust assumption. After DA Bridges are integrated, then as long as the DA Layer and its DA Bridge are decentralized and functioning as intended, then once data is posted to the DA Layer, the L1 commitments would be bridged without relying on a aingly trusted party. It is important to remember that, even after integrating the DA Bridges and Fault Proofs, there will still be an added trust assumption that the DA Layer and DA Bridge are secure and functioning as intended. +Alt-DA Mode will always have more trust assumptions than simply posting data to L1 Ethereum. In its current initial iteration, Alt-DA Mode with generic commitments fully trusts the chain operator to make data available by both posting all data to the DA Layer and posting corresponding commitments to L1 Ethereum. If a chain operator posts incorrect commitments or does not post data to the DA Layer, it will not be accessible by node operators. The future improvements mentioned above are intended to address this trust assumption. After DA Bridges are integrated, then as long as the DA Layer and its DA Bridge are decentralized and functioning as intended, then once data is posted to the DA Layer, the L1 commitments would be bridged without relying on a single trusted party. It is important to remember that, even after integrating the DA Bridges and Fault Proofs, there will still be an added trust assumption that the DA Layer and DA Bridge are secure and functioning as intended. ## Next Steps