status-go
status-go copied to clipboard
Fix issues with syncing mailservers
Problem
In relation to recent postmortem of DB issues we found that syncing mailservers using the available instructions doesn't work properly.
Notes
I've made a script for syncing mailservers by calling the 3 methods described in the instructions:
-
admin_addPeer
- Which returnsresult: true
but is lying -
shh_markTrustedPeer
- Which fails due to peer not being added -
shhext_syncMessages
- Which will fail if peer is not marked as trusted
Issues
The shh_markTrustedPeer
call fails with:
Could not find peer with ID: 2721ca3e5c87d73ce892bd0710f9a78eef4c800f92aeaa7feec8b9b86b62c131
If peer has not been added already. And apparently admin_addPeer
is an async call.
For that reason I implemented a loop that calls admin_addPeer
and admin_peers
in order to catch the moment when peer is added before trying to mark it as trusted. The issue with that is that it never worked:
Failed to addPeer, sleeping...
Failed to addPeer, sleeping...
Failed to addPeer, sleeping...
Failed to addPeer, sleeping...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still relevant.
Still broken, but okay.
Closing because we will be working exclusively on waku-v2 store nodes, but yes, still broken, we should eventually remove the code