Frietor Saar
Run an archive node

How to run an archive node on Frietor Saar?

What is an archive node?

Simply speaking, an archive node is a full node running without the --seal flag. It stores all the historical data of the blockchain starting from the genesis block. As compared to a typical full node that just holds all the state change data for some latest blocks, an archive node always stores them for each block.

Why is an archive node important?

Developers face limitations when querying recent blocks to ascertain the balance of an address and the status of a smart contract using a full node. This constraint arises because the blockchain continually progresses, making it challenging to obtain comprehensive data. In contrast, archive nodes offer a solution by enabling queries for any specific block at a given point in time.

Archive nodes play a crucial role in various applications on the blockchain, particularly for demanding use cases. These include:

  1. Automatic Trading Systems: Historical data is essential for optimizing trading models, allowing automatic trading systems to make informed decisions based on past performance.

  2. Verification Modules: State data is necessary for timely transaction verification. Archive nodes provide the required historical context for validating transactions effectively.

  3. Analytical Tools: To conduct thorough data analysis, analytical tools rely on full historical data. Archive nodes facilitate the retrieval of complete blockchain history for in-depth analytics.

  4. Exchange in Wallets: Some wallets depend on archive nodes to enable fast and efficient transfers on exchanges. By accessing historical data, these wallets enhance their functionality and provide users with a seamless experience.

In summary, archive nodes are instrumental in addressing the challenges associated with obtaining historical blockchain data, enabling developers to meet the specific requirements of diverse applications and use cases.

How to run an archive node on Frietor Saar?

Running an archive node on Frietor Saar is similar to running a full node. The only difference is that you need to remove the --seal flag from the command while starting the node.

  • Follow the instructions in the Run a full node page.

  • Remove the --seal flag from the command while starting the node.

  • Run the following command to start the archive node:

starting_archive_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