[WIP] feat: Track when we last received a message from which contact via which transport - #8544
Draft
Hocuri wants to merge 1 commit into
Draft
[WIP] feat: Track when we last received a message from which contact via which transport#8544Hocuri wants to merge 1 commit into
Hocuri wants to merge 1 commit into
Conversation
Hocuri
marked this pull request as draft
August 4, 2026 15:05
Collaborator
Author
|
@link2xt do you think this is the right approach in general? |
Collaborator
|
The table looks good, at least for collecting statistics and understanding how the knowledge of relays is distributed. As for the approach, it might turn out unnecessary if it happens extremely rarely that we even have contacts that don't know any of our working relays. If we onboard with three relays, then it is unlikely that we will be removing all three relays (because they all went down) any time soon, so for most users any logic based on this might turn out to be dead code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For automatic relay removal and replacement, we want to track which contact knows about which of our transports, and is able to send messages via it.
The prospective idea is that we can use this information for safe deletion of transports: Before deleting a transport, we can check which of our contacts only know about this transport, and would therefore fail to reach us once the transport is removed. Then, we send a hidden message to all of these contacts in order to tell them about our new relays and/or postpone the deletion until all of our contacts know about the current relays.
This PR here only saves the relevant data to the database and doesn't use them yet.
cc @link2xt