CKB Rosetta Node | How to Deploy a CKB Rosetta Node?
Here we lay out the procedure one needs to follow to deploy an CKB node that adheres to Rosetta’s blockchain specifications.
ckb-rosetta-sdk implement the Rosetta specifications for CKB.
ckb-rosetta-docker is a separate dockerfile to combine CKB nodes and ckb rosetta service.
Before running any of the commands specified below, please ensure that you are running the latest version of Docker.
If you don’t have it installed on your system already, please follow this link to download Docker.
First clone the CKB rosetta docker source code using the following command:
git clone https://github.com/nervosnetwork/ckb-rosetta-docker.git
Now we will be building the mainnet node and rosetta server from the source code.
Dockerfile already contains all the necessary config and dependencies. Within the directory, run the following command to build the docker image:
docker build -t ckb-rosetta-docker .
Startup rosetta service
First, we should create new directory for store node and indexer data.
Next, run the
ckb-rosetta-docker image the command specified below.
docker run --name ckb-rosetta-docker -d -p 8117:8117 -v "$PWD/data":/data ckb-rosetta-docker
Based on the Rosetta specification, CKB rosetta-compliant nodes make the following Restful APIs available.
Fetch the list of available networks
Fetch network options
Fetch the network status
Fetch account balance
Fetch block details
Fetch transaction information from a block