Skip to content
README.md 1.32 KiB
Newer Older
# Substrate Shasper
Wei Tang's avatar
Wei Tang committed
*Note: This is an experimental project. Everything will break, and it may disappear without any notice!*
This is an implementation of [Shasper](https://github.com/ethereum/eth2.0-specs) beacon chain using the [Substrate framework](https://github.com/paritytech/substrate).
Wei Tang's avatar
Wei Tang committed
## Status
Wei Tang's avatar
Wei Tang committed
Currently we have a (mostly complete, but untested) implementation of Shasper state transition validation algorithms. This is then combined with Substrate's embedded consensus engine to provide a simple Substrate node implementation. In the future, this consensus engine will be replaced to comply with Shasper's fork choice rule specification.

## Get Started

Wei Tang's avatar
Wei Tang committed
To build the project, first install [rustup](https://rustup.rs/) and [wasm-gc](https://github.com/alexcrichton/wasm-gc):
Wei Tang's avatar
Wei Tang committed

```bash
Wei Tang's avatar
Wei Tang committed
rustup update stable
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc
```

After that, clone the repo and compile the WebAssembly runtime:
Wei Tang's avatar
Wei Tang committed

```bash
git clone https://github.com/paritytech/shasper.git
cd shasper/runtime/wasm && ./build.sh && cd ../..
Wei Tang's avatar
Wei Tang committed
```

You can then execute the client:

```bash
Wei Tang's avatar
Wei Tang committed
cargo run -- --chain dev
```

However, before the block authoring logic is added, there's probably not much you can do!

## License

Licensed under GPLv3.