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
97fed89079
Companion for substrate/5686 ( #1008 )
...
* Companion for substrate/5686
* Update substrate
2020-04-22 09:51:55 +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
ed9c8ce662
Fix extensions handling for Parachain validation ( #1015 )
...
The `TaskExecutor` extension is now required by Substrate to batch verify signatures.
Co-authored-by: NikVolf <nikvolf@gmail.com >
2020-04-21 19:59:59 +03:00
Rakan Alhneiti
2e521d30ea
Companion PR to #5182 - Substrate offchain signing ( #985 )
...
* Implement offchain::SendTransactionTypes
* Fix test-runtime
* Fix Kusama
* Add SendTransactiontypes to Kusama
* impl SendTransactiontypes for parachains and registrar
* Fix typos
* Provided extrinsic type
* Implement AppCrypto for signing transactions
* Add signing capabilities to runtime
* Fix test runtimes
* Implement CreateSignedtransaction for Test
* Implement signing types for test runtimes
* Fix test runtime create transaction impl
* Fix build
* Bump kusama's spec version
* Update substrate
* Use all_accounts
2020-04-21 18:50:32 +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
Bastian Köcher
765c456a10
Fix building master ( #1014 )
...
* Fix building master
* Fix westend chainspec
2020-04-21 16:21:11 +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
Ashley
14766804c0
Remove usage of substrate-test-runtime. ( #969 )
...
* Switch from using the substrate_test_runtime Extrinsic to the polkadot_test_runtime one
* Copy genesismap into test-runtime
* Add UncheckedExtrinsics
* Fix tests :^)
* Remove unused functions from genesismap
* DRY, clean up
* Clean up
* Update service/src/grandpa_support.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix indentation
* Update runtime/test-runtime/src/genesismap.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-21 12:56:22 +02:00
Cecile Tonglet
06a36a6650
Update substrate & polkadot ( #82 )
2020-04-21 12:17:50 +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
cheme
1a4db93c50
Companion to child trie api change #4857 ( #950 )
2020-04-21 10:39:35 +02:00
Bastian Köcher
9f9b3fb4c6
Don't leak std feature to WASM ( #81 )
2020-04-21 10:34:41 +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
Bastian Köcher
fb2e0c0ca9
Make sure collators join the validation network ( #1010 )
...
Collators need to join the validation network to tell its connected
relay chain peers the leaf they listen on. This is required to make the
Parachain validator send the signed statement to the collators as well.
2020-04-20 15:58:36 -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
Bastian Köcher
41e5f0dcfd
Introduce message broker for receiving and sending relay chain messages ( #80 )
...
* Start message broker implementation
* Finish first stub implementation
* Add features
* Fix attribute
* Update primitives/src/lib.rs
Co-Authored-By: Joshy Orndorff <JoshOrndorff@users.noreply.github.com >
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com >
2020-04-20 16:22:05 +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
thesilk-tux
79dcce1674
update local chain name in docker-compose and docu ( #1009 )
...
* update local chain name in docker-compose and docu
the name of a local network changed from local to polkadot-local so
some local test environments were broken and the ticket #965 was
created
* using CLI flags --alice in local dev
as this directly adds the required keys to the keystore
Co-authored-by: Christian Seidemann <christian.seidemann@t-systems.com >
2020-04-20 13:57:11 +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
Bastian Köcher
eab3624096
Release 0.7.30 ( #1006 )
...
* Release 0.7.30
* Update Substrate & libp2p
2020-04-17 23:01:00 +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
Nikolay Volf
39e8013490
Companion PR for 5657 ( #1003 )
...
* prometheus registry to txpool
* Fix network tests
* Use None as the network config path
* update substrate
Co-authored-by: Ashley Ruglys <ashley.ruglys@gmail.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-04-17 17:29:33 +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
Gav Wood
abd2650a58
Update Substrate
2020-04-17 12:11:48 +02:00
Gavin Wood
e303f92f20
Companion for Runtime Semver ( #987 )
...
* Companion for Runtime Semver
* Fix
2020-04-17 12:10:58 +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
Kian Paimani
762c741c55
Clean Phragmén Equlise API ( #5452 )
...
* Clean phragmen API and equalise()
* Stabilize new api
* Fix phragmen fuzzers
* More fixes
* Make fuzzers reproducible
* improvements
* Make equalize update assignments as well.
* total function for staked_assignment.
* Fix fuzzer build
* remvoe TODO
* Fix a bunch more.
* clean stray debug stuff
* Update primitives/phragmen/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* fix range function
* fix number generator
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-04-17 09:53:30 +02:00
Pierre Krieger
0fd5643e84
Adjustments to Kademlia-related metrics ( #5660 )
...
* Turn kbuckets_num_nodes into a GaugeVec
* random_kademlia_queries -> kademlia_random_queries
* kademalia_random_queries_total now a CounterVec
* Add metrics about records store
2020-04-17 09:11:47 +02:00