Pierre Krieger
fdbbf14fa4
Improve sc-network's documentation for network protocols ( #5364 )
...
* Improve sc-network's documentation for network protocols
* Add note about protocol id
* Apply suggestions from code review
Co-Authored-By: Max Inden <mail@max-inden.de >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-03-26 12:26:30 +01:00
Kian Paimani
087736e390
Manadatory Weight ( #931 )
...
* upsub
* Revert branch change
* Fix some
* Fix build
2020-03-26 12:10:18 +01:00
Marcio Diaz
5a48cade1b
Benchmark Democracy Pallet ( #5257 )
...
* Add origin bounds to benchmark macro.
* Add democracy benchmark.
* Fix tests
* Remove collective from frame/benchmarking, partially use EnsureOrigin.
* Remove collective stuff.
* Make previous benches compile again.
* Remove comments.
* Make prev bench to work again.
* Add remove votes.
* Add new proxy calls.
* Add runtime-benchmarks guard to EnsureOrigin and implementations.
* Refactor.
* Add missing import.
* Remove duplicated import
* Fix features.
* Add some missing features.
* Update frame/collective/Cargo.toml
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/democracy/src/benchmarking.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/democracy/src/benchmarking.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Add referendums to state.
* populate vecs before call
* Update weight docs
* More fixes and weight docs
* More updates
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-03-26 11:18:24 +01:00
Kian Paimani
a0772117ac
Mandate weight annotation ( #5357 )
...
* Disallow default weight
* Fix build and test
* Fix tests
* Fix another beloved ui test.
* fix beloved trybuild tests
* fix treasury?
* Final test fix
* Fix build
* Fix another one
* Fix
* More doctest fix
2020-03-26 11:17:05 +01:00
Alexander Theißen
7cbadd73be
contracts: Remove OnKilledAccount implementation ( #5397 )
...
* contracts: Remove OnKilledAccount implementation
Contracts now longer rely on this callback to tell them when they
are removed. Instead, they can only self destruct using `ext_terminate`.
* Fix account removal test
* Fix account storage removal
2020-03-26 11:16:24 +01:00
thiolliere
b0d2f4b173
Make Staking pallet using a proper Time module. ( #4662 )
...
* add new trait, still migration to make
* Apply suggestions from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* implement migration
* better naming
* fix test
* no longer require DeprecatedTime
* add test
* fix version
* upgrade only from kusama
* add test
* fix test
* Update frame/timestamp/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-26 11:04:52 +01:00
Kian Paimani
bc4567e229
Update CODEOWNERS ( #5409 )
2020-03-26 10:44:11 +01:00
Tomasz Drwięga
c8150e1d33
Transaction source ( #5366 ) companion PR ( #938 )
...
* Add transaction source.
* Bump substrate.
* Fix tests.
2020-03-26 10:38:01 +01:00
Spencer Judge
8e10f36628
Make AccountId32 hashable ( #5405 )
...
* Make AccountId32 hashable
* Only implement Hash in std
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-03-26 09:17:17 +01:00
Arkadiy Paronyan
d474864d67
Allow syncing to peers with finalized common block ( #5408 )
...
* Allow syncing to peers with finalized common block
* Added test
2020-03-26 09:13:09 +01:00
pscott
73c99eec84
TelemetryEndpoints must be valid MutliAddr URL ( #5069 )
...
* Check for url validity when creating TelemetryEndpoints
* Update code that used TelemetryEndpoints::new()
* Update commennts that referred to TelemetryEndpoints::new()
* Add tests for telemetry
* Fix typo and fix code in docs
* Return error on failing to override telemetry
* Use expect instead of suppressing errors on must-be-valid telemetry endpoints
* Update telemetry unit tests to use expect instead of unwrap
* Implement custom deserializer for TelemetryEndpoints
* Fix typo
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-26 09:02:38 +01:00
Fedor Sakharov
dbb4e987fa
Remove Parent Hash to Session mapping ( #928 )
...
* Adds a SigningContext type
* Bump spec versions
* Fixes requested changes
* Bump ParachainHost api_version and guard signing_context call
* Improve error message
* If there is no signing_context api use default value
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2020-03-25 17:04:05 -04:00
Max Inden
77446d3b50
client/finality-grandpa/src/until_imported: Refactor BlockGlobalMessage ( #5390 )
...
* client/finality-grandpa/src/until_imported: Refactor BlockGlobalMessage
`BlockGlobalMessage` owns an `inner` which contains (1) a count for the
amount of outstanding blocks to be waited on and (2) the message itself.
Given that both is already wrapped in an `Arc` there is no need to keep
track of the outstanding blocks, given that it simply corresponds to the
amount of strong reference counts on the `Arc` itself.
This commit removes the atomic counter within `inner` and piggy backs on
the `Arc` reference counter instead.
* client/finality-grandpa/src/until_imported: Remove useless match
* client/finality-grandpa/src/until_imported.rs: Remove unused var
Co-Authored-By: André Silva <andre.beat@gmail.com >
* client/finality-grandpa/src/until_imported: Address comment suggestion
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-03-25 19:45:04 +01:00
Joshy Orndorff
0505e93733
Remove package aliases from node template ( #5389 )
...
* delias outer node template
* dealias pallet template
* Fix mock
* attempt to fix warning
* Revert "attempt to fix warning"
This reverts commit 3d39142b877fb7ae2bd9bd0b31442a00d4c8f0bf.
* Add call to test interface.
2020-03-25 19:44:13 +01:00
André Silva
e86fedba81
primitives: add missing cargo metadata to sp-arithmetic-fuzzer ( #5402 )
...
* primitives: add missing cargo metadata to sp-arithmetic-fuzzer
* ci: add sp-arithmetic-fuzzer to unleash skip list
2020-03-25 19:42:25 +01:00
André Silva
3a136bdcf9
Internal version dependencies cleanup ( #5401 )
...
* always depend on latest alpha version
* integrate arithmetic fuzzer into root workspace
2020-03-25 15:02:39 +01:00
thiolliere
62cddd6fcb
Update substrate for new on_initialize syntax and update on_initialize weight ( #937 )
...
* update new on_initialize syntax
* update substrate
* update spec_version
2020-03-25 14:10:11 +01:00
Tomasz Drwięga
04ccb179e9
Pass transaction source to validate_transaction ( #5366 )
...
* WiP
* Support source in the runtime API.
* Finish implementation in txpool.
* Fix warning.
* Fix tests.
* Apply suggestions from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Extra changes.
* Fix test and benches.
* fix test
* Fix test & benches again.
* Fix tests.
* Update bumpalo
* Fix doc test.
* Fix doctest.
* Fix doctest.
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-03-25 14:09:23 +01:00
Bastian Köcher
601ac11e52
Upgrade bumpalo to make cargo deny happy ( #5398 )
2020-03-25 13:17:42 +01:00
Nikolay Volf
e85d7a4ba7
Fix propagation in network ( #5395 )
...
* fix propagation in network
* Update client/service/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* fix suggestion
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-25 13:03:58 +01:00
Shawn Tabrizi
d52c3a45a7
Add CI check for runtme-benchmarks ( #936 )
2020-03-25 11:27:29 +01:00
Sergei Pepyakin
e61ca13cb1
Remove XX hash from contract API. ( #5383 )
2020-03-25 10:53:27 +01:00
Bernhard Schuster
d4093af110
frame: base 2 pow is just a shift left op ( #5393 )
2020-03-25 10:50:22 +01:00
thiolliere
8a41ac664b
on_initialize return weight consumed and default cost to default DispatchInfo instead of zero ( #5382 )
...
* frame update
* doc
* move offchain worker trait also
* fix weigh merge
* indentation
* reorder for better git diff
* comment
* fix benchmark
* remove test
2020-03-24 19:51:04 +01:00
Wei Tang
2e558908e6
Split PrimaryPreDigest and SecondaryPreDigest ( #5373 )
...
* Split PrimaryPreDigest and SecondaryPreDigest
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com >
* Update primitives/consensus/babe/src/digests.rs
Co-Authored-By: André Silva <andre.beat@gmail.com >
* Update primitives/consensus/babe/src/digests.rs
Co-Authored-By: André Silva <andre.beat@gmail.com >
* Update primitives/consensus/babe/src/digests.rs
Co-Authored-By: André Silva <andre.beat@gmail.com >
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-03-24 18:07:51 +01:00
Denis Pisarev
06525e2b47
add cargo-deny job ( #5347 )
...
* add cargo-deny job
* feat(ci): add cargo-deny CI job, checks registries, licenses, dependencies dupes and advisories
2020-03-24 18:07:28 +01:00
Marcio Diaz
22e23b0103
Benchmark Collective Pallet ( #5343 )
...
* Init
* Fix execute.
* Duplicate macro for instances temporarilly
* Add propose.
* Add vote, close.
* Propose from own module
* Add old members to set_members.
* Add previous proposals to propose.
* Compress a bit the macro.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-03-24 18:06:29 +01:00
Nikolay Volf
27fe4206ed
Update schnorrkel with versioning ( #5358 )
...
* use versioning for deprecated api, remove deprecated api from regular verification
* Update primitives/core/src/sr25519.rs
* add test to transaction pool
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-24 18:05:57 +01:00
Bastian Köcher
6beb6acbd5
Print an error when a bootnode is on a different chain ( #5377 )
...
* Print an error when a bootnode is on a different chain
* Fix tests
2020-03-24 14:24:09 +00:00
Benjamin Kampmann
ba06d5ef64
Releasing 2.0.0-alpha.5 ( #5340 )
...
* bump pre-version
* Changelog alpha.4->alpha.5
* repo + homepage to sp-consensus-vrf
* Add default rocksdb feature to `frame-benchmarking-cli` (#5367 )
* Add default rocksdb feature
* Update Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-03-24 15:08:02 +01:00
gabriel klawitter
75123f051e
check polkadot for companion pull requests ( #5262 )
...
* check_polkadot: move to external script
* check_polkadot: check for companion pr
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-03-24 18:29:11 +05:30
Kian Paimani
92191ae91a
Remove files ( #932 )
2020-03-24 12:37:52 +01:00
Stanislav Tkach
4414d00082
Get rid of rustc_hex in favor of hex ( #5370 )
...
* Get rid of rustc_hex in favor of hex
* Use HexDisplay
2020-03-24 11:48:23 +01:00
Alexander Theißen
5345407783
Update COMPLEXITY.md for ext_terminate ( #5275 )
2020-03-24 11:40:58 +01:00
Shawn Tabrizi
9fbbdfdfd4
Add runtime-benchmarks compile/test in CI pipeline ( #5371 )
...
* Add `runtime-benchmarks` compile
* Use cargo check and no wasm build
2020-03-23 21:57:36 +01:00
Shawn Tabrizi
9283855dba
Fix runtime benchmarks build ( #929 )
2020-03-23 20:09:37 +01:00
Bastian Köcher
fde05dd236
Show an error when we connect to a bootnode with a different peer id ( #5365 )
...
Currently when we connect to a bootnode and it returns a different peer
id, than the one we provided, we disconnect silently. This pr changes
the behavior to printing an error when a bootnode returns a different
peer id than the provided one.
2020-03-23 18:49:49 +01:00
Gav Wood
6ac200252e
Bump runtime version
2020-03-23 17:20:25 +01:00
Gav Wood
5f04e1aa52
Version bump
2020-03-23 16:29:10 +01:00
Nikolay Volf
4d3557d5a1
Versioning for #[runtime-interface] ( #5328 )
...
* versionned runtime-interface
* use only one additional wasm blob
* alter docs
* formatting, naming and docs
* add comment for test
* version duplicate err
* RuntimeInterfaceItem -> RuntimeInterfaceFunction<
* test naming
* version checking
* remove spaces
* Update primitives/runtime-interface/proc-macro/src/runtime_interface/bare_function_interface.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* remove sanity checks and reduce coverage
* add doc comment
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-23 15:09:05 +01:00
Toralf Wittner
fe972155c8
Update yamux to version 0.4.5 ( #927 )
2020-03-23 14:32:31 +01:00
Toralf Wittner
fe68d6fd8c
Update yamux to version 0.4.5 ( #5354 )
2020-03-23 14:11:46 +01:00
Marcio Diaz
0c10687022
Regression algorithm for runtime benchmarks ( #5288 )
...
* Add linregress
* Regression, initial stuff.
* More analytics
* whitespace
* Fix
* Median slopes regression algo
* Warnings
* Update to lastest benchmark changes.
* Use both algorithms temp.
* Move analysis to frame.
* Fix tests.
* Only build analysis in std
Co-authored-by: Gav Wood <gavin@parity.io >
2020-03-23 14:07:25 +01:00
Wei Tang
14249913a6
pallet-evm: configurable gasometer config ( #5320 )
...
* pallet-evm: configurable gasometer config
* Bump runtime impl_version
* Update evm to 0.16.1
Documentation updates
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-03-23 13:30:40 +01:00
Shawn Tabrizi
ad1876bf94
Switch Treasury to on_initialize, Tips KeepAlive ( #5352 )
...
* Switch Treasury to `on_initialize`
* Fix bench compile
2020-03-23 13:19:15 +01:00
Wei Tang
9c7261fab3
Simplify BABE pre-digest definitions ( #5289 )
...
* Init vrf crate without type alias
* Generic PreDigest definition for BABE
* Fix BABE vrf interface change
* Missing default-features def in sp-consensus-babe
* Fix sp-consensus-babe compile
* frame-babe: fix type inference
* Unify type definitions of vrf output/proof and randomness
* frame-babe: fix tests
* Bump node impl version
* Update cargo lock
* Derive Copy for RawVRFOutput and RawVRFProof
* Fix duplicated derive
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-03-23 11:53:41 +01:00
Gavin Wood
95d1d668c3
Sensible way of selecting Prime member ( #5346 )
...
* Calculate prime votes only during the election
* Migration
* Fix build, enable migration
* Fix tests
* Bump runtime version
* Update frame/elections-phragmen/src/lib.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com >
Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com >
2020-03-23 11:52:44 +01:00
Pierre Krieger
1da48b3b3f
Rewrite reconnect_after_disconnect test ( #5351 )
2020-03-23 11:50:11 +01:00
Max Inden
26a204da21
client/network-gossip/state_machine: Fix log message ( #5350 )
...
A gossip validator returns `ValidationResult::Discard` for messages that
should not be processed nor kept due to not being useful for the node.
Examples are out-of-scope messages or messages with bad signatures. The
corresponding log message did not reflect this, thus the update through
this patch.
One caveat is a finality grandpa neighbor packet. Given that the concept
of neighbor packets is handled in the finality grandpa gossip validator
only, valid neighbor packets are always discarded on the
`client/network-gossip` layer.
2020-03-23 11:04:48 +01:00
Andronik Ordian
d348fed02e
deduplicate parity-util-mem ( #926 )
2020-03-23 08:57:15 +01:00