Commit Graph

31 Commits

Author SHA1 Message Date
Andrea Maria Piana 3cc4767638
Check for mobile data connection if setting is on (#5511)
* feat_: Check for mobile data connection if setting is on

* fix_: check code control flag inside  asyncRequestAllHistoricMessages

---------

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-07-26 22:34:57 +01:00
Andrey Bocharnikov 5d113071db fix(NodeConfig)_: Do not add backoff if user action triggered store node disconnection
fixes status-im/status-desktop#14929
2024-07-26 22:24:55 +07:00
Andrey Bocharnikov fe588c7a79 fix(mailservers)_: ToggleUseMailservers should connect/disconnect from active store node
fixes status-im/status-desktop#15032
2024-07-26 22:24:55 +07:00
Vitaly Vlasov 67364dadc8 chore_: small mailserver async fetching refactor 2024-07-16 10:53:42 +03:00
kaichao 47899fd045
feat_: hash based query for outgoing messages. (#5217)
* feat_: hash based query for outgoing messages.

* chore_: more logs

* chore_: fix comments

* chore_: do not lock when send queries

* chore_: use constant for magic number

* chore_: remove message ids from query queue after ack

* chore_: fix ack clean process

* chore_: fix message resend test

* chore_: add test for waku confirm message sent.

* chore_: fix tests.

* chore_: fix more

* chore_: set store peer id when mailserver updates

* fix_: tests

* chore_: increase max hash query length

* chore_: remove debug log of ack message

* chore_: remove automatic peer selection

* chore_: mark raw message to sent after ack

* chore_: fix test

* chore_: fix test
2024-06-11 15:45:01 +08:00
Siddarth Kumar 1551c98f96
chore_: override DNS for iOS as well (#5093)
We need to apply the DNS override hack for iOS as well.

This PR -> https://github.com/status-im/status-mobile/pull/19798 in status-mobile fixes the DNS resolution issue for
iOS ARM Simulators and for Android x86 Emulators.
But we still need this change to ensure storenodes are found on real iOS devices and on Android arm Emulators.
2024-04-26 14:14:17 +02:00
Siddarth Kumar d6c4682479
chore_: bump go to 1.20 (#5027)
This commit attempts to upgrade go version to 1.20.12
This commit also removes the following items from lint checks :
* `goconst`
* `structcheck`
* `deadcode`
* `golint`
* `varcheck`

Mobile PR for QA purposes -> https://github.com/status-im/status-mobile/pull/19564
2024-04-18 18:48:02 +02:00
Pablo Lopez 78bf40994a
remove confusing debug log (#4948) 2024-03-19 19:11:18 +02:00
Igor Sirotin c8044bf400
chore: disable curated communities loop in tests (#4894) 2024-03-09 09:42:06 +00:00
Pablo Lopez 3f19972c8e
enable custom community storenodes (#4532)
* enable custom community store nodes

* fix

* fix

* fix

* fix

* cleanup

* fix

* migration

* fix

* cleanup

* fix

* cleanup

* fix

* fix

* cleanup

* message to update the community storenodes

* rename

* fix test

* wait for availability only if global storenode

* fix test

* fix typo

* sync community storenodes

* remove unused

* add tests

* fix imports

* fix todo

* unused

* pr comments

* pr feedback

* revert merge deleted

* fix lint

* fix db and perform ms request

* typo

* fix log

* fix go imports

* refactor handle message

* cleanup public message

* add tests

* fix test

* cleanup test

* fix test

* avoid making one file to big to keep codeclimate from complaining

* fix lint

* revert

* Update protocol/storenodes/database.go

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

* Update protocol/messenger_mailserver_cycle.go

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

* PR comment

* fix tx

* proto files

* pr comment

---------

Co-authored-by: richΛrd <info@richardramos.me>
2024-02-20 17:49:39 +02:00
Igor Sirotin 432bfeea2f
fix: flaky `MessengerStoreNodeRequestSuite` (#4721) 2024-02-12 22:30:19 +00:00
Igor Sirotin 0c2a935578
fix: fetch history when back online (#4651) 2024-01-30 18:13:18 +00:00
Igor Sirotin 195982c950
fix_(StoreNodeRequestManager): various fixes and improvements (#4509) 2023-12-27 13:53:19 +00:00
Igor Sirotin 0818c98fca
fix_: don't start mailserver cycle when no mailservers set (#4457) 2023-12-19 11:58:44 +00:00
Igor Sirotin e3ef8c649a
chore: store node requests manager (#4446) 2023-12-15 19:50:12 +00:00
Siddarth Kumar a6df2be92e
fix crash on x86_64 android emulators (#4233)
Due to presence of syscall to `epoll_wait` android emulators after Android 10 would crash.
This commit has added `amd64` fallback implementations in 2 spots

- `tcp-shaker` ref : 571aa46f35
- `notify` ref : 0eb36e6c1a

The build flags are updated for fallback implementation to only be used in case of `x86_64` simulators.

status-mobile PR : https://github.com/status-im/status-mobile/pull/17773
2023-12-14 19:02:38 +05:30
Richard Ramos ee8d8473e2 refactor: it's not necessary for storenodes to be connected peers 2023-12-05 14:20:17 -04: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
Sale Djenic 56cad423f0 chore: `forceFetchingBackup` param added to `RequestAllHistoricMessages` and `RequestAllHistoricMessagesWithRetries` functions 2023-06-09 17:42:11 +02:00
Andrea Maria Piana fe75054218 Query only once mailservers per cycle 2023-05-05 16:49:06 +01:00
RichΛrd ea46779e98 Update messenger_mailserver_cycle.go 2023-01-19 13:56:50 -04:00
Richard Ramos f0cd807763 fix: only evaluate connected peers when active mailserver is set 2023-01-19 13:56:50 -04:00
Richard Ramos 8fd291f27c fix: dropping peer in mailserver cycle 2023-01-18 09:28:08 -04:00
Richard Ramos cd34538937 fix: set waku version to mailservers and set min peers for relay to 1 2022-11-07 18:03:52 +03:00
Richard Ramos bb4237f616 fix: wakuv2 mailserver cycle ticker 2022-10-27 09:52:41 -04:00
Andrea Maria Piana 1bfde4c4cc Initial support for mutual contact requests 2022-05-31 09:12:36 +01:00
Pascal Precht 7032fc9dcc Introduce community history archive routine
This introduces logic needed to:

- Create WakuMessageArchives and and indices from store waku messages
- History archive torrent data to disk and create .torrent file from
  that
- Seed and unseed history archive torrents as necessary
- Starting/stopping the torrent client
- Enabling/disabling community history support for individual components
  and starting/stopping the routine intervals accordingly

This does not yet handle magnet links (#2568)

Closes #2567
2022-04-06 13:00:33 +02:00
Andrea Maria Piana d60a6713fe Enable mailserver cycle by default
This commit enables mailserver cycle logic by default and make a few
changes:

1) Nodes are graylisted instead of being blacklisted for a set amount of
   time. The reason is that if we blacklist, any cut in connectivity
   might result in long delays before reconnecting, especially on spotty
   connections.

2) Fixes an issue on the devp2p server, whereby the node would not
   connect to one of the static nodes since all the connection slots
   where filled. The fix is a bit inelegant, it always connects to
   static nodes, ignoring maxpeers, but it's tricky to get it to work
   since the code is clearly not written to select a specific node.

3) Adds support to pinned mailservers

4) Add retries to mailservers requests. It uses a closure for now, I
   think we should eventually have a channel etc, but I'd leave that for
   later.
2022-03-19 08:56:22 +00:00
Richard Ramos 89370b7d7f fix: random mailserver selection when available mailservers is 1 2022-02-23 11:12:11 -04:00
Richard Ramos 52b2c5db7b
feat: verify if mailserver is pinned in cycle (#2489) 2022-01-19 08:35:19 -04:00
Richard Ramos 98784b752a
feat: desktop mailserver cycle (#2481) 2022-01-12 12:02:01 -04:00