Commit Graph

19 Commits

Author SHA1 Message Date
Pierre Krieger 5bde98e95a Increase tolerance for bandwidth usage in test (#2576) 2019-05-14 14:40:06 +02:00
Pierre Krieger 52472238bd Drop connections when the handler gets disabled (#2439)
* Drop connections when the handler gets disabled

* Add test
2019-05-02 21:03:04 +02:00
Pierre Krieger f3df7250e9 Remove the multiplexed networking system (#2373)
* Remove the multiplexed networking system

* Rename BackCompat to Normal

* Remove CustomMessageId

* Fix tests
2019-04-25 11:39:57 +02:00
Pierre Krieger 3f06fe32f3 Update to libp2p v0.7.0 (#2343)
* Update to libp2p master

* Fix tests

* More tests fixing
2019-04-23 18:46:30 +01:00
Pierre Krieger b483c5608f ProtocolId can now be more than 3 bytes (#2350) 2019-04-23 17:15:21 +01:00
Pierre Krieger 6e394464b8 Replace NodeIndex with PeerId everywhere (#2077)
* Replace NodeIndex with PeerId

* Fix tests

* More test fixing

* Whitespace
2019-03-23 10:34:28 +01:00
Pierre Krieger b712795aa2 Fix #1777 (#2072) 2019-03-21 16:49:21 +01:00
Pierre Krieger 90c6f85db5 Add a substrate-peerset crate (#2042)
* Add a substrate-peerset crate

* Some adjustements

* More adjustements

* Use a temporary libp2p branch

* Add back-off mechanism

* Fix RPC tests

* Some adjustements

* Another libp2p bugfix

* Do a round-robin in the peerset

* Use a real dependency instead of a patch for libp2p

* Initialize reserved nodes correctly

* Better diagnostic for no address

* Don't allocate slots if in reserved only

* Ban node on dial failure

* Fix indentation
2019-03-21 14:02:28 +01:00
Pierre Krieger 002143d0a2 Remove support for multiple network protocols (#2005)
* Remove support multiple network protocols

* Address concerns

* Add back debug_asserts
2019-03-19 11:56:56 +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
Gav Wood 828cd9580a Stash/controller model for staking (#1782)
* First steps to stash/controller separation

* More drafting

* More drafting

* Finish draft.

* Optimisation

* Remove accidental commit

* Make it build.

* Fix linked map for traits.

* Fix Option<_> variant.

*  Improve naming a tad

* Rebuild runtime

* Builds!

* First test.

* Bump RT version

* Minor fix

* Update Mock

* adds the correct reward testcase (+staking eras which was already ok)

* fixes the basic staking testcase to work properly (along with a small fix in the module)

* New logic to avoid controller transferring stash.

* Fix some build issues.

* adding some comments to tests

* Fix impls.

* adds a few more lines to explain the test case

* More fixes.

* gets the basic test up and running again

* Fix rest of build

* Rebuild wasm

* Fix docs.

* fix staking test with new chnages

* updating some tests, pending questions

* More working tests

* adds double staking test

* Docs

* remove invalid slashing test

* Payee stuff.

* Fix build

* Docs

* Fix test

* Fix a couple of tests

* Layout plan for finishing tests before Pragmen

* Add some working tests

* re-build staking and reward tests

* Add more tests

* fix offline grace test

* Nominator should have payee checked for cleanup

* adds more nomination tets

* adds validator prefs tests

* Fix and clean up some TODOs

* Fix a couple of issues

* Fix tests

* noting warnings from tests

* final fix of local tests

* Fix slot_stake bug

* Half baked test

* Add logic to limit `unstake_threshold` set in storage

* Make sure to check before writing!

Almost forgot this one

* Move a couple of comments

* fix last broken slot_stake test

* Ignore broken test
2019-03-02 14:31:48 +01:00
Pierre Krieger 733ce7d616 Split Substrate messages into multiple substreams (#1796)
* Split Substrate messages into multiple substreams

* Add back Clogged event
2019-02-25 11:55:45 +01:00
Pierre Krieger 2b71b3e84b Update to libp2p v0.4 (#1836) 2019-02-21 10:04:53 +01:00
Pierre Krieger 9e999cdd81 Make network-libp2p's Service generic over the message (#1708)
* Make network-libp2p's Service generic over the message

* Apply suggestions from code review

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Fix warning
2019-02-12 15:36:15 +01:00
Pierre Krieger 35a4aa638c Make the discovery test more strict (#1721) 2019-02-11 13:47:14 +01:00
Pierre Krieger b6fd967dfb Update libp2p to v0.3 (#1634)
* Update libp2p

* Some more diagnostics

* 30 seconds back to 5 seconds

* Bump libp2p-core and improve test

* Fix runtime Cargo.lock

* More work

* Finish upgrade to libp2p 0.3

* Add a maximum of 60 seconds for the rounds

* Remove env_logger

* Update Cargo.lock

* Update Cargo.lock in test-runtime

* Fix test compilation

* Make the test pass

* Add identify addresses to Kademlia

* Don't connect to nodes we're already connected to

* Add warning for non-Substrate nodes

* Fix external address not added

* Start in Enabled mode
2019-02-06 16:39:22 +01:00
Pierre Krieger 3c7d6c7b72 Add some networking tests (#1480) 2019-01-21 19:26:12 +01:00
Pierre Krieger b009b42a68 Update network-libp2p to edition 2018 (#1481) 2019-01-19 12:38:52 +01:00
Pierre Krieger a0d458aa06 Update to latest libp2p (#1386)
* Update to latest libp2p

* Fix indentations

* Add basic test

* Apply suggestions from code review

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Remove Mutex from topology

* Remove unused method

* Fix concerns
2019-01-14 13:38:36 +01:00