Run an archive node

<!> This guide assumes you have followed the instructions to setup your node here.

Table of Contents:

Run using docker

Follow the below instructions, to setup your miner node to connect to Ferrum testnet

  1. Build the docker image using:

docker build -t ferrum_node -f docker/ferrum.Dockerfile .
  1. Next, make sure you set the ownership and permissions accordingly for the local directory that stores the chain data. In this case, set the necessary permissions either for a specific or current user (replace DOCKER_USER for the actual user that will run the docker command):

# chown to a specific user
mkdir /var/lib/ferrum-data
chown DOCKER_USER /var/lib/ferrum-data

# chown to current user
sudo chown -R $(id -u):$(id -g) /var/lib/ferrum-data
  1. Now, execute the docker run command depending on your configuration :

docker run --network="host" -v "/var/lib/ferrum-data:/data" \
-u $(id -u ${USER}):$(id -g ${USER}) \
ferrum_node \
--base-path=/data \
--chain ./chainspecs/ferrum-alpha-testnet \
--name="YOUR-NODE-NAME" \
--pruning archive \
--config-file-path=/var/lib/node-config.json
-- \
--execution wasm \
--name="YOUR-NODE-NAME (Embedded Relay)"

Once the node has started, your output should look similar to this

2023-04-28 17:22:41 Ferrum Parachain    
2023-04-28 17:22:41 ✌️  version 0.0.1-742b47b9d10    
2023-04-28 17:22:41 ❤️  by Ferrum Network <https://github.com/ferrumnet>, 2020-2023    
2023-04-28 17:22:41 📋 Chain specification: Ferrum Testnet    
2023-04-28 17:22:41 🏷  Node name: TestNode    
2023-04-28 17:22:41 👤 Role: AUTHORITY    
2023-04-28 17:22:41 💾 Database: RocksDb at ./chain/alice/chains/ferrum_testnet/db/full    
2023-04-28 17:22:41   Native runtime: ferrum-parachain-1 (ferrum-parachain-0.tx1.au1)    
2023-04-28 17:22:43 assembling new collators for new session 0 at #0    
2023-04-28 17:22:43 assembling new collators for new session 1 at #0    
2023-04-28 17:22:43 Parachain id: Id(1000)    
2023-04-28 17:22:43 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    
2023-04-28 17:22:43 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000cb981b199b0dfb2631bbac63b767890daad314c0ce7b0d681e0fa76354a9b89803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    
2023-04-28 17:22:43 Is collating: yes    
2023-04-28 17:22:43 [Parachain] assembling new collators for new session 0 at #0    
2023-04-28 17:22:43 [Parachain] assembling new collators for new session 1 at #0    

Depending on how long the testnet has been running, your node will take a while to sync with the latest state of the network.

Run using binary

  1. Install the required dependencies to compile rust and substrate, refer the documentation here : https://docs.substrate.io/install/

  2. Clone the ferrum-network repo

https://github.com/ferrumnet/ferrum-network.git
  1. Checkout the latest release

cd ferrum-network
git checkout tags/<release_version> -b <release_version>

For example, if the latest release is 0.0.3

git checkout tags/0.0.3 -b v0.0.3

You can checkout releases here : https://github.com/ferrumnet/ferrum-network/releases

  1. Build the binary

cargo build --release
  1. Insert the keys

./target/release/ferrum-network key insert --key-type ofsg --scheme Ecdsa --base-path /var/lib/ferrum-data
  1. Once the keys are inserted, you can run it using the following command

./target/release/ferrum-network \
--base-path=/var/lib/ferrum-data \
--chain ./chainspecs/ferrum-alpha-testnet \
--name="YOUR-NODE-NAME" \
--pruning archive \
-config-file-path node-config.json
-execution wasm \
-- \
--execution wasm \
--name="YOUR-NODE-NAME (Embedded Relay)"

Once the node has started, your output should look similar to this

2023-04-28 17:22:41 Ferrum Parachain    
2023-04-28 17:22:41 ✌️  version 0.0.1-742b47b9d10    
2023-04-28 17:22:41 ❤️  by Ferrum Network <https://github.com/ferrumnet>, 2020-2023    
2023-04-28 17:22:41 📋 Chain specification: Ferrum Testnet    
2023-04-28 17:22:41 🏷  Node name: TestNode    
2023-04-28 17:22:41 👤 Role: AUTHORITY    
2023-04-28 17:22:41 💾 Database: RocksDb at ./chain/alice/chains/ferrum_testnet/db/full    
2023-04-28 17:22:41   Native runtime: ferrum-parachain-1 (ferrum-parachain-0.tx1.au1)    
2023-04-28 17:22:43 assembling new collators for new session 0 at #0    
2023-04-28 17:22:43 assembling new collators for new session 1 at #0    
2023-04-28 17:22:43 Parachain id: Id(1000)    
2023-04-28 17:22:43 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    
2023-04-28 17:22:43 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000cb981b199b0dfb2631bbac63b767890daad314c0ce7b0d681e0fa76354a9b89803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    
2023-04-28 17:22:43 Is collating: yes    
2023-04-28 17:22:43 [Parachain] assembling new collators for new session 0 at #0    
2023-04-28 17:22:43 [Parachain] assembling new collators for new session 1 at #0    

Depending on how long the testnet has been running, your node will take a while to sync with the latest state of the network.

Last updated