🌅
Sunrise / Gluon Docs
  • Home
    • 👋Sunrise
  • 📜Learn
    • 🌆Sunrise
      • Proof of Liquidity
      • Fee Abstraction
      • Data Availability
      • Gauges Voting
      • Liquidity Pool
      • Liquidity Incentive
      • Swap
      • TokenConverter
      • Fee
      • Lockup Account
      • Bribes
    • 💴$RISE
      • Allocations
    • 🏦Gluon
    • 💴$GLU
    • 🎓Thesis
      • App chain thesis
      • Interoperability
  • 🛠️Build
    • 🚀Quick Start
    • Client
    • L2 Blockchains
      • Rollkit
        • Sunrise Data
        • Rollkit L2 Chain
      • OP Stack
        • Sunrise Data
        • OP Stack L2 Chain
    • Validators
      • Proof of Data Availability
      • Self Delegation
  • 🏗️Run a Sunrise Node
    • Networks
    • Types of Nodes
      • Consensus
        • Full Consensus Node
        • Validator Node (Genesis)
        • Validator Node
        • Setup Cosmovisor
      • IBC Relayers
    • Resources
      • Upgrade
      • Environment
  • 🏗️Run a Gluon Node
    • Networks
    • Node
      • Validator Node
  • 🔗Links
    • GitHub
    • Discord
    • X (Twitter)
    • Medium
    • dev.to
  • 📓Deprecated (UnUniFi)
    • IBC Channels
    • Security
    • CosmWasm
      • Tutorial
      • Create Project
    • IYA Strategy
      • Interface
      • External CosmWasm chain with IBCHooks
      • External EVM chain with Axelar
    • Frontend
      • Cosmos Client TS
    • Resources
    • Setup ununifid
    • ununifid
      • Basic Commands
      • Module Commands
        • wasm
    • Build a Node
    • Build a Validator Node
    • Setup Cosmovisor
    • Mainnet Upgrades
    • IBC Relayer
Powered by GitBook
On this page
  • Proof
  • Sunrise-Data for Validator
  • Register proof deputy of your validator
  • How to set up
  • Run IPFS on local
  • Start to proof data
  1. Build
  2. Validators

Proof of Data Availability

PreviousValidatorsNextSelf Delegation

Last updated 2 months ago

Sunrise's Data Availability Layer is validated by validators. Validators must validate data that may not be valid and send the proofs to chain.

This section describes how validators prove data.

Proof

The only data that require proof are those that have been sent MsgSubmitInvalidity and the status has been changed to CHALLENGING.

The threshold for CHALLENGING is when MsgSubmitInvalidity is sent for 33% (the default in genesis) of the entire shards.

The validator is then validated. If more than a certain number of shards are proved, the status changes to VERIFIED as usual. If not, the status changes to REJECTED.

See for status and proof of data in the Data Availability Layer.

Sunrise-Data for Validator

sunrise-data provides validators with the functions to monitor and prove data that has become CHALLENGING.

Register proof deputy of your validator

Although validators can send tx themselves to send proof data, it is recommended to use a deputy address to prevent leakage of keys.

sunrised tx da register-proof-deputy [deputy_address] \
   --from [your_validator_key] \
   --chain-id=$CHAIN_ID \
   --fees=21000urise \
   --gas=220000

To register you need to send a transaction with the validator key only once on sunrised. Register the address of the deputy to be used on sunrise-data.

How to set up

  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
    vi config.toml

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

    Change home_path to your .sunrise directory, proof_deputy_account to your sunrised key's name and validator_address to your validator address.

    [api]
    port = 8000
    ipfs_api_url = ""
    ipfs_address_info = ""
    
    [chain]
    address_prefix="sunrise"
    home_path="/home/ubuntu/.sunrise"
    keyring_backend="test"
    sunrised_rpc="http://localhost:26657"
    
    [validator]
     proof_deputy_account="your_deputy_account"
     validator_address="sunrisevaloper1a8jcsmla6heu99ldtazc27dna4qcd4jyv75vcz"
     proof_fees="10000urise"
     proof_interval=5

Run IPFS on local

  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

Start to proof data

On your sunrise-data directory,

sunrise-data validator

Or register as a service

vi /etc/systemd/system/sunrise-data.service
systemctl enable sunrise-data
systemctl start sunrise-data
[Unit]
Description = sunrise-data validator daemon
After=network-online.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/sunrise-data
ExecStart = /home/ubuntu/go/bin/sunrise-data validator
Restart=on-failure
RestartSec=3
LimitNOFILE=1400000

[Install]
WantedBy = multi-user.target

If the setup is successful, the display will look like this

$ sunrise-data validator
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"Starting validator task"}
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"validator: sunrisevaloper1a8jcsmla6heu99ldtazc27dna4qcd4jyv75vcz deputy: sunrise155u042u8wk3al32h3vzxu989jj76k4zcc6d03n"}
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"On-chain data is checked every 5 sec"}

Running sunrised as a validator See for setting up.

🛠️
Data Availability
Validator Node