Forked from Joystream/joystream https://github.com/Joystream/joystream
|
5 年之前 | |
---|---|---|
src | 5 年之前 | |
.gitignore | 5 年之前 | |
.travis.yml | 5 年之前 | |
CHANGELOG.md | 6 年之前 | |
Cargo.toml | 5 年之前 | |
README.md | 5 年之前 | |
banner.svg | 5 年之前 | |
build-with-docker.sh | 5 年之前 | |
build.rs | 5 年之前 | |
runtime_dockerfile | 5 年之前 | |
setup.sh | 5 年之前 | |
wasm_dockerfile | 5 年之前 |
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 substrate v1.0 and adds additional functionality:
To compile the runtime you will need some tools such as: Rust, llvm and openssl. You can install most of the dependencies with:
curl https://getsubstrate.io -sSf | bash -s -- --fast
git clone https://github.com/Joystream/substrate-runtime-joystream
cd substrate-runtime-joystream/
./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.
Deploying the compiled runtime on a live system can be done in one of two ways:
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.
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.
cargo test
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/*.*
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
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
See also the list of contributors who participated in this project.
This project is licensed under the GPLv3 License - see the LICENSE file for details
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.