The endpoint node is a node that provides a JSON-RPC interface for interacting with the Bifrost Network. Through the provided RPC methods, users or many projects can easily interact with the blockchain data. In addition to the Ethereum standard RPC interface, Geth's debug and txpool APIs and OpenEthereum's trace APIs are also selectively enabled, providing a non-standard RPC interface for bringing more detailed information about transaction processing.
The endpoint node consists of two modes. The first mode is the archive mode which stores status information on all blocks from the genesis block to the present. This mode can be used when you need to request historical data. The second mode is the non-archive mode which, unlike the archive mode, stores chain information only by the specified number of blocks. Therefore, it is not possible to request chain information outside of the set range.
As endpoint nodes do not participate in the consensus algorithm, there is no need to deposit BFC's and separate account settings, and unlike validator nodes do not lead to any special rewards.
Install Requirements
First, create a local directory to store the chain data of the Bifrost Network. This directory stores all block information collected from the genesis block to the present.
# Add sudo at the beginning if it doesn't workmkdir-p/var/lib/bifrost-data
You must set the ownership and permissions for the directory you created. If you wish to set it to a specific user, you can run the command written in “case 1” and change DOCKER_USER to the actual user name to run Docker later. If you wish to set it as the currently connected user, you can run the command written in "case 2".
# case 1. chown to a specific userchownDOCKER_USER/var/lib/bifrost-data# case 2. chown to current usersudochown-R $(id-u):$(id-g) /var/lib/bifrost-data
Run the Node Container
To run an endpoint node with the archive mode enabled, you can run the following command.
Conversely, to run an endpoint node with the non-archive mode enabled, you can run the following command. In this case, it is necessary to determine the maximum number of past blocks to be indexed, and the number of blocks may be specified after the --state-pruning option.
Since chain data needs to be synced starting from the genesis block, the information that it is currently syncing will be shown as the following output. You can proceed to the next steps only when the sync is complete, and it may take up to several days at most.
To quickly synchronize your chain data, follow this link.
As Bifrost Network development continues, it will sometimes be necessary to upgrade your node client. Node operators will be notified on our Discord channel or by personal contacts when upgrades are available and whether they are necessary (some client upgrades are optional).
Before upgrading your node client, please keep a backup file of your chain data to prevent any further data, keys, or credential losses.
# First of all stop bifrost-nodedockerstop"YOUR_CONTAINER_NAME"dockerrm"YOUR_CONTAINER_NAME"# Pull the latest bifrost-node imagedockerpullthebifrost/bifrost-node:latest# Change bifrost-node image version(tag) on run command# e.g.docker run -d -p 30333:30333 -p 9933:9933 -v "/var/lib/bifrost-data:/data" --name "YOUR_CONTAINER_NAME" thebifrost/bifrost-node:latest \
--base-path/data \--chain/specs/bifrost-testnet.json \--port30333 \--rpc-port9933 \--state-pruningarchive \--rpc-corsall \--rpc-external \--ethapidebug,trace,txpool \--runtime-cache-size64 \--name"YOUR_NODE_NAME"
# First of all stop bifrost-nodedockerstop"YOUR_CONTAINER_NAME"dockerrm"YOUR_CONTAINER_NAME"# Pull the latest bifrost-node imagedockerpullthebifrost/bifrost-node:latest# Change bifrost-node image version(tag) on run command# e.g.docker run -d -p 30333:30333 -p 9933:9933 -v "/var/lib/bifrost-data:/data" --name "YOUR_CONTAINER_NAME" thebifrost/bifrost-node:latest \
--base-path/data \--chain/specs/bifrost-mainnet.json \--port30333 \--rpc-port9933 \--state-pruningarchive \--rpc-corsall \--rpc-external \--ethapidebug,trace,txpool \--runtime-cache-size64 \--name"YOUR_NODE_NAME"