crux

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

README

Crux

Quorum Slack Build Status

Data privacy for Quorum.

Crux is a secure enclave for Quorum written in Golang.

It is a replacement for Constellation, the secure enclave component of Quorum, written in Haskell.

Getting started

The best way to start is to run the Crux 7 Nodes Quorum example. This is a fork of the JP Morgan version.

If you you'd prefer to run just a client, you can build using the below instructions and run as per the below.

git clone https://github.com/blk-io/crux.git
cd crux
make setup && make
./bin/crux

Usage of ./bin/crux:
      crux.config              Optional config file
      --alwayssendto string    List of public keys for nodes to send all transactions too
      --berkeleydb             Use Berkeley DB for storage
      --generate-keys string   Generate a new keypair
      --othernodes string      "Boot nodes" to connect to to discover the network
      --port int               The local port to listen on (default -1)
      --privatekeys string     Private keys hosted by this node
      --publickeys string      Public keys hosted by this node
      --socket string          IPC socket to create for access to the Private API
      --storage string         Database storage file name (default "crux.db")
      --url string             The URL to advertise to other nodes (reachable by them)
      --verbosity int          Verbosity level of logs (default 1)
      --workdir string         The folder to put stuff in (default: .) (default ".")
      --grpc                   Use protobuf + gRPC for communication between nodes
      --tls                    Use TLS to secure HTTP communications
      --tlsservercert          TLS server certificate
      --tlsserverkey           TLS server key

Generating keys

Each Crux instance requires at least one key-pair to be associated with it. The key-pair is used to ensure transaction privacy. Crux uses the NaCl cryptography library.

You use the --generate-keys argument to generate a new key-pair with Crux:

crux --generate-keys myKey

This will produce two files, named myKey and myKey.pub reflecting the private and public keys respectively.

Core configuration

At a minimum, Crux requires the following configuration parameters. This tells the Crux instance what port it is running on and what ip address it should advertise to other peers.

Details of at least one key-pair must be provided for the Crux node to store requests on behalf of.

crux --url=http://127.0.0.1:9001/ --port=9001 --workdir=crux --publickeys=tm.pub --privatekeys=tm.key --othernodes=https://127.0.0.1:9001/

How does it work?

At present, Crux performs its cryptographic operations in a manner identical to Constellation. You can read the specifics here.

The two main workflows for handling private transactions are the submission and retrieval demonstrated below.

New transaction submission

New Transaction Sequence

Existing transaction retrieval

Read Transaction Sequence

Logical architecture

Logical architecture

Why Crux?

Crux is a constellation located in the southern sky in a bright portion of the Milky Way. It is among the most easily distinguished constellations, even though it is the smallest of all 88 modern constellations. (Source: Wikipedia)

The critical or transitional moment or issue, a turning point.

Thanks

@patrickmn the original author of Constellation. Crux would not exist were it not for his work.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package config provides the configuration settings to be used by the application at runtime
Package config provides the configuration settings to be used by the application at runtime
Package enclave provides enclaves for the secure storage and propagation of transactions.
Package enclave provides enclaves for the secure storage and propagation of transactions.
Package server contains the core server components.
Package server contains the core server components.

Jump to

Keyboard shortcuts

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