Dan Forbes
ca3f54b4af
Document crypto key identifiers ( #5750 )
2020-04-23 17:10:13 +01:00
Hoani Bryson
aabbf52909
Regression testing and readability additions for reward curve log2 ( #5610 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-23 15:43:28 +02:00
Nikolay Volf
67200c1f5b
Integrated trie benchmark: part 2 ( #5702 )
2020-04-23 15:42:23 +02:00
Bastian Köcher
46677555ac
Allow missing functions when checking the new runtime's version ( #5741 )
2020-04-23 14:54:52 +02:00
Ashley
fd65c3807c
Fix error in browser demo readme ( #5754 )
2020-04-23 14:53:35 +02:00
Svyatoslav Nikolsky
8689a97a0d
make GrandpaJustification::decode_and_verify_finalizes public ( #5746 )
2020-04-23 12:07:08 +01:00
Nikolay Volf
1a41b88430
Full block import benchmark ( #5745 )
2020-04-23 12:55:57 +02:00
Benjamin Kampmann
624e95b1af
Fix leak in stream notifications ( #5739 )
2020-04-23 12:01:09 +02:00
Nikolay Volf
ff9c88d21c
Assign DB weights for node runtime ( #5703 )
2020-04-23 11:51:52 +02:00
Max Inden
e84b06a8c0
client/network-gossip/state_machine: Reduce indentation level ( #5714 )
...
* client/network-gossip/src/state_machine: Add unit test for on_incoming
Add two unit tests to ensure `on_incoming` is ingoring discarded
messages and reports and ignores messages from unknown peers.
* client/network-gossip/state_machine: Reduce indentation level
* client/network-gossip/bridge: Remove unnecessary into_iter
* client/network-gossip/state_machine: Report success after register check
* client/network-gossip/state_machine: Error not report on unregistered
`peers` contains all the peers we're connected to. If we receive a
message from a peer not in this list, that means there's an internal
problem within the local client. It's not the fault of the peer in
question.
With the above in mind instead of reducing the reputation of such peer,
log an error.
2020-04-23 09:58:43 +02:00
Toralf Wittner
421ef498f4
network: Only insert global addresses into the DHT. ( #5735 )
...
* network: Only insert global addresses into the DHT.
Currently every address reported via libp2p-identify is inserted into
the DHT which thus contains a multitude of unreachable addresses such
as from 127.0.0.0/8 or 10.0.0.0/8.
Issue #5099 suggested a dedicated service over UDP to gauge the
reachability of an address, which would however incur extra I/O costs
and be of limited use.
As an alternative and simpler tactic, this PR only allows global IP
addresses to be inserted into the DHT unless an explicit command-line
flag `--allow-non-global-addresses-in-dht` is given or a node is
started with `--dev`. This opt-in behaviour is meant to allow
site-local networks to still make use of a DHT.
* Enable non-global in more test setups.
* Replace command-line option with different name.
* Another test fix.
2020-04-23 09:52:20 +02:00
André Silva
96b7cec1ce
slots: fix slot lenience methods ( #5742 )
...
* slots: extract slot lenience from babe and aura
* slots: add tests for slot lenience
* slots: fix comment in test
2020-04-23 09:42:53 +02:00
Ashley
733a4250aa
Fix the browser tests by not relying on Flaming Fir ( #5728 )
...
* Fix the browser tests
* Mistyping
* Fix warnings
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-04-22 16:28:08 +02:00
Bastian Köcher
4e7e65ff99
Make version_is_full test work without .git being available ( #5737 )
2020-04-22 15:56:27 +02:00
Kian Paimani
6607393f9b
enum Pays for PaysFee ( #5733 )
...
* enum Pays for PaysFee
* Fix doc test
* Update bin/node/executor/tests/basic.rs
* Update bin/node/executor/tests/basic.rs
2020-04-22 15:50:25 +02:00
Pierre Krieger
c424ce94a3
Enable yamux flow control by default ( #5734 )
...
* Enable yamux flow control by default
* Tweak description
* Apply suggestions from code review
2020-04-22 14:31:05 +02:00
Pierre Krieger
a7f578d63a
Add a protocol that answers finality proofs ( #5718 )
...
* Add a protocol that answers finality proofs
* Fix documentation
* Use Toggle
2020-04-22 10:58:26 +02:00
Pierre Krieger
3ad9f65f11
Send a status message on block announce handshake ( #5726 )
...
* Send a status message on block announce handshake
* Make sure to send the handshake to all handlers
2020-04-22 10:20:52 +02:00
Kian Paimani
50a7e12b3f
Migrate away from SimpleDispatchInfo ( #5686 )
...
* Migrate away from SimpleDispatchInfo
* Fix imports
* Better doc
* Update lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-04-22 09:20:28 +02:00
Pierre Krieger
25c3ab2c1e
Fix warning reported in out_events when Registry is None ( #5716 )
2020-04-22 00:36:12 +02:00
pscott
f5d7b5bc92
Remove TaskManagerBuilder ( #5725 )
...
* Remove TaskManagerBuilder
* Clean up use declaration fo SpawnTaskHandle
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-04-22 00:35:01 +02:00
Bastian Köcher
20f211a624
Require fn token in decl_storage get ( #5717 )
...
* Require `fn` token in `decl_storage` `get`
The `fn` token was already for quite some time as an optional parameter.
It was introduced to make these functions better findable. This pr makes
the `fn` token required.
* Remove `GetterNoFnkeyword`
2020-04-21 16:58:57 +02:00
Rakan Alhneiti
25751c0562
Offchain signing ( #5182 )
...
* New approach to offchain signing.
* Use in im-online
* Rewrite to use Account<T>
* DRY signing.
* Implement send_raw_unsigned_transaction
* WiP
* Expunge LocalCall
* Expunge LocalCall
* Fix compilation.
* Solve call.
* Make it compile again.
* Finalize implementation.
* Change CreateTransaction
* Clear CreateTransaction.
* Add price payload
* Send raw transaction
* Submit signed payload / unsigned transaction (WIP)
* Supertrait requirements on T::Signature
* Validate signature of payload on an unsigned transaction
* Fix encoding - part 1
* Make it compile.
* Fix compilation of unsigned validator.
* Pass price payload to the transaction
* Make block number part of the signed payload
* Send signed transaction
* Implement all_accounts, any_account
* Fix formatting
* Implement submit_transaction
* Submit signed transaction (ForAll, ForAny)
* Fix formatting
* Implement CreateSignedTransaction
* Move sign and verify to AppCrypto
* Sign transaction
* Call `use_encoded`
* Remove SubmitAndSignTransaction
* Implement runtime using new SigningTypes
* Adapt offchain example to changes
* Fix im-online pallet
* Quick fix: rename AuthorityId2
* Fix offchain example tests
* Add a comment on why keystore is required in unsigned transaction test
* Use UintAuthorityId instead of u64
* WIP
* Remove IdentifyAccount from UintAuthorityId
* Implement PublicWrapper type
* Fix im-online tests
* Fix runtime test
* Bump spec version
* Fix executor tests
* Rename ImOnlineAuthId -> ImOnlineAuthorityId and formatting
* Fix merge
* Documentation
* Revert u64 -> UintAuthorityId conversion
* Fix string errors
* Document public members in offchain module
* Introduce SubmitTransaction
* Update pallets to use SubmitTransaction
* WIP
* Use SubmitTransaction in offchain
* Use `submit_unsigned_transaction`
* Fix tests
* Update docs
* Remove SigningTypes requirement from `SendTransactionTypes`
* Fix tests
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/example-offchain-worker/src/tests.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Remove leftover from previous iterations
* Change enum to struct
* Remove public
* Move mock to node/executor/tests
* Cleanup test-helpers
* Make `application-crypto` `std` feature internal
The macros should not generate code that requires that the calling crate
has a feature with the name `std` defined.
* Revert cargo lock update
* Use TestAuthorityId from common
* Restore members of account to public
* Tidy up imports
* Fix benchmarking pallet
* Add tests demonstrating ForAll, ForAny on signer
* Move definition of AppCrypto
in example-offchain-worker
from tests to mod::crypto
* Cleanup stray comment
* Fix ValidTransaction
* Re-fix CreateSignedTransaction
* Address PR feedback
* Add can_sign method to signer
* Propagate error
* Improve documentation
* Fix vec! macro not available
* Document SendTransactiontypes
* Add some docs.
* Split signing examples
* Add tests for signing examples
* WIP can_sign - PR feedback
* WIP
* Split for_any / for_all into different calls
* Verify payload and signature in test
* Fix can_sign implementation
* Fix impl_version
* Import Box from sp_std
* Create issues for TODOs
* Ignore doctest.
* Add test directly to system. Adjust UintTypes.
* Add some tests to account filtering.
* Remove code samples and point to example offchain worker
* Fix doc links
* Fix im-online tests using signatures.
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-04-21 14:55:05 +02:00
Max Inden
798de8337b
client/authority-discovery: Add metric exposing priority group size ( #5707 )
...
Expose the amount of addresses that are passed from the authority
discovery module down to the network peer set manager as a priority
group in order to connect to the corresponding nodes.
```
authority_discovery_priority_group_size 10
```
2020-04-21 10:54:37 +02:00
Joshy Orndorff
723ee05a73
Move AuraPair import to new_full_start! macro ( #5709 )
2020-04-21 10:52:34 +02:00
Pierre Krieger
f2578bdc3b
Pass an encoded Roles as the notifications protocols handshakes ( #5665 )
2020-04-21 10:47:37 +02:00
Max Inden
5db336c743
client/network-gossip: Move sink IO outside of state_machine ( #5669 )
...
* client/network-gossip: Move sink IO outside of state_machine
`ConsensusGossip` is supposed to be a deterministic state machine.
`GossipEngine` wrapping `ConsensusGossip` should handle IO operations.
This commit moves the `message_sink` IO operations to `GossipEngine`.
More specifically on incoming messages a `GossipEngine` calls
`ConsensusGossip::on_incoming` to validate and register the messages.
`ConsensusGossip` returns the valid messages which are then forwarded by
`GossipEngine` to the upper layer via the `message_sinks`.
* client/network-gossip: Adjust and extend tests
* Update client/network-gossip/src/bridge.rs
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com >
2020-04-20 16:40:44 -04:00
Yuanchao Sun
52d0173ec3
Add RPC function state_getProof, resolves #1110 ( #5649 )
...
* Add RPC function state_getProof, resolves #1110
* Apply suggestions from code review
* Update client/rpc/src/state/state_full.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update Cargo.lock
* Make block hash optional
* Wrap StorageProof as Bytes
* Add struct ReadProof
* Fix typo
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-20 21:09:55 +02:00
Vladimir Komendantskiy
0ce9657db2
added the Polymath subkey ID ( #5705 )
2020-04-20 21:05:45 +02:00
cheme
4ffcf98d8d
Child trie api changes BREAKING ( #4857 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 15:21:22 +02:00
Shawn Tabrizi
7d9aa81bfc
Implement try_mutate for storage value and storage double map ( #5699 )
...
* impl try_mutate for storage value and storage double map
* Docs + Reuse `try_mutate` in `mutate`
2020-04-20 15:05:20 +02:00
Ashley
319a00fb1c
Add a crate to test the in-browser light client. ( #4887 )
...
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-04-20 14:45:13 +02:00
Bastian Köcher
1d1caed335
Improve tracing ( #5698 )
...
* Improve tracing implementation
* Enable tracing in runtime interfaces
* Switch to `TRACE` level
2020-04-20 14:37:27 +02:00
Pierre Krieger
ca1c60c2cf
Move around definitions in sc_network ( #5701 )
2020-04-20 14:35:17 +02:00
thiolliere
e1ef69506a
update code owners ( #5700 )
2020-04-20 13:37:05 +02:00
Jaco Greeff
8c52a2dae6
Pass max-total to RewardRemainder on end_era ( #5697 )
...
* Pass max-total to RewardRemainder on end_era
* add test and event
* add doc
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 13:13:45 +02:00
Igor Matuszewski
4b1f7d187f
Allow to expose a subset of unsafe RPCs ( #5233 )
...
* sc-cli: Use type-safe constructors for RPC/Prometheus interfaces
* service: Simplify rpc handler creation
Could probably be further simplifies once [this][commit] lands.
[commit]: https://github.com/paritytech/jsonrpc/commit/20485387ed06a48f1a70bf4d609a7cde6cf0accf
* service: Streamline some HTTP & WS server start logic
* client: Introduce a simple RPC policy mechanism
* rpc/system: Check unsafe RPCs
* rpc/offchain: Check unsafe RPCs
* rpc/author: Check unsafe RPCs
2020-04-20 11:03:58 +02:00
Joshy Orndorff
d05dc090a8
Revise docs on randomness ( #5497 )
...
* Initial attempt to revise docs.
* Remove incorrect warning from Babe pallet
* Add more hints that collective flip is for low security
2020-04-19 11:57:16 +02:00
Pierre Krieger
cff487dd22
Refactor misleading log in discovery ( #5679 )
...
* Refactor misleading log
* Forgot to git add the compilation fix
2020-04-18 14:04:23 +02:00
Eliott Teissonniere
cacba117f8
subkey: compute and inspect a moduleid ( #5676 )
...
* create moduleid command
* fill README
* make it work on the last master
2020-04-18 00:17:36 +02:00
Pierre Krieger
bc6ebabf23
Force libp2p 0.18.1 ( #5689 )
2020-04-17 23:00:44 +02:00
Pierre Krieger
f544907bd2
Revert listening on IPv6 by default ( #5687 )
2020-04-17 20:34:23 +02:00
Ashley
95dc400bb8
Make network_config_path an Option ( #5661 )
...
* Make network_config_path an Option
* Fix network tests
* Use None as the network config path
* Fix cli
* Don't make PathBuf an Option in a cli context
2020-04-17 14:48:45 +02:00
Alexander Theißen
249a92aece
Fix weight refund to use proper adjustment factor ( #5640 )
2020-04-17 12:20:04 +02:00
Gavin Wood
fd2cb9ca83
Transaction versioning in the RuntimeVersion ( #5582 )
...
* Add transaction_version
* Semantic versioning for runtimes
* Move new field to bottom
* Versioning
* Runtime versioning stuff.
* Fix test
* Adds tests and fixes bugs
* Bump runtime
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-04-17 12:10:31 +02:00
Nikolay Volf
fea626ca84
Add prometheus registry to transaction pool, with couple of initial metrics ( #5657 )
...
* make new contructor
* add metrics to txpool
* fix review
* fix doc comment
* change to counters
* Update client/transaction-pool/src/metrics.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Update client/transaction-pool/src/metrics.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Update client/transaction-pool/src/metrics.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Update client/transaction-pool/src/lib.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Update client/transaction-pool/src/lib.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* use dedicated wrapper
Co-authored-by: Max Inden <mail@max-inden.de >
2020-04-17 11:02:45 +02:00
Xiliang Chen
7dcff4c1e2
emit TipClosed event on success tip payout ( #5656 )
...
* emit TipClosed event on success tip payout
* test for events
* bump version
2020-04-17 10:37:00 +02:00
Joshy Orndorff
a42d87483c
remove rustdocs script ( #5675 )
2020-04-17 10:35:50 +02:00
Shawn Tabrizi
276b27a7d4
Add migration for transaction-payment ( #5673 )
2020-04-17 09:56:17 +02:00
Bastian Köcher
c5c9b56e94
Listen on ipv6 by default as well ( #5677 )
...
Instead of just listening on ipv4 by default, this enables listening on
ipv6 as well. While doing this, it also fixes a bug which lead to always
listen on all sockets, even if we specify listen addresses explicitly.
2020-04-17 09:53:52 +02:00