Commit Graph

78 Commits

Author SHA1 Message Date
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
Gav Wood eca163ba64 Bump version to 1.0.0 globally (#2149)
* Bump versionb globally

* Rebuild and fix

* Rename fixes

* Rebuild

* Minor fix and code formatting for validator election

* Fix tests

* More test fixes

* Fix several bugs in phragmen elections.

* Rebuild, remove pointless closures
2019-04-01 15:16:06 +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
Benjamin Kampmann 0135afd0ed Update substrate-cli & node-template deps (#1737)
* Update to latest sysinfo crate

* Update node_templates parking_lot dependency
2019-02-08 14:05:06 +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
Benjamin Kampmann ab4c70b379 Update dependencies (#1527)
* update to latest env_logger

* roundabout dependency update

* Update to latest vengen

* Update rand to 0.6

* Update to latest rng shuffle API

* Roundabout update of dependencies

* Update rustc_hex

* Update wasm

* Fix logging setup in tests

* revert to fix test
2019-01-25 12:44:41 +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
Pierre Krieger a1586df41b Report the average network bandwidth (#1551)
* Report the average network bandwidth

* Fix concerns
2019-01-25 10:34:34 +00:00
Bastian Köcher 5be237030d Fix warnings in substrate (#1523)
* Fix warnings in substrate

* More warnings removed and wasm updated

* Fixes error on stable and grumbles

* Update wasm files

* Add links to the github issue for replacing `error-chain`
2019-01-24 16:10:07 +01:00
Stanislav Tkach 28c37ef419 Migrate basic-authorship, cli and client-db crates to 2018 edition (#1529) 2019-01-23 14:27:40 +01:00
Pierre Krieger f67c2cc181 Store identification info about the remote (#1500)
* Store identification info about the remote

* Add node name on the wire

* Fix tests
2019-01-21 14:33:25 +01:00
Marcio Diaz b57486c74f Fix revert for non finalized blocks (#1479)
* fix: temporal modification to make revert works for non finalized blocks

* fix: print info when the number of blocks asked to revert is higher than the number of reversible blocks

* fix: remove function get_db_path_for_subcommand and remove it from all subcommands

* fix: revert only non finalized blocks

* fix: improve printed information for revert command

* fix: new wasm file

* chore: remove unused parameter

* fix: revert log logic

* fix: subcommands should take sub_matches instead of matches

* fix: removing confusing message
2019-01-21 13:52:33 +01:00
Benjamin Kampmann d4eb3872a0 Simplier and cleaner implementation of #1468 (#1471)
* Simplier and cleaner implementation of #1468

* move AppInfo into base_path

* default to executable_name rather than pretty visible name
2019-01-17 22:26:58 +01:00
Benjamin Kampmann 15856747ae Allow implementation to provide AppInfo to figure out default paths (#1468) 2019-01-17 16:55:55 +01:00
Robert Habermeier 9acda28c16 informant: display finalized height and hash (#1387) 2019-01-10 18:19:31 +01:00
Gav Wood a13fda2e83 Fix telemetry (and a minor cleanup) (#1384) 2019-01-10 15:47:12 +01:00
Robert Habermeier eb0ff291d6 log on reorganization (#1356) 2019-01-07 15:32:04 +01:00
Aton 409d495b42 fix bug for revert (#1341)
* must pass sub_matches to function, so that could get `<num>` in revert
* revert should del current best index block, not prev block
2019-01-07 10:17:05 +01:00
toxotguo 236208b6cb fix pruning arg type (#1332) 2018-12-27 13:35:05 +01:00