Commit Graph

203 Commits

Author SHA1 Message Date
Yuanchao Sun 9515d34aee Also replace paths in [build-dependencies] (#4039)
* Also replace paths in [build-dependencies]

* Update scripts/node-template-release/src/main.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Slightly reduce memory usage

* Update scripts/node-template-release/src/main.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2019-11-07 11:48:30 +01:00
Ashley 934d7aac1c Remove sr-arithmetic/fuzzer from workspace to fix windows builds (#3872)
* Remove sr-arithmetic/fuzzer from workspace to fix windows builds

* Remove sr-arithmetic/fuzzer from check_runtime.sh
2019-10-22 13:24:58 +02:00
Andrew Dirksen 470b62366f Change manual dependency on wasm-gc executable to an automatic cargo dependency. (#3854)
Improves user experience.
2019-10-19 10:38:19 +02:00
André Silva 6e5fe1a557 deps: update clap and structopt (#3809) 2019-10-12 18:31:49 +01:00
Bastian Köcher 875fa73728 Fix build-only-wasm script (#3536) 2019-09-03 14:13:32 +01:00
Bastian Köcher 4ff97bd856 Make it easier to just rebuild the WASM files (#3510)
* Adds `WASM_TARGET_DIRECTORY` env variable to `wasm-builder`

* Create the `wasm-builder-runner`'s in a common workspace

* Make `wasm-builder` trigger less rebuilds

* Version up

* Adds script for building only the WASM files

* Apply suggestions from code review

Co-Authored-By: André Silva <andre.beat@gmail.com>
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
2019-08-29 09:06:51 +02:00
Bastian Köcher d81df14391 Make node-template-release create a workspace (#3484) 2019-08-27 07:43:10 +02:00
ddorgan 6815ce59fe Fix artifact location required for flaming fir deployments (#3268) 2019-07-31 17:49:04 +01:00
TriplEight d98f3c6023 WIP: Subkey docker image (#3183)
* WIP to release subkey im docker

* debug run with publishing

* debug build

* debug build 2

* easier sync

* fix the template

* fix typo
2019-07-26 08:40:53 +08:00
Max Inden ab761f7a09 scripts/sentry-node: Ensure release mode and reserved connection for A (#3077)
Ensure all nodes in the sentry setup run in release mode. In addition
configure sentry-a as a reserved node for validator-a.
2019-07-10 10:15:23 +01:00
Max Inden 6639ab339a Introduce flag to enable sentry nodes to participate in grandpa gossip (#3018)
Given the following situation: A validator 'A' is not supposed to be
connected to the public internet to protect it from e.g. a DoS attack.
Instead it connects to a sentry node 'sentry-A' which connects to the
public internet. Validator 'B' can reach validator 'A' via sentry node
'sentry-A' and vice versa.

A sentry node needs to participate in the grandpa gossip without
becoming a validator itself in order to forward these message to its
validator. This commit adds a new command line flag (`--grandpa-voter`)
forcing a node to participate in the grandpa voting process even though
no `--key` was specified. Due to the fact that it does not have a key,
it does not become a validator in the network.

In order to simulate the above situation this commit also adds a Docker
Compose file (`scripts/sentry-node/docker-compose.yml`) with further
documentation.
2019-07-09 18:35:37 +02:00
Bastian Köcher ae80c05232 Fix node-template-release and make cargo doc faster (#3019) 2019-07-04 16:26:03 +02:00
Bastian Köcher fe08221479 Build WASM binaries as part of cargo build (#2868)
* Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`

Make use of `wasm-builder` in `test-runtime`.

* Add build script and remove the wasm project

* Port `node-runtime` to new wasm-builder

* Make `substrate-executor` tests work with `wasm-builder`

* Move `node-template` to `wasm-builder`

* Remove `build.sh` :)

* Remove the last include_bytes

* Adds the missing build.rs files

* Remove `build.sh` from CI

* Debug CI

* Make it work in CI

* CI attempt 3

* Make `substrate-runtime-test` compile on stable

* Ahhh, some missed `include_bytes!`

* AHH

* Add suggestions

* Improve search for `Cargo.lock` and don't panic if it is not found

* Searching from manifest path was no good idea

* Make the `wasm-builder` source better configurable

* Expose the bloaty wasm binary as well

* Make sure to rerun WASM recompilation on changes in dependencies

* Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
changes to env variables

* Remove `build.sh` from READMEs

* Rename the projects

* Fixes CI

* Update lock file

* Fixes merge-conflict

* Apply suggestions from code review

Co-Authored-By: TriplEight <denis.pisarev@parity.io>

* Try to make windows happy

* Replace all back slashes in paths with slashes

* Apply suggestions from code review

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Use cargo from `CARGO` env variable

* Fix compilation

* Use `rustup` for running the nightly build

* Make individual projects skipable

* Fix compilation

* Fixes compilation

* Build all WASM projects in one workspace

* Replace more back slashes!

* Remove `inlcude_bytes!`

* Adds some documentation

* Apply suggestions from code review

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* More review comments

* Update `Cargo.lock`

* Set license

* Apply suggestions from code review

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* More review comments + adds `TRIGGER_WASM_BUILD` env

* Fix doc tests

* Increase version + update README

* Switch crates.io version of `wasm-builder`

* Update README

* Switch to released version of `wasm-builder-runner`
2019-07-04 11:34:06 +02:00
David Craven b2622b611e Don't label PR's with gotissues. (#2993) 2019-07-02 12:42:58 +02:00
Lio李欧 66ae3a57ff Passthru build.sh/script.sh command line arguments (#2837) 2019-06-11 16:00:27 +02:00
DemiMarie-parity 418d4a0ce0 Add digest subtypes and update dependencies (#2734)
* Add different digest types for different parts of the code

* Add script to update dependencies

* Remove an old changelog

* `Inherent` → `PreRuntime`
2019-06-06 22:16:59 +02:00
Pierre Krieger f210557211 Require --locked when building runtime (#2813)
* Require --locked when building runtime

* Update locks

* Do it in a different way

* Accidentally reverted Cargo.lock

* pass on arguments in build.sh scripts
2019-06-06 15:53:22 +02:00
DemiMarie-parity c7d1204ce5 Introduce inherent digests (#2466)
* Introduce inherent digests

* Implement inherent digests

* fix silly error

* Implementation of inherent digests in BABE

All tests pass. There are still limitations:

1. The runtime strips out inherent digests, so BABE must re-add them.
2. The test runtime checks that it can re-compute all digests.  It
   can’t, so I had to comment out that test.

* Fix compilation and seal import

Seals were not imported correctly: the pre-digest was imported twice,
instead of both it and the seal being imported.  Also, other parts of
the code did not compile due to incomplete refactoring.

* Remove bogus assertion

* Fix testsuite compilation

* Remove unused import

* Fix compiler diagnostics

* Add inherent digest parameters to block constructors

This enforces that inherent digests are added first.

* Fixup Cargo.lock

* Fix build errors

* Re-add an incorrectly removed import

* Bump primitive-types version

* Update Cargo.lock

* Refactoring

* Use inherent digests for AuRa

They do reach the runtime, but get stripped.  I have not figured out
where.

* Fix compilation errors

* Fix compilation errors due to incorrect types

* Fix whitespace

Suggested-by: Tomasz Drwiega <tomasz@parity.io>

* Add preamble

Suggested-by: Tomasz Drwiega <tomasz@parity.io>

* Fix silly compile error

* Refactor pre-digest finding code into a separate function

* Remove unwanted assertion

It is too likely to bring down the entire blockchain.

Suggested-by: Tomasz Drwiega <tomasz@parity.io>

* Use `find_pre_digest` after runtime, too

Also, use `Member` trait rather than rolling our own requirements.

Suggested-by: Tomasz Drwiega <tomasz@parity.io>

* Fix various warnings

mostly due to upgrading the dependency on `error_chain`.

* Pre-digests nearly complete

This nearly completes the implementation of pre-runtime digests.

* `Seal2` → `Seal` and fix test suite

* Try to fix the storage error

* Try to fix storage (again)

* Fix tests

* Hopefully finish pre-runtime digests

The key is to pass *only* the pre-runtime digests to the runtime.  The
others must be stripped out by `initialize_block`.

* Fix silly typo

* Fix another silly mistake

* Remove unnecessary filtering of BABE pre-digests

We no longer get duplicate BABE pre-digests, so if they appear, the
header should be rejected outright.

* Update Cargo.lock files

* Reformatting

* Fix silly typo in inherent digest code

Also, revert `error.rs` files that contained calls to the `error_chain!`
macro.

* Try to keep the runtime from stripping pre-digests

Currently runs into the “Storage root must match that calculated”
assertion.

* Don’t compute storage root until storage changes are done.

Also, fix a compilation error.

* Fix compile-time error

* Fix compilation errors

* Fix more compile errors

* Hopefully it compiles this time…

* Fix compilation and add docs

* Prevent BABE from adding duplicate pre-runtime digests

Found by comparing with the AuRa code.  I also did some refactoring.

* Respond to review and fix some warnings

* Delete some dead code introduced earlier

* More dead code goes away

* `ref mut` → `&mut`

* Respond to review and fix some warnings

* Fix compilation error

* Remove unneeded `HashT` type parameter

Suggested-by: Robert Habermeier <robert@parity.io>

* Remove spurious #[allow(deprecated)]

* Document inherent digest parameter to `build_block`

* Delete `Simple` trait

It wasn’t needed

* delete wrongly added files

* Fix trait bounds

* Digest serialization tests

I also did some reformatting and cleanup.

* Apply suggestions from code review

Reformatting

Co-Authored-By: André Silva <andre.beat@gmail.com>

* Swap two arguments to `propose` and `propose_with`

Also, remove some needless unsafe code.

* Remove bogus `#![allow(deprecated)]` annotations

With the removal of the deprecated `Seal` variant, these are not needed.

* Add a missing `#[allow(deprecated)]` in the AuRa tests

* Fix silly compile error

* Fix silly compiler error

RLS did not tell me that I hadn’t fixed `babe/lib.rs`, so I missed it.

* Fixes made automatically by Cargo
2019-05-29 14:13:38 +02:00
TriplEight 672b72f44a some prettiness, fix dockerfile's metadata (#2682) 2019-05-27 14:06:38 +02:00
Tomasz Drwięga c162fc5ff1 Expunge error-chain (feat. tomaka) (#2662)
* Remove error_chain

* Expunge error-chain from rpc and service.

* Expunge from transaction pool.

* Expunge from node/cli

* Expunge from keystore.

* Remove some boilerplate.

* Fix remaining stuff.

* Improve on deprecation message.

* Fix issues.

* Fix trnsaction pool tests.

* Fix the rest.

* Fix borked merge.

* Update lock
2019-05-24 10:35:31 +01:00
ddorgan a827869dfb Flaming fir deployment scripts (#2599)
* Initial commit of flaming fir deployment scripts

* Debug

* Fix formatting

* Correct wget syntax

* Use 8 char commit id

* 9 chars

* Use the longer CI_BUILD_REF ref to slice from

* Fix backtick error with flaming fir deploy script

* Use the correct commit id length

* Split out validator deploments

* Fix syntax, missing :

* Pass hostname as TARGET_HOST per validator

* Correct syntax

* Uncomment wget

* Switch deploy -> kubernetes

* Use full group name

* Check awx log

* Fix if syntax and ignore failed

* Use correct JOB_ID and fix if syntax

* Use correct variable

* Print ansible awx log and status

* Make awx status clearer

* make variable names consistent

* Do 15 second checkups on the job

* Remove extra echo

* Use artifacts/VERSION instead of gitlab variables

* Use all of the VERSION info
2019-05-18 21:50:38 +01:00
TriplEight 9ad96e50ac Dockerfile optimization (#2598)
* metadata for docker image

* metadata for docker image
2019-05-16 14:36:27 +02:00
gabriel klawitter 7fb3dc5f68 check line-width of only newly added lines (#2522)
* strictly require <= 120 characters
2019-05-13 17:51:09 +02:00
André Silva 9d23d2a25a Bump master to v2.0.0 (#2514)
* bump crates to v2.0.0

* fix crate authors

* bump node runtime spec_version

* remove unused import for no-std
2019-05-10 16:55:15 +02:00
DemiMarie-parity fb19684358 BABE signing and verification (#2270)
* Add basic BABE consensus type

* Update core/consensus/babe/slots/Cargo.toml

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Fix parameterization and run `rustfmt`

* Respond to review comments

* Update various Cargo.lock files

* Revert "Update various Cargo.lock files"

This reverts commit af53d7624752a744320e9cbb25749fdd8e6f46d2.

* `BabeSealSignature` → `BabeSeal`

* Move slot code to its own crate

This was highly non-trivial, due to cyclic dependencies.

* Remove redundancy between AuRa and BABE

Some of the code duplication was removed using a macro.

* Fix build error

* Avoid non-`#[doc(hidden)]` re-exports

Also, bump some library versions in `Cargo.toml`.

* Remove dead code in AuRa

* Remove impl_slot macro

It was more trouble than it was worth.

Also, delete useless dependencies on Serde.

* AuRa and BABE need different DB keys

* Bring back `aura::Network`, but deprecate it.

* Improve docs and add `slot_duration` inherent method

* Add docs to `substrate_consensus_aura::SlotDuration`

* Add missing documentation and #![forbid(missing_docs, unsafe_code)]

* Add a #![forbid(missing_docs)]

* Remove dependency of `test-runtime` on `slots`

* Update core/consensus/babe/src/lib.rs

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Remove wrongly added file

* Fix copyright notice

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Bump `impl_version` and `spec_version`

* Add more code to BABE

Most of it is copied from AuRa code, but at least the initial core is
there.

* Stuck on horrible compiler error message

* add missing files

* Spaces → tabs

* Simplify code

* Fix compilation

This involved fixing dependencies and adding a `Mutex`.

* More work on BABE

* Fix deprecation version

* Fix deprecation version; remove spurious carets

* Fix Cargo.toml

* Implement VRF signing logic

* The import queue code compiles, though it probably doesn’t work.

* Add VRF verification

* Update Cargo.lock

* Update dependencies

* Move test network to sr25519 authority keys

* Fix accidental build bustage

* Trying to get the tests to work

* Add logging messages and remove dead code

There seems to be a problem with the test network.  Since AuRa and BABE
are both affected, this is most likely due to the switch from ed25519 to
sr25519.

* Trying to get the tests to work

* Add logging messages and remove dead code

There seems to be a problem with the test network.  Since AuRa and BABE
are both affected, this is most likely due to the switch from ed25519 to
sr25519.

* Working testsuite at last!

The problem was with serialization and deserialization.  Normally,
those functions are generated automatically, but those for `BabeSeal`
had to be written manually.  The hand-written versions were not
correct, however, as shown by the decoder not being able to decode the
output of the encoder.

* Enable BabeSeal::Encode asserts in --release tests

* Bump runtime and dependency versions

* Fix wasm compilation

The wasm build was broken because of a typo in
`core/test-runtime/src/lib.rs`, and missing gates on the `std` feature
in `core/consensus/{aura,babe}/primitives/Cargo.toml`.  Additionally,
improve the quotation in the build scripts.

* Merge Cargo.lock

* Change expected JSON string

The test was also broken on `master`, so I suspect that the test was
incorrect.

* Responded to review

* Remove hard-coded threshold from production code

A hard-coded threshold is now only used in tests.

* Fix swapped doc comments

* Fix unused import warnings

* fix ci error

* fix typo

* Fix spacing in docs

* Minor changes suggested by @joepetrowski

on https://github.com/paritytech/substrate/pull/2372

* Remove unnecessary getters

* fix compile error

* Fix silly unused-variable error

* Improve documentation formatting

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Add issue links

* Revert excess verbosity and #![forbid(warnings)]

* Apply suggestions from code review

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Reformat some comments

* Threshold should depend on number of validators

Also, respond to code review

* Fix silly compilation errors

* Reduce logging verbosity

* Fix missing import
2019-05-02 11:16:54 -04:00
Bastian Köcher c1deb66962 Fixes node-template-release (#2375) 2019-04-25 12:03:30 +01:00
gabriel klawitter e919304c3e ci: fix dockerfile for debian build (#2194) 2019-04-03 14:38:16 +02:00
gabriel klawitter 728f0393c7 ci: remove ci for automated wasm rebuilds (#2168) 2019-04-02 12:19:52 +02:00
Gav Wood eca163ba64 Bump version to 1.0.0 globally (#2149)
* Bump versionb globally

* Rebuild and fix

* Rename fixes

* Rebuild

* Minor fix and code formatting for validator election

* Fix tests

* More test fixes

* Fix several bugs in phragmen elections.

* Rebuild, remove pointless closures
2019-04-01 15:16:06 +02:00
joe petrowski 0ddcbf747f Convert all UK spelling to US (#2138)
* all the ise

* forgot a misspelling

* a few more replacements

* bump impl

* rollback and fixes

* bump impl again

* Add aliases for RPC

* Update on_demand.rs
2019-03-29 14:11:45 +01:00
gabriel klawitter 7ab7a826d3 ci: fix kubernetes chart (#2111) 2019-03-25 16:33:43 +01:00
gabriel klawitter 53f40c583d Ci update names and chart (#2076)
* add option to specifiy substrate node name via environment variable file

* gitlab-ci: change job names and adopt to polkadot pipeline

* upgrade helm chart

Signed-off-by: gabriel <gabriel@parity.io>
2019-03-22 13:13:37 +01:00
gabriel klawitter f5c32f71f4 ci: add kubernetes helm chart and gcp deployment (#1854)
* ci: add kubernetes helm chart and gcp deployment

* use official or parity's docker images only
2019-02-27 12:37:10 +01:00
gabriel klawitter 3cbf2bc9c4 gitlab-ci: merge-test stage (#1752) 2019-02-15 14:54:21 +01:00
Shawn Tabrizi 2acab71254 Adding vesting tests to Balances module (#1786)
* Adding vesting tests to Balances module

* Fix gitlab message, bump impl
2019-02-13 18:59:22 +01:00
Gav Wood 380d17d989 Add more naunce to the runtime CI agent (#1764)
* Add more naunce to the runtime CI agent

- If there are no changes to runtime code, exit ok; otherwise:
- If spec_version has changed, then:
  - Exit ok if the runtime is rebuilt, fail otherwise.
- If impl_version has changed, then exit ok.
- If neither version has changed, fail.

* Update check_runtime.sh
2019-02-13 11:46:27 +01:00
gabriel klawitter 810c391de2 check spec_version and impl_version (#1743) 2019-02-09 17:29:15 +01:00
gabriel klawitter 91114c6c11 CI: label a pull request breaksapi if there are changes on the wasm source code but no changes to the spec_version (#1727)
* trigger labelling pipeline for runtime changing pull requests

* cut out aws config as it is now included in the parity/awscli image
2019-02-08 13:00:01 +01:00
Bastian Köcher 461cd384fc Export TERM in node-template-release.sh (#1711) 2019-02-06 19:01:41 +01:00
Bastian Köcher 567122fab5 Moves node-template into substrate repo (#1637)
* Make runtime macros work without required `macro_use`

* Adds node-template

* Adds node-template-release tool

* Fixes building `node-template` and improve the release

* Add `profile.release` by release script to remove warning

* Adds script for releasing the node template

* Fixes compilation after master merge

* Port node-template to edition 2018

* Remove license

* Fixes compilation after master merge

* Add `node-template-release.sh` into the CI

* WIP Ci integrate node template (#1701)

* copy artifacts to s3 bucket latest path

* typo

* bucket name

* Update wasm files
2019-02-06 17:15:12 +01:00
gabriel klawitter 888e7bb76f add test for wasm runtime changes (#1612)
* add test for wasm runtime changes

* use default container

* disable cache for runtime source test

* compare spec_versions directly
2019-02-05 10:50:44 +01:00
gabriel klawitter aab15230af .gitlab-ci.yml: update to include docker builds and publishing (#1209)
* .gitlab-ci.yml: update to include docker builds and publishing

* add Dockerfile for the ci
2018-12-05 18:44:04 +09:00
Gav f31cfe96e4 Move getgoing script into scripts. 2018-10-21 12:37:39 +02:00
Bastian Köcher 12f12bff28 Make all copyrights use the correct year (#894)
* Adds a script for automatically update all copyrights

* Ran the `update-copyright` script
2018-10-10 10:28:41 +02:00
Gav Wood 851c7f42df Fix block generation by updating codec versions in wasm (#810)
* Fixes for staging testnet

* Fix codec versioning

* Comment unneeded trace

* Update lib.rs

* Update parity-codec

* Add script to update wasm deps and update them.

* Update hashes

* Add BBQ Birch testnet

* it's default-features, apparently.

* Use simpler version spec for parity codec

* Typo
2018-09-27 14:38:56 +01:00
Guanqun Lu a813d54965 add a python script to show the runtime packages' dependencies (#725)
* add a python script to show the dependencies

* add the header line and modify the mod
2018-09-12 16:05:15 +02:00
Gav Wood 1e01162505 Phase 1 of repo reorg (#719)
* Remove unneeded script

* Rename Substrate Demo -> Substrate

* Rename demo -> node

* Build wasm from last rename.

* Merge ed25519 into substrate-primitives

* Minor tweak

* Rename substrate -> core

* Move substrate-runtime-support to core/runtime/support

* Rename/move substrate-runtime-version

* Move codec up a level

* Rename substrate-codec -> parity-codec

* Move environmental up a level

* Move pwasm-* up to top, ready for removal

* Remove requirement of s-r-support from s-r-primitives

* Move core/runtime/primitives into core/runtime-primitives

* Remove s-r-support dep from s-r-version

* Remove dep of s-r-support from bft

* Remove dep of s-r-support from node/consensus

* Sever all other core deps from s-r-support

* Forgot the no_std directive

* Rename non-SRML modules to sr-* to avoid match clashes

* Move runtime/* to srml/*

* Rename substrate-runtime-* -> srml-*

* Move srml to top-level
2018-09-12 11:13:31 +02:00
Gav Wood 101f5ec393 Revert "Install llvm-tools-preview component (#643)" (#644)
This reverts commit 2601392d6a.
2018-09-05 12:13:10 +02:00
Sergey Pepyakin 2601392d6a Install llvm-tools-preview component (#643) 2018-08-31 18:04:05 +02:00
ddorgan bcdb2d7ba0 Do not attempt to rustup if in CI. This is taken care of by the base (#621)
image.
2018-08-29 15:24:24 +02:00