We've complied an executable for you to run a Citrea Full Node directly in MacOS / Linux. For the following steps, we assume that you have a Bitcoin Testnet4 node running. If not, please visit here.
To tidy things up, you can run the following and make a separate folder:
mkdir citrea
cd citrea
We're hosting our binary in the Citrea repository. Please download the suitable executable for your configuration.
To sync correctly, config & genesis files should be provided correctly. You can download & extract them using the following:
curl https://raw.githubusercontent.com/chainwayxyz/citrea/main/resources/configs/testnet/rollup_config.toml --output rollup_config.toml
curl https://static.testnet.citrea.xyz/genesis.tar.gz --output genesis.tar.gz
tar -xzvf genesis.tar.gz
First, let's grant running permission to our executable (may require sudo
):
chmod u+x ./citrea-v0.5.4-osx-arm64
chmod u+x ./citrea-v0.5.4-linux-amd64
Then, based on your operating system, run one of the following:
Mac:
./citrea-v0.5.4-osx-arm64 --da-layer bitcoin --rollup-config-path ./rollup_config.toml --genesis-paths ./genesis
Linux:
./citrea-v0.5.4-linux-amd64 --da-layer bitcoin --rollup-config-path ./rollup_config.toml --genesis-paths ./genesis
If the paths are correct, the full node will start to sync. You can check the status with the following command (you may need to arrange the URL at the end based on your setup):
curl -X POST --header "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"citrea_syncStatus","params":[], "id":31}' http://0.0.0.0:8080
A sample response (fields may vary based on the sync status):
{
"jsonrpc": "2.0",
"id": 31,
"result": {
"l1Status": {
"Synced": 46916
},
"l2Status": {
"Syncing": {
"headBlockNumber": 252441,
"syncedBlockNumber": 123425
}
}
}
}
If you do not want to use the provided binary executable to setup a Citrea node, you can also build it from the source code here.