Giter Site home page Giter Site logo

w3f-grants-archive / archipel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luguslabs/habs

0.0 1.0 0.0 3.97 MB

High availability for blockchain services

Home Page: https://archipel.id

License: Apache License 2.0

Rust 18.97% Shell 19.46% JavaScript 58.58% HTML 0.20% Dockerfile 2.79%

archipel's Introduction

Archipel

stability-wip Website archipel.id License Twitter Follow

Welcome to Archipel monorepository!

What is Archipel ?

Archipel is a high availability solution for blockchain services.

Services Supported

  • Polkadot Validator Node

Why Archipel ?

Nowadays, many blockchain services are centralized on cloud infrastructure. For instance, around 70% of Ethereum nodes are in VPC and 63% of Ethereum Dapps use Infura Provider as this survey shows. We can imagine that in a few years some of blockchain services can be banned from public cloud providers.

The solution is to have a decentralized infrastructure at home. The problem is that it is challenging to maintain a good quality of service at home. You can have internet connection or power cuts. As a result, it is very unsafe to install a Proof-of-Stake validator at home. Your validator must be always up (24/7) and ready to execute its duty. If not, you will be slashed by the network and lose your money. To solve this problem, we are creating a solution to provide high availability for blockchain services. The first service that we target is Polkadot PoS Validator.

How it works ?

The idea behind Archipel is federating some nodes between friends and family. We are using DAppNode as the infrastructure layer for our solution. With DAppNode, you can launch a blockchain node (Bitcoin, Ethereum ...) or any P2P software. We would like to thank DAppNode Team for their amazing work. To achieve the high availability of services at a DAppNode, we are adding Archipel on top of it.

Archipel Components

Component Description
Chain Chain component is responsible for Archipel state synchronization between participants
Orchestrator Orchestrator is the decision-making component in Archipel federation
CLI CLI is a component that generates configuration and bootstraps an Archipel federation
UI UI is the Archipel chain state visualization component
Deployer Archipel End-To-End tests, build scripts and deploy tools
DAppNodePackage DAppNode package wrapping Archipel

Please refer to the README instructions in the sub-repositories for more information on building, using, and testing each software component.

To federate several nodes and have a shared state to elect a leader, we created a specific blockchain using the Substrate framework.

Substrate is a Parity framework that allows creating application-specific blockchains.

We created a Substrate runtime that collects all nodes metrics and sets federation leadership. This helps Archipel orchestrator to select the best leader appropriately in the federation. We call this specific blockchain the Archipel Substrate Chain or Archipel Chain.

All nodes inside a federation, run Archipel Chain. In the current implementation, an Archipel must be composed of 3 nodes. That means that to operate, you have to set up 3 nodes. Try to set up nodes in different locations.

The idea is that in the Archipel federation, all participants are trusted. They can be friends or family or other trusted social links. That allows us to have a fast chain consensus.

More information on chain/README.md

Orchestrator is the component that is responsible for decision making in an Archipel Federation.

External services modes

  • Active mode - the service will be launched in active mode only on the leader node
  • Passive mode - the service will be launched in passive mode on all other non-leader nodes

Archipel Orchestrator Workflow

  • Launch external service in passive mode
  • Send node metrics to Archipel Chain
  • Retrieve other nodes metrics from Archipel Chain
  • Retrieve current leader from Archipel Chain and determine its availability
  • If the current leader is alive, do nothing and ensure that the service was launched in passive mode
  • If the current leader is not alive, try to take its place by making a transaction to Archipel Chain
  • If the transaction succeeded, the current node becomes the current leader of the federation
  • Do supplementary checks (anyone other is alive, Archipel Chain Node has any peers...)
  • If supplementary checks pass launch external service in active mode

Archipel Orchestrator for HA Polkadot Validator Setup

The first service targeted by Archipel is Polkadot Validator.

The Polkadot node can be launched in two modes:

  • Active mode - Polkadot node in with validator option
  • Passive mode - Polkadot node in the sync-only mode

We are also planning to support other services.

More information on orchestrator/README.md

Archipel CLI is a component that generates configuration and bootstraps an Archipel federation.

More information on cli/README.md

The Archipel UI to administrate and visualize the federation state :

More information on ui/README.md

Archipel End-To-End tests, build scripts and deploy tools.

More information on deployer/README.md

DAppNode package wrapping Archipel stack.

It allows installing Archipel from the DAppNode interface in one click.

More information on DAppNodePackage-archipel/README.md

Keys Initialization doc

Testing doc

Deployment doc

Acknowledgements

The bootstrap development of Archipel is financed by WEB3 Foundation's grant program Wave4. Thanks a lot for support.

archipel's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.