Commit Graph

148 Commits

Author SHA1 Message Date
richΛrd 3de2756660
refactor_: expire envelope cache (#5061) 2024-04-17 08:19:03 -04:00
Igor Sirotin 5a54d703c7
fix: flaky test request profile info (#4895) 2024-03-08 15:50:46 +00:00
frank 7eeeb07cab fix: no peers discovered 2024-03-07 17:20:53 +08:00
frank 881da9e654 address review feedback 2024-03-07 17:20:53 +08:00
frank 3de945feaf chore: WakuV2 use config instead of settings 2024-03-07 17:20:53 +08:00
Prem Chaitanya Prathi 92685e5a7b chore: use available peers rather than connected peers, since in case of lightMode we don't connect to all boot nodes 2024-03-07 17:20:53 +08:00
Prem Chaitanya Prathi 500755110a fix: peer exchange client logic to identify and connect to peers 2024-03-07 17:20:53 +08:00
Vitaly Vlasov 81be9ea190 fix crashes on mobile 2024-03-07 17:20:53 +08:00
Prem Chaitanya Prathi 16b3e99205 chore: fix lint errors 2024-03-07 17:20:53 +08:00
Prem Chaitanya Prathi cbec0dc726 fix: disable discv5 in lightmode and enable peer-exchange in lightmode 2024-03-07 17:20:53 +08:00
Vitaly Vlasov 637ce1d5eb Only use DiscV5 for full nodes 2024-03-07 17:20:53 +08:00
Igor Sirotin 515dbdf2b3
fix: waku connection status subscription lock (#4762)
* fix: lock waku connStatus subscription for sending
* update skipped tests
2024-02-19 23:44:38 +00:00
Igor Sirotin 44c39d345e
chore: testWakuV2Config (#4704)
* chore: testWakuV2Config

* renamed to `NewTestWakuV2`
2024-02-12 12:53:15 +00:00
Igor Sirotin 8fa31df498
chore: better lib-p2p logging (#4706)
* fix: libp2p debug level follows main logger level
* chore: implement pubsub tracer
2024-02-12 12:10:29 +00:00
Andrea Maria Piana 605fe40e32 Fix encryption metadata issues #4613
This commit fixes a few issues with communities encryption:

Key distribution was disconnected from the community description, this created a case where the key would arrive after the community description and that would result in the client thinking that it was kicked.
To overcome this, we added a message that signals the user that is kicked. Also, we distribute the key with the community description so that there's no more issues with timing.
This is a bit expensive for large communities, and it will require some further optimizations.

Key distribution is now also connected to the request to join response, so there are no timing issues.

Fixes an issue with key distribution (race condition) where the community would be modified before being compared, resulting in a comparison of two identical communities, which would result in no key being distributed. This commit only partially address the issue.
2024-02-07 10:25:41 +00:00
richΛrd f31808d938
fix: full nodes should run filter and lightpush (#4655) 2024-01-31 14:45:24 -04:00
Igor Sirotin 0c2a935578
fix: fetch history when back online (#4651) 2024-01-30 18:13:18 +00:00
richΛrd 98c1ebec05
fix: handle community shard unassignment and update (#4627) 2024-01-30 13:56:59 -04:00
richΛrd e2341248b3
feat: add peer count to logs (#4648) 2024-01-30 12:42:26 -04:00
Igor Sirotin 1f0fc2935c
fix: clear waku envelopes cache when deleting a chat (#4621)
* chore: extract `ErrPermissionToJoinNotSatisfied`
* chore: disable resending messages in communities tests
* chore: move newTestMessenger extraOptions to testMessengerConfig
* chore: `WithTestStoreNode` messenger option
* feat: waku `ClearEnvelopesCache` method
* fix: call `ClearEnvelopesCache` when deleting chat
* chore: `TestBecomeMemberPermissions` checks messages after rejoin
2024-01-30 13:43:34 +00:00
frank 69948a7024
fix: endless logout (#4563) 2024-01-30 19:45:08 +08:00
frank 9050ed7aaf
fix: waku udp port conflict (#4610) 2024-01-24 09:09:43 +08:00
Andrea Maria Piana e65760ca85 Add basic peersyncing
This commit adds basic syncing capabilities with peers if they are both
online.

It updates the work done on MVDS, but I decided to create the code in
status-go instead, since it's very tight to the application (similarly
the code that was the inspiration for mvds, bramble, is all tight
together at the database level).

I reused parts of the protobufs.

The flow is:

1) An OFFER message is sent periodically with a bunch of message-ids and
   group-ids.
2) Anyone can REQUEST some of those messages if not present in their
   database.

3) The peer will then send over those messages.

It's disabled by default, but I am planning to add a way to set up the
flags.
2024-01-23 12:46:17 +00:00
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00
Richard Ramos d0ca4447c6
test: bump go-libp2p 2024-01-18 14:28:06 +00:00
Igor Sirotin a5acffc001
fix: TestFetchRealCommunity with shards fleet (#4553)
* fix: TestFetchRealCommunity with shards fleet
* fix: DefaultShardPubsubTopic
* chore: print waku query request id
2024-01-16 13:38:41 +03:00
richΛrd 1ac99c2dcb
chore: bump go-waku (#4505) 2024-01-05 16:43:05 -04:00
Igor Sirotin 195982c950
fix_(StoreNodeRequestManager): various fixes and improvements (#4509) 2023-12-27 13:53:19 +00:00
richΛrd b6f2aced08
chore: add dns discovery URL to the list of default nodes and add extra logging for store queries (#4490)
* chore: add dns discovery url to list of default discv5 nodes

* chore: add logs for store queries
2023-12-20 10:04:00 -04:00
Igor Sirotin 92f0479a0c
chore: fetch contact with `StoreNodeRequestManager` (#4484) 2023-12-20 12:49:12 +00:00
richΛrd e5ce11f067
fix: panic in broadcast when logout (#4475) 2023-12-19 11:42:50 -04:00
Igor Sirotin e3ef8c649a
chore: store node requests manager (#4446) 2023-12-15 19:50:12 +00:00
richΛrd 93aeefcb89
refactor(waku2): publish messages on a goroutine (#4466) 2023-12-15 08:02:04 -04:00
kaichao 9be202be50
chore: fix peer exchange and unit testing (#4381)
* chore: peer exchange local test

* chore: use local enr resolver

* remove light client close peer.

* fix: peer exchange not start when enabled

* chore: remove ws config

* uncomment light client

* use resolver option

* chore: use option param for dns resolver

* chore: fix vendor changes.

* chore: lint
2023-12-07 08:28:08 +08:00
kaichao e28eca1c54
Bump waku version (#4407)
* chore: make vendor

* chore: fix data types

* Update wakuv2/common/message.go

Co-authored-by: richΛrd <info@richardramos.me>

* Update wakuv2/common/message.go

Co-authored-by: richΛrd <info@richardramos.me>

* Update wakuv2/persistence/dbstore.go

Co-authored-by: richΛrd <info@richardramos.me>

* chore: use safe method to get timestamp.

* chore: use proto.Uint64 to convert reference

* chore: manual fix lint issue when import dependency

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-12-05 12:29:27 +08:00
Vitaly Vlasov 384543d3a6 Re-send messages with ResendAutomatically=true 2023-11-30 10:46:38 +02:00
Igor Sirotin e32c5546e1
test: request community from storenode (#4364)
* feat: request community info from storenode test

* shutdownWaitGroup

* fix requestCommunityInfoFromMailserver timestamp roundin
2023-11-25 23:24:20 +00:00
Pablo Lopez e9c9bbb7b1
Adding store wakuv2 test (#4340)
* chore: wip tests

* chore: wakuv2 store test

* chore: cleanup

* chore: cleanup

* chore: avoid using sleep in test

* cleanup
2023-11-24 10:13:26 +00:00
Prem Chaitanya Prathi f622265679 chore: fix linter error 2023-11-23 11:16:50 -04:00
Prem Chaitanya Prathi 9510ad0f5d fix: specify clusterid as 16 when using sharding fleet so that metadata proto negotiation doesn't fail 2023-11-23 11:16:50 -04:00
Richard Ramos 40c9ba82a5 fix(wakuv2): store query pubsubTopic 2023-11-22 14:02:50 -04:00
Vitaly Vlasov 1794b93c16 Always set PubsubTopic in filters 2023-11-18 02:26:34 +02:00
Richard Ramos d2578bf0cb fix: reset context on stop 2023-11-17 13:37:41 -04:00
Richard Ramos 573a97791e fix: start idService and add wg.Done to fnApply 2023-11-17 13:37:41 -04:00
Richard Ramos 89385cfcaf fix(waku2): use a cancelable context for initial bootnode discovery 2023-11-17 13:37:41 -04:00
Pablo Lopez f1d31d6339
add message hash to login (#4315) 2023-11-15 16:33:23 +02:00
richΛrd de12ca885c
fix(wakuv2): don't wait for connections to login (#4293)
- Identify will not block logout
- Use `peer.AddrInfo` instead of multiaddresses
- Modifies some logs to reduce noise
2023-11-10 11:31:59 -04:00
richΛrd 2c954d42cf
feat: replace DefaultPubsubTopic by Shard 32 (#4161) 2023-11-09 20:29:15 -04:00
Michal Iskierko 02e4cc6e1f feat: Send envelopes to telemetry service
Issue #12430
2023-11-08 11:34:10 +01:00
Igor Sirotin 9f69c32593
fix(wakuv2): post envelopes previously cached but not processed (#4246) 2023-11-02 14:16:59 +00:00