Commit Graph

4006 Commits

Author SHA1 Message Date
Hernando Castano ea1eb4e57f Use Subscription Manager from jsonrpc-pubsub (#6208)
* Bump jsonrpc pubsub, core, http, and ws

Right now these are the packages which _need_ to be updated
so I can just the latest `jsonrpc-pubsub` code. Once a release
it cut upstream the rest of the dependencies should be updated
as well.

* Use jsonrpc-pubsub's SubscriptionManager

This places sc-rpc-api::Subscriptions

* Bump jsonrpc-core outside of sc-rpc-*

* Update client/rpc tests

Right now one of the `author` tests is failing, I
need to think a bit about how best to fix it.

* Remove Subscriptions manager

There's no need for this implementation since we're
using the one from `jsonrpc-pubsub` now

* Fix author RPC test

This test used to check for a numerial subscription ID,
whereas now it uses a string based ID which is the default
provided by `jsonrpc-pubsub`'s subscription manager.

* Remove unused NumericIdProvider

* Add missing bracket

Removed one too many with that last one, lol

* Bump `jsonrpc` to v14.2

There's an exception though. `jsonrpc-derive` cannot be bumped
past v14.0.5 just yet since it has a dependency on `quote` pinned
to v1.0.1. This means that at the moment it won't build on Substrate
since it's using v1.0.3.

* Track `jsonrpc-derive` master branch

* Bump `quote` version to v1.0.6

* Bump `jsonrpc-derive` to v14.2.1

This includes support for `quote` v1.0.6
2020-06-04 09:50:22 +01:00
zx9w e3795af0e3 The link to getting-started was obsolete. (#6238)
* The link to getting-started was obsolete.

* link to installation and tutorials

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2020-06-04 10:40:20 +02:00
Cecile Tonglet 60337aa765 Add run_full_node, run_light_node and print_node_infos to the API (#6233)
* Initial commit

Forked at: e77490714d
Parent branch: origin/master

* Add run_full_node, run_light_node and print_node_infos to the API

* Update runner.rs
2020-06-03 17:50:29 +02:00
Bastian Köcher f90f4854cd Split tx pool and offchain notification handling (#6231)
Instead of having the tx pool and offchain worker being feed from the
same import notification stream, this pr splits them to use two
different streams. The first advantage of this split is that the tx pool
will not be spawned anymore in another task and instead will directly
process the notification in the same task. This has the advantage of
being faster when the system is being under load, as the tx pool will
not be waiting for being scheduled to handle the notification.
2020-06-03 17:48:09 +02:00
Pierre Krieger e77490714d Fix libp2p features (#6229)
* Fix libp2p features

* Remove the opt-level of some now-unused crates
2020-06-03 13:24:44 +00:00
Pierre Krieger 0c6ae6f3d4 Make dev profile faster by compiling deps with opt-level=3 (#6228)
* Make dev profile faster by compiling deps with opt-level=3

* More comment

* More comment refinment

* Remove soketto as it doesn't fit criterias

* Fix style
2020-06-03 12:45:57 +02:00
Nikolay Volf 28ccad4118 fix millis display (#6227) 2020-06-03 11:18:10 +02:00
Svyatoslav Nikolsky b800909dae block.tx[0] is not invalid if on_initialize is too heavy (#6217) 2020-06-02 19:07:10 +02:00
Gavin Wood 4adac40c07 Generalised proxies (#6156)
* Initial work

* It should work

* Fix node

* Fix tests

* Initial test

* Tests

* Expunge proxy functionality from democracy and elections

* Allow different proxy types

* Repotted

* Build

* Build

* Making a start on weights

* Undo breaking change

* Line widths.

* Fix

* fix tests

* finish benchmarks?

* Storage name!

* Utility -> Proxy

* proxy weight

* add proxy weight

* remove weights

* Update transfer constraint

* Again, fix constraints

* Fix negation

* Update frame/proxy/Cargo.toml

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Remove unneeded event.

* Grumbles

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2020-06-02 18:15:15 +02:00
Denis Pisarev ffea161765 refactor CI (#6176)
* fix (ci): hotfix Docker release

* test (ci): run full ci  [skip ci]

* change (ci): check stage; add default variables because they were overriden; test-dep-rules goes k8s

* change (ci): move companion job to another stage

* change (ci): no good way to avoid artifacts downloads without dependencies

* fix (ci): typo

* change (ci): all CI images were moved to paritytech registry

* fix (ci): return to the prev image, new needs more testing
2020-06-02 17:23:13 +02:00
Kian Paimani 0eec4bb795 Accept new Phragmén solutions if they are epsilon better + Better pre-inclusion checks. (#6173)
* part1: Accept inly epsilon better solutions

* Fix pre-dispatch check

* Fix build

* review grumbles

* Epsilon -> Threshold
2020-06-02 17:22:56 +02:00
Xiliang Chen 6547d7a09a Allow ExistentialDeposit = 0 (#6185)
* Allow ExistentialDeposit = 0

* there are better ways to check is an account exists

* fix StorageMapShim

* test account events and fix some bugs
2020-06-02 17:22:21 +02:00
tgmichel 7b9add7a71 pallet-evm ensure gas_price + Storage getter (#6191)
* evm: move gas price check to top-level dispatchable

* Add AccountCodes get fn and account_exists helper

* Remove account_exists, evm handles non-existing accounts

* Runtime bump impl_version 251/2

* Fix Runtime impl_version and spec_version

Co-authored-by: Wei Tang <hi@that.world>
2020-06-02 17:18:45 +02:00
Pierre Krieger 7a969aa401 Remove ReportHandle (#6213) 2020-06-02 17:16:53 +02:00
Joshy Orndorff 518348b88d impl FindAuthor<T::AuthorityId> for Aura (#6205)
* Something compiles

* compiles _and_ maintains old version

* Comments

* try to pass CI

* Update frame/aura/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update frame/aura/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-06-02 15:21:12 +02:00
Dan Forbes 4b6537fbba Fix Rustdoc Build (#6207) 2020-06-01 22:54:13 +02:00
Nikolay Volf 6f677cdb23 report only on successfull block (#6187) 2020-06-01 11:09:20 +02:00
Nikolay Volf 5759cee2e9 Update import metrics and add verification time (#6170)
* refactor import reporting and add time

* Update primitives/consensus/common/src/metrics.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* remove (crate)

* fix longer lines

* swap names to avoid api breaking

Co-authored-by: Max Inden <mail@max-inden.de>
2020-06-01 11:08:59 +02:00
Pierre Krieger 9cac359f44 Add a Substrate networking Grafana dashboard template (#6171)
* Add a substrate-networking grafana dashboard

* Capitalize data source

* Do changes
2020-06-01 10:46:34 +02:00
Pierre Krieger a80e801e93 Pin async-std to <1.6 (#6193) 2020-05-30 15:19:08 +02:00
Bastian Köcher 841aab512f Make Proposer consume its reference on propose (#6190)
* Make `Proposer` consume its reference on `propose`

A proposer must be created per new round, so it makes sense to have the
proposer consume its own reference.

* Remove `ProposerInner`
2020-05-29 18:50:56 +02:00
Bernhard Schuster 78a72c12d7 fix/review: remove doc hidden on private item (#6186)
Co-authored-by: Bernhard Schuster <bernhard@parity.io>
2020-05-29 10:03:54 +00:00
Bastian Köcher c9cc46de3b Wasm-builder runtime-wasm feature (#6177)
* Enable the `runtime-wasm` for wasm builds

This enables the `runtime-wasm` feature for wasm builds. The feature is
not mandatory and will only be activated if it exists in the
`Cargo.toml`.

* Fix compilation

* Update docs

* Uprgade version

* Apply suggestions from code review
2020-05-28 21:06:25 +01:00
Gavin Wood 02c6d50f40 Remove the update lock on upgrade iterator (#6179) 2020-05-28 19:22:02 +00:00
Shawn Tabrizi 14dc43982e Allow over-weight collective proposals to be closed (#6163)
* split `finalize_proposal` to approve and disapprove

* Add test

* Add root `disapprove_proposal`

* Update approve logic after voting period passes
2020-05-28 20:08:39 +02:00
Sergei Pepyakin c8fe8b5378 pallet-contracts: State rent fixes (#6147)
* Don't store the storage size offset in the contract itself.

* Clean the AccountDb code a bit

* Use `storage_size: 0` when creating AliveContractInfo

* Count empty storage items.

* Update frame/contracts/src/account_db.rs

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* Use more clear wording.

Co-authored-by: Alexander Theißen <athei@users.noreply.github.com>

* Change the order of decrement and increment for storage size

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Alexander Theißen <athei@users.noreply.github.com>
2020-05-28 20:07:25 +02:00
Alexander Theißen c672cce4bd Make post dispatch fee consistent with a direct calculation (#6165)
* Make post dispatch fee consistent with a direct calculation

* Remove unnecessary `saturated_into` calls

* Add test with negative multipliers

* Added regression test

* Test improvements
2020-05-28 14:33:10 +02:00
Bernhard Schuster 95d73994c1 offchain storage lock (#6010)
* feat/offchain/storage: add remove interface method

* feat/offchain/storeage: add remote to StorageValueRef

* feat/offchain/storage: add storage lock

* fix/review: Apply suggestions from code review

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2

* chore/offchain/rename: _remove -> clean

* feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2

* fix/offchain/storage/lock: block and time expiry must be && not ||

* chore/offchain/storage: minor fmt doc comments

* doc/comment: prefer markdown emphasis over CAPS

* doc/comment: rewrap multiline module level docs

* doc/comment: rephrase

* impl sleep_until and use the actual time for the test env

* feat/test: add more tests, ignore some sample impl doctests

* fix/review: Apply suggestions from code review

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* doc/comment: better description

* fix/review: Apply suggestions from code review

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* chore/storage: lifetime cleanup

* fix/cleanup: trait bounds, cargo-spellcheck + extra explanations

* fix/doc: periods +-

* fix/review: Apply suggestions from code review

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* cleanup: remove explicit lifetime bound, copy -> clone

* fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>),

* chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out

* refactor: migrate to an instant based

* fix/feedback: fix, reduce, rename, docs update pending

* docs/reword: adjust to changed code

* fix/offchain/testing: timestamp and sleep_until shall not block

* chore/lines: lines must < 100 chars

* fix/docs: add missing pub field doc comments

* refactor/x: try_lock does not need to return an Option<_>

* refactor/simplify: a better way of waiting for a lock to resolve

* docs: consistency

* fix/line: < 100

* fix/doctest/use: avoid crate::

* fix/doctest: *

* fix/review: remove unused trait bound

* fix/review: pretty by const fn

* fix/review: reduce default timeout to 20s

* docs: grammar

* fix/review: add with_block_deadline

* doc: revamp BlockNumberProvider documentation to be less frame centric

* chore: fmt

* docs: add missing doc comment

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
2020-05-28 14:26:11 +02:00
Gavin Wood 1d93746b64 Update locks on upgrade (#6172) 2020-05-28 14:20:33 +02:00
Kian Paimani ecccf46987 Fix Election when ForceNone V1 (#6166)
* Clean

* Better doc

* Better better doc

* Again better doc

* Fix indemt

* Update frame/staking/src/lib.rs

* Update frame/staking/src/lib.rs

* Better test

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-05-28 11:41:51 +02:00
Pierre Krieger cf185302fa Improve the log messages printed when a listener closes (#6162)
* Improve the log messages printed when a listener closes

* Oops, didn't finish the expired listen addrs thing
2020-05-27 19:55:54 +02:00
Pierre Krieger e2e44f005c Add a warning when the user passes a legacy PeerId (#6158)
* Add a warning when the user passes a legacy PeerId

* Update client/network/src/config.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-05-27 19:55:13 +02:00
Shawn Tabrizi 7522a7a257 Add test for Transaction Payment on zero balance account (#6161)
* Test zero balance account with pays::no

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-05-27 19:54:56 +02:00
Nikolay Volf 537993a13d Improve logging for transaction pool (#6152)
* improve logging

* Update client/transaction-pool/graph/src/validated_pool.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* address review and make uniform

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2020-05-27 17:11:36 +02:00
Pierre Krieger 4b3f134b4a Peerset cleanup (#6078)
* Move methods from Peerset to peers structs

* Remove priority_only from peersstate

* Refactor PSM

* Don't test private fields

* Update sc_network

* Remove wrong comment

* Also fix small stupidity when setting reserved_only

* Put back priority_group

* Restore priority groups as before

* Apply suggestions from code review

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Do the reserved only change

* Update client/peerset/src/lib.rs

Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>

* Use HashSet::difference

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
2020-05-27 15:53:07 +02:00
Kian Paimani 8279ba96df Make Get<T> const friendly + Clean the runtime files a bit. (#6132)
* Make Get const friendly

* Better doc

* Grumble

* Better doc

* Clean runtime files more
2020-05-27 14:40:07 +02:00
Pierre Krieger bba5d7d5da Add subkey inspect-node-key (#6153) 2020-05-27 13:11:09 +02:00
Nikolay Volf 8f7bec3519 remover ancient code (#6157) 2020-05-27 13:10:04 +02:00
Xiliang Chen c46b2020f2 fix lstrip in biguint (#6151)
* add failing test for multiply_by_rational

* fix BigUint

* fix length

* bump version

* merge tests
2020-05-27 10:18:53 +02:00
Bastian Köcher 1ea45a541e Make wasm-builder check before copy/write files if the content is the same (#6149)
* Make `wasm-builder` check before copy/write files if the content is the
same

* Update utils/wasm-builder/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-05-27 00:28:41 +02:00
Bastian Köcher 8a7c2c3142 CLI: Make --dev conflict with --chain (#6146)
If we are running `--dev` chain, we should forbid the `--chain`
argument. The `--dev` chain is always special by only having one
authority etc and some other chain spec is probably not setup for this
correctly. In the end `--dev` is just a shortcut for `--validator --alice`.
2020-05-26 21:25:15 +02:00
Bastian Köcher 0f28f4bf49 Fixes wasm-builder rerun if changed logic (#6144)
There was a bug which related in required files not being tracked of
being modified. This pr fixes this bug by making sure we ignore version
requirements for path dependencies and git dependencies. This also
ensures that we only track `.rs` or `.toml` files. Another improvement
is that we only include paths which don't contain a `Cargo.toml` if this
`Cargo.toml` does not belongs to the package being processed. This
prevents that sub-crates are added to the tracked files, while not being
part of the dependencies.
2020-05-26 21:23:57 +02:00
Pierre Krieger 9906a2e39d Don't iterate over peers in generic_proto::behaviour::poll (#6142)
* Don't iterate over peers in generic_proto::behaviour::poll

* Improve comment

* Rework to use DelayIds
2020-05-26 21:23:32 +02:00
Marcio Diaz 288953942e Fix mul_acc. (#6145) 2020-05-26 18:03:29 +02:00
Benjamin Kampmann b64f55089d Releasing rc2 (#6136) 2020-05-26 14:32:23 +02:00
Gavin Wood 42ad0d138f Filter calls in utility (#6131)
* Filter calls.

* Remove old proxy code

* Docs and repot

* Update frame/utility/src/tests.rs

Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>

* fix test

* Grumble

* Bump runtime version

* fix

* Attempt general fix

Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>
Co-authored-by: NikVolf <nikvolf@gmail.com>
2020-05-26 06:34:25 +02:00
Benjamin Kampmann 110cc85715 Add Changelog for rc1 (#6128) 2020-05-25 21:09:39 +02:00
Bastian Köcher 4c138123b4 Make sure fixed arithmetic tests don't rely on debug assertions (#6126) 2020-05-25 18:37:53 +02:00
Benjamin Kampmann fb32ac8c51 Tagging as rc1 2020-05-25 18:30:48 +02:00
Pierre Krieger d18a55d391 Bump to libp2p v0.19.1 (#6125) 2020-05-25 17:26:36 +02:00