Commit Graph

16007 Commits

Author SHA1 Message Date
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 c28dd30461 Fixed block import (#368)
* Fixed decoding from file

* Increased progress frequency
2018-07-18 15:03:30 +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 be1c0a2427 Gossip through all peers. (#359)
* Added some traces

* Gossip for all

* Fixed formatting
2018-07-18 12:07:05 +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 14abd75369 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
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 a649fee20a Use create instead of open for export blocks (#356) 2018-07-17 22:52:42 +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 7e6f3291f4 Specialized network() (#352) 2018-07-17 19:33:12 +02:00
Arkadiy Paronyan 5035f18a85 Specialized network() (#352) 2018-07-17 19:33:12 +02:00
Gav Wood d8791ac79e 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
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 33ba137595 Remove old bootnodes (#341) 2018-07-17 10:10:22 +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 2b1fc459c7 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
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 90ea33c9fe hash random seed when using to choose round proposer (#336) 2018-07-16 18:17:52 +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 20f3e9f636 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
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
Gav Wood 0e40983f3b Ensure any call to disable peer has a reason (#321)
* Fix warnings in libp2p

* Force a reason when you use the fatalist disable_peer

* Print more information

* Slightly more concise ref-fu

* Tracing for figuring out what's going into genesis

* Merge

* Fxi test
2018-07-15 23:30:53 +02:00
Gav Wood c78478cf03 Ensure any call to disable peer has a reason (#321)
* Fix warnings in libp2p

* Force a reason when you use the fatalist disable_peer

* Print more information

* Slightly more concise ref-fu

* Tracing for figuring out what's going into genesis

* Merge

* Fxi test
2018-07-15 23:30:53 +02:00
Arkadiy Paronyan 1e1ddf61f2 Refactored Slicable (#324)
* Refactored Slicable

* Docs

* Wasm build

* Wasm build

* Renamed traits

* Review nits

* Renamed Slicable as well
2018-07-15 22:51:21 +02:00
Arkadiy Paronyan 1aeb2825af Refactored Slicable (#324)
* Refactored Slicable

* Docs

* Wasm build

* Wasm build

* Renamed traits

* Review nits

* Renamed Slicable as well
2018-07-15 22:51:21 +02:00
Sergey Pepyakin e1c90b573b Use --export-table from the latest LLD [2] (#325)
* It turned out that "table" was renamed.

To `__indirect_function_table`.

* Rebuild binaries.
2018-07-15 20:12:34 +02:00
Sergey Pepyakin b45020175a Use --export-table from the latest LLD [2] (#325)
* It turned out that "table" was renamed.

To `__indirect_function_table`.

* Rebuild binaries.
2018-07-15 20:12:34 +02:00
snd 1888adb98e Issue 279 - unique path for each chains db, network, keystore to prevent collisions (#322)
* make spec.name() part of database_path preventing collisions

resolves #279

* add `id` field to `ChainSpec`

* add blank line for readability

* dot/cli: use spec_id in db_path

* dot/cli: make spec_id part of keystore_path

* dot/cli: make spec_id part of network_path

* add id field to poc-1.json chain spec

* dot/cli: spec_id -> chain_id
2018-07-15 19:31:59 +02:00
snd 1d726193ba Issue 279 - unique path for each chains db, network, keystore to prevent collisions (#322)
* make spec.name() part of database_path preventing collisions

resolves #279

* add `id` field to `ChainSpec`

* add blank line for readability

* dot/cli: use spec_id in db_path

* dot/cli: make spec_id part of keystore_path

* dot/cli: make spec_id part of network_path

* add id field to poc-1.json chain spec

* dot/cli: spec_id -> chain_id
2018-07-15 19:31:59 +02:00
Pierre Krieger b3916c2999 Remove dependency on parity/network (#323)
* Remove dependency on parity/network

* Remove dependency on RLP as well

* Fix tests

* Fix tests again
2018-07-15 19:25:29 +02:00
Pierre Krieger e32b77ffdc Disable peers only for 5 minutes (#320)
* Disable peers only for 5 minutes

* Fix formatting
2018-07-15 15:14:00 +02:00
Sergey Pepyakin 8cafabc4bd Use --export-table from the latest LLD (#316)
* Remove unused build.sh

* Don't use wasm-export-table anymore.

* Rebuild binaries.

* Fix build script.
2018-07-15 14:09:29 +02:00
Sergey Pepyakin fed50df6ed Use --export-table from the latest LLD (#316)
* Remove unused build.sh

* Don't use wasm-export-table anymore.

* Rebuild binaries.

* Fix build script.
2018-07-15 14:09:29 +02:00
Gav Wood 8a0eaf9146 Avoid accounts destroyed in payments from being aux (#318) 2018-07-15 14:04:26 +02:00
Gav Wood f982801ed7 Avoid accounts destroyed in payments from being aux (#318) 2018-07-15 14:04:26 +02:00
Pierre Krieger 5924b361a3 Switch from devp2p to libp2p (#268)
* Switch from devp2p to libp2p

* Move the keys in the network state

* Properly load, store or generate private key

* Some robustness

* Update for latest libp2p

* Allow secio

* Don't open a new Kademlia connec all the time

* Handle Kademlia disconnection

* Set correct permissions on key file

* Improvements to secret key storage

* Flush the peer store at Kademlia requests

* Use RAII guards for disconnection

* Some misc work

* Set informations about peers

* Fix tests and external URL

* Fix some style

* Split obtain_private_key into multiple function

* More style fixes

* More style fixes

* Fix some concerns

* Turn // into ///

* More style fixes

* More style fixes

* Add annotations to unreachable!

* Fix style again

* Remove commented out code

* Fix test year

* More concerns
2018-07-15 11:45:37 +02:00
Gav Wood 257c6d240f Fix and cleanups (#314)
* Cleanups (remove genesis.wasm & nicer errors)

- Pretty errors for version mismatch
- Remove the need for genesis wasm

* Remove unneeded wasm files

* Improve code of conduct

* Leaner code

* Test fixes

* fix tests

* Fix consensus checking
2018-07-15 00:30:13 +02:00