protocol

module
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2019 License: Apache-2.0

README

OneLedger Protocol (MVP)

Initial version for the OneLedger Protocol, focusing on cross-chain transactions and identity management for the two different chains, Ethereum and Bitcoin.

The main part of the system is the blockchain full-node, which is currently an ABCi app based on low-level parts of the Tendermint consensus library. As development continues we will replace the Tendermint components with our own multi-level consensus engine, in order to achieve the advanced functionality we have outlined in our Whitepaper.

Table of Contents

Getting Started

These instructions will get a copy of the OneLedger Protocol up and running on your local machine.

Manual Compilation
System Requirements

Ensure your system meets the following requirements:

  • Operating System must be one of the following:
    • macOS
    • A Debian-based Linux distribution
      • Ubuntu is recommended for the smoothest install, otherwise you will have to set up your distribution for installing PPAs
  • Go version 1.7 or higher
    • Need an explicit GOPATH environment variable set
  • git
Install

Before running any install scripts, ensure your GOPATH is set up explicitly on your user account. Visit the Setting up the GOPATH page on the wiki for more help.

First clone the repository for the OneLedger Protocol with go get:

$ go get github.com/Oneledger/protocol

Before running any scripts, you'll need to set up the required environment variables properly.

Install the required dependencies:

$ cd "$OLROOT/protocol/node"
$ make setup

General scripts for running the OneLedger Protocol are inside node/scripts.

Make Targets

If everything is set up properly, you can begin testing the OneLedger Protocol with the make targets provided. Run the following scripts from inside the $OLREPO/node directory:

Target Description
make test Tests system initialization, brings up everything
make swaptest Test swap mechanics between BTC and ETH
make fulltest Does a full test, makes use of test scripts in the /tests folder
make status Lists all running nodes
make monitor Start tmux session
make stopmon Stops tmux session
Interactive Docker

See DOCKER/ for instructions on running a testnet with Docker Compose.

The OneLedger Protocol can be started as a Docker container. This is the easiest way to set up the OneLedger Protocol on your computer. You'll need to install Docker CE on your computer to use this method.

Build the protocol image:

$ git clone https://github.com/Oneledger/protocol.git && cd protocol
$ make docker-interactive

Start the protocol container (runs through your shell interactively):

$ make run-interactive

See Make Targets to see a list of make commands you can run to interact with the OneLedger Protocol.

Components

Node
  • Implements a fullnode with Tendermint consensus PoS (Proof-of-Stake)
  • Supports cross-chain transactions (as synchronized swaps on Hashed Timelocks)
    • Etheruem
    • Bitcoin
  • Supports Identity Management for OneLedger, Ethereum and Bitcoin
  • See the node README at node/README.md for more details
Consensus
  • Preliminary PoS consensus engine, single-layer
  • Post-MVP core development
Lite Chain
  • Simple chain and protocol for internal testing
  • Implements a miner with Satoshi consensus PoW (Proof-of-Work)

License

The OneLedger Protocol is released under the terms of the Apache 2.0 license. See LICENSE.md for more details or visit https://www.apache.org/licenses/LICENSE-2.0.html.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL