[][src]Crate exonum_btc_anchoring

Introduction

Private blockchain infrastructure necessitates additional measures for accountability of the blockchain validators. In public proof of work blockchains (e.g., Bitcoin), accountability is purely economic and is based on game theory and equivocation or retroactive modifications being economically costly. Not so in private blockchains, where these two behaviors are a real threat per any realistic threat model that assumes that the blockchain is of use not only to the system validators, but also to third parties.

This crate implements a protocol for blockchain anchoring onto the Bitcoin blockchain that utilizes the native Bitcoin capabilities of creating multisig(p2sh) transactions. This transactions contains metadata from Exonum blockchain (block's hash on corresponding height) and forms a chain.

You can read the details in specification.

Examples

Create application with anchoring service

use exonum_cli::NodeBuilder;

fn main() -> Result<(), failure::Error> {
    exonum::helpers::init_logger()?;
    NodeBuilder::new()
        .with_service(exonum_btc_anchoring::BtcAnchoringService)
        .run()
}

Modules

api

Anchoring HTTP API implementation.

blockchain

Blockchain implementation details for the BTC anchoring service.

btc

Collection of wrappers for the rust-bitcoin crate.

config

BTC anchoring configuration data types.

sync

Building blocks of the anchoring sync utility.

test_helpers

Set of helpers for btc anchoring testing.

Structs

BtcAnchoringService

Bitcoin anchoring service implementation for the Exonum blockchain.