Citrea is the first rollup that enhances the capabilities of Bitcoin blockspace with zero-knowledge technology, making it possible to build everything on Bitcoin.
This guide explains step-by-step how to run a Citrea Devnet Node.
Note: This node can be run in 2 ways. Today we will run it with Configurable Setup. I will add the other way to the guide in the coming days.
- CPU: 4 core
- RAM: 8 GB
- Storage: 256 GB SSD (NVMe recommended)
- Network: 25+ Mbps network connection
sudo apt update
sudo apt upgrade -ysudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce -y
# Launch Docker and Set to Autostart:
sudo systemctl start docker
sudo systemctl enable dockerdocker --versionsudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composedocker-compose --versionsudo apt install build-essential -y
sudo apt install clang -y
# For Rust:
# Note: When installing Rust, we select the 1st option "Proceed with standard installation".
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envrustc --versiongit clone https://github.com/chainwayxyz/bitcoin_signet && cd bitcoin_signetdocker build -t bitcoin-signet .
docker run -d --name bitcoin-signet-client-instance \
--env MINERENABLED=0 \
--env SIGNETCHALLENGE=512102653734c749d5f7227d9576b3305574fd3b0efdeaa64f3d500f121bf235f0a43151ae \
--env BITCOIN_DATA=/mnt/task/btc-data \
--env ADDNODE=signet.citrea.xyz:38333 -p 38332:38332 \
bitcoin-signetdocker logs bitcoin-signet-client-instancecd
git clone https://github.com/chainwayxyz/citrea --branch=v0.4.1 && cd citreanano configs/devnet/rollup_config.tomlIn this section, we will change "node_url", "node_username" and "node_password".
Since we setup Bitcoin Signet on the same server as our Citrea client, we make the "node_url" part as http://0.0.0.0:38332.
As in the picture, we change the "node_username" and "node_password" parts to bitcoin.
mkdir -p ~/citrea/configs/devnet/genesis-files# this part takes a little longer
screen -S citrea
SKIP_GUEST_BUILD=1 make build-release./target/release/citrea --genesis-paths configs/devnet/genesis-files --da-layer bitcoin --rollup-config-path configs/devnet/rollup_config.tomlNote: If you get logs as you see in the image, our node is running successfully. When xxxx in the finalise_l2{l2_block_height=xxxx} output reaches the current block, it means that our node has synced.
You can follow the blocks from the explorer in this link. This step takes a little longer.
wget https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz
tar -xzf bitcoin-25.0-x86_64-linux-gnu.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/*# In the Rollup Configuration File we set user and password to "bitcoin". so don't change it if you did it as in the manual here.
bitcoin-cli -rpcconnect=0.0.0.0 -rpcport=38332 -rpcpassword=bitcoin -rpcuser=bitcoin -signet getblockcountYou can check it from Citrea Bitcoin Signet Explorer at this link
Note: You can ask your questions about Node on the Discord.
The process of running the Citrea Devnet Node was generally smooth. The guide doc was detailed and clear, covering important steps like Docker and Rust installation. However, the process might be a bit complex for someone setting up a node for the first time, and some steps could benefit from clearer explanations. Additionally, some configuration files required extra checks and adjustments to work correctly. Overall, the performance and stability were quite good, and the node synchronized without issues.