> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimism.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to run an Alt-DA mode chain

> Learn how to configure and run an Alt-DA mode chain within the OP Stack.

<Info>
  The Alt-DA Mode feature is currently in <strong>Beta</strong>  within the MIT-licensed OP Stack. Beta features are built and reviewed by Optimism Collective 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.
</Info>

This guide provides a walkthrough for chain operators who want to run an Alt-DA Mode chain. See the [Alt-DA Mode Explainer](/op-stack/features/experimental/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.

<Info>
  This page includes providers that meet specific [inclusion criteria](#inclusion-criteria), as outlined below.
</Info>

## Prerequisite

You should use at least the following compatible op\* versions when running your chain.

* op-node/v1.9.1
* op-proposer/v1.9.1
* op-batcher/v1.9.1
* [Latest version of op-geth](https://github.com/ethereum-optimism/op-geth/releases/latest)

<Steps>
  <Step title="Setup your DA server">
    <Info>
      DA Servers are not built or maintained by Optimism Collective Core Contributors. DA servers are maintained by third parties and run at your own risk. Please reach out to the team who built the DA Server you are trying to run with any questions or issues.
    </Info>

    * 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/deploy-rollup-on-avail/Optimium)
    * 0gDA's docs on how to run the [0gDA DA Server](https://github.com/0glabs/0g-da-op-plasma)
    * Near DA's docs on how to run the [Near DA Server](https://github.com/Nuffle-Labs/data-availability/blob/84b484de98f58a91bf12c8abe8df27f5e753f63a/docs/OP-Alt-DA.md)
  </Step>

  <Step title="Configure your `op-node`">
    * 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`.

    ```
       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>

  <Step title="Configure your batcher">
    * Set `--altda.enabled=true` and `--altda.da-service=true`.
    * Provide the URL for `--altda.da-server=$DA_SERVER_HTTP_URL`.

    ```
        --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
    ```

    After completing steps 1-3 above, you will have an Alt-DA mode chain up and running.
  </Step>

  <Step title="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 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 number 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](/chain-operators/guides/features/blobs#update-your-scalar-values-for-blobs) of the docs.

      ```
      // Set in Deploy Config
        "gasPriceOracleBaseFeeScalar": 7663, // Approximate commitment tx base cost
        "gasPriceOracleBlobBaseFeeScalar": 0, // blobs aren't used for submitting the small data commitments
      ```

    <Info>
      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.
    </Info>
  </Step>
</Steps>

## For node operators (full and archive nodes)

* 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)

## Inclusion criteria

Alt DA teams who want to be featured on this page must meet the following criteria:

* Functional [DA Server](https://specs.optimism.io/experimental/alt-da.html#da-server?utm_source=op-docs\&utm_medium=docs), maintained in your own repo
* Supporting detailed documentation, to be referenced [here](#setup-your-da-server)
* Functioning OP Stack devnet using your DA server with linked configuration, contract addresses, and RPC address

## Breaking changes: renaming Plasma Mode to Alt-DA Mode

This feature has been renamed from Plasma Mode to Alt-DA Mode in the monorepo at: [0bb2ff5](https://github.com/ethereum-optimism/optimism/commit/0bb2ff57c8133f1e3983820c0bf238001eca119b). There are several breaking changes you should be aware of. These include changes to configuration file parameters, environment variables, and CLI commands.
Before proceeding with the migration, ensure you are using [OP Stack v1.9.1](https://github.com/ethereum-optimism/optimism/releases/tag/v1.9.1) or later.

### Modify `rollup.json` config

Update your `rollup.json` configuration file by replacing the old Plasma config with the new Alt-DA config.
There are two possible formats for the old Plasma config:

### Legacy plasma config

If your config looks like this:

```json theme={null}
"use_plasma": true,
"da_commitment_type": "GenericCommitment",
"da_challenge_contract_address": "0xAAA",
"da_challenge_window": 1000,
"da_resolve_window": 2000,
```

### Recent plasma config

Or if it looks like this:

```json theme={null}
"plasma_config": {
  "da_commitment_type": "GenericCommitment",
  "da_challenge_contract_address": "0xAAA",
  "da_challenge_window": 1000,
  "da_resolve_window": 2000
}
```

### New Alt-DA config

Replace either of the above configurations with:

```json theme={null}
"alt_da": {
  "da_commitment_type": "GenericCommitment",
  "da_challenge_contract_address": "0xAAA",
  "da_challenge_window": 1000,
  "da_resolve_window": 2000
}
```

<Info>
  Only include fields in the new config that were present in your old config.
</Info>

## Updating OP Stack runtime config parameters

### CLI parameters

Update the following CLI parameters for both `op-node` and `op-batcher`:

| Former CLI param          | Current CLI param        |
| ------------------------- | ------------------------ |
| `--plasma.enabled`        | `--altda.enabled`        |
| `--plasma.da-server`      | `--altda.da-server`      |
| `--plasma.verify-on-read` | `--altda.verify-on-read` |
| `--plasma.da-service`     | `--altda.da-service`     |

### Environment variables

#### op-node

| Former env var                  | Current env var                |
| ------------------------------- | ------------------------------ |
| `OP_NODE_PLASMA_ENABLED`        | `OP_NODE_ALTDA_ENABLED`        |
| `OP_NODE_PLASMA_DA_SERVER`      | `OP_NODE_ALTDA_DA_SERVER`      |
| `OP_NODE_PLASMA_VERIFY_ON_READ` | `OP_NODE_ALTDA_VERIFY_ON_READ` |
| `OP_NODE_PLASMA_DA_SERVICE`     | `OP_NODE_ALTDA_DA_SERVICE`     |

#### op-batcher

| Former env var                     | Current env var                   |
| ---------------------------------- | --------------------------------- |
| `OP_BATCHER_PLASMA_ENABLED`        | `OP_BATCHER_ALTDA_ENABLED`        |
| `OP_BATCHER_PLASMA_DA_SERVER`      | `OP_BATCHER_ALTDA_DA_SERVER`      |
| `OP_BATCHER_PLASMA_VERIFY_ON_READ` | `OP_BATCHER_ALTDA_VERIFY_ON_READ` |
| `OP_BATCHER_PLASMA_DA_SERVICE`     | `OP_BATCHER_ALTDA_DA_SERVICE`     |

#### op-alt-da (formerly op-plasma) daserver

| Former env var                             | Current env var                        |
| ------------------------------------------ | -------------------------------------- |
| `OP_PLASMA_DA_SERVER_ADDR`                 | `OP_ALTDA_SERVER_ADDR`                 |
| `OP_PLASMA_DA_SERVER_PORT`                 | `OP_ALTDA_SERVER_PORT`                 |
| `OP_PLASMA_DA_SERVER_FILESTORE_PATH`       | `OP_ALTDA_SERVER_FILESTORE_PATH`       |
| `OP_PLASMA_DA_SERVER_GENERIC_COMMITMENT`   | `OP_ALTDA_SERVER_GENERIC_COMMITMENT`   |
| `OP_PLASMA_DA_SERVER_S3_BUCKET`            | `OP_ALTDA_SERVER_S3_BUCKET`            |
| `OP_PLASMA_DA_SERVER_S3_ENDPOINT`          | `OP_ALTDA_SERVER_S3_ENDPOINT`          |
| `OP_PLASMA_DA_SERVER_S3_ACCESS_KEY_ID`     | `OP_ALTDA_SERVER_S3_ACCESS_KEY_ID`     |
| `OP_PLASMA_DA_SERVER_S3_ACCESS_KEY_SECRET` | `OP_ALTDA_SERVER_S3_ACCESS_KEY_SECRET` |

After making these changes, your system should be properly configured to use the new Alt-DA Mode.

<Info>
  Remember to thoroughly test your configuration in testnet before going mainnet.
</Info>

## Next steps

* Additional questions? See the FAQ section in the [Alt-DA Mode Explainer](/op-stack/features/experimental/alt-da-mode#faqs).
* For more detailed info on Alt-DA Mode, see the [specs](https://specs.optimism.io/experimental/alt-da.html?utm_source=op-docs\&utm_medium=docs).
* If you experience any problems, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions).
