DeMars-DMC

module
Version: v0.0.0-...-0ce3ae6 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0

README

DéMars-DMC

Hypercube-based Byzantine-Fault Tolerant Blockchain

DéMars is Byzantine Fault Tolerant (BFT) blockchain which uses network segments to reduce the storage and network transfer costs, thereby enabling it to execute on mobile nodes.

This is only a minimal prototype which has been forked from Tendermint (https://github.com/tendermint/tendermint) and modified to use Kademlia XOR metric. The network we are currently building is based on a Hypercube DHT.

Simplifications (w.r.t. the Whitepaper)

  • The prototype uses a Kademlia XOR P2P network similar to Ethereum (https://github.com/ethereum/wiki/wiki/Kademlia-Peer-Selection).
  • The validators and proposer are chosen naively (the top 100 nodes in a zone based on account balances). The final version will be based on cryptographic sortition like Algorand.

Minimum requirements

Requirement Notes
Go version Go1.9 or higher

Install

See the install instructions

Resources

DéMars

For details about the blockchain data structures and the p2p protocols, see the the DMC specification.

More

Directories

Path Synopsis
abci
app
types
nolint: gas
nolint: gas
proto
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
cmd
Ripemd160 sum := crypto.Ripemd160([]byte("This is consensus")) fmt.Printf("%x\n", sum)
Ripemd160 sum := crypto.Ripemd160([]byte("This is consensus")) fmt.Printf("%x\n", sum)
hkdfchacha20poly1305
Package hkdfchacha20poly1305 creates an AEAD using hkdf, chacha20, and poly1305 When sealing and opening, the hkdf is used to obtain the nonce and subkey for chacha20.
Package hkdfchacha20poly1305 creates an AEAD using hkdf, chacha20, and poly1305 When sealing and opening, the hkdf is used to obtain the nonce and subkey for chacha20.
merkle
Package merkle computes a deterministic minimal height Merkle tree hash.
Package merkle computes a deterministic minimal height Merkle tree hash.
docs
libs
cli
common
Package common is a generated protocol buffer package.
Package common is a generated protocol buffer package.
db
db/remotedb
remotedb is a package for connecting to distributed Demars-DMC db.DB instances.
remotedb is a package for connecting to distributed Demars-DMC db.DB instances.
db/remotedb/grpcdb
grpcdb is the distribution of Demars-DMC's db.DB instances using the gRPC transport to decouple local db.DB usages from applications, to using them over a network in a highly performant manner.
grpcdb is the distribution of Demars-DMC's db.DB instances using the gRPC transport to decouple local db.DB usages from applications, to using them over a network in a highly performant manner.
db/remotedb/proto
Package protodb is a generated protocol buffer package.
Package protodb is a generated protocol buffer package.
events
Pub-Sub in go with event caching
Pub-Sub in go with event caching
flowrate
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream.
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream.
log
pubsub
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
pubsub/query
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
Package lite allows you to securely validate headers without a full node.
Package lite allows you to securely validate headers without a full node.
client
Package client defines a provider that uses a rpcclient to get information, which is used to get new headers and validators directly from a node.
Package client defines a provider that uses a rpcclient to get information, which is used to get new headers and validators directly from a node.
files
Package files defines a Provider that stores all data in the filesystem We assume the same validator hash may be reused by many different headers/Commits, and thus store it separately.
Package files defines a Provider that stores all data in the filesystem We assume the same validator hash may be reused by many different headers/Commits, and thus store it separately.
p2p
conn
Uses nacl's secret_box to encrypt a net.Conn.
Uses nacl's secret_box to encrypt a net.Conn.
kademlia
Package kademlia implements the Node Discovery Protocol.
Package kademlia implements the Node Discovery Protocol.
upnp
Taken from taipei-torrent.
Taken from taipei-torrent.
rpc
client/mock
package mock returns a Client implementation that accepts various (mock) implementations of the various methods.
package mock returns a Client implementation that accepts various (mock) implementations of the various methods.
core
# Introduction Demars-DMC supports the following RPC protocols: * URI over HTTP * JSONRPC over HTTP * JSONRPC over websockets Demars-DMC RPC is built using [our own RPC library](https://github.com/Demars-DMC/Demars-DMC/tree/master/rpc/lib) which contains its own set of documentation and tests.
# Introduction Demars-DMC supports the following RPC protocols: * URI over HTTP * JSONRPC over HTTP * JSONRPC over websockets Demars-DMC RPC is built using [our own RPC library](https://github.com/Demars-DMC/Demars-DMC/tree/master/rpc/lib) which contains its own set of documentation and tests.
grpc
Package core_grpc is a generated protocol buffer package.
Package core_grpc is a generated protocol buffer package.
lib
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets # Client Requests Suppose we want to expose the rpc function `HelloWorld(name string, num int)`.
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets # Client Requests Suppose we want to expose the rpc function `HelloWorld(name string, num int)`.
lib/server
Commons for HTTP handling
Commons for HTTP handling
tcp
test
app

Jump to

Keyboard shortcuts

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