Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1ed68f2
Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
bkchr Jun 13, 2019
96b1fb6
Add build script and remove the wasm project
bkchr Jun 13, 2019
47dd047
Port `node-runtime` to new wasm-builder
bkchr Jun 14, 2019
468bbee
Make `substrate-executor` tests work with `wasm-builder`
bkchr Jun 14, 2019
3e6108f
Move `node-template` to `wasm-builder`
bkchr Jun 14, 2019
cdd2619
Remove `build.sh` :)
bkchr Jun 14, 2019
fb80a34
Remove the last include_bytes
bkchr Jun 14, 2019
8a61c2f
Adds the missing build.rs files
bkchr Jun 14, 2019
f4ceedc
Remove `build.sh` from CI
bkchr Jun 14, 2019
c9e4094
Debug CI
bkchr Jun 14, 2019
4269b6f
Make it work in CI
bkchr Jun 14, 2019
98c3dad
CI attempt 3
bkchr Jun 14, 2019
3140240
Make `substrate-runtime-test` compile on stable
bkchr Jun 14, 2019
ee690d4
Ahhh, some missed `include_bytes!`
bkchr Jun 14, 2019
cd62ba8
AHH
bkchr Jun 14, 2019
4daabf1
Add suggestions
bkchr Jun 17, 2019
1b334b2
Improve search for `Cargo.lock` and don't panic if it is not found
bkchr Jun 17, 2019
22273d8
Merge branch 'master' into bkchr-wasm-builder
bkchr Jun 17, 2019
30960db
Searching from manifest path was no good idea
bkchr Jun 17, 2019
b54231d
Make the `wasm-builder` source better configurable
bkchr Jun 17, 2019
d522b5c
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr Jun 26, 2019
320ce2d
Expose the bloaty wasm binary as well
bkchr Jun 26, 2019
3a8c627
Make sure to rerun WASM recompilation on changes in dependencies
bkchr Jun 26, 2019
5e17414
Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
bkchr Jun 26, 2019
54e07da
Remove `build.sh` from READMEs
bkchr Jun 26, 2019
416e5e5
Rename the projects
bkchr Jun 26, 2019
2ffc83a
Fixes CI
bkchr Jun 26, 2019
cef2a99
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr Jun 26, 2019
5dfd5d6
Update lock file
bkchr Jun 26, 2019
04aca22
Fixes merge-conflict
bkchr Jun 26, 2019
ed434f5
Apply suggestions from code review
bkchr Jun 26, 2019
420f5d9
Try to make windows happy
bkchr Jun 27, 2019
c6a4dbb
Replace all back slashes in paths with slashes
bkchr Jun 29, 2019
a2e471e
Apply suggestions from code review
bkchr Jun 29, 2019
434ee08
Use cargo from `CARGO` env variable
bkchr Jun 29, 2019
1dd2803
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr Jun 29, 2019
fd2da24
Fix compilation
bkchr Jun 30, 2019
f0c2746
Use `rustup` for running the nightly build
bkchr Jul 1, 2019
c150290
Make individual projects skipable
bkchr Jul 1, 2019
58db3fc
Fix compilation
bkchr Jul 1, 2019
3bb8192
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr Jul 2, 2019
8143a18
Fixes compilation
bkchr Jul 2, 2019
3cd7239
Build all WASM projects in one workspace
bkchr Jul 3, 2019
a83e575
Replace more back slashes!
bkchr Jul 3, 2019
6343b8e
Remove `inlcude_bytes!`
bkchr Jul 3, 2019
efb977b
Adds some documentation
bkchr Jul 3, 2019
e34b0fc
Apply suggestions from code review
bkchr Jul 4, 2019
36e6d97
Apply suggestions from code review
bkchr Jul 4, 2019
c5804bb
More review comments
bkchr Jul 4, 2019
4d22d0e
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr Jul 4, 2019
3007382
Update `Cargo.lock`
bkchr Jul 4, 2019
51660ab
Set license
bkchr Jul 4, 2019
c7674da
Apply suggestions from code review
bkchr Jul 4, 2019
c2f5580
Merge branch 'bkchr-wasm-builder' of github.com:paritytech/substrate …
bkchr Jul 4, 2019
ca8ff6f
More review comments + adds `TRIGGER_WASM_BUILD` env
bkchr Jul 4, 2019
b38fe79
Fix doc tests
bkchr Jul 4, 2019
b4c7b54
Increase version + update README
bkchr Jul 4, 2019
4427ebe
Switch crates.io version of `wasm-builder`
bkchr Jul 4, 2019
61b5c7a
Update README
bkchr Jul 4, 2019
890d420
Switch to released version of `wasm-builder-runner`
bkchr Jul 4, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
  • Loading branch information
bkchr committed Jun 26, 2019
commit d522b5c997fd436ecca1a1ed1074b8a005a326f4
42 changes: 42 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,48 @@ publish-s3-doc:
- aws s3 ls s3://${BUCKET}/${PREFIX}/
--human-readable --summarize


publish-gh-doc:
stage: publish
image: parity/tools:latest
allow_failure: true
dependencies:
- build-rust-doc-release
cache: {}
<<: *build-only
<<: *kubernetes-build
variables:
GIT_STRATEGY: none
GITHUB_API: "https://api.github.com"
script:
- test -r ./crate-docs/index.html || (
echo "./crate-docs/index.html not present, build:rust:doc:release job not complete";
exit 1
)
- test "${GITHUB_USER}" -a "${GITHUB_EMAIL}" -a "${GITHUB_TOKEN}" || (
echo "environment variables for github insufficient";
exit 1
)
- |
cat > ${HOME}/.gitconfig <<EOC
[user]
name = "${GITHUB_USER}"
email = "${GITHUB_EMAIL}"

[url "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/"]
insteadOf = "https://github.com/"
EOC
- unset GITHUB_TOKEN
- git clone https://github.com/substrate-developer-hub/rustdocs.git
- rsync -ax --delete ./crate-docs/ ./rustdocs/${CI_COMMIT_REF_NAME}/
- cd ./rustdocs; git add .
- git commit -m "update rustdoc ${CI_COMMIT_REF_NAME}"
- git push origin master 2>&1 | sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g"
after_script:
- rm -vrf ${HOME}/.gitconfig



