Frietor Saar
Run a full node

How to run a full node on Frietor Saar?

Full node deployment guide for the Frietor Saar testnet blockchain! This guide is based on ubuntu 20.04 LTS. You can use any other operating system, but the commands may be different.

Requirements

  • OS - See Supported Operating Systems
  • vCPUs >= 4
  • RAM - at least 16GB
  • Disk space (Important)
    • At least 1TB for the data directory ( recommended SSD ), solid-state drive(SSD), gp3, 8k IOPS, 250MB/S throughput, read latency less than 1ms. (for the best performance, it will need NVMe SSD) Data disk mount to /datas
  • Suggested m5zn.3xlarge instance type on AWS, c2-standard-16 on Google cloud.
  • A broadband Internet connection with upload/download speeds of 5 megabyte per second.
  • curl or wget
  • git
  • tar
  • gzip
  • Latest Frietor Binary For Your Operating System - See Supported Operating Systems

Snapshots

Download and Installation

  • Download the latest Frietor binary for your operating system from the Supported Operating Systems page.
  • Extract the downloaded archive.

Create Data Directory

  • Create a directory for the Frietor blockchain data.
make_data.sh
mkdir -p data

Recover data from snapshot

recover_data.sh
git clone https://github.com/Esportzvio/FrietorSaar_Snapshots.git
cd FrietorSaar_Snapshots
gunzip -c Snapshot-${Date in YYYY-MM-DD}.dat.gz | ./frietor server --restore - --data-dir ../data

Download The Saar Testnet Genesis File

  • Download the Saar testnet genesis file to the same directory as the frietor binary.
download_genesis.sh
wget https://raw.githubusercontent.com/Esportzvio/FrietorChain/main/genesis-saar.json -O genesis.json
  • Alternatively, you can copy the genesis file from here

Generate Secrets

  • Polygon Edge uses a vault manager to store secrets such as validator keys, wallet keys, and passwords. You can use any vault manager from (AWS SSM , Google Secret Manager, Hashicorp Vault) to store secrets. The following examples will use AWS SSM.

Secrets Configuration

  • Create a folder named secrets_config in the same directory as the frietor binary.
create_secrets_config.sh
mkdir -p secrets_config
  • Create a file named aws.json in the secrets_config folder.
create_aws_json.sh
touch secrets_config/aws.json
  • Open the secrets_config/aws.json file using nano or your preferred text editor.
open_aws_json.sh
nano secrets_config/aws.json
  • Add The Following Content To secrets_config/aws.json.
edit_aws_json.sh
{
  "Type": "aws-ssm",
  "Name": "node",
  "Extra": {
    "region": "ap-south-1",
    "ssm-parameter-path": "/frietor-saar"
  }
}
  • Replace the name, region and ssm-parameter-path values with the name, region and path of your AWS SSM parameter store. (Optional)

  • Save the file and exit the text editor.

Secret Generation

  • Run the following command to generate secrets.
generate_secrets.sh
./frietor polybftsecrets generate --secrets-config secrets_config
  • The command will generate a file named secrets.json in the same directory as the frietor binary.

  • Check The secrets.json File To Make Sure It Contains The Following Keys.

check_secrets_json.sh
cat secrets.json

The Output Should Be Similar To The Following.

secrets.json
{
  "address": "",
  "bls_private_key": "",
  "bls_pubkey": "",
  "generated": "",
  "insecure": "false",
  "node_id": "",
  "private_key": ""
}

Start The Node

  • Run the following command to start the node.
start_node.sh
./frietor server --data-dir data -secrets-config secrets_config/aws.json --chain genesis.json --relayer --seal
  • The node will start syncing with the network. It will take a few minutes to sync with the network.

  • By Default The Node Will Start Services On The Following Ports.

ServicePort
JSON RPC8545
LibP2P30301
Metrics (Prometheus)10002
GRPC9632

Check The Node Status

  • Run the following command to check the node status.
check_node_status.sh
./frietor status

Setting custom parameters

FlagDescriptionExample
--access-control-allow-originsThe CORS header indicating whether any JSON-RPC response can be shared with the specified origin.--access-control-allow-origins "*"
--block-gas-targetThe target block gas limit for the chain.--block-gas-target "0x0"
--chainThe genesis file used for starting the chain.--chain "./genesis.json"
--configThe path to the CLI config.--config "/path/to/config.json"
--data-dirThe data directory used for storing Frietor client data.--data-dir "/path/to/data-dir"
--dnsThe host DNS address which can be used by a remote peer for connection.--dns "example.com"
--grpc-addressThe GRPC interface.--grpc-address "127.0.0.1:9632"
--json-rpc-batch-request-limitMax length to be considered when handling JSON-RPC batch requests.--json-rpc-batch-request-limit 20
--json-rpc-block-range-limitMax block range to be considered when executing JSON-RPC requests that consider fromBlock/toBlock values.--json-rpc-block-range-limit 1000
--jsonrpcThe JSON-RPC interface.--jsonrpc "0.0.0.0:8545"
--libp2pThe address and port for the libp2p service.--libp2p "127.0.0.1:1478"
--log-levelThe log level for console output.--log-level "INFO"
--log-toWrite all logs to the file at specified location instead of writing them to console.--log-to "/path/to/log-file.log"
--max-enqueuedMaximum number of enqueued transactions per account.--max-enqueued 128
--max-inbound-peersThe client's max number of inbound peers allowed.--max-inbound-peers 32
--max-outbound-peersThe client's max number of outbound peers allowed.--max-outbound-peers 8
--max-peersThe client's max number of peers allowed.--max-peers 40
--max-slotsMaximum slots in the pool.--max-slots 4096
--natThe external IP address without port, as can be seen by peers.--nat "203.0.113.1"
--no-discoverPrevent the client from discovering other peers.--no-discover
--num-block-confirmationsMinimal number of child blocks required for the parent block to be considered final.--num-block-confirmations 64
--price-limitThe minimum gas price limit to enforce for acceptance into the pool.--price-limit 0
--prometheusThe address and port for the Prometheus instrumentation service. If only port is defined, it will bind to all available network interfaces.--prometheus 0.0.0.0:9090
--relayerStart the state sync relayer service. PolyBFT only.
--restoreThe path to the archive blockchain data to restore on initialization.--restore /path/to/archive
--sealThe flag indicating that the client should seal blocks.
--secrets-configThe path to the SecretsManager config file. Used for AWS SSM. If omitted, the local FS secrets manager is used.--secrets-config /path/to/secrets/config