GithubHelp home page GithubHelp logo

rrthomas / uplink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libby/uplink

0.0 3.0 1.0 753 KB

A distributed ledger for secure multiparty workflows in financial markets.

Home Page: http://www.adjoint.io

License: Apache License 2.0

Dockerfile 0.06% Python 10.54% Haskell 86.79% Shell 0.30% Assembly 2.32%

uplink's Introduction

Community Edition

Uplink

CircleCI

Uplink is a distributed database built for orchestrating secure multiparty workflows found in financial markets.

Uplink operates as a federation of nodes which communicate over a private network to provide an append-only database in which all transactions are cryptographically signed and where all members participate in a consensus protocol to maintain and verify the ledger state.

Uplink also has the capacity to run so-called smart contracts which are units of logic which run across the network and allow counterparties to interact through arbitrarily sophisticated programs that can model common business processes and financial instruments. Provided with the ledger is a new scripting language FCL (Financial Core Language) built on a verified core and designed as a target for contract modeling tools.

The community version of Adjoint's software is released under an Apache License and is part of a larger suite of tools and languages offered commercially.

Running a Node

To run an Uplink node that has the ability to construct and sign blocks, you must supply a filepath to an existing private key located in the config/validators directory. Accounts correspoding to these key pairs are created on boot and added to the genesis world state, and the list of addresses defining the validator nodes is defined in config/chain.config.local.

Without Docker

$ stack install --no-docker

To boot a validator node (needed to create & sign blocks):

$ uplink chain init -b "leveldb:///uplink1" -p 8001 -d node1 -k config/validators/auth0/key -v

And two non-validator nodes:

$ uplink chain init -b "leveldb:///uplink2" -p 8002 --rpc-port 8546 -d node2 -v
$ uplink chain init -b "leveldb:///uplink3" -p 8003 --rpc-port 8547 -d node3 -v

When prompted whether we want to provide a private key, you can enter n.

We can open up the console:

$ uplink console

Running the command listPeers in the Uplink console should give us a list containing the three peers we just started.

With Docker

The run-container script will compile and run a node using docker and bind the P2P and RPC ports to the host.

$ stack install
$ ./run-container 
Please supply three args: <db dir suffix> <p2pPort> <rpcPort>
Examples: $ ./run-container 1 8001 8545
          $ ./run-container 2 8002 8546

To boot a validator node (needed to create & sign blocks):

$ ./run-container 1 8001 8545 "-k config/validators/auth0/key" 

And two non-validator nodes:

$ ./run-container 2 8002 8546
$ ./run-container 3 8003 8547

When prompted whether we want to provide a private key, you can enter n.

We can open up the console:

$ uplink console --hostname 127.0.1.1

Running the command listPeers in the Uplink console should give us a list containing the three peers we just started.

With optimizations:

$ stack build --flag uplink:optimized

If you follow either of these examples, booting 3 Uplink nodes (one validator and two non-validating nodes), then transactions issued to any of the nodes will propagate through the network and blocks will be generated by the validating node at intervals defined in the blockPeriod field of config/chain.config.

Uplink Console

To interact with an Uplink node with a separate console process (instead of through the RPC), refer to the documentation.

Interactive Smart Contract (FCL) Shell

$ uplink scripts 
Available options:
  -h,--help                Show this help text

  Available commands:
    compile                  Compile and typecheck a script.
    repl                     Compile, typecheck a script, and load it into a REPL.
    format                   Format a script
    lint                     Lint a script.
    graph                    Extract graph from a script.
$ uplink scripts repl <fcl-file>

Documentation

Extensive documentation can be found here.

uplink's People

Contributors

sdiehl avatar rrthomas avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

commandodev

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.