- Nowadays, many blockchain services are centralized on cloud infrastructure. We can imagine that in a few years some of blockchain services can be banned from public cloud services. Moreover, cloud providers can have interruption of services and network issues.
- To have decentralized infrastructure at your home, we must overcome some issues too : it’s really difficult to maintain good quality of service at home : you can have internet box or power cuts. For example it is very risky to install a Proof-of-Stake validator at home. Your PoS validator must be always up 24/7 and ready to execute it’s duty. If not, you will be slashed by the network and lose money.
- To solve this problem we want to create a solution for high availability of blockchain services by federating few nodes between friends and family. (2 to 7 ) At this hackathon we try to hack on PoS validator high availability problem using 3 DAppNode Hardwares.
What it does
Archipel : divide and federate to run unsinkable services !
We provide a solution for high availability of Proof-of-Stake validators on light infrastructure. If the validator node goes down, another node from the federation takes the relay.
How I built it
We use DAppNode Packages et hardwares as a root base for the solution. We built a daemon Archipel Orchestrator. This daemon is running on each validator nodes. It interacts with the a smart contract to manage the validator leadership mutex. There is also a ping between nodes and an algorithm to choose when to start, stop validating.
Challenges I ran into
The chain node desynchronization may leads to unwanted state. In the final solution for the mutex between nodes, we will use a lightweight mutex, not with smart contract but rather a specific substrate module or just a use of libp2p module or zookeeper solution like.
Accomplishments that I'm proud of
The system was tested and works pretty well with 3 nodes validator setup. We remove manually the connexion from one node and one of the 2 others nodes take the leadership to assure High availability of the PoS service on polkadot Alexander testnet as you can see in the video.
What I learned
- After first tests, we change several time the smart contract during the hackathon to prevent 2 validators taking the leadership at the same.
- We also learned and experiment leadership algorithm for the selection of the active validator. it leads us to reconsider so of the assumption we have made and we will build on it to provider a more robust solution to the problem we want to solve.
What's next for Archipel
We want to continue our project to make our system more robust and test all scenarios. We want to improve the base code :
- We will use crossbar lib to properly interact between DAppNode packages (for stop start reconfiguration of the validator node).
- We will remove the smart contract part and setup a lightweight solution for the mutex ( with specific substrate module or libp2p usage or zookeeper like).
- We will also experiment adding a usb 4G stick to be able to do a robust 'STONITH' technique also called for "shoot the other node in the head". Action done by the new leader to be sure to not have double signing on the network. Action done with 4G/sms if the network is down for some nodes in the federation.
You can find more info and broader vison of Archipel https://archipel.id in this document https://archipel.id/Archipel-Atoll-Paper.pdf . It was our idea put on paper and we succeed to start and prototype this at ETH Berlin !