Commit Graph

88 Commits

Author SHA1 Message Date
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
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
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
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
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
郭光华 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
Andrew Jones e5627e2480 Prevent divide by zero panic with checked_div (#2575) 2019-05-14 11:54:56 +02:00
Michael Müller 47e3dacc2d Imply forced authoring on --dev (#2498)
* Imply forced authoring on --dev

* Combine conditionals
2019-05-09 19:01:57 +02:00
Pierre Krieger 747df1f332 Disable mDNS when passing --dev (#2467) 2019-05-04 13:58:06 +02:00
Xiliang Chen ef142722e3 Pass RunCmd to user (#2425) 2019-05-01 20:08:17 +02:00
Michael Müller a0e0d9b03d Fix typos and markdown (#2388)
* Fix typos

* Align properly

* Update core/consensus/slots/src/lib.rs

Co-Authored-By: cmichi <mich@elmueller.net>

* Update core/network/src/test/mod.rs

Co-Authored-By: cmichi <mich@elmueller.net>

* Update core/finality-grandpa/src/communication/mod.rs

Co-Authored-By: cmichi <mich@elmueller.net>

* Update core/consensus/common/src/import_queue.rs

Co-Authored-By: cmichi <mich@elmueller.net>
2019-04-26 14:09:13 +02:00
Tomasz Drwięga f0202aa425 Unify & enforce same interface of sr-io (std & without-std) (#2381)
* WiP: HTTP Apis.

* Working on the API.

* Add docs, clean up the API.

* Expose ext_ stuff as well.

* Implement HTTP helpers for offchain sr-io.

* Remove HTTP stuff.

* Remove spurious leading `::`

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Rename in toml.

* Add issue number.

* Bump version.
2019-04-25 15:49:34 +02:00
Tomasz Drwięga 93bc03cfe6 Allow localhost IP by default. (#2380) 2019-04-25 13:31:50 +02:00
Michael Müller c6d15e2cea Configurable state cache size and enforce exact state cache size (#2314)
* Allow configuring state cache size via cli

* Track used cache size

* Expose memory counter to informant

* Enforce max cache size constraint exactly

* Default to 64 MiB

Co-Authored-By: cmichi <mich@elmueller.net>

* Remove self as parameter
2019-04-23 18:47:11 +01:00
mattrutherford 778bf0256f Telemetry - change NetworkState from string to json (#2338)
* change NetworkState from string to json in telemetry
2019-04-22 18:30:01 +01:00
Pierre Krieger 0ae060d4d1 Use ed25519 by default for network keys (#2290) 2019-04-17 12:03:00 +02:00
Tomasz Drwięga a6cbc965a0 Disable CORS when running in --dev (#2291)
* Disable cors in dev mode,

* Whitelist substrate-ui.

* Fix build.

* Update docs.
2019-04-16 12:57:51 +02:00
Xiliang Chen 72a1c6298e handle not found error in purge-chain (#2274) 2019-04-14 14:57:56 +02:00
Andrew Jones 7f59cdb900 Replace error-chain for client error (#2231)
* WIP: convert client error

* Remove error_chain for client error

* Ignore tx-pool error deprecation warning

* Update Cargo.lock files

* Fix tests

* Increment impl_version

* Derive From impls, remove allow(missing_docs)

* Remove space

* Remove redundant into()s

* Blockchain Error source

* Bump impl version
2019-04-11 21:33:43 +02:00
Luke Schoen 7e24278634 docs: Fix off-chain worker execution strategy comment (#2253) 2019-04-11 09:19:10 +02:00
Tomasz Drwięga 25f56283b1 Enable CORS checks (#2248)
* Introduce CORS CLI flags.

* Fix test.
2019-04-10 23:47:27 +02:00
Luke Schoen 296d37ac7f docs: Update Substrate CLI Light option to be experimental (#2250)
Consistency with Parity Ethereum CLI Light option https://github.com/paritytech/parity-ethereum/blob/master/parity/cli/mod.rs#L263
2019-04-10 21:43:50 +02:00
Pierre Krieger 3dfda381d5 Add support for mDNS (#2153)
* Use libp2p 0.6.0 instead of a custom branch

* Add support for mDNS

* Fix tests

* Nit
2019-03-31 19:47:15 -04:00
Tomasz Drwięga 823abc2fc0 Use NativeWhenPossible for offchain worker. (#2126) 2019-03-27 16:49:53 +01:00
Stefanie Doll d3ae05b454 Fixed wrong default value for offchain-worker-execution (#2118) 2019-03-26 12:14:02 +01:00
Tomasz Drwięga e2f5e40876 Initial: Offchain Workers (#1942)
* Refactor state-machine stuff.

* Fix tests.

* WiP

* WiP2

* Service support for offchain workers.

* Service support for offchain workers.

* Testing offchain worker.

* Initial version working.

* Pass side effects in call.

* Pass OffchainExt in context.

* Submit extrinsics to the pool.

* Support inherents.

* Insert to inherents pool.

* Inserting to the pool asynchronously.

* Add test to offchain worker.

* Implement convenience syntax for modules.

* Dispatching offchain worker through executive.

* Fix offchain test.

* Remove offchain worker from timestamp.

* Update Cargo.lock.

* Address review comments.

* Use latest patch version for futures.

* Add CLI parameter for offchain worker.

* Fix compilation.

* Fix test.

* Fix extrinsics format for tests.

* Fix RPC test.

* Bump spec version.

* Fix executive.

* Fix support macro.

* Address grumbles.

* Bump runtime
2019-03-25 23:22:11 +01:00
André Silva e28ff32b89 core: cli flag to disable grandpa (#2105)
* core: cli flag to disable grandpa

* core: fix test service configuration

* Update core/service/test/src/lib.rs
2019-03-25 15:19:36 +00:00
Arkadiy Paronyan c6addc9bd5 CLI option to enable authoring when offline (#2104)
* CLI option to enable authoring when offline

* Update core/service/src/config.rs

Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
2019-03-25 11:28:35 +01:00
Roman Borschel 57387ef585 libp2p-0.5.0 (#1971)
* Update libp2p. Add support for ed25519 node (network) keys.

  * Update networking to the changes from https://github.com/libp2p/rust-libp2p/pull/972.
  * Add support for using ed25519 keys for libp2p networking.
  * Add support for reading libp2p secret keys from (external) files.

* Adapt to changes from https://github.com/libp2p/rust-libp2p/pull/992

* More tests.

* Cosmetics

* Deduplicate tests.

* Remove quickcheck from tests that don't use extra random inputs.

* Remove quickcheck.

* Swap new/default impls for NetworkConfiguration.

* Use libp2p-0.5.0 from crates.io.

* Post-rebase update.

* Remove unnecessary wildcard pattern.

* Combine two overlapping tests.
2019-03-19 11:16:25 +01:00
Bastian Köcher 530c12b4dc Expose keyring accounts in CLI (#2032)
* Expose keyring accounts in CLI

So, `--alice` will give you a node with `--key //Alice --name Alice`.

* Update readme
2019-03-18 18:15:18 +01:00
Michael Müller c52c528ee8 Add grandpa telemetry (+ other minor improvements) (#1997)
* Support skipping the interactive purge prompt

Skip it via `cargo run -- purge-chain -y`.

* Fix typos

* Add Grandpa telemetry

* Address comments

* Revert unnecessary version bump

* Version bump to make CI run

* Remove unnecessary cast

* Do not bump version
2019-03-15 15:04:01 +01:00
Gav Wood 03d52fdbeb Crypto fixes/improvements (#2008)
* Crypto fixes:

- Use schnorrkel's HDKD derive
- Assume all key URIs beginning with `/` are prefixed with public
  root phrase.

* Remove commented code.

* Update README

* Update core/primitives/src/ed25519.rs

Co-Authored-By: gavofyork <github@gavwood.com>
2019-03-15 13:53:09 +01:00
Gav Wood d7fcf5dc9d Overhaul crypto (Schnorr/Ristretto, HDKD, BIP39) (#1795)
* Rijig to Ristretto

* Rebuild wasm

* adds compatibility test with the wasm module

* Add Ed25519-BIP39 support

* Bump subkey version

* Update CLI output

* New keys.

* Standard phrase/password/path keys.

* Subkey uses S-URI for secrets

* Move everything to use new HDKD crypto.

* Test fixes

* Ignore old test vector.

* fix the ^^ old test vector.

* Fix tests

* Test fixes

* Cleanups

* Fix broken key conversion logic in grandpa

CC @rphmeier

* Remove legacy Keyring usage

* Traitify `Pair`

* Replace Ed25519AuthorityId with ed25519::Public

* Expunge Ed25519AuthorityId type!

* Replace Sr25519AuthorityId with sr25519::Public

* Remove dodgy crypto type-punning conversions

* Fix some tests

* Avoid trait

* Deduplicate DeriveJunction string decode

* Remove cruft code

* Fix test

* Minor removals

* Build fix

* Subkey supports sign and verify

* Inspect works for public key URIs

* Remove more crypto type-punning

* Fix typo

* Fix tests
2019-03-13 14:08:31 +01:00
Gregory Terzian 90cd8a8479 Add network state to system.interval telemetry (#1959)
* add network state to system.interval telemetry

* use serde_json

* use unwrap_or_default
2019-03-12 10:17:29 +01:00
Bastian Köcher 7927054f86 Update copyrights to 2019 (#1932) 2019-03-06 15:04:28 +01:00
thiolliere b599556e21 remove unused code (#1920) 2019-03-04 17:10:31 +01:00
Michael Müller c485eb8fdc Get rid of wildcard imports (#1916)
* Get rid of wildcard imports

* Update core/service/src/lib.rs

Co-Authored-By: cmichi <mich@elmueller.net>

* Update core/client/src/client.rs

Co-Authored-By: cmichi <mich@elmueller.net>

* Import by namespace
2019-03-04 14:00:46 +01:00
Gregory Terzian a81f7f48a0 Refactor Sync status updates into a stream of updates (#1858)
* refactor sync provider

* relative use of interval

* typo

* set propagate timeout to 2500ms

* address comments

* fix instant calc

* update intervals
2019-03-02 14:35:16 +01:00
Michael Müller 90e5c5ddfb Telemetry improvements (#1886)
* Fix typo

* Support multiple telemetry endpoints and verbosity levels

* Bump substrate-telemetry version

* Telemetrify Aura consensus

* Telemetrify Grandpa

* Fix CI version conflicts

* Implement style remarks

* Fix fixture

* Implement style remarks

* Clone only when necessary

* Get rid of Arc for URL

* Handle connection issues better
2019-02-28 12:22:05 +01:00
Pierre Krieger 2b71b3e84b Update to libp2p v0.4 (#1836) 2019-02-21 10:04:53 +01:00
André Silva e15ce25757 core: cli: log milliseconds when debug/trace enabled (#1784) 2019-02-13 15:39:21 +01:00
Marcio Diaz b8bd49961a Adds new execution strategy nativeElseWasm (#1546)
* fix: adds new execution strategy nativeElseWasm and replace nativeWhenPossible with it

* feat: adds cmd line params for execution strategies

* fix: uses of cmd line execution strategies

* chore: remove white spaces

* chore: remove println

* chore: remove whitespace

* fix: generating functions with context

* feat: add function to generate with_context declarations

* fix: add implementation for with_context function calls

* fix: add execution context to call_api_at function

* fix: making use of context to select strategy for block_builder

* chore: cleaning up

* fix: merging issues

* fix tests

* add wasm files

* chore: small doc for context fields

* chore: delete redundant docs

* fix: use full path for ExecutionContext

* fix: add context functions from inside fold_item_impl

* chore: remove clone

* fix: moving generative function to utils, remove unused imports

* fix: add missing full path for ExecutionContext

* fix: merge issues

* update wasm files

* fix: update to keep up with changes in master

* chore: remove unused functions, clean up

* fix test

* fix grumbles

* fix: add more tests

* fix: some refactorings

* feat: add execution strategy to call

* chore: small improvements

* fix: add message to panic

* fix tests
2019-02-11 15:22:44 +01:00
Stanislav Tkach 31188dc013 Migrate rpc-servers, serializer, service and sr-io to the 2018 edition (#1732) 2019-02-08 13:10:05 +01:00
Tomasz Drwięga 4e3eace15f Limit transaction pool size (#1676)
* Avoid excessive hashing. Store extrinsic len.

* Implement pool limits.

* Fix issues.

* Make sure we return error in case it doesn't make into the pool.

* Pass parameters from CLI.

* Remove redundant todo.

* Fix tests.
2019-02-06 19:03:05 +01:00
Stanislav Tkach df685c9e53 Rename and use --max-heap-pages parameter (#1666) 2019-02-05 12:35:12 +01:00
Arkadiy Paronyan 6c341f4e9d Fixed panic handling (#1667) 2019-02-04 09:11:29 +01:00
Stanislav Tkach da029c87b7 Replace ⭳ and ⭱ characters with ⬇ and ⬆ (#1635) 2019-01-31 14:18:40 +01:00
jkcomment 24c531cf7b Fix generate node name with less then 32 characters (#1596)
* fix generate node name with less then 32 characters

* refactor generate_node_name
2019-01-29 12:46:18 +01:00
Bastian Köcher 27a882bfac Refactor CLI handling (#1368)
* Rework cli handling

* Update readme

* Adds support for custom subcommands and extra run parameters

* Update readme

* Fixes compilation after master merge

* Make "Run" the default subcommand

Actually its hidden to the outside that is an subcommand.

* Rewrite CLI to work without breaking old CLI behavior

* Some cleanup

* Fix incorrect config setup

* Update README

* Fixes after merge

* Fixes incorrect README
2019-01-25 10:48:46 +00:00