.deploy-template: &deploy
stage: kubernetes
when: manual
Expand Down
386 changes: 194 additions & 192 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ members = [
"srml/assets",
"srml/aura",
"srml/balances",
"srml/contract",
"srml/contracts",
"srml/council",
"srml/democracy",
"srml/example",
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ substrate-trie
sr-api, sr-io, sr-primitives, sr-sandbox, sr-std, sr-version
* Substrate Runtime Module Library (SRML)
[source, shell]
srml-assets, srml-balances, srml-consensus, srml-contract, srml-council, srml-democracy, srml-example,
srml-assets, srml-balances, srml-consensus, srml-contracts, srml-council, srml-democracy, srml-example,
srml-executive, srml-metadata, srml-session, srml-staking, srml-support, srml-system, srml-timestamp,
srml-treasury
* Node
Expand Down
13 changes: 5 additions & 8 deletions core/cli/src/informant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,36 @@ pub fn start<C>(service: &Service<C>, exit: ::exit_future::Exit, handle: TaskExe
/// Creates an informant in the form of a `Future` that must be polled regularly.
pub fn build<C>(service: &Service<C>) -> impl Future<Item = (), Error = ()>
where C: Components {
let network = service.network();
let client = service.client();
let mut last_number = None;
let mut last_update = time::Instant::now();

let display_notifications = network.status().for_each(move |sync_status| {
let display_notifications = service.network_status().for_each(move |net_status| {

let info = client.info();
let best_number = info.chain.best_number.saturated_into::<u64>();
let best_hash = info.chain.best_hash;
let speed = move || speed(best_number, last_number, last_update);
last_update = time::Instant::now();
let (status, target) = match (sync_status.sync.state, sync_status.sync.best_seen_block) {
let (status, target) = match (net_status.sync_state, net_status.best_seen_block) {
(SyncState::Idle, _) => ("Idle".into(), "".into()),
(SyncState::Downloading, None) => (format!("Syncing{}", speed()), "".into()),
(SyncState::Downloading, Some(n)) => (format!("Syncing{}", speed()), format!(", target=#{}", n)),
};
last_number = Some(best_number);
let finalized_number: u64 = info.chain.finalized_number.saturated_into::<u64>();
let bandwidth_download = network.average_download_per_sec();
let bandwidth_upload = network.average_upload_per_sec();
info!(
target: "substrate",
"{}{} ({} peers), best: #{} ({}), finalized #{} ({}), ⬇ {} ⬆ {}",
Colour::White.bold().paint(&status),
target,
Colour::White.bold().paint(format!("{}", sync_status.num_peers)),
Colour::White.bold().paint(format!("{}", net_status.num_connected_peers)),
Colour::White.paint(format!("{}", best_number)),
best_hash,
Colour::White.paint(format!("{}", finalized_number)),
info.chain.finalized_hash,
TransferRateFormat(bandwidth_download),
TransferRateFormat(bandwidth_upload),
TransferRateFormat(net_status.average_download_per_sec),
TransferRateFormat(net_status.average_upload_per_sec),
);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion core/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trie = { package = "substrate-trie", path = "../trie", optional = true }
substrate-telemetry = { path = "../telemetry", optional = true }
hash-db = { version = "0.12.2", default-features = false }
kvdb = { git = "https://github.com/paritytech/parity-common", optional = true, rev="b0317f649ab2c665b7987b8475878fc4d2e1f81d" }
parity-codec = { version = "3.3", default-features = false, features = ["derive"] }
parity-codec = { version = "3.5.4", default-features = false, features = ["derive"] }
primitives = { package = "substrate-primitives", path = "../primitives", default-features = false }
runtime-primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
runtime-version = { package = "sr-version", path = "../sr-version", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion core/client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ primitives = { package = "substrate-primitives", path = "../../primitives" }
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
client = { package = "substrate-client", path = "../../client" }
state-machine = { package = "substrate-state-machine", path = "../../state-machine" }
parity-codec = { version = "3.3", features = ["derive"] }
parity-codec = { version = "3.5.4", features = ["derive"] }
executor = { package = "substrate-executor", path = "../../executor" }
state_db = { package = "substrate-state-db", path = "../../state-db" }
trie = { package = "substrate-trie", path = "../../trie" }
Expand Down
3 changes: 1 addition & 2 deletions core/client/db/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ pub fn block_id_to_lookup_key<Block>(

/// Maps database error to client error
pub fn db_err(err: io::Error) -> client::error::Error {
use std::error::Error;
client::error::Error::Backend(err.description().into())
client::error::Error::Backend(format!("{}", err))
}

/// Open RocksDB database.
Expand Down
2 changes: 2 additions & 0 deletions core/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where

/// Get pairs of (block, extrinsic) where key has been changed at given blocks range.
/// Works only for runtimes that are supporting changes tries.
///
/// Changes are returned in descending order (i.e. last block comes first).
pub fn key_changes(
&self,
first: NumberFor<Block>,
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/aura/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Aura consensus algorithm for substrate"
edition = "2018"

[dependencies]
parity-codec = "3.4"
parity-codec = "3.5.4"
primitives = { package = "substrate-primitives", path = "../../primitives" }
runtime_support = { package = "srml-support", path = "../../../srml/support" }
runtime_version = { package = "sr-version", path = "../../sr-version" }
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/aura/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Primitives for Aura consensus"
edition = "2018"

[dependencies]
parity-codec = { version = "3.5", default-features = false }
parity-codec = { version = "3.5.4", default-features = false }
substrate-client = { path = "../../../client", default-features = false }
substrate-primitives = { path = "../../../primitives", default-features = false }
rstd = { package = "sr-std", path = "../../../sr-std", default-features = false }
Expand Down
7 changes: 4 additions & 3 deletions core/consensus/aura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ use srml_aura::{
};
use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO};

use slots::{CheckedHeader, SlotData, SlotWorker, SlotInfo, SlotCompatible, slot_now, check_equivocation};
use slots::{CheckedHeader, SlotData, SlotWorker, SlotInfo, SlotCompatible};
use slots::{SignedDuration, check_equivocation};

pub use aura_primitives::*;
pub use consensus_common::SyncOracle;
Expand Down Expand Up @@ -283,8 +284,8 @@ impl<H, B, C, E, I, P, Error, SO> SlotWorker<B> for AuraWorker<C, E, I, P, SO> w
Box::new(proposal_work.map(move |b| {
// minor hack since we don't have access to the timestamp
// that is actually set by the proposer.
let slot_after_building = slot_now(slot_duration);
if slot_after_building != Some(slot_num) {
let slot_after_building = SignedDuration::default().slot_now(slot_duration);
if slot_after_building != slot_num {
info!(
"Discarding proposal for slot {}; block production took too long",
slot_num
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/babe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "BABE consensus algorithm for substrate"
edition = "2018"

[dependencies]
parity-codec = "3.4.0"
parity-codec = "3.5.4"
parity-codec-derive = "3.3.0"
babe_primitives = { package = "substrate-consensus-babe-primitives", path = "primitives" }
primitives = { package = "substrate-primitives", path = "../../primitives" }
Expand Down
2 changes: 1 addition & 1 deletion core/consensus/babe/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rstd = { package = "sr-std", path = "../../../sr-std", default-features = false
runtime_primitives = { package = "sr-primitives", path = "../../../sr-primitives", default-features = false }
substrate-primitives = { path = "../../../primitives", default-features = false }
slots = { package = "substrate-consensus-slots", path = "../../slots", optional = true }
parity-codec = { version = "3.5.1", default-features = false }
parity-codec = { version = "3.5.4", default-features = false }

[features]
default = ["std"]
Expand Down
9 changes: 9 additions & 0 deletions core/consensus/babe/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ pub struct BabeConfiguration {
///
/// Dynamic thresholds may be supported in the future.
pub threshold: u64,

/// The minimum number of blocks that must be received before running the
/// median algorithm to compute the offset between the on-chain time and the
/// local time. Currently, only the value provided by this type at genesis
/// will be used, but this is subject to change.
///
/// Blocks less than `self.median_required_blocks` must be generated by an
/// *initial validator* ― that is, a node that was a validator at genesis.
pub median_required_blocks: u64,
}

#[cfg(feature = "std")]
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.