This was originally reported as a Relay Search bug #25034 (moved).
Sometimes, but not always, the effective_family for a relay will include the relay itself. The specification does not explicitly say that a relay's own fingerprint will or won't be included, but from reading it I would assume that it is not included.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Hmm, yes, I think it makes more sense to exclude the relay itself from its "effective_family".
It looks like the reason is that some relays include their own fingerprint in the family line of their server descriptor. For example, 03603092cf69a41857aed9131aba531cf4e71f27:
Just in case we need more examples, here are all details documents that I found that have their "fingerprint" as one element in their "effective_family" field:
This is fixed for Relay Search (#25034 (moved)) so that there's no incorrect family counts showing up there (just deployed), but this should still be fixed in Onionoo too. Thanks for the example relays, handy for testing. (:
Wondering, if his shouldn't go in a different direction. I would expect the family to contain the listing relay (the 'self'). Isn't it a use case to compare families of relays? Then I would need to somewhat artificially add the 'self's. And, the field's name also yields that the entire family is listed incl. 'self'. So, Onionoo should rather add 'self' always (, which is also a slightly simpler patch).
I couldn't find any reasons for removing the 'self' in the other tickets referenced here.
Thoughts?
Iirc I'm the reason that effective_family has been added to onionoo and I'm post-processing onionoo data to always add self to all effective_family sets to have uniform effective_family sets for relays that are in the same effective_family. (That said I'm happy with either, remove it always or add it always)
What would the "effective_family" field contain if a relay is not in an effective family with any other relay?
The suggestion is to include the relay itself to "effective_family" only, and not to "alleged_family" or "indirect_family", right?
I'm open to this idea, especially if it makes processing easier for Onionoo clients. It's a bit redundant to include the same fingerprint twice in a document, but we made similar decisions in the past where some redundancy is acceptable if that makes it easier to process results.
I'll look closer at the branch as soon as we have made a decision here.
What would the "effective_family" field contain if a relay is not in an effective family with any other relay?
A family consists of that relay then, or we decide that it needs more than one to be a family, but that seems counter intuitive.
The suggestion is to include the relay itself to "effective_family" only, and not to "alleged_family" or "indirect_family", right?
The protocol states clearly that the effective family relays are not contained therein. So, actually, the 'self' needs to be in the effective family to make these correct.
I'm open to this idea, especially if it makes processing easier for Onionoo clients. It's a bit redundant to include the same fingerprint twice in a document, but we made similar decisions in the past where some redundancy is acceptable if that makes it easier to process results.
It follows the protocol more closely, I think.
I'll look closer at the branch as soon as we have made a decision here.
Even the other way wouldn't need big changes to the patch, only replacing 'remove' with 'add' and test adaption.
If we do include a relay in its own effective family, Relay Search will need to be updated to not perform that step as it currently does.
Not sure I understand. The spec seems vague right now, so how about Relay Search just either adds or removes a relay's own fingerprint to ensure it's contained or not contained, whichever state it is that Relay Search expects? That is, what prevents us from updating Relay Search now and making the Onionoo change at a later time?
Currently Relay Search removes the relay. This means it has to iterate over 2000 (worst case) lists to remove fingerprints for the search view as effective family count is shown in the results table. When I added the code to filter the fingerprints, I added a comment to say this was temporary and should be removed after this ticket was resolved.
The important thing to achieve in this ticket is consistency. My comment was not very clear, it's a different change that should be made in Relay Search depending on which way we choose to go making it consistent.
decide for adding 'self' always to the effective family, because clients (like RS) interpret it like that (and had to work around the inconsistent situation so far) or against it because it would add too much to current documents
explicitly state whether the relay belongs to its effective family or not in the protocol (if not it should also explicitly be added that the 'self' doesn't show up in the other two family types either)
decide for adding 'self' always to the effective family, because clients (like RS) interpret it like that (and had to work around the inconsistent situation so far) or against it because it would add too much to current documents
I'm fine with this. From comments above it sounds like there are no concerns. Let's do it.
explicitly state whether the relay belongs to its effective family or not in the protocol (if not it should also explicitly be added that the 'self' doesn't show up in the other two family types either)
make & merge the appropriate changes (everywhere)
Do you want to do this? I just reviewed your task-25241 branch until commit df11f4d. Looks good! Do you want to change it to always add a relays own fingerprint to its declared family? And I guess we'll squash those commits in the end, to avoid making a change and undoing it right afterwards.
If you're already juggling too many tickets, I can also take this one. Let me know.
decide for adding 'self' always to the effective family, because clients (like RS) interpret it like that (and had to work around the inconsistent situation so far) or against it because it would add too much to current documents
I'm fine with this. From comments above it sounds like there are no concerns. Let's do it.
explicitly state whether the relay belongs to its effective family or not in the protocol (if not it should also explicitly be added that the 'self' doesn't show up in the other two family types either)
make & merge the appropriate changes (everywhere)
Do you want to do this? I just reviewed your task-25241 branch until commit df11f4d. Looks good! Do you want to change it to always add a relays own fingerprint to its declared family? And I guess we'll squash those commits in the end, to avoid making a change and undoing it right afterwards.
If you're already juggling too many tickets, I can also take this one. Let me know.
You might be more efficient on this task because the tests need to be adapted; and you reviewed my suggested branch already, in which only small simple changes will be necessary.