Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ip-seed
multichain-app
multichain-node
.editorconfig
.gitignore
LICENSE
README.md
system_schema_strv_pres.png

README.md

Multichain Database

  1. Overview
  2. System diagram
  3. Startup (how-to)

Overview

A simple implementation of Multichain as a database behind a Node.js service.

The system utilizes an IP-seed which plays the role of a DNS seed as it is in the Bitcoin network, for example.

Once started, a Multichain node will request the IP-seed for an IP of a node of an existing network. If none returned, this means the current node is the root node. Any consecutive node, upon requesting the IP-seed, will get a random IP of a node which is already part of the network. With this IP, the new node will connect to the network and sync the existing data.

Once started, a Node.js app (or any other server app) will request the IP-seed for a random IP of a node from the Multichain (or Blockchain) network, to connect to and use as a Database. The Node.js app in this repo implements a repetetive mechanism that constantly checks for the availability of the node to which it's currently connected. Upon fialure, it will request a new node IP from the IP-seed.

For better understanding, see below.

System diagram

System overview diagram

Start up (how-to)

  1. Navigate to the ip-seed dir and start the service: npm start

  2. Navigate to to the multichain-node dir and start as many nodes as you want with npm start node1. The docker-compose.yml file contains definitions for 3 nodes, named node1 to node3

  3. Navigate to to the multichain-app dir and start as many services as you want using the command:

    npm start app1 // or app2 or app3
    

The docker-compose.yml file contais definitions for 3 services, named app1 to app3.

You can’t perform that action at this time.