Start
Setup DA network
- Celestia
export CELESTIA_NETWORK="celestia"
export CELESTIA_HOME_DIR="${HOME}/.da"
Follow the Celestia Docs for setting up a light node (celestia-node
) using Docker or on a Bare Metal server. It is recommended to begin the light node from a trusted height for a fast syncing process:
- Get a trusted height & hash
- Initialize:
celestia light init --node.store $CELESTIA_HOME_DIR
note
Make sure to fund the created address to publish data to the network.
- Edit config.toml:
code ~/.da/config.toml
settingDASer.SampleFrom
to the trusted height andHeader.TrustedHast
to the hash of the trusted height - Run the node:
celestia light start --node.store $HOME/.da
note
You can find a list of nodes you can use as --core.ip
here
Update RollApp configuration
- Use Celestia DA Backend [optional]
- Generate celestia namespace ID
export CELESTIA_NAMESPACE_ID=$(openssl rand -hex 10)
export CELESTIA_TOKEN=$(celestia light auth admin --p2p.network ${CELESTIA_NETWORK} --node.store $CELESTIA_HOME_DIR)
- linux
- mac
sed -i "s/da_layer .*/da_layer = \"celestia\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
sed -i "s/namespace_id .*/namespace_id = \"${CELESTIA_NAMESPACE_ID}\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
sed -i "s/da_config .*/da_config = \"{\\\\\"base_url\\\\\": \\\\\"http:\/\/localhost:26658\\\\\", \\\\\"timeout\\\\\": 60000000000, \\\\\"gas_prices\\\\\":0.02, \\\\\"gas_adjustment\\\\\": 1.3, \\\\\"namespace_id\\\\\": \\\\\"${CELESTIA_NAMESPACE_ID}\\\\\", \\\\\"auth_token\\\\\":\\\\\"${CELESTIA_TOKEN}\\\\\"}\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
sed -i '' "s/da_layer .*/da_layer = \"celestia\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
sed -i '' "s/namespace_id .*/namespace_id = \"${CELESTIA_NAMESPACE_ID}\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
sed -i '' "s/da_config .*/da_config = \"{\\\\\"base_url\\\\\": \\\\\"http:\/\/localhost:26658\\\\\", \\\\\"timeout\\\\\": 60000000000, \\\\\"gas_prices\\\\\":0.02, \\\\\"gas_adjustment\\\\\": 1.3, \\\\\"namespace_id\\\\\": \\\\\"${CELESTIA_NAMESPACE_ID}\\\\\", \\\\\"auth_token\\\\\":\\\\\"${CELESTIA_TOKEN}\\\\\"}\"/" ${ROLLAPP_HOME_DIR}/config/dymint.toml
Update RollApp configuration
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "settlement_layer" -v "dymension"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "settlement_node_address" -v "$HUB_RPC_URL"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "settlement_gas_prices" -v "20000000000adym"
Begin RollApp process
- shell
- systemd
$EXECUTABLE start
sudo tee /etc/systemd/system/rollapp.service > /dev/null <<EOF
[Unit]
Description=rollapp
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which $EXECUTABLE) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable rollapp
sudo systemctl restart rollapp
journalctl -fu rollapp
Setup IBC channels and relayer
Set the empty block time to 3s
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "max_idle_time" -v "3s"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "batch_submit_max_time" -v "3s"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "max_proof_time" -v "3s"
Install relayer:
git clone https://github.com/dymensionxyz/go-relayer.git && cd go-relayer && git checkout v0.3.4-v2.5.2-relayer && make install
Setup IBC bridge in RollApp binary:
This process takes a few minutes.
./scripts/ibc/setup_ibc.sh
Stop the rollapp process
- shell
- systemd
kill $(pgrep $(basename $EXECUTABLE))
sudo systemctl stop rollapp
Change the empty block time to 1h
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "max_idle_time" -v "1h0m0s"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "batch_submit_max_time" -v "1h0m0s"
dasel put -f "${ROLLAPP_HOME_DIR}"/config/dymint.toml "max_proof_time" -v "1m40s"
Restart the rollapp process
- shell
- systemd
$EXECUTABLE start
sudo systemctl stop rollapp
Start the Relayer
rly start hub-rollapp --flush-interval 100000h --max-msgs 100 --time-threshold 2h --no-flush --log-format json
Your RollApp is currently running and connected to the Dymension network of choice. Next list the RollApp on the Portal.