We are beginning the development process for transmitting Nostr events in a peer-to-peer fashion, away from relays. This will start with Gift-wrapped DMs, Private Attachments, Private zaps, Private Text Notes, and Private Reactions; and will be the preferred transmission choice if both users are online, falling back to relays when they are not. Our Push Notification system already transmitted over 500,000 GiftWrapped Nostr events that relays will never see. With a full P2P this will get even better and will open the doors for voice and video calls directly inside Amethyst. Side-stepping relays won't be easy or quick. And I am sure we will get strong pushback from relay operators. But we will get there. And while this might start as an Amethyst feature, it will be a NIP and other clients will be able to join the privacy train.
Nostr is just starting.
Thread
Login to reply
Replies (53)
Interesting, but this is where keet also suffers. Without backups of the whole thing, edge case events make the whole thing feel clunky.
Either rely on relays or not, give the option to restore all in one, or not at all.
This is why I think we can succeed. The relay infrastructure will always be there to be a fallback. The P2P stuff is an additional layer of privacy to be used when 2 phones are able to reliably connect with one another.
I could see P2P transmission as being super neat for near-instant messaging. Not sure if it is a good idea for broadcasting notes to all followers, but there are definitively use cases where I would love that.
Please do consider documenting it - even if not in the nips repo - for easier referencing when developing something based on this! ^^
IMO Nostr lives and dies from it's documentation. It is why there are so few Matrix clients, because the Matrix docs are a PITA...
dYeah, it's not for public notes. The idea is to focus on private ones, which is generally just encrypted p2p anyway :)
Hot take: a protocol centered around the internet is inherently more open than a protocol centered around relays on the Internet. One includes the other.
View quoted note β
Relays are public and shouldn't involve with private things yes. I support this.
What if I use both Amethyst (mobile) and Primal (desktop)?
Primal will not be in sync with my private communications.
User 1 sends the event to User 2 via P2P instead of pushing through a relay. Then User 2 can send to any relay it wants for backup and to share with other clients the same user uses.
Amethyst would just send it to your own write relays for backup for now. And we could have an option to turn that off for the privacy-conscious users. In that case, no event received via P2P ever leaves the phone.
Let me get this straight, will only private events be p2p?
Because in your initial note you say that this movement starts with private events, which made me understand that in the future all events would be p2p.
If only private p2p events and public notes continue to be transmitted via relays, at this point I support the idea. I believe that this way the scroll feed experience does not change.
Correct. Only private events will be P2P (because they are already encrypted in a P2P way). I just have way more private event types coming up, like legally-binding contracts: 
GitHub
Add NIP-79: Digital Contracts, Covenants, and Agreements by xemuj Β· Pull Request #755 Β· nostr-protocol/nips
Introduces a new proposal (NIP-79) to standardize the representation of digital contracts, covenants, and agreements within the Nostr protocol. Thi...
I think I understand now. So I really don't see any problem for the relay operators, nor for the feed experience π€·ββοΈ
Looking forward to the new private events π
I think a simplex-like queue abstraction on top of nostr would be the best of both worlds
I have not found a reason to use Simplex if you are doing WebRTC. Instead of Nostr -> SimpleX -> WebRTC, you might as well just do Nostr -> WebRTC. It's one less point of attack.
The point of simplex is the async queues which you canβt replace with p2p tech. Nostr is missing the ephemeral push-pull queue idea
What's the niche of the vanilla SimpleX client for Nostronauts from your point of view? #asknostr
Async queues could fit nicely into relays. The queues are a really interesting solution in my opinion and I wonder where is that applicable in Bitcoin or Nostr space...
I agree async queues could just be implemented in Nostr but I don't see a need for async queues at the moment. But maybe I am missing something...
It enables ephemeral asynchronous notes without p2p
I understand. But I don't have a use for that yet. It's a nice to have in my bucket.
P2P is a must though. The whole point of p2p is to transfer private content without any servers involved.
You pretty much always need servers to holepunch connections at the very least. Not to mention its also pretty rare to have two clients online at the same time to establish p2p comms. Even in that case you may still need bridge servers.
Given these difficulties a temporary queue of messages would be much more reliable and just as private, if auth was required from the get go.
You need servers for P2P signaling, yes. But that signaling doesn't need async queues. I also question the assumption that two users are not online. They might not start online, but as soon as one messages the other, both stay online for the length of the conversation. And if you do push notifications, like we do, you can get the other user online in seconds. If both are online they don't need relays at all.
Yeahhhhhhh!
View quoted note β
I donβt know what this means but it sounds provocative
This nip is given me a boner
Love Amethyst π«πππ«‘
Gossip model + clients as relays
View quoted note β
All for Nostr privacy improvements. This will probably be one of those fundamental design choices which look obvious in hindsight and baffling that it wasn't included in the first or second drafts of the protocol. Then again this could fail spectacularly with users' phones filling up to the brim or connections almost always falling back to relays, with months and months of dev hours wasted for basically nothing. But what do I know, I'm just your friendly hoodlum in these cyphers. Interested to see how all this unwinds.
View quoted note β
"Nostr is just starting" -- @Vitor Pamplona @ ~Fall Equinox 2023
Listen closely if you didn't do already.
View quoted note β
Is this comparable to something like holepunch?
You must look at veilid. https://veilid.com/docs/overview/
"Veilid is an open-source, peer-to-peer, mobile-ο¬rst, networked application framework.
The framework is conceptually similar to IPFS and Tor, but faster and designed from the ground-up to provide all services over a privately routed network.
The framework enables development of fully-distributed applications without a 'blockchain' or a 'transactional layer' at their base.
The framework can be included as part of user-facing applications or run as a 'headless node' for power users who wish to help build the network."
Is this available in China? Push service against GFWβ¦
Zapped!
View quoted note β
does anyone know they should save their data themselves ? This is the only point that bother me in this π
View quoted note β
Nostr is about censorship resistance and at least for me, the most challenging mode of censorship resistance is censorship resistant broadcast. Avoiding meta data leak in encrypted transmission is a different problem to solve and nostr trying to solve the former would have to compromise on that to solve the latter. Therefore I believe Gift-wrapped DMs and "full P2P" is potentially harming nostr.
Is there a thread that discusses this? Would love to be a fly on the wall for this π§
Hmm. How are you going to achieve this and stay interoperable with other clients? I assume the fallback transmission you mentioned? Also, would this be utilizing nostrdb, so that users essentially use their own relay and communicate to other's via their own local relays? Is there a gossip model being used? So many questions. Is there an external discussion that I can see and randomly yell into?
I think itβs fair to say amethyst is not going to be very compatible with other clients going forward. I highly doubt anyone would build around his centralized push server as a core protocol mechanism.
I am not going to use the push server for P2P. There is going to be no server. Thats the whole point.
Plizz no hard forks
Simple, if two users are using compatible P2P implementations, they can transfer their events via P2P, if not it goes through relays as usual. On a conversation via DMs for instance, I would assume the first DM comes in via relays and then moves to P2P when the person replies. The likelyhood of the two users being online is higher there. Then no additional DM goes through relays anymore, increasing privacy.
Of course, each user can receive the message via P2P and still send to relays for backup, but that is the receving user's choice, not the sender.
Thanks.
Man I need someone to explain this to me like Iβm 5
Lots to test yet. We will see if can get this to an interesting level.
Π²ΡΠ΅Ρ
ΡΠ°ΡΠΏΡΡΡΠΈΡΡ...
Nost.
View quoted note β
This is great Vitor! πππππ
Wow,
respect!
This sounds amazing!
really looking forward to the future of #NOSTR
Means we can take over everything in communication with any possible device that has access to the inet.
Sounds like fun.
View quoted note β
Bullish. Relays can be a point of failure. P2p is the way
interesting
