Skip to content

Chinilla Seeder User Guide

Edward Teach edited this page Feb 28, 2022 · 1 revision

Chinilla Seeder

Alt text

The Chinilla Seeder is a tool to keep track of the most reliable nodes on the Chinilla network. Each instance of the Chinilla Seeder maintains its own separate list of IP addresses of these nodes.

It does so by crawling through the network, periodically revisiting known nodes from its list. If a node is either no longer available, or has exhibited untoward behavior, the Chinilla Seeder instance removes that node from its list.

The Chinilla Seeder runs a mini-DNS server. Anyone can obtain an entry point into Chinilla’s decentralized and permissionless network via a simple DNS request for reliable node IPs.

The Chinilla Seeder has very low memory and CPU requirements.

Chinilla’s core developers have already been running an instance of the Chinilla Seeder for some time. You can view the current status of this instance by running: dig dns-introducer.chinilla.com for IPv4, or dig -t AAAA dns-introducer.chinilla.com for IPv6 (see instructions at the end of this document if you don’t have “dig” installed).

Chinilla has now decided to release the Seeder as a tool for anyone to maintain their own list of reliable nodes, which contributes to the further decentralization of Chinilla’s network by taking this tool off of the core team’s hands.

Features:

  • Implements peer statistics and exponentially moving averages over various time-windows, akin to those maintained by its relative, the bitcoin-seeder: https://github.com/sipa/bitcoin-seeder
  • Runs a mini-DNS server on port 53, along with a full node to crawl the network.
  • Stores peer IPs and peer statistics into a database, so that they are persisted across runs.

Expectations for Chinilla Seeder operators

The Chinilla network core developers endeavor to minimize the level of trust in the DNS servers associated with a Chinilla Seeder. In this regard, it is expected for each Chinilla Seeder to be run by an individual or organization recognized as well-intentioned within the Chinilla community (at the company’s discretion).

This entails following good host security practices, maintaining control of the underlying infrastructure, and not transferring control of the Chinilla Seeder they operate.

Logging of DNS queries must not be retained longer than necessary (as might be required for the operation of the service), and must not be communicated to any third-party.

Each entity maintaining a Chinilla Seeder DNS server is encouraged to make publicly available the details of their operating practices.

In keeping with all the previous recommendations, a reachable email address must be published for inquiries regarding said operating practices.

Installation

$ sh install.sh
$ . ./activate
$ chinilla_seeder init

You most certainly will want to specify your own configuration of a domain name server. Do so by editing the config file located at ~/.chinilla/vanillanet/config/config.yaml, or by running chinilla_seeder configure. Please refer to the relevant section below for more details, or enter $ chinilla_seeder configure --help.

Special instructions on Ubuntu

On Ubuntu, it is possible that systemd-resolved already binds port 53. The Chinilla Seeder's built-in DNS server is run on the same port, and systemd-resolved takes precedence by default.

Special instructions to free port 53 are provided here (points #2 and #3): https://github.com/team-exor/generic-seeder#exclamation-special-instructions-for-ubuntu-users-exclamation

This amounts to editing /etc/systemd/resolved.conf so as to disable binding of systemd-resolved to port 53, or, alternatively, entirely disabling the systemd-resolved service.

Configuration

The config file is .chinilla/vanillanet/config/config.yaml The default values are for running a DNS seeder for vanillanet. At the very least, in the seeder: section of config.yaml, the variables domain_name, nameserver and soa need to be changed to reflect the NS entry for your server in a domain record.

For a local DNS server setup, you will need control of a top-level domain (TLD) allowing administrator access for the purpose of creating additional DNS entries. Any domain registrar should be fine to use.

Note that while it may be possible to use an existing domain, it is recommended to register a new domain name to specifically run the Chinilla Seeder address.

Proceed by logging into your domain registrar and navigating to the section pertaining to managing DNS records for your domain. Next, click or activate the button or mechanism for creating a new DNS record. Finally, create a new DNS record of type "A", along with another new DNS record of type "NS".

For instance, if you want to run a Chinilla Seeder's DNS server on my-chinilla-seeder.example.com, an authoritative NS record in example.com's domain record will be required, which might point, e.g., to vps.example.com.

You can check that this is the case by running the following command (please ensure that you have dig on your system by installing the dnsutils or bind9-dnsutils package; for instance, on Ubuntu, $ sudo apt install dnsutils or $ sudo apt install bind9-dnsutils):

$ dig -t NS my-chinilla-seeder.example.com

whose output should display, among other information, the following:

;; ANSWER SECTION
my-chinilla-seeder.example.com.    86400    IN    NS    vps.example.com

For another example on how to set-up "A" and "NS" records for your domain using DigitalOcean, please refer to the following video, from 9:40 onward: https://www.youtube.com/watch?v=DsaxbwwVEXk&t=580s

Running

$ . ./activate
$ chinilla_seeder start all

will run both a crawler and a DNS server. Alternatively,

$ . ./activate
$ chinilla_seeder start crawler

gives you the option to merely crawl the network so as to get a list of the connectable nodes, without having to set up a DNS server.

Stopping

$ . ./activate
$ chinilla_seeder stop all
Clone this wiki locally