Sunrise OP DA Server

Sunrise OP DA Server connects the L2 blockchain to Sunrise's Data Availability Layer. Currently, L2 chains created in the OP Stack are supported.

See OP Stack for L2 chain side configuration.

Sunrise Consensus Node

Requires a networked Sunrise node to operate. Networks running Sunrise v0.3.0 or higher support Data Availability Layer.

Follow the Node Guide on how to create a consensus node.

How to set up OP DA Server

sunrise-data

  1. Clone sunrise-data repo

    cd ~
    git clone https://github.com/sunriselayer/sunrise-data.git
    cd sunrise-data
    make install
  2. Create and edit config.toml

    cp config.default.toml config.toml
    nano config.toml

    To connect to a local IPFS daemon, leave the ipfs_api_url field empty

    Chage home_path to your .sunrise directory and publisher_account to your sunrised key's name

    [api]
    port = 8000
    ipfs_api_url = ""
    ipfs_addrinfo = ""
    submit_challenge = true
    submit_proof = true
    
    [chain]
    addr_prefix="sunrise"
    keyring_backend="test"
    home_path="/home/ubuntu/.sunrise"
    publisher_account="validator"
    fees="10000uvrise"
    cometbft_rpc="http://localhost:26657"
    vote_extension_period=2
  3. Start Daemon

    sunrise-data

Integrate IPFS

  1. Run IPFS

    wget https://dist.ipfs.tech/kubo/v0.31.0/kubo_v0.31.0_linux-amd64.tar.gz
    tar -xvzf kubo_v0.31.0_linux-amd64.tar.gz
    cd kubo
    sudo ./install.sh
    ipfs init --profile=lowpower
    ipfs daemon
  2. Check the IPFS node ID and optionally share and add a remote peer

    ipfs id

sunrise-op-da-server

  1. Clone sunrise-op-da-server repo

    cd ~
    git clone https://github.com/sunriselayer/sunrise-op-da-server.git
    cd sunrise-op-da-server
    make install
  2. Start DA Server

     da-server --sunrise.server=http://localhost:8000 \
     --sunrise.data_shard_count=10 \
     --sunrise.parity_shard_count=10

Last updated