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.
Draft, a bit unstructured at the moment. Related: #306
Things that may be worth discussing at this point:
expiration
tag. Rendezvous beacons generally don't have to be kept around indefinitely, clients should at least not rely on that being the case. Having extra deletion events seems excessive and increases the amount of metadata. Having anexpiration
tag therefore seems like the best option. In order to reduce fingerprintability, all stored beacons should have the same interval betweencreated_at
andexpiration
. I've set this to 10000000 seconds, or ~3.8 months. The round number means that most digits will be the same between the two fields, aiding compression.The requirement for a
0000
prefix onid
. This gives some minimal POW requirement, helping to protect against a large volume of "frivolous" beacons. It's also necessary for meaningfulsubprefix
support, as most relays will not let you subscribe to a prefix shorter than 4 hex digits.subprefix
. It lets recipients choose to subscribe to only 1/16 of all beacons, at the cost of a proportional reduction in their anonymity set. As an option, a recipient can choose to subscribe to beacons on a set of relays with a smaller total volume of beacons. If thesubprefix
feature and0000
prefix (and accompanying POW requirement) are both removed, it would reduce the complexity of generating beacons and could save 4 base64 characters incontent
.Subscription metadata location. I've put this in the
set_metadata
event for now. That means it gets widely distributed, which is good because it lets the sender easily retrieve it without signalling intent to send a beacon to this specific recipient. Another option is to put this in a different event kind, which would allow it to be updated more easily without race conditions on otherset_metadata
fields, allowing for frequent changes torecipient_pubkey
, which must be updated regularly in order to maintain forward secrecy.