Skip to content

ackinacki/acki-nacki-igniter

Repository files navigation

Acki Nacki Igniter

Overview

The Decentralized Network Starter Protocol (DNSP) collects information about nodes and licenses, optionally updates node software, and enables Zerostate (the initial state of the blockchain) generation once all DNSP requirements are satisfied.

This repository contains the source code for Acki-Nacki-Igniter, a DNSP client that runs on each of your Block Keeper (BK) servers and shares your node data with the DNSP.

Follow the instructions below to configure and run your DNSP client.

This code was tested on Ubuntu 20.04.

Prerequisites

Generate a Node Provider Key Pair

Node Provider Key Pair - a single key pair that represents an entity (a person or a company) that owns and maintains of a number of Nodes. All the Licenses in Acki Nacki must be delegated to BK Nodes owned by Node Provider. License Owner signs a delegation request to a Node Provider, which, in turn, signs a delegation confirmation for the BK Node. Even if you plan to delegate your licenses to your own nodes, you still need to generate Node Provider keys and signatures - for security purpose.

So, the first thing needed to be done is to generate Node Provider keys.
Run:

tvm-cli getkeypair -o node_provider_keys.json

Seed phrase: "city young own hawk print edit service spot always limit secret suit"
Keypair successfully saved to node_provider_keys.json.

Important:
Store the seed phrase and secret key in a safe place. Do not share them with anyone.

Get Delegation Signatures

For a license to be delegated to this Node, you must obtain a Delegation Signature for each license.

NOTE:
A Node can operate with a minimum of one license and a maximum of 20 (twenty) licenses delegated to a single Node.

Provide License Owner with your Node Provider pubkey and ask them to sign a delegation. Delegation Signature can be generated via Acki Nacki Dashboard or manually

Prepare Configuration Files

Once the delegation is signed by the License Owner, do the last preparation steps:

Generate Node Owner and BLS Keys and Create keys.yaml

Generate both the BK Node Owner keys and BLS keys by following the instructions, then save them to a file named keys.yaml.

Prepare Confirmation Signatures and Create config.yaml

Refer to the License Delegation and Attachment section to learn how to generate the required values for the signatures section.

If you plan to operate the Block Keeper via a Proxy, include the relevant information in the proxies section of the config file.

Create a config.yaml file based on the provided template

Running Multiple Igniter Instances on a Single Server

If you plan to run multiple Block Keeper (BK) nodes on a single server, you must also run the same number of Igniter instances on that server. Each Igniter instance must use the same public IP address as its corresponding BK node.

Important:
Each Igniter instance requires its own dedicated configuration file.

To run multiple Igniter instances on a single host, you need to create separate configuration files (e.g., config_1.yaml, config_2.yaml, etc.) with unique values for the ADVERTISE_PORT and API_PORT parameters in each file. You can assign any available (non-conflicting) ports.

About Automatic Update

Igniter supports automatic update of its container when a new version is released.
This feature is enabled with auto_update parameter in the config.yaml configuration file.

  • Important:
    For auto-update to work, Igniter must be launched using the latest tag.

  • Important:
    For auto-update to work, host's docker socket should be mounted inside the container

Run Igniter with auto-update

Important:
Igniter must be launched on each node that you want to include in the Zerostate.

Igniter must be run using a Docker image with the latest tag and the hosts's Docker socket mounted inside the container:

export KEYS=./keys.yaml
export CONFIG_FILE=./config.yaml

# Change the following line to match the `advertise_addr` port, specified in your config file
export ADVERTISE_PORT=10000

export IMAGE=teamgosh/acki-nacki-igniter:latest

docker run  \
        --rm \
        -p 10001:10001 \
        -p ${ADVERTISE_PORT}:10000/udp \
        -p ${ADVERTISE_PORT}:10000/tcp \
        -v "${KEYS}:/keys.yaml" \
        -v "${CONFIG_FILE}:/config.yaml" \
        -v "/var/run/docker.sock:/var/run/docker.sock" \
        $IMAGE \
        acki-nacki-igniter --keys /keys.yaml --config /config.yaml

By default, the Gossip state is accessible at:
http://your_public_ip_address:10001

Run Igniter without auto-update

Important:
Igniter must be launched on each node that you want to include in the Zerostate.

Update config.yaml file: set auto_update to false.

Then, run the container:

export KEYS=./keys.yaml
export CONFIG_FILE=./config.yaml

# Change the following line to match the `advertise_addr` port, specified in your config file
export ADVERTISE_PORT=10000

export IMAGE=teamgosh/acki-nacki-igniter:latest

docker run  \
        --rm \
        -p 10001:10001 \
        -p ${ADVERTISE_PORT}:10000/udp \
        -p ${ADVERTISE_PORT}:10000/tcp \
        -v "${KEYS}:/keys.yaml" \
        -v "${CONFIG_FILE}:/config.yaml" \
        $IMAGE \
        acki-nacki-igniter --keys /keys.yaml --config /config.yaml

By default, the Gossip state is accessible at:
http://your_public_ip_address:10001

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages