Bladeren bron

Merge branch 'development' into feature/proposals-test-coverage

Gleb Urvanov 4 jaren geleden
bovenliggende
commit
2d44c1d748

+ 29 - 23
.travis.yml

@@ -12,6 +12,9 @@ matrix:
       services: docker
     - os: osx
       env: TARGET=x86_64-apple-darwin
+    - os: linux
+      env: TARGET=wasm-blob
+      services: docker
 
 before_install:
   - rustup component add rustfmt
@@ -39,52 +42,55 @@ script:
           joystream/rust-raspberry \
         build --release
       sudo chmod a+r ${TRAVIS_BUILD_DIR}/target/${TARGET}/release/joystream-node
+    elif [ "$TARGET" = "wasm-blob" ]
+    then
+      docker build --tag joystream/node \
+        --file ./devops/dockerfiles/node-and-runtime/Dockerfile \
+        .
+      docker create --name temp-container-joystream-node joystream/node
+      docker cp temp-container-joystream-node:/joystream/runtime.compact.wasm joystream_runtime.wasm
+      docker rm temp-container-joystream-node
     else
       cargo build --release --target=${TARGET}
     fi
 
 before_deploy:
-  - cp ./target/${TARGET}/release/joystream-node .
   - |
-    if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]
+    if [ "$TARGET" = "wasm-blob" ]
     then
-      export FILENAME="joystream-node-armv7-linux-gnueabihf"
+      export ASSET="joystream_runtime.wasm"
     else
-      export FILENAME=`./joystream-node --version | sed -e "s/ /-/g"`
+      cp ./target/${TARGET}/release/joystream-node .
+      if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]
+      then
+        export FILENAME="joystream-node-armv7-linux-gnueabihf"
+      else
+        export FILENAME=`./joystream-node --version | sed -e "s/ /-/g"`
+      fi
+      tar -cf ${FILENAME}.tar ./joystream-node
+      gzip ${FILENAME}.tar
+      export ASSET=${FILENAME}.tar.gz
     fi
-  - tar -cf ${FILENAME}.tar ./joystream-node
-  - gzip ${FILENAME}.tar
 
 deploy:
   - provider: releases
     api_key:
-      secure: QTna4XzKmPrXNA5KnYfLsH8cAKxESLdFbQ5HJ6nvB9reE10SVtg8lZ+ShL+no7TACNBUNt09Qv9HNgs6JcNRJ9QMHEJHKIbMyjplh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CGhyH85QCcrc0q6JAB3oqH8Wfm/K2HVzBobmKaSFu5DpwInNnUXnLWGVzhSt3oCq6ld773izReGdLJtLC2vaJ9rZVaVw29s9M662EEuAGgaVLO/sinZJFeIIaCF4i4zUXwXSLIdfKXGOR0ZibkyT2FS6qPGvl/lLN5IREzD7v/rV8htGMLmw4jpPLNskvRjCHX42ewRRYdMvZzQQOAvSlWcsw=
+    file: ${ASSET}
     on:
       tags: true
-      repo: Joystream/substrate-node-joystream
+      repo: Joystream/joystream
     draft: true
     overwrite: true
     skip_cleanup: true
   - provider: releases
     api_key:
