Forked from Joystream/joystream https://github.com/Joystream/joystream

Mokhtar Naamani 4319fc3734 travis: cargo test does require nightly 5 năm trước cách đây
node 630fd87810 update travis to test runtime and build joystream-node 5 năm trước cách đây
runtime 8e9cf2c809 staking module: make immediate unstaking after immediate slashing optional 5 năm trước cách đây
runtime-modules 00652b5e7d staking module: more tests 5 năm trước cách đây
utils 7fa0703f6e update dependency path, integrate node into workspace 5 năm trước cách đây
.dockerignore 5f62c3d0e2 update docker files 5 năm trước cách đây
.editorconfig 411f6f59bd Initial commit 6 năm trước cách đây
.gitignore 187f05853b udpate .gitignore files 5 năm trước cách đây
.travis.yml 4319fc3734 travis: cargo test does require nightly 5 năm trước cách đây
CHANGELOG.md 72f4471f47 Changelog 5 năm trước cách đây
Cargo.lock 4c4b986217 include Cargo.lock now that we have binaries 5 năm trước cách đây
Cargo.toml 1fce5d2649 configure profile in root package 5 năm trước cách đây
README.md 41bfd7e1ae Merge branch 'master' into development 5 năm trước cách đây
banner_new.svg edc289d3fd Added new repo cover 5 năm trước cách đây
build-with-docker.sh 2871d6dd75 update docker build 5 năm trước cách đây
runtime_dockerfile 5f62c3d0e2 update docker files 5 năm trước cách đây
setup.sh 999b1627af remove unnecessary steps in setup.sh 5 năm trước cách đây
wasm_dockerfile 5f62c3d0e2 update docker files 5 năm trước cách đây

README.md

Joystream Runtime

Joystream Runtime

The runtime is the code that defines the consensus rules of the Joystream protocol. It is compiled to WASM and lives on chain. Full nodes execute the code's logic to validate transactions and blocks on the blockchain.

The joystream runtime builds on a pre-release version of substrate v2.0 and adds additional functionality to support the various roles that can be entered into on the platform.

Prerequisites

Getting Started - Building the WASM runtime

# Clone repository
git clone https://github.com/Joystream/substrate-runtime-joystream
cd substrate-runtime-joystream/

# Install Pre-requisits
./setup.sh
cargo build --release

This produces the WASM "blob" output in:

target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm

See deployment for notes on how to deploy this runtime on a live system.

Deployment

Deploying the compiled runtime on a live system can be done in one of two ways:

  1. Joystream runtime upgrade proposals which will be voted on by the council. When the Joystream platform is live, this will be the only way to upgrade the chain's runtime code.

  2. During development and testnet phases, we can send an extrinsic (transaction signed with the sudo key) invoking conesnsus::setCode(). This can be done either from the UI/extrinsics app, or directly with an admin script.

Running the tests

cargo test

Coding style

We use rustfmt to format the source code for consistency.

rustfmt can be installed with rustup:

rustup component add rustfmt

Running rustfmt can be applied to all source files recursing subfolders:

rustfmt src/*.*

Reproducible Builds

In an attempt to have a reproducuble version of the runtime that can be verified independantly (by council members for example when deciding wether to vote in a runtime upgrade proposal) there is a build-with-docker.sh script which can be run to generate a joystream_runtime.wasm file to the current directory.

Built With

Contributing

Please see our contributing guidlines for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

Versioning of the runtime is set in src/lib.rs For detailed information about how to set correct version numbers when developing a new runtime, see this

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPLv3 License - see the LICENSE file for details

Acknowledgments

Thanks to the whole Parity Tech team for making substrate and helping on riot chat with tips, suggestions, tutorials and answering all our questions during development.