Commit Graph

652 Commits

Author SHA1 Message Date
Arkadiy Paronyan c709ba1dd0 Update version on git head change (#444) 2018-07-28 19:25:51 +02:00
Pierre Krieger 2cb4ed8dcc Fix the public key of bootnode 3 (#441) 2018-07-28 17:33:50 +02:00
Pierre Krieger 53a68d8b9f Update libp2p (#442) 2018-07-28 14:55:43 +01:00
Pierre Krieger b1a3552aa0 Switch to the master branch of libp2p (#427)
* Switch to the master branch of libp2p

* Fixed having to clear manually

* Fix TTL of bootstrap nodes

* Speed up compilation time

* Update libp2p

* Remove obsolete comment
2018-07-28 10:42:26 +01:00
Chevdor 93fb824dfc Export ws port 9944 and add doc (#440)
Fix #437
2018-07-28 09:14:30 +01:00
Sergey Pepyakin 9bcecefbe0 Iterate over overlay to decide which keys to purge (#436) 2018-07-28 09:13:38 +01:00
Arkadiy Paronyan 31db321814 Exit signal gets its own trait (#433)
* Exit signal gets its own trait

* Typo

* Removed clone bounds
2018-07-28 08:31:16 +02:00
Chevdor 97a6db785e Add docker image (#375)
* Add Dockerfile

Add documentation

Ref #375

* Add PORT, VOLUME and reduce size of the docker image significantly

Fix doc and reduce image size

Fix #375

* Fix docker compose
2018-07-27 16:32:12 +02:00
Chevdor e5900d8f17 Reset peers.json if the content is not loadable (#405)
* Reset peers.json if the content is not loadable

Fix #404

* Whitespace
2018-07-27 16:24:28 +02:00
Wei Tang 6d0bed8a65 Limit number of incoming connections (#391)
* Limit number of incoming connections

* Check Endpoint::Listener before checking num_open_connections.incoming

* Maintain at least 1-1/n portion of outgoing connections

* Remove use

* Default incoming_peers_factor to 2

* Use max_incoming_peers and max_outgoing peers to check whether connections should be dropped

* Fix expected_max_peers: reserved peers are not counted in config.max_peers

* typo: fix test
2018-07-27 16:13:27 +02:00
Pierre Krieger 988440a368 Fix memory leaks in libp2p (#432)
* Fix memory leaks in libp2p

* Fix memory leaks in libp2p
2018-07-27 16:09:49 +02:00
Svyatoslav Nikolsky 4491a9fac5 Do not queue empty blocks set for import (#431)
* do not queue empty blocks set for import

* fixed grumbles
2018-07-27 16:09:31 +02:00
Sergey Pepyakin 94be7783e2 5 random fixes (#1) (#435)
* ok_or → ok_or_else

* Correct the sides of the given and expected args

* Indent } properly

* Convert identation from tabs to spaces.

* Convert identation from tabs to spaces. [2]
2018-07-27 15:55:34 +02:00
Bob Liu 06ec2669fe Chore: fix typo (#434) 2018-07-27 14:24:17 +03:00
Arkadiy Paronyan 916131b073 Prevent building invalid blocks (#430)
* Commit extrinsics changes

* Removed panic=abort

* Commit when needed

* Resotre default hook for the native call

* Revert test

* Proper test

* Sorted errors and fixed wasm build
2018-07-27 11:11:47 +02:00
Pierre Krieger 1b0e3e57dd Better logging for public key mismatch (#429) 2018-07-27 09:35:24 +02:00
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