-      secure: QTna4XzKmPrXNA5KnYfLsH8cAKxESLdFbQ5HJ6nvB9reE10SVtg8lZ+ShL+no7TACNBUNt09Qv9HNgs6JcNRJ9QMHEJHKIbMyjplhBtZ+W3l0k+6TL0yeKHZ/OvddDF+vDbpN+y4xBfOf0xqZcNH3lZJTms/NPBn/KT5DpQ3JZ8bibdMP2HSCazfvHLwj38OuLX6VWbFcmN2RAmUR9AXYvk5wWYVw8g1VDzTCxjH1G+dGWH1L9+ZDgFfv7BNSNhPc6V9GghgLVZ+37r/STzTTAQ/gPv+yruglEWUhSAngFfVYUegvTmIeQLi/V+g0tKUS+l7eNX08xz6eZcn0+/32V7P+oEN/dhU84E0kgmiOsiUEGI/KFM+qw9TyX3GtD67UmG5TZrD7OUMIu1qCuPSetsTOK2kvpwlYAn+j5iFB30Uz4hXhOH5dib2zz2I7cYHi1kvzeNQqQOPNDCmaO48bcbRIaeqMAHdsb6scGzh/+CD2V2HOmHlhd+4o1PpX6hAMwmOXAu3bMDi4zlB9Hb1cSZnsYNBHawkD6y45QGepFKpGW/6u5VRPeMK62Gm9wu815C36B4mVg6CVqtZMbk0WYPIk6zfoTft3i04YthKbRO96a5VD9LssVbiSYnudXuZJjSllSZVCi9AKS8JVIS2jC2z+tWkquAesSrwztriRcs=
-    file: ${FILENAME}.tar.gz
+      secure: FfxZGQexxAGT0Skbctl1FuqmEvNHejPDPtNG8Du1ACSGjS7Y+M6o/aPqE6HL158AmddOgndsIPR+HM7VfMDAUMkLTbOhv3nMpDBZu1h25vwk+jHOM65tm5LWUu/ROWBpaAQiG7NKrvtfkNfbNBSETsEbWBt/DPrhlIfSbgsXBFDiid7uRrCiwvDUJ097/EUOJ9OVUrk+O4ebSzfIfKPGPtRU2rQQ0eNX7yX3TCm3jbQm/kplkQNRL9mnAJNxtKuvuko4LqZ6jN4XLoLTHUMjO7E0r6wXVB4GVjA4HA214eLlQD6BhgTbWMDxKgWyuKzPG+2GLKyluSSn0RurSl8tYryXKxKxuN3H1FX9r23a8AzGtpRACJtIePC2YmPuQRSnz2Bw8jlSP2WPLJtXGD036J/wVMj6W9TROm7IBigiC7QlqAqCYNByOnoKyhRCgYyAJZb0Jpa3qWaFhA6b6gCGhyH85QCcrc0q6JAB3oqH8Wfm/K2HVzBobmKaSFu5DpwInNnUXnLWGVzhSt3oCq6ld773izReGdLJtLC2vaJ9rZVaVw29s9M662EEuAGgaVLO/sinZJFeIIaCF4i4zUXwXSLIdfKXGOR0ZibkyT2FS6qPGvl/lLN5IREzD7v/rV8htGMLmw4jpPLNskvRjCHX42ewRRYdMvZzQQOAvSlWcsw=
+    file: ${ASSET}
     on:
       branch: development
-      repo: Joystream/substrate-node-joystream
+      repo: Joystream/joystream
     draft: true
     prerelease: true
     overwrite: true
     skip_cleanup: true
-  - provider: releases
-    api_key:
-      secure: ZoEXp8g+yZOEG8JZ1Fg6tWnW3aYDfupFbZflEejYaAdXhj1nw7G9N10ZX5VDdb/O1iFx8BhfFymQxk0ynxNC8c52LzOjKIhXEporxgvEPdnoPS/N1JhfsOUV0ragwZDLv2tFVi2AT0K4w8WJFJDzrK4qHOMMQgVbVQZtFmDL1whHdfBD5FyFyKmMdZdWBtTGy4s7X0LnmxjNB4/3AMa540T3LowZ5H66MYZkQmAbtg8ib93WomVanhS23vbjNaH9x1Kmzxd2B3pCSgI8uaxBrpmzINvAeSusYVJQt0EF/cAPXmq0+JmGoocvcS1ecg/SNZoKUNmeElB4ns/obg/QAyE+fyQtyl+iDYBilhFLm5xRMUnqkpyeUUD3u824i/Z+/tfLvtm5Egg1QAiXtIIJMeAj1nN8OIeSlHR4phnSTA3jl2PZw9QYidtV9WCqHC0qxtpkYSKkC8ItaefScPB1AuvOvVx8xvnIxfR/tXvL8Y3Y2BvhiLgpky9JkbdMln1b0m0E5c4vyGCEVqHqpbxM63VJkpct8sVx0atGvipWEelVjz5XpkxW2PYbgg4EKUzl3FiYcXwf5Y/ykxaZNZt7I4gv9nz2KkVwUCCPqdwWF7ww1shFWW5tCoCmJuUESOdPFx0jQ7LVWz7SDLDsqvvaW2c2OPxG6DIx9BiTeAE4qIQ=
-    file: "${FILENAME}.tar.gz"
-    skip_cleanup: true
-    draft: true
-    prerelease: true
-    overwrite: true
-    on:
-      repo: mnaamani/substrate-node-joystream
-      branch: deploy

