Skip to content

[WIP] feat: Track when we last received a message from which contact via which transport - #8544

Draft
Hocuri wants to merge 1 commit into
mainfrom
hoc/relay-usage-tracking
Draft

[WIP] feat: Track when we last received a message from which contact via which transport#8544
Hocuri wants to merge 1 commit into
mainfrom
hoc/relay-usage-tracking

Conversation

@Hocuri

@Hocuri Hocuri commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

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

@Hocuri
Hocuri marked this pull request as draft August 4, 2026 15:05
@Hocuri

Hocuri commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

@link2xt do you think this is the right approach in general?

@link2xt

link2xt commented Aug 4, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants