Mokhtar Naamani b28e31f149 update readmes after importing landing repo 4 anos atrás
..
src ec89b3552c staking module: call slash handler when doing immediate slash 5 anos atrás
CHANGELOG.md bc0b5115ff reorganize scripts and docker files 5 anos atrás
Cargo.toml 8e9cf2c809 staking module: make immediate unstaking after immediate slashing optional 5 anos atrás
README.md b28e31f149 update readmes after importing landing repo 4 anos atrás
build.rs bfcab70f42 Update obsolete code in the runtime/build.rs 5 anos atrás
runtime-banner.svg 2a532261d6 update README 5 anos atrás

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. Joystream node execute the code's logic to validate transactions and blocks on the blockchain.

When building joystream-node as described abot with cargo build --release, in addition to the joystream-node binary being built the WASM blob artifact is produced in:

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

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 system::setCode(). This can be done either from the UI/extrinsics app, or directly with an admin script.

Versioning the runtime

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

Coding style

We use cargo-fmt to format the source code for consistency.

It should be available on your machine if you ran the setup.sh script, otherwise install it with rustup:

rustup component add rustfmt

Applying code formatting on all source files recursing subfolders:

cargo-fmt