* 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>
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.
* 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`
* Require --locked when building runtime
* Update locks
* Do it in a different way
* Accidentally reverted Cargo.lock
* pass on arguments in build.sh scripts
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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