# Celestia Bridge Node - Mamaki

By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-11-30

---

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**

[https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/080axi695I-z\_CqU7li65kCOluP7sukMeSk8ocz4uzk](https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/080axi695I-z_CqU7li65kCOluP7sukMeSk8ocz4uzk)

**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

Part 1: install Celestia Node
-----------------------------

**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.

[https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/KeaXlEAl7l0PzhrkpInJaFLJZx7g9tdxKpN3uW6eZv8](https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/KeaXlEAl7l0PzhrkpInJaFLJZx7g9tdxKpN3uW6eZv8)

    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

![Should output something like this](https://storage.googleapis.com/papyrus_images/c2c8907d292d99075727fab5b090c9cddf009bc2ad5042cbc8c5250f1161a1b1.png)

Should output something like this

**_NOTE: celestia app_**\* is what was installed for validator node\*

[https://docs.celestia.org/developers/celestia-node/#errors-1](https://docs.celestia.org/developers/celestia-node/#errors-1)

Part 2: Initialize the Bridge Node
----------------------------------

    celestia bridge init --core.remote https://rpc-mamaki.pops.one:9090
    

`--core.remote` port defaults to 9090, RPC Endpoints can be found [here](https://docs.celestia.org/nodes/mamaki-testnet/#rpc-endpoints):

![output should look similar](https://storage.googleapis.com/papyrus_images/a33bdad8d60c66ba046f7c6b89af03486182821860effd04877bf40d2994a49f.png)

output should look similar

We now have a working directory `.celestia-bridge` and our config should be found at `./config.toml`

Part 3: Run the Bridge Node
---------------------------

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
    

Part 4: Wallet
--------------

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
    

![](https://storage.googleapis.com/papyrus_images/ff7da6b2dbda6302a2e7031bcc096c7b5d133552209ee038a51b3050595aad20.png)

**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
    

Part 5: Set up as a System Service
----------------------------------

    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
    

![if connected successfully to gRPC endpoint, logs will look similar to this](https://storage.googleapis.com/papyrus_images/63164386bdc1110ea0dddc93c8d0c0af9843b0851ea6872bcf8cd0e924a019ff.png)

if connected successfully to gRPC endpoint, logs will look similar to this

Making Changes
--------------

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

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/celestia-bridge-node-mamaki)*
