* Switch consensus-common to new futures
* Fix tests
* More tests fixing
* Make Proposer, OnSlot and SyncOracle mut
* Make the Environment mut as well
* Fix test
* Fix Babe tests
* Babe fixes
* Fix CLI service tests
* Fix Babe tests
* Remove unnecessary trait bound
* Inline the code of BlockBuilder and AuthoringApi
* Remove warning lint
* Bounds simplification
* Imports simplification
* Don't panic on bad generated block
* Code style
* Add doc example
* Remove dependency on aura
* Order dependencies alphabetically
* Minor style
* Make extrinsics extensible.
Also Remove old extrinsic types.
* Rest of mockup. Add tips.
* Fix some build issues
* Runtiem builds :)
* Substrate builds.
* Fix a doc test
* Compact encoding
* Extract out the era logic into an extension
* Weight Check signed extension. (#3115)
* Weight signed extension.
* Revert a bit + test for check era.
* Update Cargo.toml
* Update node/cli/src/factory_impl.rs
* Update node/executor/src/lib.rs
* Update node/executor/src/lib.rs
* Don't use len for weight - use data.
* Operational Transaction; second attempt (#3138)
* working poc added.
* some fixes.
* Update doc.
* Fix all tests + final logic.
* more refactoring.
* nits.
* System block limit in bytes.
* Silent the storage macro warnings.
* More logic more tests.
* Fix import.
* Refactor names.
* Fix build.
* Update srml/balances/src/lib.rs
* Final refactor.
* Bump transaction version
* Fix weight mult test.
* Fix more tests and improve doc.
* Bump.
* Make some tests work again.
* Fix subkey.
* Remove todos + bump.
* First draft of annotating weights.
* Refactor weight to u64.
* More refactoring and tests.
* New convert for weight to fee
* more tests.
* remove merge redundancy.
* Fix system test.
* Bring back subkey stuff.
* a few stress tests.
* fix some of the grumbles.
* Final nits.
* Update srml/system/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Scale weights by 1000.
* Bump.
* Fix decl_storage test.
* babe: add babe module trait
* babe: track current slot and epoch start slot
* babe: implement ShouldEndSession based on epochs
* babe: rename weight type to avoid ambiguities
* babe: expose epoch start slot in Epoch digest
* babe: use epoch start for validating epoch transitions
* babe: make the epoch duration a parameter type
* babe: remove unused fields from config
* node: update runtime to use babe instead of aura
* node: use babe instead of aura
* core: generate sr25519 keys from seed and add to keystore
* core: remove AuthorityKeyring
* node: remove unused primitive types related to babe crypto
* uniform babe primitives crate import name
* wrap long lines
* babe: fix find_epoch_digest
* fork-tree: fix find_node_where
* node: set babe epoch duration to "10 minutes"
* babe: cleanup import key cache if authorities don't change
* node: make integration test compile (but fail)
* node: bump spec_version
* node: fix import
* babe: don't use constants in storage fields array sizes
* babe: account for first epoch slot way in the past
* babe: signal next epoch change (not current)
* babe: calculate next epoch randomness with next epoch index
* babe: track next epoch in node
* babe: cache current epoch and authorities separately
* babe: generate valid babe vrf proofs in integration test
* babe: cleanup claim_slot
* babe: perform threshold calculation according to spec
* babe: compute relative weight in threshold
* babe: more precise threshold calculation
* babe: use floats for threshold exponent calculation
* babe: update constant c
* Make extrinsics extensible.
Also Remove old extrinsic types.
* Rest of mockup. Add tips.
* Fix some build issues
* Runtiem builds :)
* Substrate builds.
* Fix a doc test
* Compact encoding
* Extract out the era logic into an extension
* Weight Check signed extension. (#3115)
* Weight signed extension.
* Revert a bit + test for check era.
* Update Cargo.toml
* Update node/cli/src/factory_impl.rs
* Update node/executor/src/lib.rs
* Update node/executor/src/lib.rs
* Don't use len for weight - use data.
* Operational Transaction; second attempt (#3138)
* working poc added.
* some fixes.
* Update doc.
* Fix all tests + final logic.
* more refactoring.
* nits.
* System block limit in bytes.
* Silent the storage macro warnings.
* More logic more tests.
* Fix import.
* Refactor names.
* Fix build.
* Update srml/balances/src/lib.rs
* Final refactor.
* Bump transaction version
* Fix weight mult test.
* Fix more tests and improve doc.
* Bump.
* Make some tests work again.
* Fix subkey.
* Remove todos + bump.
* Ignore expensive test.
* Bump.
* Fix grammar and typo
* Extend network service
* Extend offchain API
* Support creating unsigned UncheckedExtrinsic
* Introduce srml/im-online
* Bump impl and spec version
* Fix web-wasm test
* Apply suggestions from code review
Remove parity-multiaddr dependency
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Replace transmute with from_raw_parts
* Replace PeerId.to_string() with .to_base58()
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Update Cargo.lock
* Bump impl and spec version (again)
It was updated in master in the meantime.
* Apply suggestions from code review
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Address comments
* Add public function is_online_in_current_session()
* Bump spec_version
* Fix doc tests
* Improve comments
* Remove superfluous line
* Name parameters consistently
* Implement comments
* Switch From to TryFrom
* Use Vec instead of HashSet
* Fix tests
* Revert me: local testing
* Fix check if already sent during session
We gossip each session, hence we need to check
if already sent in this session (not era).
* Fix typos
* Consistent terminology
* Revert "Revert me: local testing"
This reverts commit 73fbc29ff3e5ed71d99436318260b4f007e837f4.
* Introduce IsMember trait
* Implement misc comments
* Remove unused function
* Fix test
* Fix external_addresses being written
* Fix test
* Add necessary trait bound
* Do not increment version
* Update lib.rs
* Add copy of council seats as elections module.
* Split council into collective and elections modules.
Make collective instanceable.
* Propagate changes to the runtime and fix origin/event
* insert_ref and put_ref to avoid copies.
* Add tests
* Fix up collective's tests
* One more test
* Fix elections module tests
* Missed merge line
* Minor fix
* Test fixes
* Line widths
* Line widths
* Rntime version
* Remove comment
* Deduplicate
* Bump runtime again
* Fix test
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.
* SharedFinalityProofRequestBuilder -> BoxFinalityProofRequestBuilder
* SharedThings -> BoxThings
* Fix tests
* build_request_data now takes &mut self
* The other traits now also take &mut self
* More or less fix tests
* Fix tests
* Fix more tests
* Moar tests
* Don't call make_block_import multiple time
* Fix doctest
* skeleton for tracking historical sessions
* refactor OpaqueKeys
* some more skeleton work
* adjust session to new OpaqueKeys API
* further refactoring of key-type-ids
* session gets validator ID parameter
* run up against compiler
* tweak staking to support new session changes
* first run at child storage for deduplication
* Make session use `AccountId` as `ValidatorId`
* run up against child trie issues
* switch to using normal trie but with a fixed prefix
* clear out some println
* add dedup test
* flesh out historical module more
* introduce ExposureOf for staking
* test the historical module
* WASM compiles
* tests all compile
* do some mock change
* fix bulk of tests
* fix staking tests
* test obsolecence mechanic
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* some more style nits
* a couple more nits
* tweak tries
* fix typo thie -> this
* 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`
* Remove dependencies on tokio
* Make service not depend on tokio
* Fix service tests
* Manually poll the import queue if failed to start
* Spawn all tasks at the end
* Remove executor from TelemetryOnConnect
* Remove TaskExecutor from offchain workers
* Remove TaskExecutor from AuthoritySetup
* Remove TaskExecutor from service
* Remove tokio dependency from RPC
* Remove finality-grandpa from WASM checks
* Fix offchain tests
* Line widths
* Fix RPC tests
* Fix service tests
* Fix bad futures polling
* Address some concerns
* Better error handling
* Is it the connectivity test that's not passing? I don't know, let's try
* Revert "Is it the connectivity test that's not passing? I don't know, let's try"
This reverts commit 28bbe51f0e2e4885fe1f901e11078604604cb212.
* Fix test
* srml-contract: Move gas costs from Config to Schedule.
* srml-contract: Define Gas units fixed as u64.
This removes Gas as a configurable type on the contracts Trait.
* Bump node runtime spec/impl versions.
* Draft of new sessions
* Reintroduce tuple impls
* Move staking module to new session API
* More work on staking and grandpa.
* Use iterator to avoid cloning and tuple macro
* Make runtime build again
* Polish the OpaqueKeys devex
* Move consensus logic into system & aura.
* Fix up system module
* Get build mostly going. Stuck at service.rs
* Building again
* Update srml/staking/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Refactoring out Consensus module, AuthorityIdOf, &c.
* Refactored out DigestItem::AuthoritiesChanged. Building.
* Remove tentative code
* Remove invalid comment
* Make Seal opaque and introduce nice methods for handling opaque items.
* Start to use proper digest for Aura authorities tracking.
* Fix up grandpa, remove system::Raw/Log
* Refactor Grandpa to use new logging infrastructure.
Also make authorityid/sessionkey static. Switch over to storing
authorities in a straight Vec.
* Building again
* Tidy up some AuthorityIds
* Expunge most of the rest of the AuthorityKey confusion.
Also, de-generify Babe and re-generify Aura.
* Remove cruft
* Untangle last of the `AuthorityId`s.
* Sort out finality_tracker
* Refactor median getting
* Apply suggestions from code review
Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
* Session tests works
* Update core/sr-primitives/src/generic/digest.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Session tests works
* Fix for staking from @dvc94ch
* log an error
* fix test runtime build
* Some test fixes
* Staking mock update to new session api.
* Fix build.
* Move OpaqueKeys to primitives.
* Use on_initialize instead of check_rotate_session.
* Update tests to new staking api.
* fixup mock
* Fix bond_extra_and_withdraw_unbonded_works.
* Fix bond_with_little_staked_value_bounded_by_slot_stake.
* Fix bond_with_no_staked_value.
* Fix change_controller_works.
* Fix less_than_needed_candidates_works.
* Fix multi_era_reward_should_work.
* Fix nominating_and_rewards_should_work.
* Fix nominators_also_get_slashed.
* Fix phragmen_large_scale_test.
* Fix phragmen_poc_works.
* Fix phragmen_score_should_be_accurate_on_large_stakes.
* Fix phragmen_should_not_overflow.
* Fix reward_destination_works.
* Fix rewards_should_work.
* Fix sessions_and_eras_should_work.
* Fix slot_stake_is_least_staked_validator.
* Fix too_many_unbond_calls_should_not_work.
* Fix wrong_vote_is_null.
* Fix runtime.
* Fix wasm runtime build.
* Update Cargo.lock
* Fix warnings.
* Fix grandpa tests.
* Fix test-runtime build.
* Fix template node build.
* Fix stuff.
* Update Cargo.lock to fix CI
* Re-add missing AuRa logs
Runtimes are required to know about every digest they receive ― they
panic otherwise. This re-adds support for AuRa pre-runtime digests.
* Update core/consensus/babe/src/digest.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Kill log trait and all that jazz.
* Refactor staking tests.
* Fix ci runtime wasm check.
* Line length 120.
* Make tests build again
* Remove trailing commas in function declarations
The `extern_functions!` macro doesn’t like them, perhaps due to a bug in
rustc.
* Fix type error
* Fix compilation errors
* Fix a test
* Another couple of fixes
* Fix another test
* More test fixes
* Another test fix
* Bump runtime.
* Wrap long line
* Fix build, remove redundant code.
* Issue to track TODO
* Leave the benchmark code alone.
* Fix missing `std::time::{Instant, Duration}`
* Indentation
* Aura ConsensusLog as enum
* Revamp crypto API and make seeds work better in subkey
* Final tweaks
* Update tests
* line spacing
* Avoid escapes in hex constants
* Fix build
* Another fix
* More fixes
* Minor nits
* first --unclean-- working version of locks and weight decay
* Refactor voter activity history.
* Tuning offset calculation and tests
* Remove print.
* Configurable decay ratio.
* Remove spaces.
* Name for activity.
* Fix some style
* Re-write voters as chunked map-vec.
* Adds panic todo.
* Fix some of the grumbles.
* Fix some of the grumbles.
* Chunked approvals vector.
* Introduce voter_index for set_approvas in favor of complexity.
* Add a bit more docs
* Add boolean approvals as scalar.
* Some cleanups TODO removes.
* enhance some error checking.
* No more double_map
* Combined voter info and fee.
* Fix global tests
* Bump.
* Fix line length
* Fix error message.
* Kill As<T>.
* Final fix.
* _Further_ kill As.
* Proper imbalance for fee.
* Bump.
* Fix spacing.
* Update
* Address grumbles.
* Line width.
* Drop import_lock from client, move it into backend, impl default version via static mutex
* still need to allow depcretion because of client.backend
* additional docs
* Remove default impl of get_import_lock, impl on instances
* Bump parking_lot to 0.8.0 accross the board
* Nonlinear locking and cleanups
* Bump runtime version
* Minor cleanup
* Fix tests
* Fix council tests
* Fix flaw in turnout counting
* Initial work on referendum schedules
* Refactor council-democracy interface.
* Fix build
* Update srml/democracy/src/lib.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
* Update srml/democracy/src/lib.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
* Tests compile again
* Tests!
* Update todo
* Fix build
* Ensure votes arer not double-counted on member-transitions
* Extra logic for normal council changes
* Typo
* A few grumbles addressed.
* restored test_consensus
* restored test_sync
* run integration tests only on CI
* use single test-thread for integration tests
* post-merge fix
* panic when integration test runs for too long
* add some traces to integration logs
* manual wait -> timeout
* post-merge fix
* post-merge fix
* Nonlinear locking and cleanups
* Bump runtime version
* Minor cleanup
* Fix tests
* Fix council tests
* Fix flaw in turnout counting
* fix: lock_voting_should_work_with_delegation test
* chore: fix comment refering to unexisting function
* Remove InherentsPool.
* Introduce transactions that are not propagated over the network.
* Bump spec version.
* Use separate flag for propagation.
* Fix tests.
* Silence known deprecation warnings
1. Prefixes known instances of usages of client.backend and client.import_lock with `#[allow(deprecated)]` to silence the warnings. 2. Remove file-global `#![allow(deprecated)]` used in these cases. Both to prevent us overlooking externally caused deprecation messages.
* fixing missing ;
* fix missing test cases
* move deprecated markers to make CI happy
* move deprecated markers to make CI happy
* attempt to fix the test
* bumping impl_version of node runtime
* Minor cleanup