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

Mokhtar Naamani b872b48878 basic README 5 anni fa
src 5d9448fe7b Merge pull request #42 from mnaamani/improved-role-staking 5 anni fa
wasm e4351606a0 runtime update Cargo.lock with runtime version 5 anni fa
.gitignore 88031146ec Might as well make my life easier 6 anni fa
CHANGELOG.md d57bdf16ae initial commit - runtime spec version 4 6 anni fa
Cargo.toml ffbf17f89b runtime spec version 2 5 anni fa
Dockerfile d1f3abe5d6 Update Dockerfile 6 anni fa
README.md b872b48878 basic README 5 anni fa
build.sh d57bdf16ae initial commit - runtime spec version 4 6 anni fa
setup.sh d57bdf16ae initial commit - runtime spec version 4 6 anni fa

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 full nodes execute the logic of the runtime to validate transactions and blocks on the Joystream blockchain.

The joystream runtime builds on the substrate runtime library (srml) and adds additional functionality:

Council elections User membership system Runtime Upgrade proposal system Staked Roles Storage Provider

Prerequisites

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

Getting Started - Building the WASM runtime

git clone https://github.com/Joystream/substrate-runtime-joystream
cd substrate-runtime-joystream/
./setup.sh
./build.sh

This produces the WASM "blob" output in:

wasm/target/wasm32-unknown-unknown/release/joystream_node_runtime_wasm.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 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 direc with a 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/*.*

Built With

Contributing

Please read CONTRIBUTING.md 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.