News for hackers. Stuff that matters.
Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @12:09PM (#37352615)
I tried Nostr for awhile, and I appreciate that they're picking up where Scuttlebot left off. There are a few things that bug me about it that I wish they'd fix, or that some future protocol will solve.

First, I want a replication strategy. Nostr messages get lost in time, and many of the clients end up just blasting an entire message history at your client. Because there's no clue in the protocol how messages are related other than a timestamp this also means you can fake timestamps and write fake messages in the future or back in time. This doesn't have to be an append-only log, but you need some idea of message order to avoid wasting bandwidth to get someone's timeline and detect when a message has been posted out of order.

Second, I don't like that many Nostr clients are using the same signing key for messages as they do for lightning transactions. We don't know how many of these web Nostr clients are secretly sending your private keys back to their servers, and everyone will run from Nostr as soon as some untrustworthy dev starts emptying lightning wallets.

Third, someone needs to delete some of these NIPS. The arms race to make Nostr as complex and difficult as possible to implement is not going to do much for the ecosystem in the long run. In the beginning Nostr was simple to implement from scratch, they should get back to that!

Fourth, it needs a dedicated blob store protocol. Yah, I know IPFS isn't great but someone should come up with something that is simple and works.

Anyway best of luck to the people who are working on the project. If anything we learned more about how these protocols can work, even if Nostr isn't going to be the winner in this space in the long term.

Re:Nostr: A Decentralized Messaging Protocol by drexlspivey on Friday September 01, 2023 @12:44PM (#37353163)
> First, I want a replication strategy. Nostr messages get lost in time, and many of the clients end up just blasting an entire message history at your client. Because there's no clue in the protocol how messages are related other than a timestamp this also means you can fake timestamps and write fake messages in the future or back in time. This doesn't have to be an append-only log, but you need some idea of message order to avoid wasting bandwidth to get someone's timeline and detect when a message has been posted out of order.

nostr is stateless it’s just a streaming protocol for messages, there is no ordering (the same way there is no packet ordering in UDP). Looks like what you need is something built on top of it. Right now nostr relays are just that, real time message relays, they are not even supposed to store the messages.

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @02:00PM (#37354196)
> nostr is stateless it’s just a streaming protocol for messages

I've brainstormed ways to solve this on top of Nostr. Perhaps I could write a program that downloads all of the history of Nostr (or perhaps just the users I'm interested in?) and then my server would sign when I received the messages and create order out of that.

Then if I get a message that claims to be from the past at some point in the future, I'd instantly be able to see that. I'd also be able to periodically ping relays and see what messages that are no longer being relayed and I'd have some curiosity about why that is happening.

I just kind of wish this was baked into the protocol. But I sailed here from the Scuttleverse. I'm open to ideas about how to do this well.

Re:Nostr: A Decentralized Messaging Protocol by curtisblaine on Friday September 01, 2023 @07:46PM (#37357327)
> Perhaps I could write a program that downloads all of the history of Nostr

Is this even possible? Won't relays throw away older messages at some point? Or are they supposed to scale infinitely?

Re:Nostr: A Decentralized Messaging Protocol by gkbrk on Saturday September 02, 2023 @03:56AM (#37359389)
Some relays try to store messages for as long as possible (aside from cleaning up some really large spammy ones), some others keep a certain number of messages.

There are some relays that have no storage at all, they only relay messages between connected clients and then discard the messages.

Re:Nostr: A Decentralized Messaging Protocol by kdragon on Friday September 01, 2023 @10:36PM (#37358131)
nostr has an early NIP that talks about publishing timestamp commitments to the bitcoin blockchain, using the open timestamp protocol
Re:Nostr: A Decentralized Messaging Protocol by jazzyjackson on Friday September 01, 2023 @01:29PM (#37353799)
IPFS is so heavy and unperformant, just not a lot of bang for your buck when paying for a host. As far as I can tell it owes its success to VC funded blockchain startups subsidizing hosts with 8:1 payouts for hosting other peoples' stuff

I'm betting on webtorrent paired with seedboxes - your peer just has to serve whatever mp3/mp4 you're hosting to the first few clients, and as long as their browser windows are open they can help seed any viral growth, handling DDoS/hugs-of-death without issue. If there are multiple hosts in a community they can enter peering agreements and sync their seedboxes to keep media available, solving bitrot

if only I could figure out how to get paid to implement it

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @02:09PM (#37354314)
Someone with money should create a VC fund for simple IPFS alternatives. That's a good idea.
Re:Nostr: A Decentralized Messaging Protocol by kaliqt on Friday September 01, 2023 @09:36PM (#37357889)
Would be nice to see a well secure alternative to torrent and IPFS so we can just settle and use it. Ideally encrypted and anonymous optionally too.
Re:Nostr: A Decentralized Messaging Protocol by genewitch on Friday September 01, 2023 @09:55PM (#37357957)
I like the idea of anonymity, and have done implementations of anonymous services - ones that are public and live now. I wouldn't do it for money unless i was somehow indemnified against fault and damages. In my measured opinion, it is too risky to allow unfettered anonymous uploads, even strictly financially.
Re:Nostr: A Decentralized Messaging Protocol by bubersson on Saturday September 02, 2023 @01:47AM (#37358850)
If you use bitcoin you can make services that provide value and get paid for those online without any identity involved. That's the main value. That said it's a bit complicated to use bitcoin in a truly anonymous way without connecting identity to it at any point.
Re:Nostr: A Decentralized Messaging Protocol by jazzyjackson on Saturday September 02, 2023 @02:23AM (#37359002)
(not the OP:) Sure I could host your content without knowing who you are, the issue is hiding my own identity when I'm found to be hosting illicit content, this issue is then multiplied when I'm taking payment and trying to offramp those funds to pay my bills.

The financial system at large is built to discourage people transferring funds anonymously for myriad reasons, and most people aren't interested in keeping all their cash inside the black market (no exit nodes in torspeak)

Re:Nostr: A Decentralized Messaging Protocol by jazzyjackson on Saturday September 02, 2023 @02:17AM (#37358982)
you can torrent over tor (well, more in theory than in practice)

from my view it's been settled for near 2 decades now, IPFS just gets more press in certain circles

Re:Nostr: A Decentralized Messaging Protocol by 3np on Saturday September 02, 2023 @11:28AM (#37362368)
Re:Nostr: A Decentralized Messaging Protocol by doublepg23 on Friday September 01, 2023 @11:49PM (#37358426)
Would tweaking PeerTube not work for that?
Re:Nostr: A Decentralized Messaging Protocol by jazzyjackson on Saturday September 02, 2023 @06:33AM (#37360213)
i'll have to take another look at their technology stack, are they torrent or IPFS?

They were using Gun db at some point too maybe but it's been some time since i checked, maybe it was a clone.

Re:Nostr: A Decentralized Messaging Protocol by nunobrito on Saturday September 02, 2023 @02:40AM (#37359063)
Keep it simple.

Just post the SHA256 hash on the note and when publishing keep sending the file to some file hosting server (as done today).

The file host will be gone one day, hopefully some other server will have the same hash.

SHA256 is not enough? Just use a tag like file:sha256:blablablabla and you now support better hashes in the future.

Nostr isn't about blockchain nor a crazy fear of losing data. It is intended for sharing notes that someone, somewhere might have interest to piece back together in a few centuries from now.

Re:Nostr: A Decentralized Messaging Protocol by jazzyjackson on Saturday September 02, 2023 @06:31AM (#37360203)
We have the same idea, a sha256 is all you need to construct a magnet link and start peering, my suggestion is for a nostr client to support this use case and webtorrent to replace the hash with the embedded file on the front end. not to make any change to the protocol.
Re:Nostr: A Decentralized Messaging Protocol by nunobrito on Saturday September 02, 2023 @07:09AM (#37360416)
so long it remains as standardized hash. The problem with torrent hashes is that it remains specific to torrents. Most common scenario are volunteers setting up large storage space that indexes all files according to SHA256 where anyone can regenerate those hashes again easily if needed.

Maybe time for a NIP on this topic?

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Saturday September 02, 2023 @11:04AM (#37362164)
I like the idea of simply hashlinking to a blob. Then, ask a random relay if they have it.

If we don't want a global scope for blob sharing maybe the relay only responds if we are friends/members of the relay.

Re:Nostr: A Decentralized Messaging Protocol by supermatt on Saturday September 02, 2023 @04:23AM (#37359498)
Isnt IPFS effectively the same thing as trackerless torrents? i.e. its a DHT for registration and lookup of distributed resources where segments can be downloaded from multiple sources in parallel.

I think the main difference is that in IPFS the content ids (equivalent to torrent hashes) support multiple encodings, etc, and peer connections are more flexible than bittorrent "nodes" in their addressing - i.e. multiple protocols/transports, etc.

Re:Nostr: A Decentralized Messaging Protocol by jb55 on Friday September 01, 2023 @01:32PM (#37353845)
Hey, author of https://damus.io here (ios twitter-like nostr client)

> First, I want a replication strategy. Nostr messages get lost in time, and many of the clients end up just blasting an entire message history at your client. Because there's no clue in the protocol how messages are related other than a timestamp this also means you can fake timestamps and write fake messages in the future or back in time

You can do this with email or git too and it doesn't make it any less useful. I actually like the backdating feature as it allows you to copy your account to a new key.

As for replication, at damus I am working on https://github.com/damus-io/nostrdb which is intended to be a "sqlite for nostr". I plan on implementing set-reconciliation based syncing with strfry relays (using a technique called negentropy), so that replication is very efficient.

> Second, I don't like that many Nostr clients are using the same signing key for messages as they do for lightning transactions.

This is simply not true.

> Third, someone needs to delete some of these NIPS. The arms race to make Nostr as complex and difficult as possible to implement is not going to do much for the ecosystem in the long run. In the beginning Nostr was simple to implement from scratch, they should get back to that!

All nips are optional except for nip01, you can ignore them all for the most part.

> Fourth, it needs a dedicated blob store protocol. Yah, I know IPFS isn't great but someone should come up with something that is simple and works.

It does not, in the same way email or git or any text-based protocol doesn't need a dedicated blob store. These are separate concerns and they should be a separate protocol. nostr clients can of course integrate and link to any blob store it wants via new NIPs that describe this. I believe there are a few already in the nips repo.

Cheers!

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @01:43PM (#37353988)
> > Second, I don't like that many Nostr clients are using the same signing key for messages as they do for lightning transactions.

> This is simply not true.

I'm sorry if I'm wrong about this one. How does it work?

Re:Nostr: A Decentralized Messaging Protocol by jb55 on Friday September 01, 2023 @01:59PM (#37354178)
Zaps just put a signed nostr note inside a lightning invoice so that clients can show that a specific user send some amount of money to some note or profile. clients request lightning invoices via lnurl (an http lightning specification). You could do the same thing for any other fiat or crypto system if you want to, but nostr was mainly build by bitcoiners which is why there is lots of bitcoin tech integrated, but its completely optional.
Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @02:07PM (#37354288)
How do you request your Zaps balance to send it somewhere else (like to a Bitcoin wallet)? Maybe this is a Lightning thing and not a Nostr thing.

I guess I assumed it was based on the private key you generated when you got started on Nostr and if that private key became compromised then the Zaps could go to whoever had the private key.

Perhaps there is a document somewhere that explains this.

Re:Nostr: A Decentralized Messaging Protocol by jb55 on Friday September 01, 2023 @02:15PM (#37354382)
There is no "zaps balance". Zaps are just receipts of lightning payments.

The basic idea is that a lightning node will detect when the invoice with a nostr note inside is paid, and then send the receipt to nostr as a nostr note, with the original bolt11 invoice inside with the signature from the user who sent the zap.

It's all described by NIP-57, a spec I put together to support this:

https://github.com/nostr-protocol/nips/blob/master/57.md

I was working on c-lightning at the time and I thought it would be really cool to replace the "like" button with an instant bitcoin micro-payment. I think it worked out quite well! There are many sites utilizing zaps in all aspects of the protocol, such as a decentralized market for AI job requests (data vending machines), zapgoals and zap fundraisers. All built on this note type. protocol synergy!

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @02:34PM (#37354572)
I read NIP-57 just now.

I guess what confused me is I've used Nostr clients where everyone has a Zap button. Who is holding onto those lighting receive addresses until they specify where they want the funds to go?

Like if someone Zaps me right now, I haven't specified a place for those Zaps to go. Do I call the Damus staff and they send the total of the micropayments Zapped to me over Nostr to a Bitcoin receive address? I don't think anyone has Zapped me, I'm just trying to wrap my mind around how it works since I was wrong earlier.

Maybe I need to set aside an afternoon and read about how Lighting works, perhaps I just don't get that protocol.

Re:Nostr: A Decentralized Messaging Protocol by clarkmoody on Friday September 01, 2023 @02:48PM (#37354720)
Lightning is an online protocol, so your wallet must be available to complete the transaction. No online wallet, no zaps.
Re:Nostr: A Decentralized Messaging Protocol by supertestnet on Friday September 01, 2023 @04:04PM (#37355602)
> if someone Zaps me right now, I haven't specified a place for those Zaps to go

then you can't be zapped

you can only be zapped if your profile has a tag in it that tells people where to send your zaps to

without that, a zap button shouldn't show up, and if it does show up, it shouldn't do anything

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @04:17PM (#37355728)
Ok, this makes sense. I must have been using a client that had 'Zap' icons and because I didn't have a Zap balance I just assumed the buttons didn't work because I had no balance.

I didn't realize every single person who downloads a zap-supporting client had to also set up a separate app to handle the micro-transactions and host that app somewhere where it is available 24/7 in case their post gets zapped.

Re:Nostr: A Decentralized Messaging Protocol by kdragon on Friday September 01, 2023 @10:32PM (#37358116)
it's not that big a deal if you use a hosted wallet. There's quite a few options out there, like stacker.news or wallet of satoshi.
Re:Nostr: A Decentralized Messaging Protocol by satvikpendem on Friday September 01, 2023 @06:04PM (#37356635)
> Hey, author of https://damus.io here (ios twitter-like nostr client)

Haha, like Nostradamus, very clever name!

Re:Nostr: A Decentralized Messaging Protocol by entropie on Friday September 01, 2023 @10:34PM (#37358123)
missed the opportunity to nostra.damu.us ?

That remembers me off project.ioni.st and now iam sad.

Re:Nostr: A Decentralized Messaging Protocol by 3np on Saturday September 02, 2023 @11:20AM (#37362292)
> > First, I want a replication strategy. Nostr messages get lost in time, and many of the clients end up just blasting an entire message history at your client. Because there's no clue in the protocol how messages are related other than a timestamp this also means you can fake timestamps and write fake messages in the future or back in time

> You can do this with email or git too and it doesn't make it any less useful.

In the sense that you can fake timestamps, you're of course correct on git and anything else beyond public blockchains.

In the other sen, git is a counter-example of what I take the author's main point to be, in that commits do have an mandated relationship and linkage that Nostr noted don't.

Re:Nostr: A Decentralized Messaging Protocol by lovvtide on Friday September 01, 2023 @02:07PM (#37354284)
So I've been building of one of the nostr web clients ( https://satellite.earth ) full time since December last year - I agree partially with all these points and will try to add something from my perspective of being perhaps a bit too close to this.

1) With regard to message replication/ordering, the relays are supposed to reject messages that are received with a timestamp that deviates from the server clock beyond some max delta, but it's not clear they always do this. Nostr in its current state (multiple relays hosting everything and letting clients sort it out) is optimizing for redundancy over efficiency — as the ecosystem matures I think this will get sorted out. I have one idea in particular that I think could really help, but it's beyond the scope of this comment.

2) In the very early days you had to copy/paste your key into some clients, but this is not the case anymore. There are several web extensions now that hold your key securely and expose a limited interface for clients to sign messages.

3) You're right - there are too many NIPS (that's "nostr implementation possibility" for those unaware). But fortunately the only required NIP is NIP-01 which is basically just a standard for how to sign and exchange json between clients and relays. I don't think any client implements all the NIPs. In fact, there has been a lot of talk on nostr about 'microapps' (apps that specialize in a narrow use case) and that's fine — maybe because nostr was birthed in the context of being a Twitter alternative we've been thinking that all clients need to support the whole protocol, but I don't really think it will turn out that way. Since all apps are interoperable with a shared user identity, it's possible for clients to be complementary to each other in a way that hasn't previously been incentivized.

4) Regrading blob storage — that's what NIP-94 was created for. You can in principle create a "file" message containing whatever metadata you want. This can be a torrent magnet link or IPFS cid or whatever.

For what it's worth, I've personally never had as much coding anything than I have working on nostr. There's a core group of people that are very excited about this, and it's really motivating to get immediate feedback every time I push an update. No doubt the whole thing is very messy compared to a corporate-sponsored project like (for example) Bluesky. My bias is toward ecological systems tending to win in the long term. We'll find out.

Re:Nostr: A Decentralized Messaging Protocol by evbogue on Friday September 01, 2023 @02:16PM (#37354383)
All good points!

I believe Nostr is doing way better than Bluesky at achieving the goal of being a distributed social network.

Re:Nostr: A Decentralized Messaging Protocol by michaelmrose on Friday September 01, 2023 @11:21PM (#37358323)
I checked out a community that on the tin is about learning coding and found Trumpers, bigots and antivaxxers. It reminded me of pro free speech fork of Reddit. It wasn't a bad idea AT ALL on the face of it but in practice its front page was never without a racial slur and no decent people stayed long.

If everyone cares about privacy then privacy focused places ought to be full of on average smart people having intelligent conversations. If few people feel the need to bother you end of serving largely the paranoid and the odious and this can easily be a self re-enforcing trend as bad drives out the good.

I feel like the space could use some innovation if its produce communities worth attending to without strong centralized moderation. Instead of bubbling up the top 100 things the community as a whole thinks are worth reading or the top 100 things that someone thinks I might be willing to engage with including 60 things selected because they are liable to make me angry or succeed in wasting my time why not have a personalized analysis done on MY side or on a computer I rent to pull in 10,000 things and figure out which 100 I actually want to engage with based on my own aims not advertisers.

I would probably pay for that especially if it could be plugged into a lot of common platforms to filter out the crap.

Re:Nostr: A Decentralized Messaging Protocol by plagiarist on Saturday September 02, 2023 @12:45AM (#37358622)
Social media is crawling with the bigoted anti-reality Trumper crowd. There are plenty here as well.

Maybe running a local spam filter on one of these decentralized platforms is the way to go. I wouldn't mind running LLMs and removing all the content from Trump crime family fans. Would be nice to detect and reject LLM-generated adtech bullshit while we are at it.

Re:Nostr: A Decentralized Messaging Protocol by woah on Friday September 01, 2023 @05:46PM (#37356498)
> First, I want a replication strategy.

> Second, I don't like that many Nostr clients are using the same signing key for messages as they do for lightning transactions.

> Fourth, it needs a dedicated blob store protocol.

You should make some Nostr Improvement Proposals

Re:Nostr: A Decentralized Messaging Protocol by antisocialist on Friday September 01, 2023 @11:05PM (#37358255)
In other words, Nostr can't do almost anything that matters.

> First, I want a replication strategy.

xx Network has message replication built in.

> Third, someone needs to delete some of these NIPS.

xx Network lets you delete messages.

> Fourth, it needs a dedicated blob store protocol.

For blobs, clients should be able to plug in to any 3rd party blob storage (e.g. Crust Network). This secondary storage is needed only for large attachments and isn't strictly required in messaging. If you think about it, you could upload large attachments anywhere and send links in messages. Look how Teams or Outlook work with One Drive.

Re:Nostr: A Decentralized Messaging Protocol by 3np on Saturday September 02, 2023 @10:24AM (#37361790)
Oh hey David Schaum has entered the chat to shill their thing