Commit Graph

1804 Commits

Author SHA1 Message Date
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
Pierre Krieger c4e3970d9f Keep node information about disconnection (#2596)
* Keep node information about disconnection

* Fix line widths
2019-05-15 18:11:41 +02:00
thiolliere 2893a613c2 increase block gas limit (#2597) 2019-05-15 18:11:05 +02:00
Marcio Diaz bc325eca66 Init store for slots-headers (#2492)
* init store for slots

* fix: add check_equivocation to Aura/Babe

* fix tests

* fix: add pruning bound

Co-Authored-By: André Silva <andre.beat@gmail.com>

* use saturating_sub
2019-05-15 12:22:43 +02:00
Bastian Köcher d50b717ff6 Generate correct serde bound for GenesisConfig (#2585)
* Generate correct serde bound for GenesisConfig

* Handle double map as well

* Adapt double map test
2019-05-15 11:54:00 +02:00
TriplEight 9ea689bdef check-web-wasm now uses the default builder image (#2583) 2019-05-14 18:28:01 +02:00
thiolliere 3a58c7ebcb make construct_service_factory compile (#2581) 2019-05-14 17:50:38 +02:00
Niklas Adolfsson e330b69cb9 fix(redundant import) (#2582)
Fixes warning: the item `HashSet` is imported redundantly
2019-05-14 18:07:13 +03:00
Pierre Krieger 0181833f89 Randomly fuzz the PSM (#2470)
* Randomly fuzz the PSM

* Fix test

* Run it moar
2019-05-14 16:30:28 +02:00
Pierre Krieger 0d0fe6a0ea Add WebSocket addresses for bootnodes (#2578) 2019-05-14 16:30:16 +02:00
Pierre Krieger 18f7acce98 Move ProtocolMsg to service.rs (#2560)
* Move ProtocolMsg to service.rs

* Fix line width

* Fix line width again

* Correct whitespace

* Another whitespace correction
2019-05-14 14:26:52 +01:00
Svyatoslav Nikolsky a29fd10859 Do not try to synchronize from light client (#2039)
* do not try to sync from light node

* use Roles' utility methods
2019-05-14 14:41:10 +02:00
Pierre Krieger 5bde98e95a Increase tolerance for bandwidth usage in test (#2576) 2019-05-14 14:40:06 +02:00
Svyatoslav Nikolsky 9a14ba0555 Fix light client startup (build_select_chain returns Result<Option>) (#2574)
* fix light client strtup (build_select_chain -> Option)

* fixed node template compilation

* Update core/service/src/lib.rs

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>
2019-05-14 12:38:30 +01:00
André Silva 132984adf5 Introduce Flaming Fir testnet (#2526)
* node: replace emberic elm with flaming fir testnet

* update readme
2019-05-14 12:11:25 +02:00
Sergei Pepyakin d57f6f9305 Pass topics along with events (#2563)
* Introduce an IndexedEvent

* Plumb topics through the Ext interface.

* Add topics to ext_deposit_event

* Charging for events.

* Check the number of topics.

* Check for duplicate topics.

* Bump API version.

* Move derive(*Eq) under test.

* Use sorting for finding duplicates.
2019-05-14 12:09:51 +02:00
Pierre Krieger 6ccdbea01c Move extra_requests.rs as a submodule of sync (#2573) 2019-05-14 12:08:01 +02:00
joe petrowski 580432d822 Fix over/under flow risk in OnDilution (#2548)
* fix over/under flow risk in OnDilution

* bump impl
2019-05-14 12:07:32 +02:00
Andrew Jones e5627e2480 Prevent divide by zero panic with checked_div (#2575) 2019-05-14 11:54:56 +02:00
Michael Müller 7f3d71d306 Add possibility to sign calls via cli (#2549)
* Add possibility to sign calls via cli

* Update subkey/README.adoc

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
2019-05-13 21:18:14 +02:00
Pierre Krieger e5b0a98f1a Split SyncContext from protocol Context (#2550) 2019-05-13 21:16:52 +02:00
Gavin Wood 20e809668b Introduce the Get trait and type_parameter. (#2565) 2019-05-13 20:58:57 +02:00
Sergei Pepyakin 21773b3a07 Light client friendly events (#2491)
* Sketch of indexed events.

* Get EventIndex by holding another variable.

* Add some docs.

* Use DoubleMap to store reverse topic index

* Implement StorageDoubleMap::append

* Use append for EventTopics.

* Refactor.

* Avoid `mutate`

* Docs.

* Add topics to EventRecord

* Update tests.

* Rebuild.

* Bump version.

* Event topics test.

* Mix in BlockNumber to distinguish updates

* Fix srml-system test.

* Post merge fixes.

* Comments/TODO.
2019-05-13 20:56:01 +02:00
Pierre Krieger d974189e3c Make the behaviour in libp2p generic (#2525)
* Make the behaviour in libp2p generic

* Fix indentation

* Fix bad merge
2019-05-13 20:55:39 +02:00
Pierre Krieger 2724cdac33 Remove the NetworkChan from the OnDemandService (#2561) 2019-05-13 20:55:27 +02:00
gabriel klawitter 7fb3dc5f68 check line-width of only newly added lines (#2522)
* strictly require <= 120 characters
2019-05-13 17:51:09 +02:00
TriplEight 3b0eca992c Tag for wasm check job (#2538)
* tag for wasm tst
2019-05-13 16:31:29 +02:00
thiolliere 2b694b5898 contruct_runtime doc (#2552) 2019-05-13 14:15:26 +02:00
Joshy Orndorff 3b534c1cc6 Changed all occurences of referendums to referenda. Updated spec versions. (#2545) 2019-05-13 11:37:47 +02:00
Svyatoslav Nikolsky 22586113ea Light GRANDPA import handler (#1669)
* GrandpaLightBlockImport

* extract authorities in AuraVerifier

* post-merge fix

* restore authorities cache

* license

* new finality proof draft

* generalized PendingJustifications

* finality proof messages

* fixed compilation

* pass verifier to import_finality_proof

* do not fetch remote proof from light import directly

* FinalityProofProvider

* fixed authorities cache test

* restored finality proof tests

* finality_proof docs

* use DB backend in test client

* justification_is_fetched_by_light_client_when_consensus_data_changes

* restore justification_is_fetched_by_light_client_when_consensus_data_changes

* some more tests

* added authorities-related TODO

* removed unneeded clear_finality_proof_requests field

* truncated some long lines

* more granular light import tests

* only provide finality proof if it is generated by the requested set

* post-merge fix

* finality_proof_is_none_if_first_justification_is_generated_by_unknown_set

* make light+grandpa test rely on finality proofs (instead of simple justifications)

* empty_finality_proof_is_returned_to_light_client_when_authority_set_is_different

* missing trait method impl

* fixed proof-of-finality docs

* one more doc fix

* fix docs

* initialize authorities cache (post-merge fix)

* fixed cache initialization (post-merge fix)

* post-fix merge: fix light + GRANDPA tests (bad way)

* proper fix of empty_finality_proof_is_returned_to_light_client_when_authority_set_is_different

* fixed easy grumbles

* import finality proofs in BlockImportWorker thread

* allow import of finality proofs for non-requested blocks

* limit number of fragments in finality proof

* GRANDPA post-merge fix

* BABE: pos-merge fix
2019-05-13 11:36:52 +02:00