* 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
* perthings operate in type operator
* implementation with rem
* fmt
* doc
* better fmt
* bump version
* Tests for pet-things
* demonstrate output as type of operation
* Remove redundant assertions.
* rename test
* update lock
* bump impl version
* set reasonable value for bonding_duration in chainspec staging config
* set default bonding_duration to 1, and bump runtime version
* Update node/cli/src/chain_spec.rs
Co-Authored-By: mnaamani <mokhtar.naamani@gmail.com>
* Update node/cli/src/chain_spec.rs
Co-Authored-By: mnaamani <mokhtar.naamani@gmail.com>
* Update srml/staking/src/lib.rs
Co-Authored-By: mnaamani <mokhtar.naamani@gmail.com>
* Send high-level consensus telemetry by default
* Notify telemetry on finalized
* Send used authority set to telemetry
* Do not send commit message telemetry by default
* Fix typo
* Allow for notifications on telemetry connect
...and send the current authority set on each connect.
* Send authority set to telemetry on change
* Revert "Send used authority set to telemetry"
This reverts commit 1deceead52bb7443a02879ac8138afad9a6ca5ff.
* Merge branch 'master' into 'cmichi-send-high-level-consensus-telemetry-by-default'
Squashed commit of the following:
commit 19d77cbc23
Author: Xiliang Chen <xlchen1291@gmail.com>
Date: Wed Apr 10 20:26:29 2019 +1200
update authers for rest of the node-template cargo.toml files (#2242)
commit 0afc357a97
Author: Bastian Köcher <bkchr@users.noreply.github.com>
Date: Tue Apr 9 10:31:18 2019 +0200
Throw a compile error for `on_finalise` and `on_initialise` (#2236)
commit e57e54ab9c
Author: Pierre Krieger <pierre.krieger1708@gmail.com>
Date: Tue Apr 9 05:30:43 2019 -0300
Add warning when using default protocol ID (#2234)
* Add warning when using default protocol ID
* Update core/service/src/lib.rs
commit cb766e5f5d
Author: Xiliang Chen <xlchen1291@gmail.com>
Date: Tue Apr 9 17:22:20 2019 +1200
update name and authors to placeholder text for node-template (#2222)
* update name and authors to placeholder text
* revert package name change
commit a1e15ae55a
Author: André Silva <andre.beat@gmail.com>
Date: Mon Apr 8 12:50:34 2019 +0100
grandpa: Voter persistence and upgrade to finality-grandpa v0.7 (#2139)
* core: grandpa: migrate to grandpa 0.7
* core: grandpa: store current round votes and load them on startup
* core: grandpa: resend old persisted votes for the current round
* core: grandpa: store base and votes for last completed round
* core: grandpa: fix latest grandpa 0.7 changes
* core: grandpa: update to grandpa 0.7.1
* core: grandpa: persist votes for last two completed rounds
* core: grandpa: simplify VoterSetState usage
* core: grandpa: use Environment::update_voter_set_state
* core: grandpa: fix aux_schema test
* core: grandpa: add docs
* core: grandpa: add note about environment assumption
* core: grandpa: don't update voter set state on ignored votes
* core: grandpa: add test for v1 -> v2 aux_schema migration
* core: grandpa: add test for voter vote persistence
* core: grandpa: use grandpa 0.7.1 from crates.io
* core: grandpa: use try_init in test
* core: grandpa: add comment about block_import in test
* core: grandpa: avoid cloning HasVoted
* core: grandpa: add missing docs
* core: grandpa: cleanup up can_propose/prevote/precommit
commit ed3ae4ac39
Author: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Date: Mon Apr 8 13:17:00 2019 +0200
remove clone bound on specialization in testnet factory (#2157)
commit 03f3fb1442
Author: Andrew Jones <ascjones@gmail.com>
Date: Sat Apr 6 12:23:56 2019 +0100
Contract import/export validation (#2203)
* Reject validation of contract with unknown exports
* Validate imports eagerly
* Increment spec version
commit decddaab0f
Author: Pierre Krieger <pierre.krieger1708@gmail.com>
Date: Fri Apr 5 14:07:09 2019 -0300
Fix state inconsistency between handler and behaviour (#2220)
* Fix state inconsistency between handler and behaviour
* Fix the error! being in the wrong place
commit dce0b4ea49
Author: Bastian Köcher <bkchr@users.noreply.github.com>
Date: Fri Apr 5 18:50:38 2019 +0200
Use `storage_root` of newly calculated header (#2216)
Instead of calculating the `storage_root` a second time, we just can
take the `storage_root` from the new header.
commit b01136c90d
Author: Marek Kotewicz <marek.kotewicz@gmail.com>
Date: Fri Apr 5 14:44:46 2019 +0200
Peerset::discovered accepts many peer ids (#2213)
* Peerset::discovered accepts many peer ids
* Improve tracing in peerset
commit 1142bcde97
Author: Marek Kotewicz <marek.kotewicz@gmail.com>
Date: Thu Apr 4 19:40:40 2019 +0200
simplification of peerset api (#2123)
* Introduction of PeersetHandle
* integrate PeersetHandle with the rest of the codebase
* fix compilation errors
* more tests for peerset, fixed overwriting bug in add_reserved_peer
* Slots data structure and bugfixes for peerset
* bend to pressure
* updated lru-cache to 0.1.2 and updated linked-hash-map to 0.5.2
* peerset discovered list is now a LinkedHashMap
* fix review suggestions
* split back Peerset and PeersetHandle
* test for Peerset::discovered
* applied review suggestions
* fixes to peerset::incoming
* peerset disconnects are all instantaneous
* instantaneous drop in peerset finished
* Peerset::set_reserved_only can also reconnect nodes
* Peerset scores cache uses lru-cache
* remove redundant function call and comment from Peerset::on_set_reserved_only
* add_peer returns SlotState enum
* apply review suggestions
* is_reserved -> is_connected_and_reserved
commit 301844dd56
Author: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Date: Thu Apr 4 18:01:28 2019 +0200
Disconnect on protocol timeout (#2212)
commit cb3c912b1a
Author: André Silva <andre.beat@gmail.com>
Date: Thu Apr 4 15:56:49 2019 +0100
core: grandpa: verify commit target in justification (#2201)
commit 6920b169cd
Author: Bastian Köcher <bkchr@users.noreply.github.com>
Date: Thu Apr 4 16:56:16 2019 +0200
Introduce `original_storage` and `original_storage_hash` (#2211)
Both functions will ignore any overlayed changes and access the backend
directly.
commit cb7a8161f5
Author: Xiliang Chen <xlchen1291@gmail.com>
Date: Fri Apr 5 03:55:55 2019 +1300
code cleanup (#2206)
commit acaf1fe625
Author: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Date: Wed Apr 3 15:52:46 2019 +0200
Emberic elm testnet (#2197)
* Make telemetry onconnect hoook optional
* Merge branch 'master' into 'cmichi-send-high-level-consensus-telemetry-by-default'
* Introduce GrandpaParams struct to condense parameters
* Remove debug statement
* Fix tests
* Rename parameter
* Fix tests
* Rename struct
* Do not send verbosity level
* Combine imports
* Implement comments
* Run cargo build --all
* Remove noisy telemetry
* Add docs for public items
* Unbox and support Clone trait
* Fix merge
* Fix merge
* Update core/finality-grandpa/src/lib.rs
Co-Authored-By: cmichi <mich@elmueller.net>
* grandpa: initial implementation of minimal grandpa worker
* grandpa: extract grandpa observer future to function
* grandpa: add test for observer
* grandpa: start observer if no local key is defined
* grandpa: add minor comments
* grandpa: observer: log invalid commit
* grandpa: observer: persist voter set state on authority change and pause
* grandpa: observer: use commit processing callback
* grandpa: keep run_grandpa to avoid breaking public api
* grandpa: use grandpa::process_commit_validation_result
* grandpa: use finality-grandpa 0.7.2
* Implement `ext_println` in contract runtime
* Only allow contracts to import `ext_println` on dev chains
* Configure dev chain to allow contracts with `ext_println`
* Increment spec version
* Docs
* Rename config to the more specific enable_println
* Consensus status packet
* Allow for repropagation after status
* More generic gossip
* add a basic view struct and gossip module
* move gossip stuff to the gossip module
* integrate view into gossip
* some reshuffling
* alter rules for keeping one commit at a time in view
* Allow sending addressed messages
* don't cast outgoing votes if we know that we voted before
* Handle one hop messages
* initial run at polite grandpa
* build WASM
* handle neighbor messages
* refactor validator's internals into an Inner struct
* gossip only knows to keep or discard messages. optimize should_send_to
* Periodic rebroadcast
* implement `should_send_to` and message_expired
* track peers' best received commit height
* Pass peer id to topic steam
* kill rebroadcasting network
* Notify about existing peers
* clean up network APIs a bunch
* implement gossip::send_message for direct messages
* refactor network trait
* implement gossip::send_message for direct messages
* get all non set-change tests passing
* treat unknown rebroadcasts as broadcasts
* get all other main tests passing
* remove unimplemented test
* everything compiles
* treat unknown rebroadcasts as broadcasts
* Rebradcast interval
* Apply suggestions from code review
Style
Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
* Style
* some module docs
* address some grumbles + docs
* allow rebroadcast every few minutes
* send_topic && generic context
* some tests for view change
* more grumbles & tests
* use send_peer
* 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 `start_aura2`.
* .gitignore patch conflict files
and remove one that accidentally got committed
* Fix build
The tests still don’t work.
* Fix compilation errors
* Fix compile errors (again)
* Try (and fail) to fix tests
* Properly deserialize data
Previously, `DigestItem::Consensus` had no separate `DigestItemType`,
so it did not get properly serialized and deserialized.
* Add extra debug logging. Always allow old seals.
A `RUST_LOG=substrate_aura_consensus cargo test --all -- --nocapture \
tests::authoring_blocks` revealed that old seals were being and
rejected, causing the test to hang. As a temporary debug measure, allow
old seals unconditionally, so that CI can test if this fixes the
problem.
* Forcibly disable rejection of old seals
* Use old trait, but newer serialization
The old trait for `CompatibleDigestItem` actually worked. By changing
its implementation, one can ensure that all *new* seals have the modern
form, but *legacy* seals are still decoded correctly.
* Bump impl version
* Squash spurious deprecation warning
`rustc` should not be emitting a deprecation warning in deprecated
code, but it does, so silence it.
* Rip out unused Cargo feature
* Move AURA to aura_primitives
* Respond to code review
* Wrap overly-long line
* Reduce logging verbosity and add target
* Add dependency on `sr-primitives` to `aura_primitives`
* Fix build
It failed with a message about Cargo.lock being out of date.
* core: aura: rename aura engine id const
* core: aura: remove superfluous logging
* core: primitives: add removed semicolons
* core: aura: remove unused import
* core: network: style fix
* runtime: update wasm blobs
* runtime: bump impl_version
* core: primitives: tag all DigestItemType variants explicitly