-
Notifications
You must be signed in to change notification settings - Fork 16
Archive nodes #32
Comments
The Open Network archive node HOWTOOverviewThis guide describes the requirements as well process of launching the TON archive node. WhatArchive node is full node that contains all blocks of network, starting with genesis block. This is important part of our network as it allows to recall it's entire history. RoleArchive nodes are best paired with LiteServer listener, ideally all public LiteServers on our network should be archive nodes. RequirementsHistorical data is large, as of April 2021 database has a size of about 1 Terrabyte and contains over 1'270'000 files. Running such node requires higher resources then normal Full Node / Validator. You will also need to be savvy as a sysadmin in order to perform some adjustments on your system by hand. HardwareAs of April 2021, minimum HW requirements are:
Please do note that hardware requirements will likely increase as database grows, be sure that you can either easily resize (cloud servers) or start with a larger configuration to begin with. SoftwareYou should have configured full node, it does not need to be in sync with network but it should be in process of syncing. Easiest way to launch full node is by using mytonctrl. Preparation StepsIncrease OS File Descriptors (open files) limitsBecause database contains so many files, validator-enigne will attempt to open more then 125k files, this is more then standard limits in most UNIX operating systems. You can check your current limit using You will need to increase this number to 262144, the way how this is done depends on your OS, here are some guides:
Get proper TON BinariesThe source code used to compile TON binaries should include following commit: newton-blockchain/ton@3db52ff Master branch includes this commit as of 9th of April 2021. Prepare file systemYou will need to setup and mount large file system where your validator-engine startup scripts expects ton work directory to be ( IMPORTANT: make sure to backup/move the If you are familiar with ZFS I personally advise you to use it with compression enabled, it saves space (1.9x compression factor for this type of data) and increases small IO. Execute following command before you copy any data on file system: Make sure that the FS is remounted properly on system reboot, the way how this is done depends on OS, in Ubuntu and most other linuxes via the file I would advise to reboot your machine once you complete those adjustments to make sure that the new FS will be mounted properly on reboot. Adjust validator-enigne ttl paramsvalidator-engine will drop data once it's TTL has been exceeded, default values can be seen by invoking
For now we advise to add following parameters to validator-engine invocation: While you are at it, I advise to increase number of threads used by validator engine to at least 4 by adding If you are using mytonctrl to install TON then this adjustment needs to be done in Database injectionStart with a clean TON
StartYou are basically done, try to start the node and analyze the logs, note that it would take quite some time for node to open all files. You can check quantity of open files on your node by executing following command: TroubleshootingAs long as your You might see typical initialization messages such as "no nodes" or "adnl query timeout", they are normal during new node startup and usually caused by missing local adnl/dht database, your node will start sync once this DB has been built, it can take up to 3 hours for this to happen. Have patience. If |
for the future: research why we need to keep all files open and a large state-ttl |
The network must have archive nodes that have a complete history of the network.
Not all TON nodes need to do this.
We need to make instructions for starting archive nodes (including the hardware specification) and then launch the enough number of archive nodes (should all lite-servers be archive nodes?)
The text was updated successfully, but these errors were encountered: