Skip to content

Commit

Permalink
Merge pull request #8 from KILTprotocol/feature/bk_update_2019_02_13
Browse files Browse the repository at this point in the history
substrate update
  • Loading branch information
bekolb authored Feb 19, 2019
2 parents 012bcf3 + 0d0203e commit dfcba58
Show file tree
Hide file tree
Showing 20 changed files with 3,531 additions and 2,716 deletions.
3,738 changes: 2,182 additions & 1,556 deletions Cargo.lock

Large diffs are not rendered by default.

119 changes: 80 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,87 @@
[package]
name = "kilt-prototype-chain"
version = "0.9.0"
authors = ["Botlabs <admin@botlabs.org>"]
build = "build.rs"

[[bin]]
name = "node"
path = "src/main.rs"
name = 'node'
path = 'src/main.rs'

[dependencies]
error-chain = "0.12"
futures = "0.1"
ctrlc = { version = "3.0", features = ["termination"] }
log = "0.4"
tokio = "0.1.7"
exit-future = "0.1"
parking_lot = "0.4"
hex-literal = "0.1"
slog = "^2"
parity-codec = { version = "2.1" }
trie-root = { git = "https://github.com/paritytech/trie" }
sr-io = { git = "https://github.com/paritytech/substrate" }
sr-primitives = { git = "https://github.com/paritytech/substrate" }
substrate-cli = { git = "https://github.com/paritytech/substrate" }
substrate-primitives = { git = "https://github.com/paritytech/substrate" }
substrate-executor = { git = "https://github.com/paritytech/substrate" }
substrate-service = { git = "https://github.com/paritytech/substrate" }
substrate-transaction-pool = { git = "https://github.com/paritytech/substrate" }
substrate-network = { git = "https://github.com/paritytech/substrate" }
substrate-consensus-aura = { git = "https://github.com/paritytech/substrate" }
substrate-client = { git = "https://github.com/paritytech/substrate", default-features = false }
substrate-finality-grandpa = { git = "https://github.com/paritytech/substrate" }
template-node-runtime = { path = "runtime" }
structopt = "0.2.13"
error-chain = '0.12'
exit-future = '0.1'
futures = '0.1'
hex-literal = '0.1'
log = '0.4'
parity-codec = '3.0'
parking_lot = '0.7.1'
slog = '^2'
tokio = '0.1'
trie-root = '0.11.0'

[build-dependencies]
vergen = "2"
[dependencies.basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-basic-authorship'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.consensus]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-consensus-aura'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.ctrlc]
features = ['termination']
version = '3.0'

[dependencies.inherents]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-inherents'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.node-executor]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.node-template-runtime]
path = 'runtime'

[dependencies.primitives]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-primitives'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[workspace]
members = [ "runtime" ]
exclude = [ "runtime/wasm" ]
[dependencies.sr-io]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.substrate-cli]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.substrate-client]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.substrate-executor]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.substrate-network]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.substrate-service]
git = 'https://github.com/paritytech/substrate.git'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-transaction-pool'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[build-dependencies]
vergen = '3'
[profile.release]
# Substrate runtime requires unwinding.
panic = "unwind"
panic = 'unwind'

[package]
name = "kilt-prototype-chain"
version = "0.9.0"
edition = '2018'
authors = ["Botlabs <admin@botlabs.org>"]
build = "build.rs"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt -y update && \
apt install -y --no-install-recommends \
software-properties-common curl git file binutils binutils-dev snapcraft \
make cmake ca-certificates g++ zip dpkg-dev python rhash rpm openssl gettext\
build-essential pkg-config libssl-dev libudev-dev ruby-dev time
build-essential pkg-config libssl-dev libudev-dev ruby-dev time clang

# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
Expand Down
27 changes: 2 additions & 25 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Substrate.

// Substrate is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Substrate is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

extern crate vergen;

use vergen::{ConstantsFlags, Vergen};
use vergen::{ConstantsFlags, generate_cargo_keys};

const ERROR_MSG: &'static str = "Failed to generate metadata files";

fn main() {
let vergen = Vergen::new(ConstantsFlags::all()).expect(ERROR_MSG);

for (k, v) in vergen.build_info() {
println!("cargo:rustc-env={}={}", k.name(), v);
}

generate_cargo_keys(ConstantsFlags::all()).expect(ERROR_MSG);
println!("cargo:rerun-if-changed=.git/HEAD");
}
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
set -e

echo "obtain the project folder"
PROJECT_ROOT=`pwd`
#PROJECT_ROOT=`git rev-parse --show-toplevel`
PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

export CARGO_INCREMENTAL=0

Expand Down
186 changes: 141 additions & 45 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,146 @@
[dependencies.aura]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'srml-aura'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

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

[dependencies.client]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-client'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

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

[dependencies.consensus-aura]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-consensus-aura-primitives'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

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

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

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

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

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

[dependencies.rstd]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'sr-std'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

[dependencies.runtime-io]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'sr-io'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

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

[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.sudo]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'srml-sudo'
rev = '6288a4774a5ca57832896f6c501ba04aa6ef398c'

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

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

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

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

[package]
name = "template-node-runtime"
version = "0.9.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
rustc-hex = "1.0"
hex-literal = "0.1.0"
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", optional = true }
safe-mix = { version = "1.0", default-features = false }
parity-codec = "2.0"
parity-codec-derive = "2.0"
sr-std = { git = "https://github.com/paritytech/substrate" }
sr-io = { git = "https://github.com/paritytech/substrate" }
srml-support = { git = "https://github.com/paritytech/substrate" }
substrate-primitives = { git = "https://github.com/paritytech/substrate" }
substrate-keyring = { git = "https://github.com/paritytech/substrate" }
srml-balances = { git = "https://github.com/paritytech/substrate" }
srml-consensus = { git = "https://github.com/paritytech/substrate" }
srml-executive = { git = "https://github.com/paritytech/substrate" }
sr-primitives = { git = "https://github.com/paritytech/substrate" }
srml-system = { git = "https://github.com/paritytech/substrate" }
srml-timestamp = { git = "https://github.com/paritytech/substrate" }
srml-upgrade-key = { git = "https://github.com/paritytech/substrate" }
substrate-client = { git = "https://github.com/paritytech/substrate", optional = true }
sr-version = { git = "https://github.com/paritytech/substrate" }
authors = ['Parity Technologies <admin@parity.io>']
edition = '2018'
name = 'node-template-runtime'
version = '0.9.0'

[features]
default = ["std"]
default = ['std']
std = [
"parity-codec/std",
"substrate-primitives/std",
"substrate-client/std",
"sr-std/std",
"sr-io/std",
"srml-support/std",
"srml-balances/std",
"srml-consensus/std",
"srml-executive/std",
"sr-primitives/std",
"srml-system/std",
"srml-timestamp/std",
"srml-upgrade-key/std",
"sr-version/std",
"serde_derive",
"serde/std",
"safe-mix/std",
"substrate-client"
'parity-codec/std',
'parity-codec-derive/std',
'primitives/std',
'client/std',
'rstd/std',
'runtime-io/std',
'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',
]
6 changes: 3 additions & 3 deletions runtime/src/attestation.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rstd::prelude::*;
use runtime_primitives::codec::Codec;
use sr_primitives::verify_encoded_lazy;
use srml_support::{dispatch::Result, StorageMap};
use traits::{Member, Verify};
use runtime_primitives::verify_encoded_lazy;
use runtime_primitives::traits::{Member, Verify};
use support::{dispatch::Result, StorageMap, decl_module, decl_storage};
use {balances, system::ensure_signed};

pub trait Trait: balances::Trait {
Expand Down
Loading

0 comments on commit dfcba58

Please sign in to comment.