Nikolay Volf
6cef6b410e
fix expect text ( #4530 )
2020-01-04 14:34:53 +01:00
Denis Pisarev
75702e146e
check_polkadot now runs nightly and on master (merges) only ( #4492 )
2020-01-03 20:51:26 +00:00
Max Inden
c5fe4295f8
*: Register network event stream for authority discovery ( #4344 )
...
Previously one would create a sender and receiver channel pair, pass the
sender to the `build_network_future` through the service builder and
funnel network events returned from polling the network service into the
sender to be consumed by the authority discovery module owning the
receiver.
With recent changes it is now possible to register an `event_stream`
with the network service directly, thus one does not need to make the
detour through the `build_network_future`.
2020-01-03 20:47:12 +00:00
Nikolay Volf
f0e21eff09
Update kvdb-* and trie ( #4483 )
2020-01-03 20:46:42 +00:00
Max Inden
5cf682cece
client/authority-discovery: Limit number of connections to authorities ( #4487 )
...
* client/authority-discovery: Limit number of connections to authorities
Instead of connecting to all sentry nodes of all authorities, with this
patch the authority discovery module does the following:
- Choose one sentry node per authority at random.
- Choose MAX_NUM_AUTHORITY_CONN out of the above at random.
The module uses randomness to prevent hot spots, e.g. all nodes trying
to connect to a single node. If the authority discovery module would
choose the nodes to connect to at random on each new address that it
learns of, the node would go through a lot of connection churn. Instead
it creates a random seed at start up and uses this seed for its RNG on
each update cycle.
* client/authority-discovery: Extract address cache into own module
* client/authority-discovery/src/addr_cache: Add basic unit tests
* client/authority-discovery: Replace unwrap with expect on [u8] cmp
* .maintain/sentry-node/docker-compose.yml: Prefix endpoint flags
* client/authority-discovery/src/addr_cache: Use sort_unstable and cmp
* client/authority-discovery: Use BTreeMap in addr_cache for sorted iter
To reduce connection churn it is preferrable to have `get_subset` of the
`addr_cache` to return the same result on repeated calls. `get_subset`
iterates a map. To make the process of iteration deterministic, use a
`BTreeMap` instead of a `HashMap`.
2020-01-03 20:40:19 +00:00
Denis Pisarev
fa1e42a2a1
triggers srml-contracts-waterfall ci ( #4490 )
...
* triggers srml-contracts-waterfall ci
* only nightly and merges
* substrate does not use tager cache so far
2020-01-03 20:40:02 +00:00
Tomasz Drwięga
5986869390
Fix period of offchain transactions. ( #4521 )
...
* Fix period of offchain transactions.
* Calculate period dynamically.
* Convert to u64.
2020-01-03 20:39:46 +00:00
Bastian Köcher
f02e6d680a
Make sure docs given to decl_module! are passed to the module struct ( #4526 )
2020-01-03 20:39:30 +00:00
ddorgan
a45aa6e1b6
Update flamingfir spec for new testnet ( #4518 )
...
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-03 12:25:31 +01:00
Pierre Krieger
0b606613b1
ServerToWorkerMsg -> ServiceToWorkerMsg ( #4519 )
2020-01-03 11:47:31 +01:00
Bastian Köcher
4a9697db94
Check for invalid modules when registering a pallet in construct_runtime ( #4520 )
2020-01-02 20:10:20 +01:00
Nikolay Volf
508f94acdf
Update libp2p to fix build ( #4522 )
...
* update libp2p
* update toml files also
2020-01-02 18:37:42 +01:00
Nikolay Volf
65e78b8129
Insert key via node RPC for subkey ( #4514 )
...
* Insert key via node RPC.
* somewhat address the reivew
* Update bin/utils/subkey/src/rpc.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/utils/subkey/src/rpc.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/utils/subkey/src/main.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-02 12:46:45 +01:00
Nikolay Volf
6d06a19f41
Refactor to use only chain info ( #4516 )
2020-01-02 12:46:07 +01:00
Bastian Köcher
8ecc450fd9
Make MultiSigner use compressed ECDSA public key ( #4502 )
...
* Don't use compressed ecdsa public key in verify
* Make `ECDSA` public support compressed
* Make it a proper `expect` message
2019-12-31 19:04:53 +00:00
Nikolay Volf
585f0c0811
update libsecp256k1 ( #4513 )
2019-12-30 11:26:34 -08:00
Bastian Köcher
2e5c327483
Increase metadata version to 10 ( #4512 )
...
Changes in https://github.com/paritytech/substrate/pull/4462 required a
metadata version increment that was forgotten.
2019-12-30 14:59:37 +00:00
Bastian Köcher
43e34bb909
Make wasm-builder remove invalid members ( #4510 )
...
* Make wasm-builder remove invalid members
Wasm-builder now removes members that point to packages that do not
exist anymore or that were renamed. Up to now, the build would fail and
required manual fixing.
* Fixes build
2019-12-29 21:54:10 +01:00
Bastian Köcher
56355879be
Fix cli for structopt 0.3.7 and pin to that version ( #4509 )
...
* Fix cli for structopt 0.3.7 and pin to that version
This is just some hotfix to make everything compile. In the future it
will require another pr to not depend on internals of StructOpt, but
that will probably also require some additions to StructOpt itself. To
not break the code again with another StructOpt, this also pins the
StructOpt version.
* Fix benches
* Fix for fix
2019-12-28 22:52:18 +01:00
Denis Pisarev
9876d3dd09
less dupes, cleanup ( #4491 )
...
* build node job is separated from build substrate; less dupes, cleanup
* it's not effective yet to split these jobs
2019-12-28 17:00:39 +01:00
Nikolay Volf
885f94dfad
Improve subkey error reporting. ( #4504 )
2019-12-27 21:07:04 +01:00
Bastian Köcher
47639339f6
Support loading the URI from a file in subkey ( #4503 )
...
* Support loading the URI from a file in subkey
* Fix tests
2019-12-27 09:12:25 +01:00
Nikolay Volf
96744926b2
Check aura slot numbers are strictly increasing ( #4020 )
...
* initial block import handler
* fix node template
* fix error message
* fix error message again
* final fixes
* fix node template again
2019-12-26 14:04:07 +01:00
Weiliang Li
5431f09a4e
fix ligature ( #4497 )
2019-12-25 09:01:17 +01:00
Weiliang Li
fe587c72ec
Use sc_network::NetworkStateInfo instead of implementing redundant traits ( #4436 )
...
* Implement local_peer_id for gossip
* refactor local_peer_id
* fix
* reset gossip
* Update tests.rs
* fix ci
* fix review
* fix Cargo.lock
* fix Cargo.lock
2019-12-24 16:17:19 +01:00
Xiliang Chen
901dff5d14
use generated ModuleToIndex type ( #4495 )
2019-12-24 16:16:19 +01:00
Sergei Pepyakin
1f07123c6c
Remove unnecessary unsafe. ( #4494 )
2019-12-24 14:16:14 +01:00
Sergei Pepyakin
1782fbbbba
Extract execution engines definitions into their own crates ( #4489 )
...
* Clean imports in wasmi_execution
* Replace `interpret_runtime_api_result` with `pointer_and_len_from_u64`.
* Extract sc-executor-common crate
* Extract `sc-executor-wasmi` into its own crate
* Extract `sc-executor-wasmtime` into its own crate.
* Add missing headers.
* Clean and docs
* Docs for sc-executor-wasmi
* Expand a comment about sandboxing
* Fix assert_matches
* Rename (un)pack_ptr_and_len and move them into util module
* Remove wasmtime errors in sc-executor-common
2019-12-24 13:17:41 +01:00
Tomasz Drwięga
b214b3f3e9
Fix replace_previous of Ready Transaction Queue. ( #4488 )
...
* Fix transaction replacements.
* Test.
* Fix typo.
* Update client/transaction-pool/graph/src/ready.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-24 11:13:29 +01:00
Stanislav Tkach
2403cf320c
Migrate election-phragmen, election contracts and authorship to decl_error ( #4479 )
...
* Migrate election-phragmen
* Migrate elections
* Migrate contracts module
* Update authorship module
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-24 11:11:57 +01:00
gabriel klawitter
9051945505
ci: increase git cloning depth to 100 ( #4481 )
...
* ci: increase git cloning depth to 100
* check_runtime: verify shallow git clones to contain origin/master
* check_runtime: fetch master branch
2019-12-23 19:43:05 +01:00
Stanislav Tkach
f4a3056167
Change log level for DhtEvent::ValueNotFound from warn to debug ( #4485 )
2019-12-23 17:23:35 +01:00
Nikolay Volf
10cd358e40
fix warnings in grafana module ( #4486 )
2019-12-23 17:41:43 +03:00
Gavin Wood
205ddec344
Twitter field for IdentityInfo (in a back-compat way) ( #4476 )
2019-12-22 23:11:34 +01:00
Gavin Wood
3c70800eab
Extend Utility pallet with multisig and pseudonyms ( #4462 )
...
* Add subaccounts functionality
* More work
* Multisig prototyped with tests
* Add timepoints to prevent replay
* Remove TODO
* Check for the right owner in cancel.
* Test the timepoint stuff
* Batch works with any origin
* Refactor tuples into structs.
* Finalise function docs/complexity and also add proper weights.
* Fix wasm
* Module-level docs
* Fix typo
* Runtime fix
* Better deposit system; more tests.
* Fix typo
* Switch +1 for -1
* Add Blake2_128Concat; fix insecurity; change return policy.
* Fix typo
* Update frame/utility/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/utility/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update bin/node/runtime/src/lib.rs
Co-Authored-By: Sergei Pepyakin <sergei@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com >
2019-12-22 20:41:55 +01:00
Wei Tang
c3413fdea3
Clean up definition for custom ss58 address formats ( #4470 )
...
* Clearer definition for custom ss58 address formats
* Fix subkey compile
2019-12-21 15:34:36 +01:00
Stanislav Tkach
2c2e0d772d
Migrate generic-asset, identity and im-online to decl_error ( #4473 )
...
* Migrate generic-asset, identity and im-online to decl_error
* Update democracy tests
* Update nicks test
2019-12-21 15:10:29 +01:00
Joshy Orndorff
f6cbf4421f
Rename ChainSpec field ( #4471 )
...
* initial rename
* nitpick: add space in "chain spec"
* Add comment to client spec.
2019-12-20 21:50:18 +01:00
Gavin Wood
e6b8a69656
Add ProposalRejected event to Treasury ( #4468 )
...
Closes #4467
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-20 21:35:51 +01:00
Tomasz Drwięga
14a08d430c
Add Clone bound to the Origin. ( #4472 )
2019-12-20 18:43:04 +01:00
Stanislav Tkach
328563f8d4
Migrate membership, nicks, scored-pool and session to decl_error ( #4463 )
...
* Migrate membership, nicks, scored-pool and session to decl_error
* Fix tests
* Update frame/scored-pool/src/tests.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Remove InsufficientBalance error from scored-pool
* Replace Error::<Test, DefaultInstance> with Error::<Test, _>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2019-12-20 17:12:21 +01:00
Arkadiy Paronyan
9950ea98fc
Shared params in CLI API ( #4466 )
...
* Common shared parames getter
* Expose more types from `service-builder`
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2019-12-20 16:05:01 +01:00
Bastian Köcher
bfad5f3ffc
Fix warnings and make CI working again ( #4469 )
...
* Fix warnings and make CI working again
* Fix test
2019-12-20 14:47:19 +01:00
Svyatoslav Nikolsky
7d4c6354df
use multiple threads in integration tests ( #4379 )
2019-12-20 12:37:21 +01:00
Bastian Köcher
054607f092
Subkey add support for interactive password ( #4465 )
...
* Subkey add support for interactive password
* Support inserting the URI from tty as well
2019-12-20 12:36:55 +01:00
Shawn Tabrizi
4fffe19c28
Update Balances Pallet for decl_error! ( #4405 )
...
* Update balances for `decl_error!`
* Update for new `decl_error`
* Fix staking tests
* Use `ok_or` over `match`
2019-12-20 00:23:20 +01:00
André Silva
dfe87ec61e
babe: remove unused slot_duration variable ( #4461 )
2019-12-19 17:38:01 +00:00
Stanislav Tkach
d46eaf79aa
Warn about using --rpc-external and --ws-external options ( #4448 )
...
* Warn about using --rpc-external and --ws-external options
* Apply review comments
* Remove links placeholders
* Add links to wiki
2019-12-19 17:57:42 +01:00
Gavin Wood
bbda30c7dd
Add new event for registering deposits. ( #4459 )
2019-12-19 17:57:20 +01:00
Shawn Tabrizi
1d04d5a05e
Fix Fees in Substrate ( #4421 )
...
* Fix fees
* Add comment to explain saturated multiply accumulate
* Fix final fee calculation
* Fix doc
* improve doc
* grumble
* Update tests
* Fix executor tests
2019-12-19 14:03:00 +01:00