Ram | cpu | disk |
---|---|---|
2 GB |
4 Core |
40 GB SSD |
sudo apt update && sudo apt upgrade -y
sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
sudo apt update -y && sudo apt upgrade -y
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -y && sudo apt upgrade -y
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Docker version check
docker --version
mkdir -p /root/project/run_btc_testnet4/data
git clone https://github.com/rainbowprotocol-xyz/btc_testnet4
cd btc_testnet4
You can continue without changing your default config in docker-compose.yml
but if you need to change the ports to avoid conflicts, you can change the ports like following example: 5001:5000
1- Start Bitcoin Core:
docker compose up -d
2- Enter container:
docker exec -it bitcoind /bin/bash
3- Create new wallet:
bitcoin-cli -testnet4 -rpcuser=demo -rpcpassword=demo -rpcport=5000 createwallet test
bitcoin-cli -testnet4 -rpcuser=demo -rpcpassword=demo -rpcport=5000 loadwallet test
bitcoin-cli -testnet4 -rpcuser=demo -rpcpassword=demo -rpcport=5000 getnewaddress
4- Exit the container:
exit
- Download and set up the indexer:
cd $HOME
git clone https://github.com/rainbowprotocol-xyz/rbo_indexer_testnet.git && cd rbo_indexer_testnet
wget https://github.com/rainbowprotocol-xyz/rbo_indexer_testnet/releases/download/v0.0.1-alpha/rbo_worker
cd rbo_indexer_testnet
chmod +x rbo_worker
- Start a screen:
screen -S rbo
- Start Indexer:
./rbo_worker worker --rpc http://127.0.0.1:5000 --password demo --username demo --start_height 42000
Ctrl+A+D
to minimze the screen
- Copy your pricipal ID:
cat ./identity/principal.json
-
Log in to the Testnet Explorer:
- Input the Principal ID and submit the details.
cat ./identity/private_key.pem
- Or just save the
./identity/private_key.pem
file in your local system
Return to screen
screen -r rbo
Kill screen
screen -XS rbo quit
- 1- Return to your rbo screen
- 2- stop it with
CTRL+C
- 3- Run the follwoing commands
# Change 5050 to the port you customized beore or don't touch it
cd $HOME && /bin/netstat -ntpl | grep 5050 | awk '{print $NF}' | awk -F"/" '{print $1}' | xargs -r kill -9
# Replace with the new rbo_worker
wget https://storage.googleapis.com/rbo/rbo_worker/rbo_worker-linux-amd64-0.0.2-20240914-4ec80a8.tar.gz && tar -xzvf rbo_worker-linux-amd64-0.0.2-20240914-4ec80a8.tar.gz
cp rbo_worker-linux-amd64-0.0.2-20240914-4ec80a8/rbo_worker rbo_indexer_testnet/rbo_worker
# Start the new one
cd rbo_indexer_testnet && chmod +x rbo_worker
./rbo_worker worker --rpc http://127.0.0.1:5000 --password demo --username demo --start_height 42000
if you get into you just need to rerun your indexer using step 5.3 and with the latest height of your bitcoin core node ( just check its logs using docker ps -a
& docker logs -f CONTAINER_ID
)
Or check this faq https://github.com/rainbowprotocol-xyz/rbo_indexer_testnet/blob/main/FAQ.md