Bastian Köcher
5a19ece7e3
Fix polkadot companion test ( #7732 )
2020-12-15 10:28:40 +01:00
Pierre Krieger
ae4f9b14ae
Fix wrong order of values in log line ( #7728 )
2020-12-14 18:37:19 +00:00
Bastian Köcher
059746183d
Default block announce validation should reject additional data ( #7726 )
...
If we are using the default block announce validator and receive
additional data alongside the block announcement, we should disconnect
this peer.
2020-12-14 18:47:08 +01:00
Kian Paimani
6b08b37bc9
Prevent dust in staking by disallowing cheap bond_extra ( #7718 )
...
* prevent bond_extra to cause staking actve lower than ed
* prevent bond_extra to cause staking actve lower than ed
* Check in post conditions.
* check rebond as well.
* also change withdraw_unbonded.
* Fix build
* change check format.
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-12-14 15:45:49 +00:00
dependabot[bot]
a9ab45beae
Bump hyper from 0.12.35 to 0.13.9 ( #7569 )
...
* Bump hyper from 0.12.35 to 0.13.9
Bumps [hyper](https://github.com/hyperium/hyper ) from 0.12.35 to 0.13.9.
- [Release notes](https://github.com/hyperium/hyper/releases )
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hyperium/hyper/compare/v0.12.35...v0.13.9 )
Signed-off-by: dependabot[bot] <support@github.com >
* Update bin/node/rpc-client/Cargo.toml
* Update Cargo.lock
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-12-14 16:22:49 +01:00
Tomasz Drwięga
aa2191642f
Avoid too high values. ( #7716 )
2020-12-14 12:34:41 +00:00
Kian Paimani
056e57e812
Update debug.rs ( #7721 )
2020-12-12 20:08:44 +00:00
Tomasz Drwięga
abe119abba
Add keccak-512 to host functions. ( #7531 )
2020-12-11 16:41:18 +01:00
Shawn Tabrizi
36a684a14b
Support Multiple Instances with Benchmarks ( #7669 )
...
* Support multiple instances with benchmarks
* fix tests
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* docs
* fix output
* Update lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-12-11 09:20:10 +00:00
Kian Paimani
b8b7702f21
Fix PerThing::from_percent. ( #7701 )
...
* Fix overflow in per_things::from_percent.
* Fix test
* Fix the whole thing.. :|
2020-12-11 10:14:28 +01:00
Denis Pisarev
5478c2b891
Update md link checker ( #7709 )
...
* CI: ignore %20 for md link checker
* CI: update to a new action release that fixes %20 issue
2020-12-11 10:02:59 +01:00
Guillaume Thiolliere
8814d793c7
Fix docs ( #7710 )
...
* fix docs
* Update frame/merkle-mountain-range/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2020-12-10 14:38:56 +01:00
Albrecht
9384e6ed53
kilt&polimec ss58 prefix ( #7547 )
...
* kilt ss58 address
* polimec ss58 prefix
2020-12-10 13:23:47 +00:00
Max Inden
e4e120e9b3
*: Update to libp2p v0.32.2 ( #7708 )
...
Version v0.32.2 pins async-tls to the semver compliant v0.11.0 instead
of the yanked async-tls v0.10.2.
2020-12-10 09:22:40 +00:00
Max Inden
0a2636d20c
*: Update to libp2p v0.32.0 ( #7696 )
...
* *: Update to libp2p v0.32.0
* Cargo.lock: Update async-tls to 0.10.2
* client/network/request_response: Adjust to new request response events
* client/network/request_response.rs: Clean up silently failing responses
* client/network/discovery: Lazily instantiate mdns
* client/network/discovery: Exclude MdnsWrapper for target_os unknown
* client/network/discovery: Fix indentation
* client/network/request-response: Use LruCache to track pending resp time
* client/network/request_responses: Fix early connection closed error
* client/network/request-response: Replace debug_assert with debug
* client/network/request-response: Fix typo
* client/network/request-response: Don't emit event on send_response fail
* client/network/request-response: Revert waker.wake_by_ref()
* client/network/request-resp: Make duration in InboundRequest optional
* client/network/req-resp: Don't emit two events for busy builder
When a response builder is busy incoming requests are dropped.
Previously this was reported both via a `ResponseFailure::Busy` and a
`ReponseFailure::Network(InboundFailure::Omisssion)` event.
With this commit the former is removed, leaving only the latter in
place.
2020-12-09 21:58:22 +00:00
Max Inden
b29d6092c2
frame/staking/README: Fix broken link ( #7703 )
2020-12-09 21:09:38 +01:00
Tomasz Drwięga
02f66e8823
Merkle Mountain Range pallet ( #7312 )
...
* Add MMR pallet.
* WiP
* Working on testing.
* WiP - test
* Tests passing.
* Add proof generation.
* Generate and verify proofs.
* Allow verification of older proofs.
* Move stuff to a module.
* Split MMR stuff to it's own module.
* Add docs.
* Make parent hash optional.
* LeafData failed approach.
* Finally implement Compact stuff.
* Compact encoding WiP
* Implement remaining pieces.
* Fix tests
* Add docs to compact.
* Implement for tuples.
* Fix documentation.
* Fix warnings and address review suggestion.
* Update frame/merkle-mountain-range/src/primitives.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Address review grumbles.
* Removing missing crate.
* Fix test.
* Add some docs and test.
* Add multiple instances.
* Cargo.toml sync.
* Fix no_std compilation.
* More no_std stuff.
* Rename MMR struct.
* Addressing other grumbles.
* Fix test.
* Remove format for no_std compat.
* Add test for MMR pallet.
* Fix std feature.
* Update versions.
* Add to node/runtime.
* Add hook to insert digest.
* Make primitives public.
* Update lib.rs
tech spec/typos etc
* Use WeightInfo and benchmarks.
* Fix test.
* Fix benchmarks.
* Trait -> Config.
* Fix typo.
* Fix tests.
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Addie Wagenknecht <addie@nortd.com >
2020-12-09 16:35:13 +01:00
André Silva
2ed2832046
fork-tree: expose silent failures of is_descendent_of ( #7695 )
...
* fork-tree: expose silent failures of is_descendent_of
* fork-tree: use mem::take instead of mem::swap
2020-12-09 12:04:57 +01:00
Benjamin Kampmann
5ce8c33368
Expand remote keystore interface to allow for hybrid mode ( #7628 )
...
* update to latest master
* updates on docs, license, meta
* hide ssrs behind feature flag
* implement remaining functions on the server
* sign server line length fix
* fix tests
* fixup in-memory-keystore
* adding failsafe
* skipping ecdsa test for now
* remote keystore param
* remote sign urls made available
* integrating keystore remotes features
* don't forget the dependency
* remove old cruft
* reset local keystore
* applying suggestions
* Switch to single remote, minor grumbles
* minor grumbles, docs
2020-12-09 10:52:56 +01:00
Shawn Tabrizi
7a43cca875
benchmarks: Fix panic in case of a missing model ( #7698 )
...
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2020-12-09 04:00:52 +00:00
Alexander Theißen
9ce24fe1f4
Allow capping the amount of work performed when deleting a child trie ( #7671 )
...
* Allow Backend::for_keys_in_child_storage to be aborted by the closure
* Ext::kill_child_storage now takes an upper limit for backend deletion
* Add Storage::storage_kill_limited() runtime interface
* review: Use a new version of kill_storage instead of a new interface
* review: Simplify boolean expression
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* review: Rename for_keys_in_child_storage
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
2020-12-09 01:17:28 +00:00
Robert Habermeier
4689c21069
add an upgrade_keys method for pallet-session ( #7688 )
...
* add an upgrade_keys method for pallet-session
* test the upgrade_keys function
2020-12-08 12:13:21 -06:00
Denis Pisarev
29d7e0e6c1
Remove waterfall CI trigger ( #7519 )
...
* fix (CI): fix the triggered project name
* fix (CI): debug run
* fix (CI): debug run 2
* fix (CI): revert debug2
* Revert "fix (CI): debug run"
This reverts commit 96866a953da797ef6e0689374eecc0d8cba4627d.
* CI: remove the trigger
2020-12-08 18:53:22 +01:00
Denis Pisarev
679a9bac5a
Pin md link checker's version ( #7697 )
...
* CI: pin md link checker's version to the previous release
* CI: add a whitelist for allowed GH actions pins
* CI: try master tip [skip ci]
* CI: return to a previous markdown-link-check dependency version [skip ci]
* CI: substitute %20 for a literal space [skip ci]
* CI: substitute %20 for a literal space
2020-12-08 18:00:36 +01:00
André Silva
48d5156357
client: remove duplicate implementation of block_status ( #7694 )
2020-12-08 14:07:24 +01:00
Tomasz Drwięga
39a776cd00
Streamline frame_system weight parametrization ( #6629 )
...
* Basic weights builder.
* Fixing WiP
* Make the tests work.
* Fix weights in node/runtime.
* WiP.
* Update pallets with new weights parameters.
* Validate returns a Result now.
* Count mandatory weight separately.
* DRY
* BREAKING: Updating state root, because of the left-over weight-tracking stuff
* Update tests affected by Mandatory tracking.
* Fixing tests.
* Fix defaults for simple_max
* Update frame/system/src/weights.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Rework the API a bit.
* Fix compilation & tests.
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Add extra docs & rename few things.
* Fix whitespace in ASCII art.
* Update frame/system/src/limits.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Fix max_extrinsic calculations.
* Fix conflicts.
* Fix compilation.
* Fix new code.
* re-remove generic asset
* Fix usage.
* Update state root.
* Update proxy.
* Fix tests.
* Move weights validity to integrity_test
* Remove redundant BlockWeights.
* Add all/non_mandatory comment
* Add test.
* Remove fn block_weights
* Make the macro prettier.
* Fix some docs.
* Make max_total behave more predictabily.
* Add BlockWeights to metadata.
* fix balances test
* Fix utility test.
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org >
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-12-08 13:18:34 +01:00
Guillaume Thiolliere
f6198b4c1b
implement more convertion on NumberOrHex ( #7682 )
2020-12-08 10:10:46 +01:00
Bastian Köcher
588461f52a
Make sure the companion CI test fails on any error ( #7683 )
2020-12-07 16:48:54 +01:00
Kian Paimani
8e9f9057fe
Update Cargo.toml ( #7627 )
...
On behalf of dependabot, because we use 1.4.x in it clashes with this.
2020-12-07 15:32:16 +00:00
Pierre Krieger
22fdd3a6ea
Fix #7629 ( #7680 )
...
* Fix #7629
* Update client/network/src/service.rs
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-12-07 15:04:32 +01:00
Pierre Krieger
1ca5e8856b
Fix two potential connection poisonings ( #7677 )
2020-12-07 10:10:21 +01:00
Bastian Köcher
d9b1b14769
Adds support for tuples in runtime-interface ( #7672 )
2020-12-06 15:14:19 +01:00
Shawn Tabrizi
4b8cee9e55
Add Standard Error to Weight Template ( #7652 )
...
* Add standard error to weight template
* fix test compile
2020-12-04 22:09:19 +01:00
Gavin Wood
80af50b830
Features needed for reserve-backed stablecoins ( #7152 )
...
* Features needed for reserve-backed stablecoins
* Builds & tests.
* Double map for an efficient destroy.
* Update frame/assets/src/lib.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
* ED/zombie-count/refs
Feature: ED/minimum balance enforcement
Feature: enforce zombie count
Feature: allow system-alive accounts to exist, but add reference
* Update frame/assets/src/lib.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
* Update frame/assets/Cargo.toml
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Docs
* Some tests
* More tests
* Allow for max_zombies to be adjusted
* Test for set_max_zombies
* Tests and a couple of fixes
* First few benchmarks
* Benchmarks.
* Fix error message in test
* Fixes
* Fixes
* Fixes
* cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_assets
* Update frame/assets/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Fixes
* Fixes
* Fixes
* cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_assets
* Fixes
* Update default weight
* Add proper verification to benchmarks
* minor improvements to tests
* Update frame/assets/src/benchmarking.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Fix
* New weights system
* fix compile
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-12-04 16:57:09 +01:00
Bastian Köcher
947b82df68
Don't panic on a sink error ( #7666 )
2020-12-03 17:11:49 +01:00
Bastian Köcher
2877c038cf
Use block requests to check if block responses are correct ( #7653 )
...
* Use block requests to check if block responses are correct
Before this pr sync relied on recently announced blocks to check if a
given peer response is correct. However this could lead to situations
where we requested a block from a peer and it gave us the requested, but
we rejected the response because this peer never send us an announcement
for the given block. See the added tests for a reproduction of the
problem.
With this pr, we now take the block request to check if a given response
matches the request. A node should not send us a block response
without a request anyway.
Essentially there is still a bug, because as you see in the test, we are
requesting block 2, while we already have this block imported. It even
happens that we request a block from the network that we have authored.
However a fix for this would require some more refactoring of the sync code.
* Revert change
* Give the test a proper name
* Add moar logging
* Move cheaper checks
* Move checks to common place
2020-12-03 15:49:23 +01:00
mattrutherford
56c97ce604
RPC to allow setting the log filter ( #7474 )
...
* Add filter reload handle
* add RPC, move logging module from cli to tracing
* remove dup fn
* working example
* Update client/rpc-api/src/system/mod.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
* Prefer "set" to "reload"
* Re-enable the commented out features of the logger
* Remove duplicate code
* cleanup
* unneeded lvar
* Bump to latest patch release
* Add new CLI option to disable log filter reloading,
Move profiling CLI options to SharedParams
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Applied suggestions from reviews
* Fix calls to init_logger()
* Handle errors when parsing logging directives
* Deny `system_setLogFilter` RPC by default
* One more time
* Don't ignore parse errors for log directives set via CLI or RPC
* Improve docs
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/config.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fix merge errors
* include default directives with system_setLogFilter RPC,
implement system_rawSetLogFilter RPC to exclude defaults
* docs etc...
* update test
* refactor: rename fn
* Add a test for system_set_log_filter – NOTE: the code should likely change to return an error when bad directives are passed
* Update client/cli/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Address review grumbles
* Add doc note on panicking behaviour
* print all invalid directives before panic
* change RPCs to: addLogFilter and resetLogFilter
* make CLI log directives default
* add comments
* restore previous behaviour to panic when hard-coded directives are invalid
* change/refactor directive parsing
* fix line width
* add test for log filter reloading
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* finish up suggestions from code review
* improve test
* change expect message
* change fn name
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* add docs, remove unused fn
* propagate Err on invalid log directive
* Update tracing-subscriber version
* Improve docs for `disable_log_reloading` CLI param
Co-authored-by: Matt <mattrutherford@users.noreply.github.com >
Co-authored-by: David <dvdplm@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-12-03 13:17:44 +00:00
Krishna Singh
f717a20446
Changed map to filter map so that Phragmen ignores empty voters ( #7378 )
...
* Changed map to filter map so that Phragmen ignores empty voters
* Resolve flaws and added test case
* Updated test
2020-12-03 12:44:53 +00:00
LusWar
3ce406c140
Update ss58 registry for Phala network ( #7654 )
2020-12-03 12:22:03 +01:00
Guillaume Thiolliere
7e83b7a7f2
Refactor StorageInstance trait to be usable more easily ( #7659 )
...
* refactor StorageInstance to be usable without macros
* better description
* update types doc
* Update frame/support/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-12-03 10:51:08 +00:00
Max Inden
b149b1fdc0
*: Update to libp2p v0.31.2 ( #7658 )
2020-12-02 17:45:49 +00:00
Pierre Krieger
610585d17f
Remove sc_network::NetworkService::register_notifications_protocol and partially refactor Grandpa tests ( #7646 )
...
* Remove sc_network::NetworkService::register_notifications_protocol
* Missing calls to .into()
* Wrong crate name
* [WIP] Fix Grandpa tests
* One more passing
* One more. Two to go.
* This one was actually already passing 🎉
* Last one compiles
* Progress
* grandpa: fix voter_persists_its_votes test
* Restore other tests
* Try spawn future later
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2020-12-02 16:35:48 +00:00
Pierre Krieger
3761fe3161
Show reputation changes when dropping peer ( #7655 )
...
* Show reputation changes when dropping peer
* Print all
2020-12-02 16:34:05 +00:00
Bastian Köcher
9d43568e4e
Use unreleased trybuild to fix CI ( #7656 )
2020-12-02 16:53:44 +01:00
André Silva
b737ebba6d
fork-tree: fix tree rebalancing ( #7616 )
...
* fork-tree: rebalance tree when inserting inner node
* fork-tree: fix tests for new rebalancing behavior
* fork-tree: fix node iterator initial state
* grandpa: fix tests
2020-12-01 18:49:09 +00:00
Tomasz Drwięga
6079fabdd3
Remove a stray file. ( #7649 )
2020-12-01 13:40:53 -05:00
Benjamin Kampmann
e2b486cfb1
minor fix and improvements on localkeystore ( #7626 )
...
* minor fixes and improvements on localkeystore
* fixing tests
* update docs
2020-12-01 14:35:06 +00:00
Andronik Ordian
e0016473a9
remove unused deps pulled by parity-util-mem ( #7635 )
...
* remove unused deps pulled by parity-util-mem
* fix a warning about unused Cargo key
2020-12-01 12:50:27 +00:00
jolestar
22a28db957
Fix cargo clippy warning in peerset. ( #7641 )
...
* Fix cargo clippy warning in peerset.
* Update client/peerset/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-12-01 10:58:00 +00:00
Shawn Tabrizi
762b4b25d0
Fix CI Link Check ( #7639 )
...
* fix trigger fingers
* more
* Update frame/example-offchain-worker/README.md
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2020-11-30 22:01:18 +00:00