Commit Graph

813 Commits

Author SHA1 Message Date
Chevdor 903ce68809 Subkey fix and refactor (#418)
* Fix bug and refactoring

- Fix panic in some cases
- Extract the generation as a reusable function
- Improve scoring calculation
- Add tests
- Sort the results
- Fix the case when called with a desired pattern either empty or of 1 char
- Add a 'even more' paranoiac mode
- Add benchmarks

Fix #417

* Fixed compilation for nightly
2018-07-26 11:11:52 +02:00
Arkadiy Paronyan debeedfbe8 Substrate CLI (#423)
* Moved chain ops to substrate-service

* moved RPC to susbstrate-service WIP

* Moved RPC to substrate-service

* Version

* Removed redundadnt messages

* substrate CLI

* Removed obsolete files

* Sorted out startup messages

* Pass executable name to CLI
2018-07-25 22:10:09 +02:00
Arkadiy Paronyan 65f0c5f3af Revert chain command (#393)
* Revert chain command

* BLOCKS -> NUM

* Fixed warning
2018-07-24 15:54:34 +02:00
Pierre Krieger e65672575f Add some logging if the timeouts stream ends (#414) 2018-07-24 15:54:19 +02:00
Arkadiy Paronyan 2fdb9cbc29 Keep last finalized overlay in memory until DB commit (#409) 2018-07-24 11:13:04 +02:00
Chevdor bb97684112 WIP: Asciidoc (#407)
* Rename readme

* Add some Asciidoc demo

* Remove extra lines
2018-07-24 11:12:53 +02:00
Gav Wood b0714c4c23 Create CONTRIBUTING.md (#411)
* Create CONTRIBUTING.md

* Update CONTRIBUTING.md
2018-07-24 10:12:56 +02:00
Tomasz Drwięga 6ed6edc02f Bump jsonrpc. (#410) 2018-07-23 17:44:27 +02:00
Gav Wood 077c3d3cb7 Style fixes (#396)
* Fix p2p

* Cosmetic stuff

* More cosmetics

* Whitespace

* Whitespace

* Whitespace

* Renames

* Most cosmetics

* typo

* minor rename

* Remote-end disconnect message should be info!

* invalid tab

* Avoid ignoring sustained bad pings

* Remove workarounds.
2018-07-23 16:46:13 +02:00
Pierre Krieger fcb30f4009 General multiplexing fixes (#408) 2018-07-23 15:58:48 +02:00
Chevdor 8c5f774490 Fix export when starting from block 0 (#406)
* More explicit variable names

* Fix export when from block is 0

Fix #402
2018-07-23 13:49:01 +02:00
Chevdor b65700d003 Add restrictions on node name length and content (#395) 2018-07-21 23:00:06 +02:00
Gav Wood 76384d0afb Refactor out disable/disconnect peer to make API more declarative (#394)
* Refactor out disable/disconnect peer to make API more declarative

* Minor fixes.

* rename `disconnect_peer` to `drop_peer` in low-level
2018-07-21 16:13:19 +02:00
Pierre Krieger 625918394a Introduce support for yamux (#388) 2018-07-20 00:44:21 +02:00
Benjamin Kampmann e3268de487 Allow bootnodes as IP:PORT, query Peer-id (#386)
* Simplify cli parsing: remove unnecessary match for Version and help: e.exit() manages both for us already
* Allow passing of IP:PORT as bootnodes, then try to discover its PEER_ID
2018-07-20 00:43:31 +02:00
Pierre Krieger 831810b155 Register protocols at the same time as we start (#385)
* Register protocols at the same time as we start

* Fix tests
2018-07-19 20:50:07 +02:00
Pierre Krieger 0fbf66b07e More networking fixes (#384)
* Don't connect to ourselves for Kademlia

* Improve log messages

* Manually drop connections

* Kademlia is now 32 seconds

* Fix potential panic

* Fix other potential panic

* No longer pass the endpoint everywhere
2018-07-19 17:56:39 +02:00
Chevdor ed7144d281 Add support for shell completion (#340)
* Add build script to generate completion scripts

* Add installation doc for the shell auto-completion
2018-07-19 17:20:11 +02:00
Gav Wood 920a6b810e Fix telemetry (#383)
* Explicit disconnect on timeout

* Fix telemetry
2018-07-19 16:11:43 +02:00
Arkadiy Paronyan 2ece52f339 Explicit disconnect on timeout (#382) 2018-07-19 16:04:05 +02:00
Pierre Krieger bcd2f274f9 Network improvements (#374)
* Ping active connections

* Bump rust-libp2p

* Deny connection attempts if we're already connected

* Properly check max_peers against custom connections

* Fix set_until not immediately called

* Clean up unusued connections and stop pinging them

* Disconnect Kad connections after 20 seconds of inactivity
2018-07-19 15:22:07 +02:00
Maciej Hirsz be55eb8db6 Use SSL to submit Telemetry (#381)
* Fix deadlock for too-small heap

* Use SSL for submitting telemetry
2018-07-19 15:08:23 +02:00
Arkadiy Paronyan 0dfe40e742 Panic hook (#379)
* Panic hook

* Abort on panic in release
2018-07-19 14:14:30 +02:00
Gav Wood dd0eaa0d52 Various small v0.2 improvements (#367)
* Make telemetry less susceptible to flakey wifi

* Update readme

* Staging shouldn't autoconnect to telemetry

* Don't try to output more than 1KB of hex to Display

* Better logging of transactions

* Grumbles

* off-by-one
2018-07-19 12:08:34 +02:00
Chevdor bcd4cedf3c Use generated name if no name was provided (#377) 2018-07-19 11:26:52 +02:00
Pierre Krieger 3dfd53cc86 Timeouts now repeat forever (#372) 2018-07-18 17:59:31 +02:00
Robert Habermeier 927cb59aaf Collator-side of collator protocol (#351)
* skeleton of collators object

* awaiting and handling collations. rename `collators` to CollationPool

* add some tests

* add tests

* implement Collators trait for ConsensusNetwork

* plug collators into main polkadot-network

* ignore collator role message

* add a couple more tests

* garbage collection for collations

* extract session-key tracking from consensus

* add local_collations.rs

* finish polish of local_collations

* integrate local_collations into network layer

* introduce API for adding local collations

* mostly finish collator implementation pending service fix

* Specialized network()

* push collations to the network

* grumbles

* substrate-service has custom configuration

* initialize network in collator mode as necessary
2018-07-18 15:04:26 +02:00
Arkadiy Paronyan 8bcfb16fad Fixed block import (#368)
* Fixed decoding from file

* Increased progress frequency
2018-07-18 15:03:30 +02:00
Pierre Krieger 4dfa17ab37 Fix style in #364 (#365) 2018-07-18 14:34:05 +02:00
Pierre Krieger de168ca034 Fix the networking (#364)
* Serve only non-empty Kademlia nodes

* Use the number of custom protos to determine whether to open more

* Add timeout when connecting

* Connect to random peers from the peer store

* Various adjustements

* Typo

* Explicitely connect to bootnodes

* Fix potential overflow
2018-07-18 13:55:38 +02:00
Arkadiy Paronyan 73613f45c1 Gossip through all peers. (#359)
* Added some traces

* Gossip for all

* Fixed formatting
2018-07-18 12:07:05 +02:00
Svyatoslav Nikolsky 7b8463aaf1 explicit stop of AsyncImportThread (#360) 2018-07-18 12:06:50 +02:00
Tomasz Drwięga 7ce2a8552f Extrinsics PubSub (#349)
* Extrinsic subscriptions.

* Handle RPC errors better.

* Add tests for extrinsics and unignored others.

* Handle client errors.

* Fix compilation.
2018-07-17 23:57:08 +02:00
Sergey Pepyakin 7dcbf77c9d Use create instead of open for export blocks (#356) 2018-07-17 22:52:42 +02:00
Arkadiy Paronyan 94fcb9a262 Download bodies when authorit nodes are syncing (#355) 2018-07-17 21:48:51 +02:00
Gav Wood e9ddcac261 Fix deadlock for too-small heap (#353) 2018-07-17 21:47:28 +02:00
Pierre Krieger 1809f0596b Fix install command in README (#354) 2018-07-17 20:31:34 +02:00
Arkadiy Paronyan 5035f18a85 Specialized network() (#352) 2018-07-17 19:33:12 +02:00
Gav Wood 07fbd871d9 Final tweaks for PoC-2 runtime upgrade (#348)
* Final tweaks for PoC-2 runtime upgrade

* Address grumble

* Avoid slow wasm

* New poc-2-era bootnodes

* Fix warning

* Typo

* Fix for allocation in wasm

* Fix & runtimes.

* PoC-1 should be default.

* Name testnet Krumme Lanke, update README

* YML update

* Use the right port
2018-07-17 18:55:28 +02:00
Pierre Krieger 428682d3b5 More robust connections (#343)
* Make Kademlia connection more robust

* Make custom connetions more robust

* Fix potential deadlock

* Style and minor changes

* Upgrade rust-libp2p
2018-07-17 17:14:06 +02:00
Chevdor 7372bbc0a5 Add badges (#344) 2018-07-17 13:59:54 +02:00
Gav Wood f140ebf7a6 Remove old bootnodes (#341) 2018-07-17 10:10:22 +02:00
Svyatoslav Nikolsky 91cb0fcfef fixed AsyncImportQueue drop deadlock (#342) 2018-07-17 10:09:18 +02:00
Gav Wood e75d7d8fda Adaptive heap size (#328)
* heap-size is a CLI arg, make it 512 by default

* Fix tests

* Adaptive heap size.

* Allow storage_exists
2018-07-16 20:59:10 +02:00
Pierre Krieger bb8987df28 Better reporting in libp2p (#337) 2018-07-16 19:11:19 +02:00
Svyatoslav Nikolsky f775b38828 Fix light sync deadlock (blocks import queue) (#260)
* fix light sync deadlock

* some more docs
2018-07-16 19:04:27 +02:00
Robert Habermeier c6119cbbdf hash random seed when using to choose round proposer (#336) 2018-07-16 18:17:52 +02:00
Arkadiy Paronyan f84ad85c62 Use substrate codec for network messages (#333)
* Use substrate codec for network messages

* Version bump

* Removed redundant format
2018-07-16 14:28:31 +01:00
Phil 747537f6fd changed polkadot.io to polkadot.network (#335) 2018-07-16 14:20:24 +01:00
Pierre Krieger 801747cb76 Fix nodes not connecting to each other (#330)
* Fix nodes not connecting to each other

* Only report external addresses
2018-07-16 14:27:11 +02:00