Skip to content

Commit

Permalink
Merge pull request #185 from Joystream/development
Browse files Browse the repository at this point in the history
Rome - initial release
  • Loading branch information
mnaamani authored Mar 12, 2020
2 parents c759993 + ef07ff9 commit 251840f
Show file tree
Hide file tree
Showing 136 changed files with 27,777 additions and 6,691 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ joystream_runtime.wasm

# Vim
.*.sw*

**/Cargo.lock
23 changes: 17 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
language: rust

rust:
- 1.34.0
cache:
- cargo
- 1.41.1
# Caching saves a lot of time but often causes stalled builds...
# disabled for now
# look into solution here: https://levans.fr/rust_travis_cache.html
# cache:
# - cargo

before_script:
- rustup component add rustfmt
- ./setup.sh
- rustup component add rustfmt --toolchain 1.41.1-x86_64-unknown-linux-gnu
- rustup update nightly
- rustup target add wasm32-unknown-unknown --toolchain nightly
- cargo +nightly install --git https://github.com/alexcrichton/wasm-gc --force

script:
# Ensure all checked in code is cargo-fmt'ed
- cargo fmt --all -- --check
- ./build.sh
# Native build and unit tests check
- cargo test --verbose --all
# WASM build check
- cargo build
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Version 6.8.0 (Rome release) - March 9th 2020
- New versioned and permissioned content mangement system that powers a new media experience.
- Content Working Group - introduces staked content curator roles to maintain quality of content and ensure that is meets the platform's terms of service.
- Update of core substrate to pre-release of version 2.0 - [c37bb08](https://github.com/paritytech/substrate/commit/c37bb08535c49a12320af7facfd555ce05cce2e8)

### Version 5.4.0 (Acropolis) - Athens testnet update 3 - June 22n 2019
- New Forum - v1.0.0
- Discovery Service to support new Storage Provider implementation.
Expand Down
212 changes: 18 additions & 194 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,196 +1,20 @@
[package]
authors = ['Joystream']
edition = '2018'
name = 'joystream-node-runtime'
version = '5.4.0'

[dependencies]
# restrict version of syn, see https://github.com/paritytech/substrate/issues/2326
syn = { version = ">= 0.15.26, < 0.15.32", features = ["full"] }

[features]
default = ['std']
std = [
'parity-codec/std',
'parity-codec-derive/std',
'primitives/std',
'substrate-client/std',
'rstd/std',
'runtime-io/std',
'srml-support/std',
'balances/std',
'executive/std',
'aura/std',
'indices/std',
'primitives/std',
'system/std',
'timestamp/std',
'sudo/std',
'version/std',
'serde_derive',
'serde/std',
'safe-mix/std',
'consensus-aura/std',
'staking/std',
'session/std',
'offchain-primitives/std',
'consensus-authorities/std',
'grandpa/std',
'finality-tracker/std',
'forum/std'
[workspace]
members = [
"runtime",
"runtime-modules/common",
"runtime-modules/content-working-group",
"runtime-modules/forum",
"runtime-modules/governance",
"runtime-modules/hiring",
"runtime-modules/membership",
"runtime-modules/memo",
"runtime-modules/recurring-reward",
"runtime-modules/roles",
"runtime-modules/service-discovery",
"runtime-modules/stake",
"runtime-modules/storage",
"runtime-modules/token-minting",
"runtime-modules/versioned-store",
"runtime-modules/versioned-store-permissions",
]
[dependencies.aura]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-aura'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.balances]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-balances'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.consensus]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-consensus'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.consensus-aura]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'substrate-consensus-aura-primitives'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.executive]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-executive'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.indices]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-indices'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.parity-codec]
default-features = false
version = '3.1'

[dependencies.parity-codec-derive]
default-features = false
version = '3.1'

[dependencies.primitives]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'substrate-primitives'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.rstd]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'sr-std'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.runtime-io]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'sr-io'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.runtime-primitives]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'sr-primitives'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.safe-mix]
default-features = false
version = '1.0'

