Using Docker
Introduction
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 work
mkdir -p /var/lib/bifrost-dataYou 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 user
chown DOCKER_USER /var/lib/bifrost-data
# case 2. chown to current user
sudo chown -R $(id -u):$(id -g) /var/lib/bifrost-dataGenerate Peer Key
Every node running on the Bifrost Network requires a peer key to connect to the P2P network. To generate a new peer key and insert it into your chain data automatically, simply run the following command.
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.
Check Logs
To check your running bifrost-node container logs, execute the command below.
If the Docker image is successfully pulled, and the validator node is executed, the chain information will be shown as the following.
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.
When all the chain data sync is complete, newly generated blocks are synchronized one by one at every block time as follows.
Update Node Client
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.
Last updated