+ 2 - 2
Cargo.lock

@@ -1569,7 +1569,7 @@ dependencies = [
 
 [[package]]
 name = "joystream-node"
-version = "2.1.6"
+version = "2.2.0"
 dependencies = [
  "ctrlc",
  "derive_more 0.14.1",
@@ -1614,7 +1614,7 @@ dependencies = [
 
 [[package]]
 name = "joystream-node-runtime"
-version = "6.12.2"
+version = "6.13.0"
 dependencies = [
  "parity-scale-codec",
  "safe-mix",

+ 13 - 7
README.md

@@ -1,12 +1,18 @@
-# Joystream
+# Joystream [![Build Status](https://travis-ci.org/Joystream/joystream.svg?branch=master)](https://travis-ci.org/Joystream/joystream)
 
 This is the main code reposity for all joystream software. It will  house the substrate chain project, the full node and runtime and all reusable substrate runtime modules that make up the joystream runtime. In addition to all front-end apps and infrastructure servers necessary for operating the network.
 
 The repository is currently just a cargo workspace, but eventually will also contain yarn workspaces, and possibly other project type workspaces.
 
+## Build Status
+
+Development [![Development Branch Build Status](https://travis-ci.org/Joystream/joystream.svg?branch=development)](https://travis-ci.org/Joystream/joystream)
+
+More detailed build history on [Travis CI](https://travis-ci.org/github/Joystream/joystream/builds)
+
 ## Overview
 
-The joystream network builds on a pre-release version of [substrate v2.0](https://substrate.dev/) and adds additional
+The Joystream network 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.
 
 
@@ -20,7 +26,7 @@ To setup a full node and validator review the [advanced guide from the helpdesk]
 
 ###  Pre-built Binaries
 
-The latest pre-built binaries can be downloads from the [releases](https://github.com/Joystream/substrate-runtime-joystream/releases) page.
+The latest pre-built binaries can be downloaded from the [releases](https://github.com/Joystream/joystream/releases) page.
 
 
 ### Building from source
@@ -28,9 +34,9 @@ The latest pre-built binaries can be downloads from the [releases](https://githu
 Clone the repository and install build tools:
 
 ```bash
-git clone https://github.com/Joystream/substrate-runtime-joystream.git
+git clone https://github.com/Joystream/joystream.git
 
-cd substrate-runtime-joystream/
+cd joystream/
 
 ./setup.sh
 ```
@@ -49,7 +55,7 @@ Run the node and connect to the public testnet.
 cargo run --release -- --chain ./rome-tesnet.json
 ```
 
-The `rome-testnet.json` chain file can be ontained from the [release page](https://github.com/Joystream/substrate-runtime-joystream/releases/tag/v6.8.0)
+The `rome-testnet.json` chain file can be obtained from the [releases page](https://github.com/Joystream/joystream/releases/tag/v6.8.0)
 
 
 ### Installing a release build
@@ -122,7 +128,7 @@ Deploying the compiled runtime on a live system can be done in one of two ways:
 ### 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](https://github.com/Joystream/substrate-runtime-joystream/issues/1)
+For detailed information about how to set correct version numbers when developing a new runtime, [see this](https://github.com/Joystream/joystream/issues/1)
 
 
 ## Coding style

+ 7 - 0
devops/dockerfiles/node-and-runtime/Dockerfile

@@ -14,6 +14,13 @@ COPY --from=builder /joystream/target/release/wbuild/joystream-node-runtime/joys
 # confirm it works
 RUN /joystream/node --version
 
+# https://manpages.debian.org/stretch/coreutils/b2sum.1.en.html
+# RUN apt-get install coreutils
+# print the blake2 256 hash of the wasm blob
+RUN b2sum -l 256 /joystream/runtime.compact.wasm
+# print the blake2 512 hash of the wasm blob
+RUN b2sum -l 512 /joystream/runtime.compact.wasm
+
 EXPOSE 30333 9933 9944
 
 # Use these volumes to persits chain state and keystore, eg.:

+ 1 - 1
devops/dockerfiles/rust-builder/Dockerfile

@@ -1,4 +1,4 @@
-FROM liuchong/rustup:1.42.0 AS builder
+FROM liuchong/rustup:1.43.0 AS builder
 LABEL description="Rust and WASM build environment for joystream and substrate"
 
 WORKDIR /setup

+ 1 - 1
node/Cargo.toml

@@ -3,7 +3,7 @@ authors = ['Joystream']
 build = 'build.rs'
 edition = '2018'
 name = 'joystream-node'
-version = '2.1.6'
+version = '2.2.0'
 default-run = "joystream-node"
 
 [[bin]]

+ 3 - 4
runtime/CHANGELOG.md

@@ -1,5 +1,6 @@
-### Version 6.9.1
-...
+### Version 6.13.0 - (Constantinople) runtime upgrade - May 20th 2020
+- New proposal system that strengthens the governance structure of the platform
+- Adjusted inflation curve to better reflect a new realistic economic system for the platform
 
 ### Version 6.8.0 (Rome release) - March 9th 2020
 - New versioned and permissioned content mangement system that powers a new media experience.
@@ -35,5 +36,3 @@
   - Council Runtime upgrade proposal
   - Simple PoS validator staking
   - Memo (account status message)
-
-Used in genesis block for first testnet (Sparta)

+ 1 - 1
runtime/Cargo.toml

@@ -5,7 +5,7 @@ edition = '2018'
 name = 'joystream-node-runtime'
 # Follow convention: https://github.com/Joystream/substrate-runtime-joystream/issues/1
 # {Authoring}.{Spec}.{Impl} of the RuntimeVersion
-version = '6.12.2'
+version = '6.13.0'
 
 [features]
 default = ['std']

+ 6 - 6
runtime/src/lib.rs

@@ -142,8 +142,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
     spec_name: create_runtime_str!("joystream-node"),
     impl_name: create_runtime_str!("joystream-node"),
     authoring_version: 6,
-    spec_version: 12,
-    impl_version: 1,
+    spec_version: 13,
+    impl_version: 0,
     apis: RUNTIME_API_VERSIONS,
 };
 
@@ -358,17 +358,17 @@ impl session::historical::Trait for Runtime {
 srml_staking_reward_curve::build! {
     const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
         min_inflation: 0_025_000,
-        max_inflation: 0_100_000,
-        ideal_stake: 0_500_000,
+        max_inflation: 0_300_000,
+        ideal_stake: 0_300_000,
         falloff: 0_050_000,
-        max_piece_count: 40,
+        max_piece_count: 100,
         test_precision: 0_005_000,
     );
 }
 
 parameter_types! {
     pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6;
-    pub const BondingDuration: staking::EraIndex = 24 * 28;
+    pub const BondingDuration: staking::EraIndex = 24;
     pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
 }
 

+ 4 - 0
scripts/compute-runtime-blob-hash.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+# The script computes the b2sum of the wasm blob in a pre-built joystream/node image
+# Assumes b2sum is already instally on the host machine.
+
 # Create a non running container from joystream/node
 docker create --name temp-container-joystream-node joystream/node
 
@@ -13,4 +16,5 @@ docker rm temp-container-joystream-node
 # ubuntu 17.0+ with: apt-get install coreutils; b2sum -l 256 joystream_runtime.wasm
 # TODO: add install of b2sum to setup.sh
 b2sum -l 256 joystream_runtime.wasm
+b2sum -l 512 joystream_runtime.wasm
 rm joystream_runtime.wasm