[dependencies.serde]
default-features = false
version = '1.0'

[dependencies.serde_derive]
optional = true
version = '1.0'

[dependencies.srml-support]
default_features = false
git = 'https://github.com/joystream/substrate.git'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.substrate-client]
default_features = false
git = 'https://github.com/joystream/substrate.git'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.sudo]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-sudo'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.system]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-system'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.timestamp]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-timestamp'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.version]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'sr-version'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.staking]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-staking'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.session]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-session'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.offchain-primitives]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'substrate-offchain-primitives'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.consensus-authorities]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'substrate-consensus-authorities'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.grandpa]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-grandpa'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.finality-tracker]
default_features = false
git = 'https://github.com/joystream/substrate.git'
package = 'srml-finality-tracker'
rev = '6dfc3e8b057bb00322136251a0f10305fbb1ad8f'

[dependencies.forum]
default_features = false
git = 'https://github.com/joystream/substrate-forum-module'
package = 'substrate-forum-module'
tag = "v1.0.0"
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
# 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](https://github.com/Joystream/substrate-node-joystream) execute the code's logic to validate transactions and blocks on the blockchain.
It is compiled to WASM and lives on chain.
[Full nodes](https://github.com/Joystream/substrate-node-joystream) execute the code's logic to validate transactions and blocks on the blockchain.

The joystream runtime builds on [substrate v1.0](https://docs.substrate.dev/docs) and adds additional functionality:
The joystream runtime builds on a pre-release version of [substrate v2.0](https://substrate.dev/) and adds additional
functionality to support the [various roles](https://www.joystream.org/roles) that can be entered into on the platform.

- [Council elections](src/governance/election.rs)
- [Runtime Upgrade proposal system](src/governance/proposals.rs)
- [User membership system](src/membership/)
- [Staked Roles](src/roles)
- [Storage Provider](src/storage/)
- [Forum](https://github.com/Joystream/substrate-forum-module)
- [Discovery](src/discovery_service)

### Prerequisites

## Getting Started - Building the WASM runtime

Expand All @@ -24,14 +21,12 @@ cd substrate-runtime-joystream/

# Install Pre-requisits
./setup.sh

# Compile runtime
./build.sh
cargo build --release
```

This produces the WASM "blob" output in:

`wasm/target/wasm32-unknown-unknown/release/joystream_node_runtime_wasm.compact.wasm`
`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.

Expand Down
2 changes: 1 addition & 1 deletion build-with-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ docker build --tag runtime-build --file ./runtime_dockerfile .
# Create a non running container from the runtime build image
docker create --name runtime-container runtime-build
# Copy the compiled wasm blob from the docker container to our host
docker cp runtime-container:/runtime/wasm/target/wasm32-unknown-unknown/release/joystream_node_runtime_wasm.compact.wasm joystream_runtime.wasm
docker cp runtime-container:/runtime/target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm joystream_runtime.wasm
docker rm runtime-container

# compute blake2_256 hash of the wasm blob - this should match the hash computed when the runtime file is
Expand Down
18 changes: 0 additions & 18 deletions build.sh

This file was deleted.

32 changes: 32 additions & 0 deletions runtime-modules/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = 'substrate-common-module'
version = '1.0.0'
authors = ['Joystream contributors']
edition = '2018'

[features]
default = ['std']
std = [
'sr-primitives/std',
'srml-support/std',
'system/std',
]


[dependencies.sr-primitives]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'sr-primitives'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.srml-support]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'srml-support'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.system]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'srml-system'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
2 changes: 1 addition & 1 deletion src/currency.rs → runtime-modules/common/src/currency.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use runtime_primitives::traits::Convert;
use sr_primitives::traits::Convert;
use srml_support::traits::{Currency, LockableCurrency, ReservableCurrency};
use system;

Expand Down
4 changes: 4 additions & 0 deletions runtime-modules/common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Ensure we're `no_std` when compiling for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]

pub mod currency;
Loading

0 comments on commit 251840f

Please sign in to comment.