Substrate Consensus Handoff

Overview

Substrate Consensus Handoff

Ethereum will soon migrate from Proof of Work to Proof of Stake. Preparing this miagration has taken years of planning to get just right. This repository explores whether such a handoff is Possible for a Substrate chain, and how hard it might be to develop.

Roadmap

This is exploratory, so I'll probably learn a lot along the way, but this is my rough plan for now.

PoW Only

Migrate the node template to PoW authoring. This will help us see all of the relevant parts of Aura and PoW that will need to work together

Pause after ten blocks

Make importing nodes only accept PoW blocks up to height N, then, instead of verifying PoW, look for an aure digest, and panic if it isn't found. In this scenario, upgraded nodes will refuse to import valid PoW blocks.

Actual Handoff

This is the MVP step. If we can accomplish this, the rest is butter. Although churning butter is still a lot of work.

Here Upgraded nodes will actually author Aura blocks after height N

Democracy over handoff

In Substrate world, on-chain governance is common. Allow the community to vote whether the handoff should happen, and if so, at what block height. Provide this information to the consensus layer through a runtime API:

/// Trait for passing consensus handoff information from the runtime, where the vote occurs
/// to the consensus layer where it will be executed.
pub trait ConsensusHandoff {
  /// Check whether the handoff is complete. If it is, the new consensus logic should be used.
  fn handoff_block() -> bool;
}

Forking Miners

Some miners may wish to fork the network to stay on the PoW chain. Until now the way to fork is to not upgrade the node. However, the PoW fork will likely want the non-pos-related improvements in future releases. So we add support for ignoring the handoff and staying on the PoW fork. Now the forking miners can run updated software and still fork.

Add support for:

  • Never fork
  • Fork at specific block
  • Fork according to runtime API
You might also like...
Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment ๐Ÿ› ๏ธ Simple Setup Install all the required depe

Substrate Node for Anmol Network
Substrate Node for Anmol Network

Anmol Substrate Node ๐Ÿ–ผ ๐Ÿ› ๏ธ ๐Ÿ‘ท Anmol is the First Cross-Chain NFT Toolkit, on Polkadot. Introducing: Moulds NFT Breeding Multi-Chain NFT Migration ink

Substrate NFT !ink smart contract base

Substrate !ink NFT simple implementation This is a simple working version of base NFT smart contract written using latest (as of this date) !ink 3.0.0

Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts โ€’ a smart contract modu

InvArch Pallet Library - IP Infrastructure for Substrate
InvArch Pallet Library - IP Infrastructure for Substrate

InvArch-Pallet-Library Intro This repository should contains the Pallets used in the InvArch blockchain, and reviews their relationships and functions

Substrate Pallet for chaotic experimentations
Substrate Pallet for chaotic experimentations

Chaos Pallet The Chaos module is used to inject chaos into a Substrate Runtime and intentionally break things. Overview The Chaos module provides func

Filecoin to substrate bridge

filecoindot A Substrate pallet to bridge from Filecoin to any blockchain built using the Substrate framework, including Polkadot parachains. How to in

Substrate Node Template Generator

Substrate Node Template Generator A tool to generate stand-alone node templates of a customized Substrate clients used in "Substrate Library Extension

Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

Owner
Joshy Orndorff
Blockchain::{Developer, Philosopher, Chef}
Joshy Orndorff
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

Liam Parry 0 Nov 6, 2021
EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

Reef Finance 148 Dec 31, 2022
An implementation of the paper "Honey Badger of BFT Protocols" in Rust. This is a modular library of consensus.

Honey Badger Byzantine Fault Tolerant (BFT) consensus algorithm Welcome to a Rust library of the Honey Badger Byzantine Fault Tolerant (BFT) consensus

null 335 Dec 25, 2022
๐Ÿšฃโ€โ™€๏ธ <1kloc, well-documented Raft consensus algorithm implementation

miniraft A <1kloc, well-documented Raft consensus algorithm implementation This crate is a minimal implementation of the Raft consensus protocol with

Jacky Zhao 25 Dec 1, 2022
Consensus layer peer-to-peer connection setup

Consensus Layer P2P This project is a basic setup for a consensus layer peer-to-peer connection, as specified in the consensus layer specifications of

Brechy 11 Dec 31, 2022
Standing watch over the Pi Network, PiSentinel is a consensus algorithm that safeguards security, decentralization, and scalability.

pi-sentinel Standing watch over the Pi Network, PiSentinel is a consensus algorithm that safeguards security, decentralization, and scalability. Intro

KOSASIH 3 Aug 4, 2024
Substrate: The platform for blockchain innovators

Substrate ยท Substrate is a next-generation framework for blockchain innovation ?? . Trying it out Simply go to substrate.dev and follow the installati

Parity Technologies 7.7k Dec 30, 2022
A substrate pallet that enables Manta's decentialized anynonymous payment (DAP) protocol.

This is a pallet that enables decentialized anynonymous payment (DAP) protocol. The best way to use this repo is to invoke it with a manta-runtime, available from either manta-node or cumulus.

Manta Network 27 Nov 23, 2022