Commit Graph

1833 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky 48b2ba041f Synchronous import queue + fix async inport queue shutdown (#2701)
* sync implementation of ImportQueue

* fix import queue shutdown

* never clone import queue
2019-05-28 15:07:35 +02:00
Svyatoslav Nikolsky 549d9e1da1 Remove BlockNumber <-> u64 conversions from light-client related code (#2666)
* Remove As usage from CHT

* Remove As usage from CHT (continue)

* Restrict BN <-> int conversions in CT

* more BN <-> u64 conversions removed

* upd spec_version

* Apply suggestions from code review

Co-Authored-By: Gavin Wood <github@gavwood.com>

* Apply suggestions from code review

Co-Authored-By: Gavin Wood <github@gavwood.com>

* more grumbles

* fix last grumbles + compilation

* too long lines

* too long lines
2019-05-28 15:07:16 +02:00
Pierre Krieger 25b88f1a1f Allow passing an optional transport to network-libp2p (#2680)
* Allow passing an optional transport

* Fix tests

* Fix Cargo.lock

* Fix Cargo.lock again?!?!
2019-05-28 12:54:02 +02:00
Benjamin Kampmann 22d3043917 Silence known deprecation warnings (#2651)
* Silence known deprecation warnings

1. Prefixes known instances of usages of client.backend and client.import_lock with `#[allow(deprecated)]` to silence the warnings. 2. Remove file-global `#![allow(deprecated)]` used in these cases. Both to prevent us overlooking externally caused deprecation messages.

* fixing missing ;

* fix missing test cases

* move deprecated markers to make CI happy

* move deprecated markers to make CI happy

* attempt to fix the test

* bumping impl_version of node runtime

* Minor cleanup
2019-05-28 10:34:59 +02:00
Pierre Krieger b10ecd7931 Peerset should never return Ready(None) (#2684) 2019-05-27 20:08:03 +02:00
TriplEight 672b72f44a some prettiness, fix dockerfile's metadata (#2682) 2019-05-27 14:06:38 +02:00
Pierre Krieger e7d12e2915 Fix not connected peers being connected peers (#2692) 2019-05-27 12:01:07 +02:00
André Silva 10c1dfcffb Register previous rounds' votes with gossip service on startup (#2676)
* grandpa: register previous round votes with gossip service on startup

* gossip: fix tests

* grandpa: optionally register previous round votes on startup

* grandpa: fix tests
2019-05-26 23:05:02 +02:00
Bastian Köcher e2d1d0c951 Fix doc propagation for Call enum (#2690)
* Fix doc propagation for `Call` enum

* Fix warnings while generating `srml-staking` docs

* Make the line check happy
2019-05-25 21:03:27 +02:00
Bastian Köcher cf39cbc1f0 Check for exact wasm blob size in RPC tests (#2687) 2019-05-25 21:02:50 +02:00
Tomasz Drwięga 22d40435a2 Lower the required code threshold. (#2685) 2019-05-24 15:21:19 +02:00
TriplEight fa08a1e35c rust versions (#2681) 2019-05-24 12:24:37 +02:00
Tomasz Drwięga c162fc5ff1 Expunge error-chain (feat. tomaka) (#2662)
* Remove error_chain

* Expunge error-chain from rpc and service.

* Expunge from transaction pool.

* Expunge from node/cli

* Expunge from keystore.

* Remove some boilerplate.

* Fix remaining stuff.

* Improve on deprecation message.

* Fix issues.

* Fix trnsaction pool tests.

* Fix the rest.

* Fix borked merge.

* Update lock
2019-05-24 10:35:31 +01:00
Tengfei Niu 69ffec5822 remove unused import (#2678)
remove unused import
2019-05-24 08:44:09 +03:00
Pierre Krieger 24c08a780d Make peerset ban nodes under a reputation (#2667) 2019-05-23 20:17:58 +01:00
Pierre Krieger ff479c4e23 Rework the OnDemand service (#2670)
* Rework the OnDemand service

* Try fix line widths
2019-05-23 20:13:23 +01:00
thiolliere ffce18b994 Contract restoration (#2502)
* partial impl

* more checks

* improve TestExternalities + tests

* make tombstone raw to derive Eq

* remove before merge

* add test

* fmt

* update test

* doc

* bump version

* fix testing

* update runtime

* Fix TrieIdGenerator

* fix dummy trie id generator

* update test

* bump version

* format

* Update core/state-machine/src/testing.rs

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* document test

* Apply suggestions from code review

Co-Authored-By: DemiMarie-temp <50585338+DemiMarie-temp@users.noreply.github.com>

* refactor

* fix

* fmt

* address review

* impl last_write

* Fix storage size, test, remove size in tombstone

* fix

* Update srml/contract/src/lib.rs

Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com>

* comment

* child_storage_root as &[u8]
2019-05-23 15:09:16 +02:00
Pierre Krieger c357854015 More extractions from the Protocol struct (#2641)
* Pass the TransactionPool explicitly

* Extract finality_proof_provider

* Remove Protocol::connected_peers

* Add note and rename function

* Fix tests

* More test fixing

* Revert the WASM locks, I guess

* Add space

* Remove space
2019-05-23 12:07:51 +02:00
André Silva 563a67b8e4 core: allow setting max ws rpc connections (#2632)
* core: allow setting max ws rpc connections

* style: break long lines

* core: fix service tests
2019-05-23 10:50:36 +01:00
Sergei Pepyakin 12f052ce9d srml-contract: update ext_random(_seed) (#2635)
* Initial implementation.

* Rename random_seed to random

* Update rustdocs

* Update COMPLEXITY.md

* Fix comment.

* Limit the size of subject.

* Bump the runtime version.

* Fix doc

* Update node/runtime/src/lib.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
2019-05-23 10:34:17 +01:00
Luke Schoen b017e683dc docs: Update Support SRML to link to StorageDoubleMap in Rustdocs (#2646)
* docs: Update Support SRML to link to StorageDoubleMap in Rustdocs

* review-fix: Add missing backticks. Add trait text for consistency. Fix typo

* review-fix: Move trait text out of link
2019-05-23 10:34:00 +01:00
Niklas Adolfsson 5ca761c033 fix(bump protobuf): fix vulnerability (#2654) 2019-05-23 10:28:49 +01:00
Pierre Krieger dda04eef38 Remove dependency on parity-crypto (#2655) 2019-05-23 10:28:35 +01:00
thiolliere 1e35552c14 get rid of refcell, use &mut storage (#2659) 2019-05-23 10:08:19 +01:00
Pierre Krieger d05f35f764 Make info! string less ambiguous (#2661) 2019-05-23 10:06:38 +01:00
Pierre Krieger 6431cdf601 Remove TaskExecutor from the API of the informant (#2642)
* Remove TaskExecutor from the API of the informant

* Fix node-template
2019-05-23 09:44:36 +01:00
Gavin Wood 3860d7c810 Remove As (#2602)
* Start to remove the `As` bound on `SimpleArtithmetic`

This just introduces standard numeric bounds, assuming a minimum of
`u32`. Also included is a saturating from/into trait allowing ergonomic
infallible conversion when you don't care if it saturates.

* Remove As from Balances trait

* Remove As from Aura module

* Remove As from Babe module

* Expunge `As` from contract

* Council module

* Democracy

* Finality tracker

* Grandpa

* First bit of indices

* indices

* Line lengths

* session

* system

* Staking

* Square up all other uses of As.

* RHD update

* Fix build/test

* Remove As trait

* line widths

* Remove final As ref

* Update srml/staking/src/lib.rs

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

* Update core/client/src/cht.rs

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

* Update core/client/db/src/light.rs

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

* Apply suggestions from code review

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

* whitespace

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-Authored-By: André Silva <andre.beat@gmail.com>

* Bring back u32 check for number on CLI
2019-05-22 23:11:38 +01:00
Robert Habermeier 36987c0205 propagate round messages after verification (#2660) 2019-05-22 18:01:36 +02:00
Gavin Wood 0089ad4040 Revert "Allow warnings (#2627)" (#2648)
This reverts commit b9c39d771a.
2019-05-22 08:45:28 +01:00
Luke Schoen 1ce221f0d8 docs: Rephrase EnumerableStorageMap comment in Rustdocs (#2647) 2019-05-22 09:18:18 +02:00
Shawn Tabrizi 3527f08479 Update build script to create a table for the runtime (#2643)
This enables use of the sanbox needed for running smart contracts on Substrate

See: https://github.com/paritytech/substrate/issues/2570
2019-05-21 19:08:55 +02:00
thiolliere 57f306a3c1 Reserve function name (#2609)
* reserve function name

* bumpd impl version

* Revert "bumpd impl version"

This reverts commit 03a23e308312d857bdfd3c90ff564b4b11347530.

* add test

* update test

* update lock

* Fix test on stable
2019-05-21 17:07:30 +02:00
Pierre Krieger 062b734571 Remove the NetworkChan (#2577)
* Remove the NetworkChan from the API

* Remove the NetworkChan altogether

* Address review

* Fix line widths

* More line width fixes

* Remove pub visibility from entire world

* Fix tests
2019-05-21 14:07:01 +02:00
Svyatoslav Nikolsky e296cf8cba fix panic in PSM when add_reserved_peer(same_peer) is called twice (#2640) 2019-05-21 14:56:58 +03:00
Pierre Krieger b9c39d771a Allow warnings (#2627) 2019-05-20 17:14:02 -04:00
Pierre Krieger 85ce4623ce Update to libp2p 0.8 (#2607)
* Update to libp2p 0.8

* Fix CLI tests

* Zeroize
2019-05-20 15:47:52 +02:00
Tomasz Drwięga 98de97e1d9 Access child storage over RPC. (#2586)
* Access child storage over RPC.

* Address review grumbles.

* Test happy case in child_storage rpc.

* Remove stray printlns

* Fix line widths.

* Bump runtime again.

* Fix genesis storage root calculation for light clients.

* Don't pass values to full_storage_root child_delta.
2019-05-19 13:02:09 -04:00
ddorgan a827869dfb Flaming fir deployment scripts (#2599)
* Initial commit of flaming fir deployment scripts

* Debug

* Fix formatting

* Correct wget syntax

* Use 8 char commit id

* 9 chars

* Use the longer CI_BUILD_REF ref to slice from

* Fix backtick error with flaming fir deploy script

* Use the correct commit id length

* Split out validator deploments

* Fix syntax, missing :

* Pass hostname as TARGET_HOST per validator

* Correct syntax

* Uncomment wget

* Switch deploy -> kubernetes

* Use full group name

* Check awx log

* Fix if syntax and ignore failed

* Use correct JOB_ID and fix if syntax

* Use correct variable

* Print ansible awx log and status

* Make awx status clearer

* make variable names consistent

* Do 15 second checkups on the job

* Remove extra echo

* Use artifacts/VERSION instead of gitlab variables

* Use all of the VERSION info
2019-05-18 21:50:38 +01:00
Niklas Adolfsson 009898f309 feat(light client): fetch block body from remote (#2527)
* feat(on_demand): block body request

* fix(light block req): no justific + one block

* fix(bad rebase)

* feat(protocol): add messages for `remote_body`

* fix(on demand body): remove needless `take()`

* fix(network): remove messages for `on_demand_body`

* fix(grumbles): use `hash` in `remote_body_requests`

As long as we can't compute `ordered_trie_root(body)` just compare that request.header.hash() == response.header.hash()

* fix(grumbles): `hdr.ext_root == trie_root(body)`

* fix(grumbles): propogate `Err` in `fn body()`

* fix(grumbles): Vec<Block::Extrinsic>

* fix(grumbles): util_fn for `not_impl` in tests

* fix(on remote body): tests `fetch` and `on_demand`

* docs(resolve todos)
2019-05-17 20:05:00 -04:00
Xiliang Chen 55937d1f08 Update libp2p addresses in readme (#2616) 2019-05-17 12:04:05 +01:00
Amaury Martiny e24b18f844 Remove remains from metadata v0 (#2610)
* Remove rests for metadata v0

* bump impl_version
2019-05-17 10:49:08 +02:00
Niklas Adolfsson 7e525dc603 fix(telemetry): remove needless Box (#2612) 2019-05-16 20:13:45 -04:00
TriplEight 9ad96e50ac Dockerfile optimization (#2598)
* metadata for docker image

* metadata for docker image
2019-05-16 14:36:27 +02:00
Pierre Krieger 8afbe0df59 Libp2p 0.7.1 (#2600) 2019-05-16 09:24:28 +02:00
Andrew Jones b2ea94d73d Replace compile_fail doc tests with trybuild (#2588)
* WIP: use trybuild for compile tests

* declaring_old_block

* declaring_own_block_with_different_name

* adding_self_parameter

* adding_at_parameter

* invalid_api_version

* invalid_api_version2 & invalid_api_version3

* missing_block_generic_parameter

* Restore main functions

* missing_path_for_trait

* empty_impl_runtime_apis_call

* empty_impl_runtime_apis_call

* type_reference_in_impl_runtime_apis_call

* impl_incorrect_method_signature

* impl_two_traits_with_same_name

* changed_at_unknown_version

* changed_at > changed_in

* fix test
2019-05-16 09:13:46 +02:00
thiolliere aa2c496a65 Make perthings operate in type operator (#2501)
* perthings operate in type operator

* implementation with rem

* fmt

* doc

* better fmt

* bump version

* Tests for pet-things

* demonstrate output as type of operation

* Remove redundant assertions.

* rename test

* update lock

* bump impl version
2019-05-15 18:48:58 +02:00
André Silva e0a6a1f55a node: set protocol id for flaming fir (#2589) 2019-05-15 18:14:52 +02:00
Bastian Köcher fcf9a46bcc Forward the result in a sudo call (#2594)
* Forward the result in a sudo call

* Print the error of the wrapped call in `sudo`
2019-05-15 18:14:33 +02:00
joe petrowski 4eb18ef2ac add quantization test for on_dilution (#2595) 2019-05-15 18:13:37 +02:00
郭光华 b399ea0b31 Add tty password input (#2503)
* Add tty password input

* Move password from core/service to core/cli

* Fix test build error

* Password should be entered only once if it's for decoding

* Update Cargo.lock from rebuild
2019-05-15 18:11:59 +02:00