Protocol for Asynchronous, Reliable, Secure and Efficient Consensus

Related tags

Parsing parsec
Overview

PARSEC - Protocol for Asynchronous, Reliable, Secure and Efficient Consensus

Crate Documentation Linux/macOS Windows Issues
Documentation Build Status Build status Stories in Ready
MaidSafe website SAFE Dev Forum SAFE Network Forum

Overview

There is a basic example available in the examples folder. This allows you to simulate a network of peers each running the Parsec protocol to reach consensus on a number of random network events. There is also the ability to dump each peer's gossip graph in dot format to a file in your system temp dir. This can be enabled via the feature dump-graphs. So, e.g. to run the example for a network of five peers and ten network events:

cargo run --release --example=basic --features=mock,dump-graphs -- --initial-peers=5 --opaque=10

If you have dot from graphviz available in your path, then SVG graphs will also have been generated from each of these dot files. If not, you can copy the contents of a generated dot file into an online converter (e.g. http://viz-js.com) to view the gossip graph.

Detailed tutorial

If the instructions in the overview are a bit sparse for your taste, please refer to the tutorial for a step-by-step guide.

Implementation status:

Features already implemented

  • Initial implementation of PARSEC
    • Demonstrates working consensus in a static network of peers
  • Integration tests
    • Simple tests show consensus being reached in a network of small size, with all nodes simulated in a single thread
    • Data is randomly generated to allow for soak testing
    • Soak testing has been performed for tens of thousands of run without errors
  • Generation of graphs
    • With the feature: dump-graphs, a dot representation of all network communications is output
    • The graphs are snapshots at the time each consensus decision is taken (one graph per node per consensus decision)
    • The graphs are annotated with details of the PARSEC protocol that explain how consensus was ultimately reached
    • An image (for instance .svg) can be obtained from the dot representation using dot
  • Reproducibility
    • In case of test failure, a seed is output. That seed can be used to reproduce the failing scenario, which helps investigate the potential issue
  • Simple example
    • A simple example was created to allow testing various scenarios
    • The number of peers, number of votes etc. can be configured by command line arguments
  • Initial documentation
    • Early documentation of the API is available here

Upcoming features

  • Foolproof handling of malice
    • Handle forks (one node sends more than one event with the same self_parent)
    • Double voting (one node votes more than once for the same network event)
    • Detection of malicious behaviour, resulting in consensus on excluding the offending peer
  • Performance
    • Benchmark and optimise the code
    • Perform measurements of Transactions Per Second in simulated network
      • Use setup that can be compared with competing consensus protocols
  • Extensive tests
    • Implement extensive tests that simulate adversarial scenarios to prove robustness outside of the "happy path"
  • Extensive documentation
    • Documentation will be made comprehensive
  • Dynamic network membership

License

Licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).

Linking exception

Parsec is licensed under GPLv3 with linking exception. This means you can link to and use the library from any program, proprietary or open source; paid or gratis. However, if you modify parsec, you must distribute the source to your modified version under the terms of the GPLv3.

See the LICENSE file for more details.

Contributing

Want to contribute? Great 🎉

There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!

For instructions on how to contribute, see our Guide to contributing.

You might also like...
A library to display rich (Markdown) snippets and texts in a rust terminal application
A library to display rich (Markdown) snippets and texts in a rust terminal application

A CLI utilities library leveraging Markdown to format terminal rendering, allowing separation of structure, data and skin. Based on crossterm so works

Generate and parse UUIDs.

uuid Here's an example of a UUID: 67e55044-10b1-426f-9247-bb680e5fe0c8 A UUID is a unique 128-bit value, stored as 16 octets, and regularly formatted

Parser for Object files define the geometry and other properties for objects in Wavefront's Advanced Visualizer.

format of the Rust library load locad blender obj file to Rust NDArray. cargo run test\t10k-images.idx3-ubyte A png file will be generated for the fi

A CSS parser, transformer, and minifier written in Rust.
A CSS parser, transformer, and minifier written in Rust.

@parcel/css A CSS parser, transformer, and minifier written in Rust. Features Extremely fast – Parsing and minifying large files is completed in milli

Rust grammar tool libraries and binaries

Grammar and parsing libraries for Rust grmtools is a suite of Rust libraries and binaries for parsing text, both at compile-time, and run-time. Most u

An IRC (RFC1459) parser and formatter, built in Rust.

ircparser An IRC (RFC1459) parser and formatter, built in Rust. ircparser should work on basically any Rust version, but the earliest version checked

Watch for changes on a webpage and do anything with it!

Sukurappa Watch for changes on a webpage and do anything with it! Install With cargo: cargo install sukurappa Or use the install-script and add $HOME/

Lexer and parser collections.

laps Lexer and parser collections. With laps, you can build parsers by just defining ASTs and deriving Parse trait for them. Usage Add laps to your pr

A WIP svelte parser written in rust. Designed with error recovery and reporting in mind

Svelte(rs) A WIP parser for svelte files that is designed with error recovery and reporting in mind. This is mostly a toy project for now, with some v

Releases(v0.7.3)
Owner
MaidSafe
MaidSafe
A native Rust port of Google's robots.txt parser and matcher C++ library.

robotstxt A native Rust port of Google's robots.txt parser and matcher C++ library. Native Rust port, no third-part crate dependency Zero unsafe code

Folyd 72 Dec 11, 2022
JsonPath engine written in Rust. Webassembly and Javascript support too

jsonpath_lib Rust 버전 JsonPath 구현으로 Webassembly와 Javascript에서도 유사한 API 인터페이스를 제공 한다. It is JsonPath JsonPath engine written in Rust. it provide a simil

Changseok Han 95 Dec 29, 2022
Parsing and inspecting Rust literals (particularly useful for proc macros)

litrs: parsing and inspecting Rust literals litrs offers functionality to parse Rust literals, i.e. tokens in the Rust programming language that repre

Lukas Kalbertodt 31 Dec 26, 2022
A rusty, dual-wielding Quake and Half-Life texture WAD parser.

Ogre   A rusty, dual-wielding Quake and Half-Life texture WAD parser ogre is a rust representation and nom parser for Quake and Half-Life WAD files. I

Josh Palmer 16 Dec 5, 2022
A modern dialogue executor and tree parser using YAML.

A modern dialogue executor and tree parser using YAML. This crate is for building(ex), importing/exporting(ex), and walking(ex) dialogue trees. convo

Spencer Imbleau 27 Aug 3, 2022
A Rust crate for RDF parsing and inferencing.

RDF-rs This crate provides the tools necessary to parse RDF graphs. It currently contains a full (with very few exceptions) Turtle parser that can par

null 2 May 29, 2022
Yet Another Parser library for Rust. A lightweight, dependency free, parser combinator inspired set of utility methods to help with parsing strings and slices.

Yap: Yet another (rust) parsing library A lightweight, dependency free, parser combinator inspired set of utility methods to help with parsing input.

James Wilson 117 Dec 14, 2022
🕑 A personal git log and MacJournal output parser, written in rust.

?? git log and MacJournal export parser A personal project, written in rust. WORK IN PROGRESS; NOT READY This repo consolidates daily activity from tw

Steven Black 4 Aug 17, 2022
Sqllogictest parser and runner in Rust.

Sqllogictest-rs Sqllogictest parser and runner in Rust. License Licensed under either of Apache License, Version 2.0 (LICENSE-APACHE or http://www.apa

Singularity Data Inc. 101 Dec 21, 2022
Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes.

Introduction Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes. The goal of this library is to

Alex Roper 4 Oct 7, 2022