Pierre Krieger
9906a2e39d
Don't iterate over peers in generic_proto::behaviour::poll ( #6142 )
...
* Don't iterate over peers in generic_proto::behaviour::poll
* Improve comment
* Rework to use DelayIds
2020-05-26 21:23:32 +02:00
Arkadiy Paronyan
5bf9e63181
Optimize network poll ( #6099 )
2020-05-21 13:54:50 +02:00
Pierre Krieger
c8339f9694
Turn a SmallVec into VecDeque for performances ( #6091 )
...
* Turn a SmallVec into VecDeque for performances
* Fix the other SmallVecs
2020-05-20 21:12:49 +02:00
Pierre Krieger
717fa95bc7
Restore the empty line after the license ( #6088 )
2020-05-20 13:08:27 +00:00
Pierre Krieger
7536de97b1
Print an error if we discover our own network identity ( #6047 )
...
* Add an error if we discover our own network identity
* Fix tests
2020-05-18 18:42:44 +02:00
Nikolay Volf
d5411969ac
fix whitespace ( #6062 )
2020-05-18 13:51:28 +02:00
Arkadiy Paronyan
cdb7808a0e
Remove on_block_imported ( #6039 )
...
* remove on_block_imported
* Update client/network/src/service.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-05-16 12:59:34 +02:00
Pierre Krieger
6ecdf20a1f
Fix lots of small nits in sc-network ( #6028 )
...
* Fix lots of small nits in sc-network
* Update client/network/src/protocol/sync/blocks.rs
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
* Fix warning
* Yes. The line width.
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
2020-05-15 12:58:52 +01:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Pierre Krieger
074d80f519
Fix potential state mismatch in behaviour.rs ( #6013 )
...
* Fix state mismatch in behaviour.rs
* Add TODO
2020-05-13 19:50:01 +02:00
Pierre Krieger
10492c0689
Add mitigation for the state inconsistency issue ( #5996 )
...
* Add mitigation for the state inconsistency issue
* Add logging
2020-05-13 14:54:59 +02:00
Pierre Krieger
0a11c48aa1
Turn an error! into a debug! ( #6000 )
2020-05-12 19:22:41 +02:00
Arkadiy Paronyan
8606b886aa
Validate block bodies when syncing ( #5894 )
2020-05-05 16:21:12 +02:00
Bastian Köcher
3d188ef17d
Fix sync logging ( #5879 )
2020-05-04 13:43:08 +02:00
Pierre Krieger
929bd07bef
Move around stuff in sc_network ( #5847 )
2020-04-30 13:08:38 +00:00
Nikolay Volf
c09bb1f350
Use mem::take instead of mem::replace where appropriate ( #5846 )
...
* replace replace with take
* Update client/api/src/cht.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/api/src/cht.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-30 12:53:36 +00:00
Arkadiy Paronyan
fdde90077b
Optimize collecting pending block requests ( #5829 )
...
* Optimized collecting pending block requests
* Make sure request iterator is consumed
2020-04-30 09:50:08 +02:00
Arkadiy Paronyan
ba50664fea
Reputation penalty for sending empty block response ( #5814 )
2020-04-29 10:12:23 +02:00
Pierre Krieger
1be634da85
Add metrics about block requests ( #5811 )
...
* Add metrics about block requests
* Apply suggestions from code review
Co-Authored-By: Max Inden <mail@max-inden.de >
Co-authored-by: Gavin Wood <i@gavwood.com >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-04-28 17:47:40 +02:00
Seun Lanlege
4fa5941f44
Move sc-client into sc-service ( #5502 )
...
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
* drop sc-service from sc-rpc
* drop sc-service from sc-consensus-aura
* drop sc-client from manual-seal and babe
* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
* drop sc-client from bin/node and bin/node-template
* drop sc-client
* fix tests
* remove check -p sc-client from gitlab.yml
* fix warnings
* fixes ui test
* fix light client tests
* adds associated Client type to AbstractService
* adds UsageProvider to Client
* fixed ui test, again
* tried and failed to get node-cli to compile for wasm
* thanks to tomaka for helping me get node-cli to compile for wasmm
* ui test pls pas 🙏🏾
* all tests passing 🪄
* no_run documentation code
* rm -f documentation code
* ClientProvider
* fix mega trait
* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
* adds license to sc-consensus
Co-authored-by: Benjamin Kampmann <ben@parity.io >
2020-04-28 11:59:31 +00:00
Pierre Krieger
636ddd95d2
Extra timeout handling in block_requests ( #5794 )
2020-04-27 12:17:26 +02:00
Pierre Krieger
6a7e86e677
Use new block requests protocol ( #5760 )
...
* Use new block requests protocol
* Tweak comment
2020-04-24 13:48:22 +02:00
Pierre Krieger
a7f578d63a
Add a protocol that answers finality proofs ( #5718 )
...
* Add a protocol that answers finality proofs
* Fix documentation
* Use Toggle
2020-04-22 10:58:26 +02:00
Pierre Krieger
3ad9f65f11
Send a status message on block announce handshake ( #5726 )
...
* Send a status message on block announce handshake
* Make sure to send the handshake to all handlers
2020-04-22 10:20:52 +02:00
Pierre Krieger
f2578bdc3b
Pass an encoded Roles as the notifications protocols handshakes ( #5665 )
2020-04-21 10:47:37 +02:00
cheme
4ffcf98d8d
Child trie api changes BREAKING ( #4857 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 15:21:22 +02:00
Pierre Krieger
efde6056f6
Temporarily increase notifications buffer size ( #5644 )
...
* Temporarily increase notifications buffer size
* Add a 511.0 bucket
2020-04-15 23:27:33 +02:00
Arkadiy Paronyan
76a5555031
More robust sync ( #5604 )
...
* More robust ancestry search
* Punish peers for being on the wrong fork
* Update client/network/src/protocol/sync.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-13 19:09:43 +02:00
Roman Borschel
40c56deea3
Do not prematurely emit CustomProtocolClosed on connection close. ( #5595 )
2020-04-09 12:41:34 +02:00
Pierre Krieger
cebd073649
Report local force-closing connections to Prometheus ( #5575 )
...
* Report local force-closing connections to Prometheus
* Also report ping timeouts separately
* Address concerns of #5571
2020-04-09 11:24:01 +02:00
Pierre Krieger
0cc2e4df89
Fix #5516 ( #5560 )
...
* Add a failing test
* Make test not freeze
* Fix the bug
* Fix spaces
* Fix tests
* Apply suggestions from code review
Co-Authored-By: Toralf Wittner <tw@dtex.org >
* Make sure test doesn't succeed if nothing happened
* Fix build
* Do the events change
Co-authored-by: Toralf Wittner <tw@dtex.org >
2020-04-08 13:32:22 +02:00
Roman Borschel
f8c8355ac7
libp2p-next ( #5278 )
...
* Adapt to rust-libp2p#1440.
* Further adapt to libp2p/master.
* Update to libp2p-0.17
* Finishing touches.
* Remove stray TODO.
* Incorporate review feedback.
* Remove unused import.
2020-04-08 09:23:21 +02:00
Pierre Krieger
8c03a4fcef
Split the Roles in three types ( #5520 )
...
* Split the Roles bitfield in three
* Forgot to include some changes
* Fix cli test
* More test fixes
* Oh God, merging master broke other tests
* Didn't run the doctests
* Address review
* I'm trying to fix the build blindly because it's taking a good hour to compile on my machine
* Address some review
* Also update the peerset's API to make sense
* Fix peerset tests
* Fix browser node
* client: distinguish between local and network authority
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-04-03 19:08:14 +02:00
Pierre Krieger
c9f3d16f44
Improve warning about notifications queue and remove spurious triggers ( #5512 )
...
* Better logging for notifications and buffer size increase
* Address review
* Improve warning about notifications queue and remove spurious triggers
2020-04-03 14:14:55 +02:00
Pierre Krieger
e8dfb37aaf
Add a sub_libp2p_notifications_queues_size Prometheus metric ( #5503 )
...
* Add a sub_libp2p_notifications_queues_size Prometheus metric
* Fix network tests
* Address review
2020-04-03 08:43:55 +02:00
Gavin Wood
3b43429729
More emojies and spaces ( #5498 )
...
* More emojies and spaces
* Sync emojis
* More emoji
2020-04-02 20:17:39 +02:00
Pierre Krieger
a8aedfa16f
Switch to new light client protocol ( #5472 )
...
* Switch to the new protocol
* Oops, forgot to remove light_dispatch.rs
* Fix tests
* Address review
2020-04-01 19:44:42 +02:00
Gavin Wood
b86c7e87a9
A few missing emojies ( #5490 )
...
* A few missing emojies
* P2p message emojis
* Add a bit of colour
* format
* Introduce a couple of spaces
* Some spaces
2020-04-01 19:41:48 +02:00
Pierre Krieger
84ff6ef157
Remove DiscoveryNetBehaviour trait ( #5430 )
2020-04-01 16:25:53 +01:00
Pierre Krieger
f04486e5bc
Increase limit on light client response size ( #5461 )
...
* Increase limit on light client response size
* Address review
2020-03-31 20:16:56 +02:00
Nikolay Volf
b4d83a4b54
And one more fix to flaky tests ( #5467 )
...
* imporoved intervallier version
* remove extra event
* use version 0.3.1
* fix warning
2020-03-31 12:15:31 +02:00
Pierre Krieger
dbba4f8929
Fix tried to send handshake twice ( #5413 )
...
* Fix tried to send handshake twice
* Fix wrong boolean
* Change to debug
2020-03-30 13:33:46 +02:00
Pierre Krieger
462eaa3f41
Make transactions and block announces use notifications substre… ( #5360 )
...
* Make transactions and block announces use notifications
* Add documentation
2020-03-30 10:00:34 +02:00
Gavin Wood
acab5f0570
Add emojis ( #5420 )
2020-03-27 10:41:31 +01:00
Arkadiy Paronyan
d474864d67
Allow syncing to peers with finalized common block ( #5408 )
...
* Allow syncing to peers with finalized common block
* Added test
2020-03-26 09:13:09 +01:00
Stanislav Tkach
4414d00082
Get rid of rustc_hex in favor of hex ( #5370 )
...
* Get rid of rustc_hex in favor of hex
* Use HexDisplay
2020-03-24 11:48:23 +01:00
Pierre Krieger
1da48b3b3f
Rewrite reconnect_after_disconnect test ( #5351 )
2020-03-23 11:50:11 +01:00
Pierre Krieger
57af4facbd
Remove the #[doc(hidden)] reexports of sc_network ( #5264 )
...
* Remove the #[doc(hidden)] reexports of sc_network
* Fix tests not building
2020-03-20 16:42:00 +01:00
Arkadiy Paronyan
a66615446d
Fixed a couple of syncing issues ( #5277 )
...
* Don't queue duplicate blocks
* Keep queue_blocks on restart
2020-03-19 14:02:07 +01:00
Toralf Wittner
89b93d9d4b
sc-network: Return on Poll::Pending. ( #5295 )
...
If polling encounters a `Poll::Pending` we need to return it instead of
continuing the loop which may turn it into a blocking operation, causing
problems with executors.
2020-03-18 11:21:10 +00:00