Run a Bridge Node
The codebase is currently not public. We will be sharing more details about the node's role and functionality soon. We appreciate your patience and interest. Thank you for your understanding and continued support.
By following these steps, you should be able to successfully set up and start a Nubit Bridge Node. If you encounter any issues, please provide detailed information, and further assistance will be provided.
Set up the Bridge Node
Ensure Validator is Running
Please Run a Validator first before running your own bridge node. Make sure your nubit-validator
is running in its own terminal.
Open a new terminal to set up the Nubit Bridge Node. All consensus data from validators is sent to the bridge node. The bridge node retrieves data from core validator nodes and then sends the data to full/light nodes.
Due to the current heavy load, we are temporarily unable to provide long-term connection services. Therefore, we recommend users run their own validator nodes and use the RPC interface provided by their validator to retrieve block data. This will ensure the stability and timeliness of data transmission.
Install the Node
Download the Necessary Repositories
Clone the nubit-node
repository.
git clone -b nubit-alphatestnet-1 [email protected]:RiemaLabs/nubit-node.git
cd nubit-node
Make Build and Install
In the cloned repository directory, run the following command to make build and install the CLI:
sudo make build install
Set up the Environment
Set Network and Custom Variables
Remove any existing bridge node data and set up the necessary network and environment variables.
export VALIDATOR_IP=http://<your-server-IP>:<your-rpc-port> # Replace <your-server-IP> and <your-rpc-port> with the actual ones
export VALIDATOR_NODE_ID=900a00a618f20a2e4867b26585b15108c728b523
export NETWORK=nubit-alphatestnet-1
export FLAGS="--rpc.addr 0.0.0.0 --p2p.network ${NETWORK} --core.ip ${VALIDATOR_IP} --metrics --metrics.endpoint otel.nubit-alphatestnet-1.com:4318"
export NUBIT_DATA_HOME="$HOME/.nubit-bridge-${NETWORK}"
Clear Previous Data
Use the following command to clear up any previous data:
rm -rf $NUBIT_DATA_HOME
Initialize the Bridge Node
Run the following command to initialize the bridge node. This command will automatically generate a Nubit node address and mnemonic phrase. Make sure to save the mnemonic phrase securely.
nubit bridge init --p2p.network $NETWORK
Synchronize with the Latest Block
To quickly sync to the latest block, a snapshot is provided and updated every 12 hours. Follow these steps:
Remove Old Data Directory
rm -rf $NUBIT_DATA_HOME/blocks $NUBIT_DATA_HOME/data $NUBIT_DATA_HOME/index $NUBIT_DATA_HOME/inverted_index $NUBIT_DATA_HOME/transients
Download the Snapshot
Download the snapshot using wget
. Ensure you have enough disk space (approximately 11GB):
wget https://nubit-cdn.com/nubit-data/bridge_data.tgz
Extract the Snapshot
Extract the downloaded snapshot to update your node's data:
tar -zxf bridge_data.tgz -C $NUBIT_DATA_HOME && rm -rf bridge_data.tgz
This will update your node to a recent state. Keep it running to ensure it syncs to the latest block. For the most current block information, please visit the chain explorer at explorer.nubit.org.
Start the Bridge Node
Run the following command to start the bridge node. Pay special attention to the output and ensure the node starts correctly.
nubit bridge start $FLAGS
Successful response will show like thie
/_____/ /_____/ /_____/ /_____/ /_____/
Started nubit DA node
node version: v0.1.0-rc.2
node type: bridge
network: nubit-alphatestnet-1
/_____/ /_____/ /_____/ /_____/ /_____/
The p2p host is listening on:
* /ip4/127.0.0.1/udp/2121/quic-v1/webtransport/certhash/uEiBXY976psAnOWgdyxCgvqd1cUPQJD_49_P6bZDA2gy-sw/certhash/uEiDHhDKsm4aKlsWv6OO3EgMedYpilyc31lpKkoBB_7pdCw/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip4/172.22.51.141/tcp/2121/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip4/172.22.51.141/udp/2121/quic-v1/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip4/172.22.51.141/udp/2121/quic-v1/webtransport/certhash/uEiBXY976psAnOWgdyxCgvqd1cUPQJD_49_P6bZDA2gy-sw/certhash/uEiDHhDKsm4aKlsWv6OO3EgMedYpilyc31lpKkoBB_7pdCw/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip6/::1/tcp/2121/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip6/::1/udp/2121/quic-v1/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
* /ip6/::1/udp/2121/quic-v1/webtransport/certhash/uEiBXY976psAnOWgdyxCgvqd1cUPQJD_49_P6bZDA2gy-sw/certhash/uEiDHhDKsm4aKlsWv6OO3EgMedYpilyc31lpKkoBB_7pdCw/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
Pay special attention to the P2P PEERS, which is the IP address of your host machine. If other machines are on the same local network as your host machine, they can use this P2P PEER address to connect to your bridge node and start their own full/light nodes.
/ip4/172.22.51.141/tcp/2121/p2p/12D3KooWDeZQatHpmUzNFSgEq1YnRpni4hLgtkk6jcCQ8ppcZocF
By following these steps, you should be able to successfully set up and start a Nubit Bridge Node. If you encounter any issues, please provide detailed information, and further assistance will be provided.
Last updated