61 Commits

Author SHA1 Message Date
Prem Chaitanya Prathi
3db4149c23
get shards using callback approach (#3545) 2025-08-29 18:43:29 +05:30
Prem Chaitanya Prathi
accf6a2561
chore: remove metadata protocol dependency on enr, relax check when nwaku is edge node (#3519)
* remove metadata protocol dep on enr, do not disconnect peers based on shards mismatch
2025-08-13 10:48:56 +05:30
Prem Chaitanya Prathi
7cfa66837a
fix: use counter instead of gauge for metrics that only increase over time (#3355)
Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>
2025-08-01 12:41:32 +02:00
Darshan K
8fe957ad21
feat: shard-specific metrics tracking (#3520) 2025-07-31 22:53:38 +05:30
gabrielmer
4b3de54fc5
chore: improve connection proc (#3509) 2025-07-16 13:25:06 +02:00
gabrielmer
726c7c56c1
chore: improve keep alive (#3458) 2025-06-27 11:16:00 +02:00
Ivan FB
2e40f2971f
chore: refactor to unify online and health monitors (#3456) 2025-06-16 18:44:21 +02:00
Ivan FB
e42e28cc6f
fix: dnsresolver (#3440)
Properly transmit the dns name server list parameter to the peer manager
2025-06-06 15:50:08 +02:00
Ivan FB
005815746b
chore: bump dependencies for v0.36 (#3410)
* properly pass userMessageLimit to OnchainGroupManager
* waku.nimble 2.2.4 Nim compiler
* rm stew/shims/net import
* change ValidIpAddress.init with parseIpAddress
* fix serialize for zerokit
* group_manager: separate if statements
* protocol_types: add encode UInt32 with zeros up to 32 bytes
* windows build: skip libunwind build and rm libunwind.a inlcusion step
* bump nph to overcome the compilation issues with 2.2.x
* bump nim-libp2p to v1.10.1
2025-05-26 21:58:02 +02:00
gabrielmer
1ec9b8d96d
chore: improve disconnection handling (#3385) 2025-04-25 19:23:53 +02:00
NagyZoltanPeter
3db00f39ee
chore: extended /admin/v1 RESP API with different option to look at current connected/relay/mesh state of the node (#3382)
* Extended /admin/v1 RESP API with different option to look at current connected/relay/mesh state of the node
* Added score information for peer info retrievals
2025-04-24 08:36:02 +02:00
Ivan FB
df58643ea3
chore: retrieve protocols in new added peer from discv5 (#3354)
* add new unit test to validate that any peer can be retrieved
* add new discv5 test and better peer store management
* wakuPeerStore -> switch.peerStore
* simplify waku_peer_store, better logs and peer_manager enhancements
2025-04-07 12:24:03 +02:00
Ivan FB
ce7f09a35f
chore: refactor filter to react when the remote peer closes the stream (#3281)
Better control when the remote peer closes the WakuFilterPushCodec
stream.
For example, go-waku closes the stream for every received message.
On the other hand, js-waku keeps the stream opened.
Therefore, we support both scenarios.
2025-02-06 17:21:23 +01:00
Ivan FB
46747fd496
chore: filter remove all subscription from a peer that is leaving (#3267)
* waku/waku_filter_v2/protocol.nim keeps track of the filter-client connections in Table[PeerId, Connection]
* waku/waku_filter_v2/protocol.nim starts listening for peer-left events in order to completely remove the previous Connection instance. Also, a new Connection is added when the filter-service starts publishing to its peers.

---------
    
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2025-01-31 17:01:55 +01:00
Ivan FB
1d6ef31f56
peer_manager simple cleanup (#3266) 2025-01-31 16:34:53 +01:00
Darshan K
2942782f95
chore: capping mechanism for relay and service connections (#3184) 2025-01-21 11:29:52 +05:30
gabrielmer
e81a5517be
feat: connection change event (#3225) 2025-01-08 18:53:00 +01:00
gabrielmer
b3656d6eea
chore: naming connectPeer procedure (#3157) 2024-10-29 18:37:07 +02:00
Ivan FB
3dc3fc8e5a
peer_manager: prevent too intense loop when no peers connected (#3130) 2024-10-22 20:09:25 +02:00
Simon-Pierre Vivier
bdb31cc114
added randomness to peer selection (#3123) 2024-10-16 15:18:47 -04:00
gabrielmer
25da810257
chore: adding to libwaku dial and disconnect by peerIds (#3111) 2024-10-15 15:32:02 +03:00
Darshan K
0f8e874000
refactor: re-arrange function based on responsibility of peer-manager (#3086) 2024-10-04 15:23:20 +05:30
gabrielmer
eb2bbae665
fix: out connections leak (#3077) 2024-10-03 12:37:22 +03:00
gabrielmer
8b0884c7b5
fix: rejecting excess relay connections (#3065) 2024-09-27 19:35:18 +03:00
Darshan K
729e63f53d
refactor: wrap peer store (#3051)
Encapsulate peerstore with wakupeerstore
2024-09-27 18:16:46 +05:30
Ivan FB
711e7db1e9
chore: test peer connection management (#3049)
* Make some useful consts public, add some utils.
* Implement various utilities.
* peer_manager reconnectPeers enhancements

---------

Co-authored-by: Álex Cabeza Romero <alex93cabeza@gmail.com>
2024-09-24 18:20:29 +02:00
gabrielmer
51391aa2ac
adding a dynamic sleep interval in the connectivity loop (#3031) 2024-09-12 22:49:47 +02:00
gabrielmer
54b5222222
pruning excess in relay connections (#2965) 2024-08-12 17:59:11 +02:00
Simon-Pierre Vivier
e4e01fabfe
fix: add back waku discv5 metrics (#2927)
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2024-07-26 16:18:14 -04:00
gabrielmer
8578fb0c3e
chore: improving logging under debugDiscv5 flag (#2899) 2024-07-15 10:55:31 +03:00
gabrielmer
e1518cf9ff
chore: deprecating named sharding (#2723) 2024-07-09 18:36:12 +03:00
gabrielmer
d0980eba4c
setting connectivity loop interval to 30 seconds (#2878) 2024-07-09 17:33:18 +03:00
Ivan FB
fd6a71cdd7
chore: Bump dependencies for v0.31.0 (#2885)
* bump_dependencies.md: add nim-results dependency
* change imports stew/results to results
* switching to Nim 2.0.8
* waku.nimble: reflect the requirement nim 1.6.0 to 2.0.8
  Adding --mm:refc as nim 2.0 enables a new garbage collector that we're
  not yet ready to support
* adapt waku code to Nim 2.0
* gcsafe adaptations because Nim 2.0 is more strict
2024-07-09 13:14:28 +02:00
gabrielmer
cae0c7e378
chore: saving agent and protoVersion in peerStore (#2860) 2024-07-01 13:29:14 +02:00
Darshan K
9bd8c33aee
chore: remove all pre-nim-1.6 deadcode from codebase (#2857) 2024-06-28 16:04:57 +05:30
gabrielmer
974b8a39ac
chore: adding discv5 logs (#2811) 2024-06-26 14:25:58 +02:00
gabrielmer
01050138c6
fix: only set disconnect time on left event (#2831) 2024-06-24 10:20:09 +02:00
gabrielmer
41bc582823
stop connecting to out peers until target is reached (#2823) 2024-06-20 12:16:15 +02:00
gabrielmer
cda18f96ca
fix: update peers ENRs in peer store in case they are updated (#2818) 2024-06-19 17:29:55 +02:00
Darshan K
3b27aee820
fix: mount metadata in wakucanary (#2793)
* chore: integrate cluster id and shards to waku node.
2024-06-14 18:29:42 +05:30
Darshan K
55a87d21d6
fix: more detailed logs to differentiate shards with peers (#2794) 2024-06-10 13:40:18 +05:30
Ivan FB
401630ee24
chore: waku_discv5, peer_manager - add more logs help debug discovery issues (#2705) 2024-05-16 22:30:51 +02:00
Álex Cabeza Romero
49dd6c1989
test(peer-and-connection-management): Implement tests (#2566)
* Implement peer and connection management tests.
* Fix multiple peers added on initialisation.
* Remove clusterId parameter from newTestWakuNode.
2024-05-13 17:25:44 +02:00
Ivan FB
2173fe2243
fix: peer_manager - extend the number of connection requests to known peers (#2534)
* peer_manager: limit the max num out conns from within the conn loop
2024-03-19 19:07:03 +01:00
Álex Cabeza Romero
33774fada0
fix(2491): Fix metadata protocol disconnecting light nodes (#2533)
* Fix metadata protocol disconnecting light nodes.
* Implement test cases.
2024-03-19 16:18:52 +01:00
Ivan FB
3ba4378cbe
Generic re-style with nph 0.5.1 (#2396) 2024-03-16 00:08:47 +01:00
gabrielmer
dcc88ee0b2
chore: migrating logic from wakunode2.nim to node_factory.nim (#2504) 2024-03-08 16:46:42 -06:00
Simon-Pierre Vivier
edca1df1a8
feat: shard aware relay peer management (#2332)
note that this feature is behind a config flag. `--relay-shard-manager`
2024-01-30 07:28:21 -05:00
Ivan FB
ebad0385ef
ip colocation is parameterizable. If set to 0, it is disabled (#2323)
The "ip colocation" concept refers to the maximum allowed peers
from the same IP address. For example, we allow disabling this limit when the
node works behind a reverse proxy.
2024-01-02 14:01:18 +01:00
Ivan FB
32668f43f5
fix: Revert "feat: shard aware peer management (#2151)" (#2312)
This reverts commit dba9820c1fa00f414f18d57f7a3ff38b67d2bb1a.

We need to revert this commit because
the waku-simulator stopped working. i.e. the nodes couldn't establish
connections among them: 054ba9e33f

Also, the following js-waku test fails due to this commit:
"same cluster, different shard: nodes connect"

* waku_lightpush/protocol.nim: minor changes to make it compile after revert
2023-12-20 15:23:41 +01:00