Commit Graph

45 Commits

Author SHA1 Message Date
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
Bastian Köcher 090ca9ee7c Upgrade sysinfo to fix compilation on windows (#1267) 2018-12-17 11:10:50 +01:00
Benjamin Kampmann bd2a206e40 Add cli param to limit database cache size (#1261)
* Add cli param to limit datbase cache size

* fixing tests
2018-12-13 12:32:41 +01:00
Tomasz Drwięga 507c13e31c Move pool maintainance to a background task. (#1236)
* Move pool maintainance to a background task.

* Remove commented code.

* Add issue number to TODOs

* Fix warnings and tests.
2018-12-10 14:13:48 +01:00
Bastian Köcher a4a67ccbe7 Make cli subcommands accept --dev, --chain and --base_path (#1214)
This restores an old behavior with more checks to inform the user
about misuse.
Only the `build-spec` parameter is not accepting these flags and options.
This subcommand only works with the options specified on the main command,
this is a restriction of the current cli parse/execute design.
2018-12-10 08:45:22 +01:00
Bastian Köcher 69a288e586 Cleanup the cli interface (#1194)
Parameters like `--dev`, `--base-path` or `--chain` were replicated
for each subcommand and were also present in the "top". This pr removes
these parameters from the subcommands.
The subcommands also ignored stuff like `--dev` as it was only read in
the top matcher, that did not look into the subcommand matchers.
Now, if you specify one of the parameters for a subcommand, you will get
an error instead of silently ignoring it.
2018-12-03 10:16:06 +01:00
Andrew Jones c36998aeaf Default boot_nodes to local node in build-spec (#1181)
* Default to local bootnode with build-spec

* Rexport libp2p stuff via network crate

* Remove unused imports and fix where formatting

* Remove spurious blank lines

* Remove unnecessary else clause
2018-12-01 16:47:40 +08:00
Benjamin Kampmann 52e36bbeb8 Clean up CLI params (#1165)
* Fix params: they are kebab not snake-cased
* Fix docs missing in cli
* remove unsed macro-use
2018-11-27 09:25:27 +01:00
Svyatoslav Nikolsky 675c3b0500 fix purge-chain cli option (#1164) 2018-11-26 10:58:09 +01:00
Robert Habermeier 11fe84a742 Minimal switch of substrate-node to GRANDPA /Aura (#1128)
* add beginnings of SRML grandpa library

* get srml-grandpa compiling

* tests for srml-grandpa

* add optional session integration to grandpa SRML

* start integration into node runtime

* Allow extracting pending change from header digest

* Make it compile on wasm

* make tests compile again

* Move Authority Key fetching into service, simplify service factory construction

* Generalize Authority Consensus Setup system

* Add Authority Setup Docs

* Allow CLI params to be extensible

 - move params to structopts
 - split parsing and default command execution
 - add custom config to node
 - extended parsing of custom config
 - extending params via structop's flatten

* Minor fixes on cli extension params:
 - added docs
 - re-add actual app name, rather than node-name
 - make strategy and subcommand optional

* better cli params

* synchronize GRANDPA and normal node authorities

* Implement grandpa::network for gossip consensus

* run_grandpa in Node

* Fix missed merge error

* Integrate grandpa import queue

* more specific type def

* link up linkhalf and import block

* make grandpa future send

* get compiling

* Fix new params convention and license header

* get it running

* rebuild node runtime WASM

* change logging level

* Update node/cli/src/params.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/params.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/runtime/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Clean up and Fixme for mutable config

* Move GrandpaService Integration into grandpa, feature gated but on per default

* Fixing grandpa runtime module test

* Update wasm runtime hashes for tests

* GRANDPA: use post-header hash when logging scheduled changes

* add an extra bit of logging to authorities

* fixing missing constrain

* remove old code

* move `NewAuthorities` to an event in srml-grandpa

* fix node-executor tests to use grandpa log

* Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests

* Update to latest wasm runtimes

* address grumbles

* address grumbles

* only derive deserialize when using std

* Clean up use of Deserialize
2018-11-21 18:42:50 +01:00
Pierre Krieger 74e907f3cb Some tweaks in the network crate (#1108)
* Move Roles to network::config

* Make network::config public

* Move NetworkConfig and NonReservedMode to config

* Move Params to config

* Move node_id() to NetworkManager and fix tests

* Rename Specialization to NetworkSpecialization
2018-11-14 11:25:16 +01:00
Pierre Krieger f94bba0802 Remove dependency on libp2p from cli (#1107) 2018-11-13 16:26:53 +01:00
Bastian Köcher 9063d1acae Implement runtime api client side directly in the runtime (#1094)
* Move `initialise_block` into `Core` trait as it is crucial calling the API functions

* Switch to first version of new runtime API implementation

* Fixes bug in tests

* Reenable asserts

* Directly use the `TestAPI` in the tests

* Start improving the api traits

:100644 100644 898aadc7 49217199 M	Cargo.lock
:100644 100644 61570436 465ed664 M	core/client/src/backend.rs
:100644 100644 5d0c886b 64d710fd M	core/client/src/block_builder.rs
:100644 100644 c447855e 5ecbe474 M	core/client/src/client.rs
:100644 100644 139cef13 f90dbf3d M	core/client/src/error.rs
:100644 100644 2800c503 3298e66a M	core/client/src/runtime_api.rs
:100644 100644 affa1c5c 809b08bc M	core/primitives/src/lib.rs
:100644 100644 2877dfa9 d5547413 M	core/sr-api/Cargo.toml
:100644 100644 9a49784d 6a625a03 M	core/sr-api/src/lib.rs
:100644 100644 7c28e1c7 a1a444a9 M	core/sr-primitives/src/traits.rs
:100644 100644 2e113ab6 dcc01a6d M	srml/metadata/Cargo.toml
:100644 100644 ea722a70 0809531a M	srml/metadata/src/lib.rs

* Refactoring

* Move `sr-api` into client and more refactoring

* Fixes tests

* Some documentation and cleanup

* Fixes compilation after rebase

* More refactoring and more documentation

* Makes `substrate-client` compilable on `wasm`

On `wasm` it basically just exports the runtime api stuff.

* Fixes grumbles

* Updates wasm files after rebasing the master

* Remove TODO comment

* Remove whitespaces

* Fixes after rebasing master

* Another rebase, another fix commit
2018-11-13 13:33:28 +01:00
Luke Schoen 037f9dde10 docs: Extends #999. Remove disused package readmes. Rename to sr-metadata. Fix Readme Rustdoc names (#1016)
* docs: Remove safe-mix since is no longer local dependency

* docs: Fix existing packages link. Still only includes Substrate Core

* docs: Remove empty package Readmes. Remove old docs links. Rename to Readme

* docs: Remove link to old docs

* misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names

* Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory

* Change example to use package name that opens all packages in RustDocs

* Fix list of packages names that are available to open in RustDocs

* fix typo

* fix ordering of CLI options and add missing backslash
2018-11-12 21:18:06 +01:00
Pierre Krieger 8050979660 Rename min-peers and max-peers CLI options (#909) 2018-10-16 08:34:59 +01:00
Maciej Hirsz 2be621af77 Silence Telemetry WS errors (#904) 2018-10-12 18:10:24 +02:00
Tomasz Drwięga 671b0e0007 Tagged transaction queue integration (#893)
* Make the graph generic.

* Adapting pool API for the graph.

* Merge pool & graph.

* Restructure.

* Fix test of transaction pool.

* Get rid of node/transaction-pool.

* Compilation fixes.

* Test7

* Fix compilation of tests.

* Revert runtime changes.

* Add validate_transaction to test-runtime.

* Fix RPC tests.

* Add clearing of the old transactions.

* Trigger pool events.

* Use new queue API.

* Fix wasm build, re-export Hasher.

* No warning if validate transaction fails.

* Get rid of Into<u64> and use As
2018-10-12 13:09:35 +02:00
Bastian Köcher 12f12bff28 Make all copyrights use the correct year (#894)
* Adds a script for automatically update all copyrights

* Ran the `update-copyright` script
2018-10-10 10:28:41 +02:00
Maciej Hirsz 4d18c50e67 Version bump on sysinfo (#871) 2018-10-04 16:51:05 +02:00
Arkadiy Paronyan 9a660f82ed Integration tests (#805)
* Started substrate tests

* Sync test

* Test updates

* Improved tests

* Use on-chain block delay

* Parallel test execution

* Otimized tests

* Logging

* Fixed racing test

* Fixed compilation

* Fixed timestamp test

* Removed rlp dependency

* Minor fixes

* Fixed tests

* Removed best_block_id and resolved fdlimit issue

* Whitespace

* Use keyring

* Style

* Added API execution setting

* Removed stale import
2018-09-28 10:37:55 +01:00
Gav 65b9e11cd8 Renaming 2018-09-27 16:25:53 +01:00
Gav Wood e5b48030b5 Fix newline. (#821) 2018-09-27 15:31:44 +01:00
Gav Wood 851c7f42df Fix block generation by updating codec versions in wasm (#810)
* Fixes for staging testnet

* Fix codec versioning

* Comment unneeded trace

* Update lib.rs

* Update parity-codec

* Add script to update wasm deps and update them.

* Update hashes

* Add BBQ Birch testnet

* it's default-features, apparently.

* Use simpler version spec for parity codec

* Typo
2018-09-27 14:38:56 +01:00
Bastian Köcher 5eb1aefde6 Updates dependencies and tries to consolidate multiple version (#815) 2018-09-27 13:50:15 +01:00
guanqun d46f2b9c76 cli: add --dev to all subcommands (#807) 2018-09-27 10:22:09 +01:00
Pierre Krieger 52dbf0cace Rewrite the libp2p networking (#742)
* Rewrite the libp2p networking

* Fix erroneous replacement during rebase

* Update libp2p

* Update libp2p

* Remove the logic error about useless substreams

* Use the new NodeHandler system of libp2p

* Commit the Cargo.lock

* Upgrade yamux

* Forward port latest changes

* Fix compilation issues

* Implement the external URL

* Update to latest networking fixes

* Forward port rest of v0.2

* Fix reserved peers being dropped when we're full
2018-09-26 11:56:32 +02:00
Gav Wood 67bf1a6eaa Transaction eras (#758)
* Initial groundwork

* A mess.

* Integrate

* Fix tests

* Unit tests

* Tests for unchecked_extrisnic

* fix tab

* Improve binary format.

* fix tests

* Rename extrinsic-pool -> transaction-pool

Closes #770

* Implement unimplemented.

* typo
2018-09-20 14:01:01 +02:00
Arkadiy Paronyan 0ed48c89ab Remove dependency on the parity repo (#734) 2018-09-13 14:25:38 +02:00
Gav Wood 1e01162505 Phase 1 of repo reorg (#719)
* Remove unneeded script

* Rename Substrate Demo -> Substrate

* Rename demo -> node

* Build wasm from last rename.

* Merge ed25519 into substrate-primitives

* Minor tweak

* Rename substrate -> core

* Move substrate-runtime-support to core/runtime/support

* Rename/move substrate-runtime-version

* Move codec up a level

* Rename substrate-codec -> parity-codec

* Move environmental up a level

* Move pwasm-* up to top, ready for removal

* Remove requirement of s-r-support from s-r-primitives

* Move core/runtime/primitives into core/runtime-primitives

* Remove s-r-support dep from s-r-version

* Remove dep of s-r-support from bft

* Remove dep of s-r-support from node/consensus

* Sever all other core deps from s-r-support

* Forgot the no_std directive

* Rename non-SRML modules to sr-* to avoid match clashes

* Move runtime/* to srml/*

* Rename substrate-runtime-* -> srml-*

* Move srml to top-level
2018-09-12 11:13:31 +02:00