Diamond Drops (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.
This repo contains code that is implemented to a deprecated sharding specification (notaries and proposers with a sharding manager contract), as well as previous code for collators and proposers. The latest specification is not finalised. Currently as of July 31 2018 work is underway on the networking aspect, with gossipsub. Note also that for a more up-to-date, but still outdated, implementation of the first version of the shasper (sharding + Casper) specification, see https://github.com/sigp/lighthouse.
We were working on a sharding implementation for Ethereum with the Rust programming language, which is fast, safe and concurrent. See also this "Why Rust?" post by ParityTech and the Rust book, 2018 edition to learn Rust. Sharding plans to scale Ethereum, with the current goal of 100k TPS (see the latest spec above for details).
We're implementing sharding according to collaboration with Ethereum research at https://ethresear.ch and other teams, which includes tasks outlined in the projects and issues. In the first phase of the roadmap, we only enshrine data availabilty, without execution, thus abstracting execution, and enabling faster and simpler implementation, with each phase being useful. For further information, please refer to our wiki, which includes an introductory video, background info, contributing info, and more. The plan is for this codebase to eventually be integrated into the Rust implementation of the EVM, Parity. diamond_drops is used as the name of the cargo crate for compatibility, and so the repo name also follows this.
- Help support us
- We're looking for more developers
- Why Rust?
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.
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>
Show help menus
- Command help
cd ~/diamond_drops; # you may wish to rename this to dod for convenience cargo run -- --help
- Sub-command "mode" help
cargo run -- mode --help
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
Follow us on Twitter for release updates
Click on the Twitter badge above.
Build and Run the code
cargo make p
cargo make n
Both Proposer and Notary Modes
cargo make b
cargo make all
All above with collation example
cargo make all-with-collation
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-default-recommended; # The below options will only work for Mac OS X, otherwise use the above. cargo make uml-chrome; cargo make uml-firefox; cargo make uml-brave;
- On a Mac you can also use
ls /Applications; open SVG-COMPATIBLE-APPLICATION ./diagrams/ml.svg.
- Optionally create a Pull Request to update Makefile.toml or open the diagrams/ml.svg file manually after building with the graphviz dependency for MML or an alternative installed.
- On a Mac you can also use
See this wiki article here.
Help support us
Send a donation to jamesray.eth. All contributors will be paid according to their contributions and timesheets, once funds are received. As an example, my timesheet is available here. A multisig will be used when other developers are contributing full-time. Funds are needed to pay researchers and developers a reasonable hourly rate or salary, which may fairly be quite high due to the time required to learn about Ethereum, sharding, etc.; and because of the scarcity of those interested and qualified to be able to contribute in the blockchain industry. For more details see this issue.<!omitting until other regular contributors are well established, although I still vouch that contributions will be paid for according to assessing hours on timesheets--our multi-sig wallet at 0x6D446f9545dBC380A6BBDde8A285A7A8030D4381-->
We're looking for more developers