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
Tomasz Drwięga
bc0b8fbddf
Add performance tracing to validate_transaction ( #5671 )
...
* Validate transaction timeouts
* Add timing
* Add tracing to transaction validation.
* Fix docs.
Co-authored-by: NikVolf <nikvolf@gmail.com >
2020-04-17 08:42:50 +02:00
Nikolay Volf
b50d2f2d1f
Companion PR for 5023 ( #939 )
...
* add extension registrations
* update to latest
* merge&update
2020-04-16 22:58:16 +02:00
Nikolay Volf
372f8b2c7e
Batch signature verification ( #5023 )
...
* create parallel tasks extension
* make type system happy
* basic externalities
* test for dynamic extensions
* batching test
* remove premature verify_batch
* shnschnorrkel batch
* alter test
* shnschnorrkel test
* executive batching
* some docs
* also multi/any signatgures
* error propagation
* styling
* make verification extension optional
* experimental ed25519 parallelization
* some merge fallout
* utilize task executor
* merge fallout
* utilize task executor more
* another merge fallout
* feature-gate sp-io
* arrange toml
* fix no-std
* sr25519 batching and refactoring
* add docs
* fix name
* add newline
* fix block import test
* long sr25519 test
* blocking instead of parking
* move everything in crypto
* return batch_verify to check :)
* use condvars
* use multi-threaded executor for benches
* don't call via host interface
* try no spawning
* add true
* cleanup
* straighten batching
* remove signature check from this test (?)
* remove now pointless test
* remove another now useless test
* fix warnings
* Revert "remove another now useless test"
This reverts commit bbdec24bb67ed4373072daef7c863e1a8825bd8b.
* rethink the sp-io-part
* Revert "remove now pointless test"
This reverts commit 4d553066322e65782264caa6053d4cd5538df977.
* fix wording
* add wording
* add todo and fix
* return check and fix
* add logging in sp-io
* Update primitives/io/src/batch_verifier.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* address review and use std condvar
* account for early exit
* address reivew
* address review
* more suggestions
* add docs for batch verification
* remove unused
* more review suggestions
* move to sp-runtime
* add expects
* remove blocks
* use entry
* Update primitives/io/src/batch_verifier.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/externalities/src/extensions.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* update overlooked note
* remove stupid return
* Update primitives/io/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/io/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* fix wording
* bump spec_version
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-16 21:40:04 +02:00
Nikolay Volf
36243068bd
update parity-util-mem ( #5668 )
2020-04-16 21:38:04 +02:00
Max Inden
70becefb3d
service/src/lib: Enable authority discovery on sentry nodes ( #984 )
...
* service/src/lib: Enable authority discovery on sentry nodes
When run as a sentry node, the authority discovery module does not
publish any addresses to the dht, but still discovers validators and
sentry nodes of validators.
* bin/node/cli/src/service: Use expressions instead of statements
* Cargo.lock: Run `cargo update`
* service/src/lib: Fix compile error
2020-04-16 20:30:22 +01:00
Max Inden
d742e88e79
client/authority-discovery: Allow to be run by sentry node ( #5568 )
...
* client/authority-discovery: Allow to be run by sentry node
When run as a sentry node, the authority discovery module does not
publish any addresses to the dht, but still discovers validators and
sentry nodes of validators.
* client/authority-discovery/src/lib: Wrap lines at 100 characters
* client/authority-discovery: Remove TODO and unused import
* client/authority-discovery: Pass role to new unit tests
* client/authority-discovery: Apply suggestions
Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com >
* bin/node/cli/src/service: Use expressions instead of statements
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2020-04-16 18:11:26 +01:00
Pierre Krieger
95ee37d242
Add alternative RPC methods to system_networkState ( #5643 )
...
* Add alternatives to system_networkState
* Fix tests
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-16 16:36:14 +01:00
Fedor Sakharov
cf7cf4bd7d
Adds an offchain call to submit double vote reports ( #966 )
...
* Adds an offchain call to submit double vote reports
* Some tweaks
* Remove unnecessary IdentifyAccount impls
* Adds ValidateDoubleVoteReports to test runtime
* sp-application-crypto is only a dev dependency
2020-04-16 16:19:51 +01:00