Just some question I just had and wanted to share. Maybe someone is as intrigued by it as I am:
Could you run lightning on top of nostr?
With "run lightning on top of nostr", I mean that two lightning nodes communicate channel updates over nostr. I assume this would make running nodes at home easier since you no longer have to accept inbound connections with a static public IP address.
Since events are signed and can be encrypted, the communication channel is authenticated and can be secure, but probably not as secure as p2p connections. We would still use BOLT 8 for encrypted and authenticated transport, but nodes would send and receive these encrypted messages over nostr which might mess with some security assumptions in some spectacular way. Do you really want to share in-flight HTLCs with a relay even if they are E2EE encrypted?
Maybe running lightning on top of nostr is a dumb idea for other reasons like reliability: force closures because the relay went down? But I guess in that case the decentralized aspect of nostr should save the day and the nodes could just pick another relay but that would need to be communicated (in advance) again in some way ...
Or maybe it's totally naive to think nostr relays could handle the amount of messages that are required to operate a lightning channel without even considering the network gossip yet.
What do you think?
also shared on nostr here
253 sats \ 2 replies \ @k00b 9 Oct
I believe @alex_lewin attempted this at one of @niftynei's hackathons a few years ago.
reply
138 sats \ 1 reply \ @ek OP 9 Oct
Interesting, I think I found the project on his linked site:
reply
🙌 🙌 🙌
reply
Tor solves the NAT traversal issue for running nodes at home with long lived network identifiers, and also provides IP privacy.
I don’t understand why it would be desirable to use nostr as the transport for Lightning, it has so many drawbacks including latency far beyond what Tor is going to deliver.
You don’t need to record all the p2p traffic via notes. It’s only meaningful to the peers involved, and better to just transmit over the internet.
Nostr is a good, interesting protocol for broadcast style messaging. It’s not a general peer to peer networking protocol, nor is it trying to be this.
It’s fun to demonstrate like running doom on everything, but it is not practical.
reply
Nostr can be used in a p2p like fashion and has much lower latency than Tor because no onions are required, you choose your relay, and can natively deliver data to the web where it's used
It solves NAT, and unlike Tor isn't a privacy nightmare getting your IP monitored by ISPs and Intel agencies, blocked by UTM, and so on... Nostr blends in with generic SSL traffic
There's also kind ranges for non- persistence like packets, basically everything you said is a complete reversal of the facts
reply
You would get better responses if you were respectful. If you think I have “reversed facts”. let’s explore this rather then saying I’m wrong.
I fail to see how picking a relay, that fact no onions are required (?) and native web data delivery (whatever that is) has any effect on latency.
Nostr is a relay based protocol. It has clients and relays. How is this peer to peer? How do I address another node and have it route? It’s not a routing protocol. It’s a caching messaging protocol.
reply
Responses from people who state things without having a clue what they're talking about aren't a KPI I optimize for, not conceding anything I said was disrespectful before. If you'll project that anyway I'll consider being disrespectful explicitly
Tor is literally chaining anonymous relays, without any optimization. Nostr is singular, already clearnet, and geo/performance easily optimized.
Each encryption layer is work that takes time, time is latency. Geography also impacts latency.
I said p2p like, peers don't need to trust the relay, it achieves NAT traversal and discovery. P2p sucks, it's fragile and doesn't work ... Torrents for ex still use trackers because of this despite decades of p2p DHT larp
Routing is a separate concern independent of the base communication layer, the lightning graph is also a cache
... You ignorant Muppet (this is disrespect)
reply
If you wish to have a real technical debate, I’m open. So far you’re just rude. I appreciate that you generally win an argument not on tech merit but via being the rudest party. That fine. I don’t, and I’m not offended.
You are comparing non equivalent things here. If you wish to have an actual technical discussion on the tradeoffs of caching, latency and onion routing vs broadcast over the public internet, I can share my position and beliefs. But otherwise you are mixing a lot of ideas and words here that don’t make sense.
Tor is “chaining” without “optimization”? Nostr is “singular”? Routing is separate than the “base communication layer”? Lightning Graph is a “Cache”?
Keep going bro
reply
I’m open
Seems not, you intentionally derailed the thread with your crying about tone because you got nothing of substance
generally win an argument not on tech
Sorry for the delayed response, I was on a flight coming back from a fully comped trip because the shit I've built with this tech has blown some minds, what is it you do you do again? Cope.
a real technical debate
Not that I think you could even parse one if you saw it, but since there are non-retards reading this I'll clarify for their sake...
Tor "the onion router" forwards comms across multiple hops, that's a chain of relays in the Nostr analogue. It's latency and reliability can't be optimized because by nature the next hop can be anywhere or anyone. Nostr relays on the other hand you pick and choose, which means you can even optimize to equivalence of a local reverse-proxy.
Routing is how Lightning moves Bitcoin, it uses a custom communication layer to coordinate that, but that communication layer could easily be anything... like Nostr events.
The graph in Lightning is data that's cached by nodes and served to other nodes, just like a Nostr relay serves notes.
Keep going bro
Cry harder.
reply
Thank you for explaining your words. Derailing what? Bro, you need to be nicer. Your argument holds no water while you act like an ass.
I appreciate that you like the LN over nostr pattern. You are welcome to build on it.
reply
Still no technical debate, just more crying.
Introspect that before you give me advice.
Perhaps the point of the exercise is to explore alternatives to running LN over the internet.
reply
Fair enough. What’s nostr running over then? My point is wrapping LN packets in notes is just extra wrapping with additional negative trade offs that still uses TCP/IP over public internet.
My point is this is putting it at the wrong layer. You can always stuff more layers in the stack but it does not necessarily make a better or more resilient product.
reply
I see your point. I'm also not sure that was his rationale.
reply
I've been advocating this since before nostr existed, that it should have been designed to use web native comms not some arbitrary new p2p network
Nostr is natures way of healing LN, as we're demonstrating with Lightning.Pub and ShockWallet
Nostr (if not some other web-first social graph) will and is starting to pull LN coordination up a layer where it belongs
reply
17 sats \ 2 replies \ @ek OP 9 Oct
You're the best example of when I can't tell if someone is a genius or just crazy.
And I am not sure if I care enough to find out by asking questions.
reply
You're the best example of when I can't tell if someone is a genius or just crazy
Progress and finding truth requires a bit of both
And I am not sure if I care enough to find out by asking questions
With that mindset you'll never get past mediocre
reply
17 sats \ 0 replies \ @ek OP 9 Oct
With that mindset you'll never get past mediocre
Good reply, I'll ask my questions when I have more time for a discussion ("care more")
reply
I think it could work. The only problematic aspect will be the latency. But as an experiment between 2 nodes using a good nostr relay it should work just fine. Also it could work nice if you use a speedloader of LN graph like Zeus or Blixt are using.
It's an interesting experiment.
reply
Men like challenges and that's why someone has already tried. I personally think it's a waste of time, considering the current state of the art. The negatives outweigh the positives.
reply
Take a look at lightning pub and their solution for this.
reply