Bridge nodes connect the data availability layer and the consensus layer while also having the option of becoming a validator. Validators do not have to run bridge nodes, but are encouraged to in order to relay blocks to the data availability network.
Mamaki test network is deprecated now and replaced with Mocha test network, please see this guide for updated instructions
Bridge Node Functions
Import and process “raw” headers & blocks from a trusted Core process (meaning a trusted RPC connection to a celestia-core node) in the Consensus network.
Validate and erasure code the “raw” blocks (what is this
Supply block shares with data availability headers to Light Nodes in the DA network.
Hardware Requirements:
4vCPU / 8GB RAM / 250GB SSD / 1 Gbps Download/100 Mbps Upload
OS: Ubuntu Linux 20.04 (LTS) x64
Dependencies
This will require the same prerequisite software dependencies installed in Step 1 of the Validator Node guide, this guide is intended for running a Bridge node in parallel to a Validator/full node, so should already be installed. However this could be run separate.
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.3.0-rc2
make install
make cel-key
You should be in celestia-node
directory, verify installed correctly
celestia version
NOTE: celestia app* is what was installed for validator node*
celestia bridge init --core.remote https://rpc-mamaki.pops.one:9090
--core.remote
port defaults to 9090, RPC Endpoints can be found here:
We now have a working directory .celestia-bridge
and our config should be found at ./config.toml
Start the Bridge Node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090), find addresses above.
celestia bridge start --core.ip <ip-address>
Optional Connect to own validator node, if running on the same server
--core.ip http://localhost:26657
Once you start the Bridge Node, a wallet key will be generated for you. You will need to fund that address with Testnet tokens to pay for PayForData
transactions.
Find address to fund
./cel-key list --node.type bridge --keyring-backend test
Use Existing Key
The custom key must exist inside the Celestia bridge node directory at the correct path (default: ~/.celestia-bridge/keys/keyring-test
. add flag to the start command
--keyring.accname <name_of_custom_key>
Sending from another wallet
such as sending from validator node.
celestia-appd tx bank send [from_key_or_address] [to_address] [amount] --chain-id mamaki --fees [fee] -y
sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-bridge.service
[Unit]
Description=celestia-bridge Cosmos daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/celestia bridge start --core.remote <ip-address>
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Enable and Start Service
sudo systemctl enable celestia-bridge
sudo systemctl daemon-reload
sudo systemctl start celestia-bridge
Check Status
sudo systemctl status celestia-bridge
Check logs
journalctl -u celestia-bridge.service -f
such as changing the gRPC endpoint you will need to edit the service file
stop the service
sudo systemctl stop celestia-bridge
Open service for editing
sudo nano /etc/systemd/system/celestia-bridge.service
Restart the service
sudo systemctl daemon-reload
sudo systemctl start celestia-bridge