Infrastructure Torrent node setup

Alternative instruction on GitHub LINK

❗️

Be sure to read the instructions on setting up the #MetaHashGate node here

🚧

Please pay attention that this package can be installed on devices running UBUNTU 18 (20 is also suitable).

In order to run Infrastructure torrent node you have to do the following:

  1. sudo apt install gcc-8 g++-8 liburiparser-dev libssl-dev libevent-dev git automake libtool texinfo make libgmp-dev libcurl4-openssl-dev libgcrypt20-dev libgnutls28-dev liburiparser-dev libboost-dev libre2-dev (this library is required for installing this particular deb package)
  2. wget LINK (Latest released version - LINK. Version 1.6 - LINK)
  3. dpkg -i NAME OF THE FILE (NAME OF THE FILE - the deb package’s current name, for v 1.6: metahash-torrent_1.6.deb)
  4. cd /opt/torrent
  5. Put the private key into /opt/torrent (how to do it read below)
  6. Create config.conf file in /opt/torrent. You need to change the sign_key = row by adding your wallet address.
    Example of the config.conf file:
Base:
{
    path_to_bd = "./level_db"; // Путь к каталогу бд
    path_to_folder = "./metahash/"; // Путь к бинарным файлам
    count_threads = 2; // Количество тредов на сохранение в leveldb
    write_buffer_size_mb = 8; // Буфер на запись leveldb
    lru_cache_mb = 100; // LRU cashe leveldb
    is_bloom_filter = true; // Использовать фильтр блума (рекомендуется)
    is_checks = true; // Выполнять проверки базы данных leveldb (рекомендуется)
    is_sync_every_block = true; // Синхронизировать записи leveldb с жестким диском в конце каждого блока

    st_write_buffer_size_mb = 8; // Буфер на запись leveldb state v8
    st_lru_cache_mb = 300; // LRU cashe leveldb state v8
    st_is_bloom_filter = true; // Использовать фильтр блума (рекомендуется)
    st_is_checks = true; // Выполнять проверки базы данных leveldb state v8 (рекомендуется)

    get_blocks_from_file = false; // Брать новые блоки из файла или из списка серверов

    servers = "tor.net-main.metahashnetwork.com:5795";

    latency_file = "./latency.txt"; // Файл, в который записывается latency до сервера ядра

    count_connections = 1;
    advanced_load_blocks = 100;
    count_blocks_in_batch = 100;

    modules = ["block","block_raw", "node_tests"];

    block_version = "v2";

    max_count_elements_block_cache = 0;
    max_count_blocks_txs_cache = 0;
    mac_local_cache_elements = 5; // Максимум кэша для транзакций и истории

    validate = false; // Валидировать ли блок (подписи транзакций, подпись блока и т.д.). Может влиять на отставание блока

    sign_key = "0x00758f0d5251c25572b975f4e9922a607336ce638612dda7d8";

    other_torrent_port = 5795;

    port = 5795;
}
  1. ./torrent.sh start

To run a torrent, you have to add the file containing your private key to the folder containing torrent (/opt/torrent). The file’s name must be as follows: yourkey-mhc.raw.prv. Create the file with this name and put the private key in HEX format inside. Сlick here for information about where to get the private key.

Example:
Name of the file - 0x007ff2d508be12392be5a381ca07b55c8fd02d09192a9b5cf4.raw.prv
Content of the file (in HEX format) -

30770211110420f9a9054ca699c38de747e9f6626fb3d4d87b4d02ef111e8e284d7f8e018afd6da00a06082a8648ce3d030107a14403420004886d9fe32423473984eb0c6782c69e64d08e33c1c89c74d3925dab93c73aff72b670f482e2f753f9f7811198f37abe8fa873d8afc665a5801a183246cc999dcс

Core functions of the torrent.sh script:

./torrent.sh start

./torrent.sh stop

./torrent.sh status

How to view Infrastructure torrent node’s log file:

cd /opt/torrent

tail -f torrent.log