Pierre Krieger
b52e64d640
Fix the light client protocol protobuf schema ( #12732 )
...
* Fix the light client protocol protobuf schema
* Add another test
* Remove unused protobuf struct
* Ok you have to use the nightly rustfmt apparently
2022-11-18 14:01:13 +00:00
Pierre Krieger and Bastian Köcher
8671fb7615
Decrease default --out-peers from 25 to 15 ( #12434 )
...
Co-authored-by: Bastian Köcher <git@kchr.de >
2022-10-18 10:46:25 +02:00
Pierre Krieger
8920b1c5b3
Clarify the "direction" field of block requests ( #12438 )
2022-10-12 13:01:54 +00:00
Pierre Krieger
d61b0866ed
Remove the unused light client requests ( #12470 )
...
* Remove the unused light client requests
* Add comment about new ids
2022-10-11 13:56:18 +00:00
Pierre Krieger
4a6c7aaf5b
Remove "to_block" field from BlockRequests ( #12447 )
...
* Remove "to_block" field from BlockRequests
* Maybe fix the tests
2022-10-08 21:15:25 +00:00
Pierre Krieger
d6f1bb8932
Don't send back empty proofs if light request fails ( #12372 )
2022-10-05 14:45:56 +00:00
Pierre Krieger
eeb267e1d6
No longer generate specs with consensus_engine field ( #10346 )
...
* No longer generate specs with consensus_engine field
* #[allow(unused)]
2022-02-24 12:05:08 +00:00
Pierre Krieger
9a78839696
Mark sync_state_genSyncSpec JSON-RPC as safe ( #10832 )
...
* Mark sync_state_genSyncSpec JSON-RPC as safe
* Note that parameter is unused
* Ideally I'd wait for compilation to be finished before pushing, but it's really taking a long time
* Remove deny_unsafe parameter
* Remove unused dependency
2022-02-15 21:21:34 +00:00
Pierre Krieger and Sacha Lansky
ffcd97807f
Add attributes and documentation to fork_id ( #10746 )
...
* Add attributes and documentation to fork_id
* Update client/chain-spec/src/chain_spec.rs
Co-authored-by: Sacha Lansky <sacha@parity.io >
Co-authored-by: Sacha Lansky <sacha@parity.io >
2022-01-28 12:25:12 +00:00
Pierre Krieger
58ebadb366
Fix #10688 being misimplemented ( #10721 )
2022-01-24 09:48:44 +00:00
Pierre Krieger
2c3787288a
Split peer slots between full and light nodes ( #10688 )
...
* Split peer slots between full and light nodes
* Rustfmt
* Oops, accidentally removed a comma
* Remove else
2022-01-19 10:58:40 +00:00
Pierre Krieger and Bastian Köcher
443bdc20d6
Remove Prometheus metrics prefix ( #9543 )
...
* Remove Prometheus metrics prefix
* Fix line widths
* Missed some metrics
* Fix CLI
* Run rustfmt on modified files
* Missing prefixes
* Hopefully fix compilation
* Rustfmt protocol.rs
* Should compile now I guess
* Rustfmt
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-12-09 11:21:27 +01:00
Pierre Krieger
2804b56d78
No longer include :code and :heappages in execution proofs ( #10419 )
...
* No longer include :code and :heap_pages in execution proofs
* Oops, forgot the line
* Rustfmt
2021-12-03 19:50:23 +01:00
Pierre Krieger
5e2b93c2ea
Don't send ForceClose repeatedly in send_sync_notification ( #10348 )
2021-11-25 08:30:07 +00:00
Pierre Krieger
a75a8820fb
Put back consensus_engine, only accept its absence ( #10345 )
2021-11-23 10:19:05 +01:00
Pierre Krieger
34bc24624a
Don't generate the consensusEngine field in chain specs ( #10303 )
2021-11-19 09:37:37 +00:00
Pierre Krieger and Bastian Köcher
281d58cb0d
Add a trie_root_hash variant for chain specs genesis ( #10140 )
...
* Add a `hash` variant for chain specs
* Add doc
* Rename to TrieRootHash
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Rustfmt
* More cargo fmt I guess
* Ok I have to use nightly cargo fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-11-03 10:12:50 +01:00
Pierre Krieger
724350418e
Don't print "Discovered new external" line for private IPs ( #10055 )
2021-10-19 13:56:09 +02:00
Pierre Krieger and Roman Proskuryakov
94635218af
Silence Kademlia InboundRequestServed event ( #9797 )
...
Co-authored-by: Roman Proskuryakov <r.proskuryakoff@gmail.com >
2021-09-21 14:59:57 +00:00
Pierre Krieger and Roman Proskuryakov
d5d6d79e37
Purge addresses that fail to reach a peer ( #8843 )
...
Co-authored-by: Roman Proskuryakov <r.proskuryakoff@gmail.com >
2021-09-13 13:31:04 +02:00
Pierre Krieger and Roman Proskuryakov
5666d9de94
Fix flaky test ( #9729 )
...
* Fix flaky test
* Restore cargo fmt
Co-authored-by: Roman Proskuryakov <r.proskuryakoff@gmail.com >
2021-09-08 20:45:24 +02:00
Pierre Krieger
fb408e3e85
Remove spurious debug_assert! ( #9603 )
2021-08-23 09:16:54 +00:00
Pierre Krieger
4366e68d08
Fix alert about delay between best and finalized block ( #9150 )
...
* Fix alert about delay between best and finalized block
* Revert debugging changes
2021-06-23 15:17:10 +00:00
Pierre Krieger
1eca7767fe
Add substrate-rpc-subscription to exceptions in alert ( #9172 )
2021-06-22 16:11:42 +00:00
Pierre Krieger
576a39a25b
Don't connect to reserved nodes if they're banned ( #9020 )
2021-06-11 12:36:37 +00:00
Pierre Krieger
5c14dd3f32
Periodically call Peerset::alloc_slots on all sets ( #9025 )
...
* Periodically call alloc_slots on all slots
* Add test
2021-06-07 13:00:03 +00:00
Pierre Krieger
152587bcb9
Discard notifications if we have failed to parse handshake ( #8806 )
2021-06-02 20:41:21 +02:00
Pierre Krieger
a7a326ee07
Make sure nodes don't hammer each other even when reserved ( #8901 )
...
* Make sure nodes don't hammer each other even when reserved
* Make the ban random
2021-05-25 11:03:35 +00:00
Pierre Krieger
ff60db4c41
Update the Grafana dashboards ( #8832 )
...
* Update the Grafana dashboards
* Remove the panels on top
2021-05-20 08:34:52 +00:00
Pierre Krieger
eaccde2ddc
Add names to offchain worker threads ( #8820 )
...
* Add names to offchain worker threads
* Compilation
2021-05-15 12:21:16 +00:00
Pierre Krieger
d849110c6b
Small improvement to network log line ( #8811 )
...
* Small improvement to network log line
* Use {:?} for the set_id
2021-05-14 14:31:03 +00:00
Pierre Krieger
3b1b339b80
Add more debug_assert to networking ( #8807 )
...
* Add more debug_assertsudo dnf update to networking
* Swap the lines
2021-05-14 14:17:10 +00:00
Pierre Krieger
d443a0b929
Don't remove addresses from known_external_addresses ( #8778 )
...
* Don't remove addresses from known_external_addresses
* Remove `remove`
2021-05-11 10:34:35 +00:00
Pierre Krieger
f16f8def08
Increase the number of external IPs in cache ( #8771 )
2021-05-10 10:18:21 +00:00
Pierre Krieger
efe2267ec7
Two bugfixes to authority-discovery ( #8768 )
2021-05-09 21:37:41 +02:00
Pierre Krieger and Roman Proskuryakov
62650989a3
Allow fallback names for protocols ( #8682 )
...
* Allow fallback names for protocols
* Apply suggestions from code review
Co-authored-by: Roman Proskuryakov <humbug@deeptown.org >
* Fix some issues
* Fix compilation after merging master
Co-authored-by: Roman Proskuryakov <humbug@deeptown.org >
2021-05-06 14:01:01 +00:00
Pierre Krieger
19d34eb87a
Add some builder functions for NonDefaultSetConfig ( #8712 )
2021-05-04 09:04:49 +00:00
Pierre Krieger
747beffe70
Fix too generous error detection in behaviour.rs ( #8717 )
2021-05-03 17:18:35 +00:00
Pierre Krieger and André Silva
54ae55f439
Revert "Properly close notification substreams ( #8534 )" ( #8646 )
...
This reverts commit 6c9c687a31 .
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-04-20 18:39:07 +00:00
Pierre Krieger and Andronik Ordian
86c5dc848f
Authority-discovery no longer publishes non-global IP addresses ( #8643 )
...
* Authority-discovery no longer publishes non-global IP addresses
* Cargo.lock
* Update client/authority-discovery/src/lib.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-04-20 13:42:58 +00:00
Pierre Krieger and Andronik Ordian
3a72631439
Enable --no-private-ipv4 by default for live chains ( #8642 )
...
* Enable --no-private-ipv4 by default for live chains
* Make the selection a bit easier to read
* Update client/cli/src/params/network_params.rs
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-04-20 13:42:11 +00:00
Pierre Krieger
d64f79924a
Update to libp2p 0.37 ( #8625 )
...
* Update to libp2p 0.37
* Line widths
* Fix tests
2021-04-18 08:04:45 +00:00
Pierre Krieger
6c9c687a31
Properly close notification substreams ( #8534 )
...
* Properly close notification substreams
* Some debug asserts
* Fix state inconsistency
* Remove erroneous debug_assert!
* Some comments
2021-04-15 10:42:47 +00:00
Pierre Krieger
2fa6f2fbd5
Fix debug_assertion failing in authority discovery ( #8599 )
...
* Fix debug_assertion failing in authority discovery
* Improve test
* Change the map_or for invalid addresses
* Remove debug_assertion
2021-04-14 13:19:33 +00:00
Pierre Krieger
c227ff78d8
Increase metric only if actually publishing ( #8618 )
2021-04-14 12:40:18 +00:00
Pierre Krieger
fa89371a17
Make non-validators listen on /ws by default ( #8609 )
...
* Make non-validators listen on /ws by default
* Fix WS path
2021-04-14 09:44:09 +00:00
Pierre Krieger
8608c2eae4
Cap the warp sync proof by size, not by fragments ( #8578 )
...
* Cap the warp sync proof by size, not by fragments
* Add a final debug assert
* Check size after
2021-04-09 15:22:47 +00:00
Pierre Krieger
1b939bcb53
Check every minute whether authority-discovery key has changed ( #8575 )
...
* Check every minute whether authority-discovery key has changed
* Fix test
* Fix comment
* Use HashSet for latest_published_keys
* More fixing
* God I'm tired, sorry
2021-04-08 16:41:23 +00:00
Pierre Krieger
29a9ba6346
Don't report confusing unsupported protocol errors ( #8482 )
2021-04-06 12:35:12 +00:00
Pierre Krieger
b16bc0552e
Clean up log levels in sc_network ( #8529 )
...
* Clean up log levels in sc_network
* Fix imports
2021-04-05 18:18:47 +00:00
Pierre Krieger
6092b56dda
Adjust number of slots in sync requests channel ( #8492 )
2021-04-05 18:31:14 +02:00
Pierre Krieger
1468de6b3e
Another tweak to GrandPa warp sync ( #8514 )
...
* Another tweak to GrandPa warp sync
* Rename to WarpSyncFragment
* Ensure proof is minimal
2021-04-02 14:40:05 +00:00
Pierre Krieger
09aa03e3c5
Add a feedback when response is successfully sent ( #8510 )
...
* Add a feedback when response is successfully sent
* Fix gp warp sync
2021-04-01 16:25:37 +00:00
Pierre Krieger
5d2640240c
Fix &mut self -> &self in add_known_address ( #8468 )
2021-03-26 22:28:55 +01:00
Pierre Krieger
e8aeadf202
Add NetworkService::add_known_address ( #8467 )
2021-03-26 17:02:41 +00:00
Pierre Krieger
1063fc7e35
Use Debug for genesis mismatch message ( #8449 )
2021-03-24 20:51:58 +01:00
Pierre Krieger
fb922e2794
Refactor NotifsHandler::poll ( #8422 )
...
* Refactor a bit NotifsHandler::poll
* Avoid some spurious wake-ups
2021-03-23 10:02:07 +00:00
Pierre Krieger
3edfdead0f
Optimize the peerset a bit ( #8416 )
...
* Only allocate slots for the relevant peer set
* Do a pre-check before calling has_free_outgoing_slot
* Oops, fix infinite loop
2021-03-22 16:51:57 +00:00
Pierre Krieger
5087634ccd
Rename GenericProto to Notifications ( #8415 )
...
* Rename GenericProto to Notifications
* Small comment fix
2021-03-22 10:32:47 +00:00
Pierre Krieger
39f3b77f4b
Fix #8306 ( #8330 )
2021-03-11 19:07:52 +00:00
Pierre Krieger
5f004b4428
Remove legacy network protocol ( #8296 )
2021-03-11 13:57:06 +00:00
Pierre Krieger
add5cbebb6
Fix state mismatch in case of bad handshake ( #8230 )
2021-03-01 18:57:00 +01:00
Pierre Krieger
2bd41a0251
Fix transactions not being propagated to authorities ( #8212 )
2021-02-26 15:09:42 +00:00
Pierre Krieger
d5b308f13c
Fix networking debug_asserts ( #8200 )
...
* Fix networking debug_asserts
* Fix comment
2021-02-25 13:51:29 +01:00
Pierre Krieger
a3d749f3c5
Add some debug_asserts for #8171 ( #8181 )
2021-02-24 17:13:34 +01:00
Pierre Krieger
ba659f9440
Bump lru dependency ( #8182 )
2021-02-23 12:52:59 +01:00
Pierre Krieger
9e84a5405c
Add a Prometheus alert on no incoming connection ( #7517 )
2021-02-23 10:05:39 +01:00
Pierre Krieger and Nikolay Volf
aa95196be3
Extract transactions handling from protocol.rs ( #8110 )
...
* Extract transactions handling from protocol.rs
* Oops, boolean
* Do this better
* Update client/network/src/transactions.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
* [WIP] Fix handshake
* Finish handshake change
* Bugfix
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2021-02-18 17:04:23 +01:00
Pierre Krieger
afc4b9bb95
Unbreak browser test CI ( #8149 )
2021-02-18 12:43:13 +01:00
Pierre Krieger
11894bc21a
Update Grafana dashboards ( #8127 )
2021-02-15 16:47:57 +00:00
Pierre Krieger
f6273f7914
Remove all code related to sentry nodes ( #8079 )
...
* Remove all code related to sentry nodes
* More fixing
2021-02-15 08:45:03 +00:00
Pierre Krieger
1eeafdd2b3
Remove backwards-compatibility networking hack ( #8068 )
...
* Remove backwards-compatibility networking hack
* Fix compilation
* Try fix
2021-02-08 13:44:34 +00:00
Pierre Krieger and parity-processbot
11b00681d2
Improve log line ( #8032 )
...
Co-authored-by: parity-processbot <>
2021-02-03 08:24:23 +00:00
Pierre Krieger
38b6182fb8
Rename system_networkState to system_unstable_networkState ( #8001 )
2021-02-02 14:58:29 +00:00
Pierre Krieger and Roman Borschel
eeff8f3204
Disable Kademlia random walk when --reserved-nodes is passed ( #7999 )
...
* Disable Kademlia random walk when --reserved-nodes is passed
* Update client/network/src/discovery.rs
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com >
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com >
2021-02-02 13:52:09 +00:00
Pierre Krieger
de838f9464
Remove outdated Grafana information ( #8012 )
2021-02-01 17:17:44 +01:00
Pierre Krieger
dc70c889ce
Introduce sc_peerset::DropReason ( #7996 )
...
* Introduce sc_peerset::DropReason
* Fix peerset tests
2021-01-29 09:33:27 +00:00
Pierre Krieger
12fe61a965
Increase maximum size of transaction notifications ( #7993 )
2021-01-27 10:41:48 +00:00
Pierre Krieger
6ae24c91e9
Fix Network trait implementation not doing what it's supposed to do ( #7985 )
2021-01-26 14:05:56 +00:00
Pierre Krieger
9d6b9684d9
Disable Nagle algorithm ( #7932 )
...
* Disable Nagle algorithm
* Oops, didn't compile
2021-01-20 10:14:24 +00:00
Pierre Krieger
2e44ffb7a7
Increase UnboundedChannelVeryLarge threshold from 5k to 15k ( #7931 )
2021-01-19 15:33:38 +01:00
Pierre Krieger
8e04515912
Add explicit limits to notifications sizes and adjust yamux buffer size ( #7925 )
...
* Add explicit limits to notifications sizes and adjust yamux buffer size
* Docfix
* Tests
* Document these 10 bytes
2021-01-19 11:00:37 +00:00
Pierre Krieger
e39ffb5a3c
Address review comments of #7916 ( #7917 )
2021-01-18 16:52:25 +01:00
Pierre Krieger
c58a2d9a74
Allow configuring Yamux window size ( #7916 )
2021-01-18 11:10:47 +01:00
Pierre Krieger
7db15cfb75
Fix not restoring non-poisoned state ( #7906 )
2021-01-15 12:47:32 +00:00
Pierre Krieger
782fe4a3fb
Fix bad debug_assert ( #7904 )
2021-01-15 11:55:21 +01:00
Pierre Krieger
c49ed20aec
Update the Grafana dashboards ( #7886 )
2021-01-14 13:35:46 +00:00
Pierre Krieger
4678da3efb
Clean-up pass in network/src/protocol.rs ( #7889 )
...
* Remove statistics system
* Remove ContextData struct
* Remove next_request_id
* Some TryFrom nit-picking
* Use constants for peer sets
2021-01-13 10:27:49 +00:00
Pierre Krieger
f198ce2095
Update serde and parity-multiaddr, to fix master CI ( #7877 )
2021-01-12 13:04:16 +01:00
Pierre Krieger
7dc47ab93d
Add Prometheus alerts if unbounded channels are too large ( #7866 )
...
* Add Prometheus alerts if unbounded channels are too large
* Tweaks
2021-01-12 09:59:17 +01:00
Pierre Krieger
a4032b1dfb
Update to futures 0.3.9 ( #7854 )
2021-01-08 15:47:33 +00:00
Pierre Krieger and Max Inden
779c4f8616
Rework priority groups, take 2 ( #7700 )
...
* Rework priority groups
* Broken tests fix
* Fix warning causing CI to fail
* [Hack] Try restore backwards-compatibility
* Fix peerset bug
* Doc fixes and clean up
* Error on state mismatch
* Try debug CI
* CI debugging
* [CI debug] Can I please see this line
* Revert "[CI debug] Can I please see this line"
This reverts commit 4b7cf7c1511f579cd818b21d46bd11642dfac5cb.
* Revert "CI debugging"
This reverts commit 9011f1f564b860386dc7dd6ffa9fc34ea7107623.
* Fix error! which isn't actually an error
* Fix Ok() returned when actually Err()
* Tweaks and fixes
* Fix build
* Peerset bugfix
* [Debug] Try outbound GrandPa slots
* Another bugfix
* Revert "[Debug] Try outbound GrandPa slots"
This reverts commit d175b9208c088faad77d9f0ce36ff6f48bd92dd3.
* [Debug] Try outbound GrandPa slots
* Apply suggestions from code review
Co-authored-by: Max Inden <mail@max-inden.de >
* Use consts for hardcoded peersets
* Revert "Try debug CI"
This reverts commit 62c4ad5e79c03d561c714a008022ecac463a597e.
* Renames
* Line widths
* Add doc
Co-authored-by: Max Inden <mail@max-inden.de >
2021-01-07 13:52:39 +00:00
Pierre Krieger
ae4f9b14ae
Fix wrong order of values in log line ( #7728 )
2020-12-14 18:37:19 +00:00
Pierre Krieger and Max Inden
22fdd3a6ea
Fix #7629 ( #7680 )
...
* Fix #7629
* Update client/network/src/service.rs
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-12-07 15:04:32 +01:00
Pierre Krieger
1ca5e8856b
Fix two potential connection poisonings ( #7677 )
2020-12-07 10:10:21 +01:00
Pierre Krieger and André Silva
610585d17f
Remove sc_network::NetworkService::register_notifications_protocol and partially refactor Grandpa tests ( #7646 )
...
* Remove sc_network::NetworkService::register_notifications_protocol
* Missing calls to .into()
* Wrong crate name
* [WIP] Fix Grandpa tests
* One more passing
* One more. Two to go.
* This one was actually already passing 🎉
* Last one compiles
* Progress
* grandpa: fix voter_persists_its_votes test
* Restore other tests
* Try spawn future later
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2020-12-02 16:35:48 +00:00
Pierre Krieger
3761fe3161
Show reputation changes when dropping peer ( #7655 )
...
* Show reputation changes when dropping peer
* Print all
2020-12-02 16:34:05 +00:00
Pierre Krieger
35efc8e4b0
Fix bad state transition with DisabledPendingEnable+OpenDesiredByRemote ( #7638 )
2020-11-30 17:43:47 +00:00
Pierre Krieger
dd3c84c362
Fix wrong value put for pending_opening ( #7633 )
...
* Fix wrong value put for pending_opening
* Oops, didn't even try compiling it
2020-11-30 15:05:01 +01:00
a2b14d10fb
sc-network: Log outgoing notifications too ( #7624 )
...
* Log outgoing notifications too
* Update client/network/src/protocol/generic_proto/handler.rs
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Addie Wagenknecht <addie@nortd.com >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-11-30 10:52:08 +00:00