Nikolay Volf
dd573374e0
Add block construction prometheus metrics ( #6030 )
...
* Add basic authorship metrics
* fixes
* no arc
* move to crate
* Update client/proposer-metrics/Cargo.toml
Co-authored-by: Max Inden <mail@max-inden.de >
* remove prefix
* use HistogramTimer
* Update client/proposer-metrics/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/basic-authorship/src/basic_authorship.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/basic-authorship/src/basic_authorship.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/basic-authorship/src/basic_authorship.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/basic-authorship/src/basic_authorship.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/basic-authorship/src/basic_authorship.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/proposer-metrics/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/proposer-metrics/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-05-18 13:48:44 +00:00
André Silva
09a16a30a6
grandpa: minor cleanup for gossip round start instant ( #5976 )
...
* grandpa: move gossip round start instant to LocalView
* grandpa: round duration is 2 gossip periods
2020-05-18 12:53:33 +01:00
Nikolay Volf
d5411969ac
fix whitespace ( #6062 )
2020-05-18 13:51:28 +02:00
Benjamin Kampmann
7c565085e9
resetting to -dev ( #6050 )
2020-05-16 19:03:04 +02:00
Rakan Alhneiti
292d456277
Aura fix: make sure the key exists locally ( #6054 )
...
* Fix AURA
* Add test to make sure claim slot works as expected
2020-05-16 19:00:58 +02:00
Arkadiy Paronyan
cdb7808a0e
Remove on_block_imported ( #6039 )
...
* remove on_block_imported
* Update client/network/src/service.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-05-16 12:59:34 +02:00
Benjamin Kampmann
d7463d348f
Releasing Alpha.8 ( #6048 )
2020-05-15 21:56:56 +02:00
Benjamin Kampmann
efc4849f1a
Meter block import results via prometheus ( #6025 )
2020-05-15 17:25:51 +02:00
satellitex
302c543b49
Added RuntimePublic for ecdsa public key. ( #6029 )
...
* add generate ecdsa, etc to keystore
* impl ecdsa needed traits
* add ecdsa to sr_io
* add ecdsa to application-crypto
* add ecdsa to test-utils
* add ecdsa debug derive
* fix ecdsa public
2020-05-15 15:04:38 +00:00
Rakan Alhneiti
f36f57b0bf
Use sign_with in consensus ( #6008 )
...
* Add derive_more to sp_core
* Convert Vec to Signature
* Use sign_with in AURA and BABE
* Signing errors
* Update slots to return consensus result
* Fix use
* Clone public key
* Match block_params
* WIP
* Use to_public_crypto_pair
* Pass public key only to block import params
* Address PR review
* Fix consensus RPC
* Fix babe tests
* adjust uses
* Fix line widths
2020-05-15 15:03:52 +00:00
Pierre Krieger
6ecdf20a1f
Fix lots of small nits in sc-network ( #6028 )
...
* Fix lots of small nits in sc-network
* Update client/network/src/protocol/sync/blocks.rs
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
* Fix warning
* Yes. The line width.
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
2020-05-15 12:58:52 +01:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Andrew Plaza
a31f4f6a5c
bump kvdb-* versions ( #6017 )
2020-05-15 11:17:39 +02:00
Pierre Krieger
d169a48dfb
Don't log the yamux errors by default ( #6034 )
2020-05-14 18:21:07 +02:00
Bastian Köcher
73389df860
Fix RPC tests for machines with a high number of cores ( #6021 )
2020-05-14 11:08:39 +02:00
Pierre Krieger
074d80f519
Fix potential state mismatch in behaviour.rs ( #6013 )
...
* Fix state mismatch in behaviour.rs
* Add TODO
2020-05-13 19:50:01 +02:00
Bastian Köcher
daf8cf0600
Handle clap errors manually and don't reset SIGPIPE ( #6012 )
...
Instead of resetting `SIGPIPE` to the system default handler, we now
handle a clap error manually and ignore any error when writing to
`stdout`/`stderr`. In this way, the node does not silently stops when it
encounters a `SIGPIPE` in normal mode and we still support piping of the
cli output.
2020-05-13 19:43:38 +02:00
Jon Häggblad
b99033368b
Fix minor clippy lints in grandpa ( #5988 )
...
* grandpa: fix clippy lints about identity conversions
* grandpa: fix clippy lints about unwrap_or_default
* grandpa: fix clippy lints about explicit return
* grandpa: fix clippy lints about unnecessary intermediary
* grandpa: fix clippy lints about to_string
* grandpa: fix clippy lints about unused imports
* grandpa: fix clippy lints about increments
* grandpa: fix clippy lints about unnecessary matches
* grandpa: fix clippy lints about struct arguments
* Fix clippy::redundant_clone
* Fix clippy::clone_on_copy
* Fix clippy::or_fun_call
* Fix clippy::identity_conversion
2020-05-13 17:40:52 +01:00
Pierre Krieger
10492c0689
Add mitigation for the state inconsistency issue ( #5996 )
...
* Add mitigation for the state inconsistency issue
* Add logging
2020-05-13 14:54:59 +02:00
Bastian Köcher
7b19d3c4ce
Give more meaningful error on missing feature when opening a db ( #5999 )
2020-05-13 11:40:10 +01:00
Igor Żuk
eadf28881d
Monitor transactions rejected from the pool as invalid ( #5992 )
2020-05-13 12:02:14 +02:00
Bastian Köcher
e4edd502bf
Only send last finalized block to telemetry ( #6003 )
...
Instead of informing the telemetry about each block that is finalized,
we only need to send the last finalized block. This removes log spam on
initial sync.
2020-05-12 22:08:24 +01:00
Pierre Krieger
0a11c48aa1
Turn an error! into a debug! ( #6000 )
2020-05-12 19:22:41 +02:00
Max Inden
1ede6d1e36
client/network: Remove default Kademlia DHT in favor of per protocol DHT ( #5993 )
...
Substrate was previously running both a chain specific Kademlia DHT as
well as the `/ipfs/kad/1.0.0` Kademlia DHT for backwards compatibility.
(See 4db45a8 for details.)
With the end of the transition period this commit removes the former
only leaving the latter and thus preventing the discovery of
incompatible nodes via Kademlia.
2020-05-12 19:07:36 +02:00
Pierre Krieger
9220bdf361
Spawn the network worker with spawn_blocking ( #5909 )
...
* Spawn the network worker with spawn_blocking
* Some comment adjustments
* Fix shutdown not working
2020-05-12 17:12:32 +02:00
Pierre Krieger
b4b1293c78
Restore the reputation penalty for timeouts ( #5984 )
2020-05-12 17:08:05 +02:00
Svyatoslav Nikolsky
246f7ae368
get tx_hashes from watcher ( #5981 )
2020-05-12 15:46:05 +02:00
André Silva
c91e681db2
babe: minor rpc nits ( #5974 )
...
* babe: fix formatting
* babe: re-use same epoch data in epoch_authorship rpc method
2020-05-12 15:18:15 +02:00
André Silva
871761694e
grandpa: update to finality-grandpa v0.12.3 ( #5972 )
2020-05-12 12:16:46 +01:00
Max Inden
1ce85590ff
client/finality-granpda/until_imported: Rework pinning ( #5983 )
...
An `UntilImported` stream wraps a `Stream` of incoming messages and
waits for blocks those messages are based on before passing the messages
on.
The above `Stream` of incoming messages implements `Unpin`, thus there
is no need to use `pin_project` on the `UntilImported` struct. Instead
one only has to add the `Unpin` trait bound on the `I` trait parameter.
2020-05-12 11:48:28 +01:00
Pierre Krieger
0690bb51a8
Allow passing multiple --log CLI options ( #5982 )
...
* Allow passing multiple --log CLI options
* Comment typo
2020-05-12 11:46:06 +02:00
Pierre Krieger
e5a36c8fa9
Small fix to block response completion reporting ( #5967 )
...
* Small fix to block response completion reporting
* while -> if
2020-05-11 17:39:39 +02:00
Pierre Krieger
ed6c5bb190
Properly log when we discard a sync response ( #5969 )
2020-05-11 14:31:56 +02:00
Jon Häggblad
66931028f4
Don't repeatedly lookup keys in babe_epochAuthorship rpc function ( #5962 )
...
* babe: don't repeatedly lookup keys in authorship rpc function
Expose a new function `claim_slot_using_keypars` in Babe so that the `babe_epochAuthorship` can
lookup authorship for all slots in the epoch without repeatedly looking up keys in the keystore.
Time to run the `babe_epochAuthorship` RPC call goes from 7s to 25ms on a local dev chain on my
machine.
* babe: pass reference to slice instead of ref to Vec
* babe: fix bunch of clippy warnings
2020-05-11 10:48:34 +02:00
Nikolay Volf
679c91e18c
Refactor network transactions handling ( #5939 )
...
* change propagation
* add bound
2020-05-11 10:36:00 +02:00
Arkadiy Paronyan
e0b17dd7a9
Bump wasmtime again ( #5950 )
...
* Update wasmtime (#5822 )
* update wasmtime
* update tests
* Update client/executor/wasmtime/src/host.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* wip
* use master-candidate
* update with patches
* update versions
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Bump version
* Added parallel execution test
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-05-08 22:22:54 +02:00
Joshy Orndorff
2ae3fe121c
Fix light clients in manual seal nodes ( #5955 )
...
* WIP
* WIP
2020-05-08 11:18:32 +02:00
Bastian Köcher
6a6f2554b4
Make sure config_mut returns a mutable reference ( #5942 )
2020-05-07 22:07:46 +02:00
Pierre Krieger
a8fac92396
Disconnect node after sync request cancelled ( #5945 )
2020-05-07 15:07:52 +02:00
Nikolay Volf
ffb2d09aa1
change to vecdeque ( #5937 )
2020-05-07 12:50:07 +02:00
Arkadiy Paronyan
427c33f16f
Use header cache for blockhain cache ( #5929 )
2020-05-07 12:49:30 +02:00
Bastian Köcher
eff1680aed
Revert "Update wasmtime ( #5822 )" ( #5935 )
...
This reverts commit e5163380e7 .
We found some bugs that we first need to fix.
2020-05-07 11:47:38 +02:00
Dan Forbes
848803aba2
Fix docs ( #5928 )
...
* Fix docs
* Update frame/support/src/dispatch.rs
Prettier link
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/runtime/src/traits.rs
Prettier link
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-05-06 23:22:35 +02:00
Bastian Köcher
7ee35f29dc
Make Digest support StorageAppend ( #5922 )
...
* Make `Digest` support `StorageAppend`
This adds support for `StorageAppend` to `Digest`. Digest is just a
wrapper around a `Vec` and we abuse the fact that SCALE does not puts
any special marker into the encoding for structs. So, we can just append
to the encoded Digest. A test is added that ensures, if the `Digest`
format ever changes, we remove this optimization.
* Update weight
* Update frame/support/src/storage/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update frame/system/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2020-05-06 23:16:54 +02:00
André Silva
fbd2ac8f3b
grandpa: report equivocations ( #3868 )
...
* session: runtime api for generating session membership proofs
* grandpa: add runtime api for creating equivocation report txs
* grandpa: submit signed equivocation report transactions
* grandpa: use proper equivocation report type
* grandpa: report equivocations
* grandpa: validate equivocation proof
* grandpa: update to finality-grandpa 0.9.1
* grandpa: fix encoding of session membership proof
* grandpa: initialize set id session mapping for genesis session
* grandpa: fix bug in set_id session validation
* fix compilation
* cleanup from merge conflicts
* cleanup crate tomls
* grandpa: refactor equivocation handling to separate trait
* node-template: fix compilation
* fix test compilation
* bump finality-grandpa to v0.10.2
* rpc: fix runtime version test
* CHERRY-PICK #4200 : Add documentation to SubmitSignedTransaction and actually make it work
Squashed commit of the following:
commit 4f2cb0b1c588a06f2f3b478bb4b28b5cb29d54b9
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Tue Dec 3 16:29:33 2019 +0100
Split the method to avoid confusing type error message.
commit c5bf24eeaaf902add89ed1b046b22c4a4aaeb2cd
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Tue Dec 3 16:19:55 2019 +0100
Make accounts optional, fix logic.
commit 97db1ef556e023cf6847e5ffdb036c0e3ea6fb0a
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Tue Dec 3 10:06:20 2019 +0100
Remove warning.
commit 535f5c116d1a2e826eaf90c3f7e6798e443d61d8
Merge: 516257217 0f1a5f651
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Tue Dec 3 07:08:05 2019 +0100
Merge branch 'master' into td-signed-transactions
commit 516257217bac89fcebd083712f4ea68b7b23b55a
Merge: ac98248c6 2e68c80c2
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Mon Dec 2 13:57:25 2019 +0100
Merge branch 'master' into td-signed-transactions
commit ac98248c6c56cff381130645a82a13d29933cf83
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Mon Nov 25 17:34:52 2019 +0100
Forgotten import.
commit 67a3c19031506c28e31c6bc4a90fff62d467dd58
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Mon Nov 25 17:32:10 2019 +0100
Fix naming and bounds.
commit 93e768ea9df97a4629fca1f9bc4b108fdb33f876
Author: Tomasz Drwięga <tomasz@parity.io >
Date: Mon Nov 25 17:01:05 2019 +0100
Add documentation to signed transactions and actually make them work.
* grandpa: skip block initialization on report submission method
* primitives: allow transaction pool access by default for offchain calls
* grandpa: unused parameters
* grandpa: remove unused method
* grandpa: enable equivocation reporting
* grandpa: add workaround for parameter encoding
* grandpa: fix localized_payload calls in tests
* fix submit_report_equivocation_extrinsic in runtimes
* node: fix submit transaction test compilation
* node: bump spec_version
* rpc: fix api version test
* grandpa: allow custom equivocation offence type
* grandpa: add test for authorities::next_change_height
* grandpa: cleanup report_equivocation function
* node: move reporting app crypto to node-primitives
* grandpa: move equivocation traits to own module
* grandpa: rename app-crypto crate import
* grandpa: export equivocation types
* node: bump spec_version
* grandpa: rename EquivocationReport to EquivocationProof
* grandpa: add missing docs to primitives
* grandpa: add missing docs to equivocation
* node: fix compilation
* grandpa: add missing docs to pallet
* node: bump spec_version
* fix whitespace
* grandpa: return error on offence reporting
* grandpa: expose session and validator count in proofs through traits
* grandpa: use strong key in module KeyOwnerProofSystem
* grandpa: move key ownership proof to grandpa runtime api
* grandpa: remove unnecessary cloning when checking equivocation proof
* grandpa: make report_equivocation a method in Environment
* support: implement KeyOwnerProofSystem for ()
* grandpa: move KeyOwnerProofSystem to module trait
* test-utils: fix runtime compilation
* grandpa: fix test compilation
* grandpa: fix test compilation after merge
* grandpa: simplify transaction submission types
* grandpa: validate equivocation report in signed extension
* client: fix test
* node: use ValidateEquivocationReport signed extension
* grandpa: expose key ownership proof under opaque type
* grandpa: better docs on key ownership proofs
* grandpa: add note about signed extension
* grandpa: add ValidateEquivocationReport::new
* grandpa: remove skip_initialize_block from runtime api
* grandpa: use new offchain transaction submission API
* grandpa: take set_id in generate_key_ownership_proof
* grandpa: update to finality-grandpa v0.12.2
* grandpa: cleanup usages of AuthoritySet::current
* grandpa: fix test
* grandpa: add mocking utilities for equivocation reporting
* grandpa: add test for equivocation reporting
* grandpa: move SetIdSession initialization
* grandpa: add more tests
* node: enable historical session manager
* node: bump spec_version
* node: use strong key types in KeyOwnerProofSystem definitions
* grandpa: export GrandpaEquivocationOffence type
2020-05-06 17:25:51 +01:00
Cecile Tonglet
fd35738163
Improve error message when essential task failed ( #5918 )
...
* Initial commit
Forked at: 9acf88f58b
Parent branch: origin/master
* Improve error message when essential task failed
2020-05-06 15:28:00 +02:00
Pierre Krieger
ddf6f8a1e1
Fix wrong task name ( #5917 )
2020-05-06 15:27:18 +02:00
Max Inden
327d11025e
client/network-gossip/bridge: Use bounded channel ( #5748 )
...
* client/network-gossip/bridge: Use bounded channel
Instead of returning an unbounded channel on
`GossipEngine::messages_for` return a bounded channel. For now the
channel length is determined by the amount of past messages cached in
the `ConsensusGossip`.
With a bounded channel, one can't just fire-and-forget style send into
it, but has to first check whether the channel is ready. Thus this
commit restructures `GossipEngine::poll` and introduces a
`ForwardingState` into `GossipEngine`.
* client/network-gossip/bridge: Add quickcheck for different size channels
2020-05-06 14:56:46 +02:00
Svyatoslav Nikolsky
11f144ee65
update light aux storage when GRANDPA set changes ( #5861 )
2020-05-06 12:12:11 +01:00
Igor Matuszewski
9acf88f58b
client: Replace unsafe_rpc_expose with an RpcMethods enum ( #5729 )
...
* client: Replace `unsafe_rpc_expose` with an `RpcMethods` enum
which can be either Default, Safe or Unsafe. The idea is to have the
following:
| | --rpc-external=false | --rpc-external=true |
|--------------------- |------------------- |----------------- |
| --rpc-methods=Default | | unsafe calls denied |
| --rpc-methods=Safe | unsafe calls denied | unsafe calls denied |
| --rpc-methods=Unsafe | | |
Since the previous `unsafe-rpc-expose` option was confusing.
* client: Only warn against exposing externally unsafe RPC method set
* Apply suggestions from code review
Co-Authored-By: Cecile Tonglet <cecile.tonglet@cecton.com >
* cli: Rephrase doc comment for rpc_methods config
* Improve debuggability of build_spec_works
...by printing to stderr the stderr of the command. This is normally
suppressed for succesful tests but not for failing ones - if that's the
case then it's useful to see the test failure reason inline rather than
having to execute the command separately ourselves.
* Rename RpcMethods::{Default => Auto} variant
* Update bin/node/cli/tests/build_spec_works.rs
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com >
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-05-06 11:30:54 +02:00