Commit Graph

29 Commits

Author SHA1 Message Date
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
ddorgan 134b8f47dd cargo --force to allow CI to build. (#599) 2018-08-24 14:43:49 +02:00
Robert Habermeier 4eefa5ee60 update script targets 2018-08-15 13:43:41 +02:00
Chevdor 1bd19d8511 Improve docker image size with a 2 stages image (#463)
* Improve docker image size with a 2 stages image

* Minor doc updates

* Fix and reduce size of the docker image

* Fix paths in scripts
2018-08-03 19:34:53 +02:00