waku-org / nwaku

Waku node and protocol.
Other
201 stars 52 forks source link

bug: add a path for waku sync to bypass the timestamp check of 'validate' #3131

Closed stubbsta closed 1 month ago

stubbsta commented 1 month ago

Problem

A store node with sync enabled fails to archive the "missing" messages identified by the sync process, because their timestamps are too old.

Impact

The store sync nodes indicate that they are synced, because the waku sync storage is updated, but the messages are never inserted into the DB. StoreQueryRequests will return no results.

To reproduce

If you can reproduce the behavior, steps to reproduce:

  1. Run 2 store nodes with their own DB backends, one with relay enabled
  2. Send a few relay message to the node which has it enabled.
  3. Wait for the other node to sync
  4. See that messages that are older than 20s at the time of syncing are not archived

Expected behavior

It is expected for all messages identified by the store sync process to be required by the store node, should be archived. the timestamps of the messages are already filtered to be within the store-sync-range config

Screenshots/logs

No error logs are produced for this issue

nwaku version/commit hash

This was specifically seen on nwaku versions: v0.33.0-rc.0-13-gd8e6a5 and v0.33.0-44-gc5a825, but it would have been present since store sync was implemented.