/diamond_drops

WIP on sharding and Ethereum 2.0 with enshrined-in-consensus data availability and Rust: a fast, safe, concurrent and practical programming language

Primary LanguageRustThe UnlicenseUnlicense

Diamond Drops

Twitter TravisCI License: Unlicense Average time to resolve an issue Percentage of issues still open Built with cargo-make

Get in touch with us on Gitter: Gitter: DropsOfDiamond/Lobby Gitter: DropsOfDiamond/Development

Gitter room for discussion on sharding, e.g. the latest developments in research and implementations.

What are we building?

We are working on a sharding implementation for Ethereum with the Rust programming language, which is fast, safe and concurrent. The below information may be outdated. For the latest information, please ask on Gitter, while additional information on plans and work tasks is in the issues and projects.

We're implementing sharding according to collaboration with Ethereum research at https://ethresear.ch and other teams, which includes tasks outlined in the projects.

For further information please refer to our wiki.

Help support us!

Send a donation to our multi-sig wallet at 0x6D446f9545dBC380A6BBDde8A285A7A8030D4381.

We're looking for more developers!

See here for information. There is a lot of work to do in the sharding roadmap.

Setup guide

Show help menus

  • Command help
cargo run -- --help
  • Sub-command "mode" help
cargo run -- mode --help

Install dependencies

  • Install Rust

  • Update Rust

    rustup update
  • Install Rust Formatter

    rustup component add rustfmt-preview
  • Install Cargo-make Task runner and build tool

    cargo install --force cargo-make
  • Execute specific task runner flow. Default is Makefile.toml

    cargo make --makefile tasks.toml <TASK_NAME>

Clone a fork of the repository

  • Fork the repository https://github.com/Drops-of-Diamond/diamond_drops

  • Clone your fork of the repository (replace below with your Github username):

    git clone https://github.com/<USERNAME>/Diamond-drops;
    cd Diamond-drops
  • Add the "upstream" repository to your remotes and show your list of remotes verbosely

    git remote add upstream https://github.com/Drops-of-Diamond/diamond_drops;
    git remote --verbose
  • Change from the "master" branch to the "develop" branch to see the latest features that are being integrated but are not officially ready for production

Build, Run the code

  • Proposer Mode

    cargo make p
  • Notary Mode

    cargo make n
  • Both Proposer and Notary Modes

    cargo make b
  • All above

    cargo make all

Unit and Integration Tests

  • Run all tests (unit and integration tests for main package and libraries)

    cargo make test-all
  • Watch all tests (polls continuously for code changes during development, automatically running tests, and reports issues)

    cargo make build;
    cargo install cargo-watch;
    cargo make watch;

Show Rust Docs

cargo make docs

View UML Diagram

  • View UML with Google Chrome, Mozilla Firefox, or Brave browser

    cargo make uml-chrome;
    cargo make uml-firefox;
    cargo make uml-brave;
  • Custom

    • Choose an application on your computer to open the SVG (i.e. ls /Applications)
    • Run open -a "<APPLICATION>" "./diagrams/ml.svg"
    • Optionally create a Pull Request to update Makefile.toml

Contibuting guidelines

See this wiki article here.

Introduction

For an introduction to Ethereum, see https://ethereum.org/ or https://github.com/ethereum/wiki/wiki/Ethereum-introduction. For information on sharding and implementations, refer to here.

Why Rust?

After comparing Rust, C++, Go, Javascript and Python, as well as corresponding implementations (Parity, cppethereum, Go-ethereum, ethereumJS and Py-EVM), Rust is most preferable, while I haven't tried being a user of other implementations, so I can't comment on a comparison. Rust has advantages such as safety, concurrency, practicality, better memory safety, zero-cost abstractions, and support for functional and imperative-procedural paradigms.

Further information

This repo and the Drops of Diamond project it belongs to is not a part of or owned by the Ethereum Foundation, nor is it endorsed by the Foundation. A different project name and logo may be used (the logo could use a more modern design rather than just using a photo in the public domain), and alternative proposals are welcome. The Drops of Diamond project is not legally incorporated as of yet, so legally it is not an organisation. That should be done, but probably only as needed once the project is more well-developed.