Proof of Data Availability

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 Data Availability 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.

First, create a new account to serve as the deputy.

sunrised keys add your_deputy_account --keyring-backend=test

Next, send some uusdrise to this account using the tx bank send command. This will be used to pay for gas fees when submitting SubmitValidityProof transactions.

DEPUTY_ADDRESS=$(sunrised keys show your_deputy_account -a --keyring-backend=test)
sunrised tx bank send [your_validator_key] $DEPUTY_ADDRESS 1000000uusdrise \
    --chain-id=$CHAIN_ID \
    --gas-prices=0.025uusdrise --gas-adjustment 1.2 \
    --gas=auto \
    -y

Finally, register the deputy address with your validator. This transaction must be sent from your validator's account and only needs to be done once.

Register the address of the deputy to be used on sunrise-data.

How to set up

  1. Running sunrised as a validator See Validator Node for setting up.

  2. Clone sunrise-data repo

  3. Create and edit 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.

Run IPFS on local

  1. Run IPFS

  2. Check the IPFS node ID and optionally share and add a remote peer

Start to proof data

On your sunrise-data directory,

Or register as a service

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

Last updated