
Show HN: Lightning Network Search and Analysis Engine - mOneThousand
https://1ml.com/#search
======
nosuchthing
Does anyone know how Lightening Network code actually routes nodes?

The LN claim is basically decentralized BGP but much more complex and prone to
race condition errors.

[https://www.youtube.com/watch?v=Ug8NH67_EfE&feature=youtu.be...](https://www.youtube.com/watch?v=Ug8NH67_EfE&feature=youtu.be&t=10m24s)

The white paper doesn't even mention how LN routing works!

    
    
      8.4 Payment Routing
    
      It is theoretically possible to build a route map 
      implicitly from observing 2-of-2 multisigs on the 
      blockchain to build a routing table. Note, however, 
      this is not feasible with pay-to-script-hash transaction 
      outputs, which can be resolved out-of-band from the 
      bitcoin protocol via a third party routing service. 
      Building a routing table will become necessary for 
      large operators (e.g. BGP, Cjdns). Eventually, with 
      optimizations, the network will look a lot like the 
      correspondent banking network, or Tier-1 ISPs.
    
    

It seems impossible to implement true decentralized routing, so it's likely
they're using some sort of hack to prioritize "masternodes" as the backbone
routers instead of actual peer to peer routing.

~~~
colordrops
The whole thing is fishy. The lightning network is pushed by Blockstream, a
company which has a large number of devs working on bitcoin core. They were
responsible for all the propaganda and talking points against bumping the
block size leading to the BCH fork, because they wanted the "correct" solution
of their lightning network. The fact that it is so complex and ill defined is
dangerous and an antithesis of decentralized system design and ethos, as it's
not clear how trustless transactions are protected. How do we know that there
isn't an easy backdoor that allows this network to be controlled for
Blockstream's purposes?

~~~
tlrobinson
This is pure FUD.

Satoshi himself proposed the first version of payment channels [1]. The
Lightning Network paper has zero authors from Blockstream [2]. At least two
other entirely independent companies are working on Lightning Network
implementations [3][4]. It's well understood how trustless LN transactions
work [5]. The spec [6] and code are open source, feel free to look for a
"backdoor".

1\. [https://en.bitcoin.it/wiki/Payment_channels#Nakamoto_high-
fr...](https://en.bitcoin.it/wiki/Payment_channels#Nakamoto_high-
frequency_transactions)

2\. [https://lightning.network/lightning-network-
paper.pdf](https://lightning.network/lightning-network-paper.pdf)

3\.
[https://github.com/lightningnetwork/lnd](https://github.com/lightningnetwork/lnd)

4\. [https://github.com/ACINQ/eclair](https://github.com/ACINQ/eclair)

5\.
[https://en.bitcoin.it/wiki/Hashed_Timelock_Contracts](https://en.bitcoin.it/wiki/Hashed_Timelock_Contracts)

6\. [https://github.com/lightningnetwork/lightning-
rfc](https://github.com/lightningnetwork/lightning-rfc)

~~~
cup-of-tea
Whenever I see the term "FUD" nowadays I think "ah, someone who is invested in
a cryptocurrency, this will definitely be an unbiased view".

------
fiiv
While everyone else argues about wether LN is evil or great, I'll just comment
on your product.

It's a nice tool, akin to the block explorers out there. One minor thing I
noticed, where you define the node colour in the sidebar, sometimes if it is
dark the hexcode cannot be seen.

There's a way to fix this by dynamically determining the color in javascript
for example, and changing the text atop of it to white.

~~~
mOneThousand
Thanks for the feedback. Fixed it with CSS text-shadow

------
AlexCoventry
What are the regulatory hurdles to operating a lightning node in the US? It
makes you a money transmitter, right?

~~~
urza
Here is something from Andreas Antonopoulos on this topic:
[https://youtu.be/c4TjfaLgzj4?t=14m35s](https://youtu.be/c4TjfaLgzj4?t=14m35s)

I think the most important aspect is that Lightning Nodes are just sending
bitcoin transactions, the whole system is trustless, the node relying your
transaction to destination can't steal your money any more then bitcoin full
node relying your transaction to miners can.

~~~
AlexCoventry
Thanks. That was very unsatisfying, though. He's right that there are usually
thresholds where money-transmitter laws kick in, but having to track that and
refrain once you hit the limit would be onerous and limiting.

------
sunsu
What does "capacity" mean in this context?

~~~
zik
Lightning Network seems very confusing. It's unclear to a casual user what
"capacity" is and what it means to them. Or what any of this means, really.

~~~
Pada
I don't think the end user needs to know anything about capacities or other
technical details the same way a user doesn't need to know their internet
speed.

The end user experience will be having a hot wallet in your computer/phone or
online service like coinbase that will handle all the routing, channel setup,
etc for you. Like when you use bittorrent you don't need to manually connect
to peers, the bittorrent client handles that for you.

------
thisisit
I have watched couple of introductions on LN and had some questions, if
someone can help:

a. What effect does this have on transaction sizing?

b. Does the the node owner charge fees for each transaction?

c. How are the channel amounts calculated? Do they include mining and node
fees?

~~~
keymone
a. LN transactions and Bitcoin transactions are different things, i will
assume you mean "how does LN affect Bitcoin's chain capacity?" \- to use LN
you have to make at least one Bitcoin transaction - so called "funding"
transaction which opens or refills a channel, afterwards you can make millions
of LN micropayments - none of them will affect Bitcoin tx capacity.

b. Yes, it's part of node configuration, you can set whatever fee you like,
but most probably at this point everybody will just route around you.

c. When creating the funding transaction you decide the amount of satoshi to
be locked up in a channel for use in LN. Funding transaction is subject to
normal Bitcoin transaction fees (x sat/byte, the higher you pay the faster
it's committed and your channel becomes usable).

~~~
thisisit
a. I meant bitcoin transaction sizing. Bitcoin fees are driven by transaction
sizes and my understanding (edited) is for a LN channel to be opened and
closed, the transaction needs to committed to the blockchain. What are the
expected size of these transactions? And how does Segwit work for these
transactions?

b. Thanks for the answer. (Edited): So, it seems the current argument there
will be too much competition for nodes hence people will automatically set low
or no fees.

c. This is unclear to me. Normally, when I am paying for stuff in bitcoin
sellers tend to attach an estimated fee for the transaction. Lets take an
example, I need to pay 0.1 BTC they will charge 0.101 BTC. The 0.001 BTC is
the transaction fee.

With LN nodes charging fees on top of it, businesses now will have two fees to
account for?

Additionally, my understanding now is that there are three fees now:

a. Channel Opening fees to miners

b. Node fees which might be zero

c. Channel Closing fees to miners

~~~
keymone
> What are the expected size of these transactions?

LN deposit/close transactions don't carry any information about LN payments
made on the channel, so their size doesn't grow with usage. They are simply
2-2 multisig transactions, so somewhat larger than the minimal 1-in-1-out tx,
but probably (didn't check this) not larger than median bitcoin transaction.

> And how does Segwit work for these transactions

those are always pay-to-witness-script-hash transactions, so they don't even
work without segwit: [https://github.com/lightningnetwork/lightning-
rfc/blob/maste...](https://github.com/lightningnetwork/lightning-
rfc/blob/master/03-transactions.md#funding-transaction-output)

> current argument there will be too much competition for nodes hence people
> will automatically set low or no fees

it's not as easy, there are multiple incentives and discentives working here.
lowering fees will bring more volume but increase cpu/io load. higher volume
also means you need to have more capacity on your channels, which essentially
means lots of funds in a hot wallet - a target for hackers. high volume also
means you might become target for authorities wanting to track payments in LN.
et cetera.

> With LN nodes charging fees on top of it, businesses now will have two fees
> to account for?

technically yes, but the fee for deposit transaction is paid only once per
channel and merchants (usually) won't be involved with it. it's reasonable to
assume that users will mostly fund channels with larger nodes because that
brings better connectivity (you don't want to have a channel with starbucks,
mcdonalds and burger king, you want single channel with a node that invested
in having a lots of channels).

as for the three fees you listed - yes (but not necessarily to miners?). the
assumption is that you will rarely be opening and closing channels, just like
you're rarely opening and closing a new debit card. you'll open with a
reliable node that makes you routable, you'll once in a while deposit more
funds and eventually you will close the channel. in between you can have
bajillion transactions for which you will pay close to zero fees.

~~~
thisisit
Thanks for the other clarifications but this part leaves me confused.

> mostly fund channels with larger nodes because that brings better
> connectivity (you don't want to have a channel with starbucks, mcdonalds and
> burger king, you want single channel with a node that invested in having a
> lots of channels).

Lets take an example. Bob wants to pay Starbucks for his coffee. Alice is
running a node which has a channel open to Starbucks. Now he can open a
channel to Starbucks directly and pay for his coffee. But that is time/fees
consuming so he will pay Alice, who will then pay to Starbucks on his behalf?

If that is true, doesn't that put too much power in Alice's hand? And if there
are some nodes which have heavily invested in cpu/io and coins to their
channels, wont they effectively control a large part of the transaction volume
and hence make the network more decentralized?

> you will rarely be opening and closing channels, just like you're rarely
> opening and closing a new debit card.

I get confused every time this analogy is brought up. Sure, I don't need to
open/close debit cards but those cards are loaded automatically when I get my
salary/income. And the money is not tied, I can move it around as much as I
want.

On the other hand, again, as per my understanding LN requires me to commit an
amount and I have to make do with it until the amount runs out. So, its more
like a prepaid gift card with fixed commitments and a reload feature.

~~~
keymone
> If that is true, doesn't that put too much power in Alice's hand? And if
> there are some nodes which have heavily invested in cpu/io and coins to
> their channels, wont they effectively control a large part of the
> transaction volume and hence make the network more decentralized?

what do you mean by "power"? yes, there will be nodes handling more
transactions than other nodes, but that in no way prevents you from using
other nodes or even investing into opening channels yourself and competing.

> those cards are loaded automatically when I get my salary/income. And the
> money is not tied, I can move it around as much as I want.

not everybody carries a debit card connected to their main bank account. and
those that do usually have daily limits on how much they can spend, so you
can't really move it around as much as you want. similar to that, not every
BTC holder stores their BTC in hot wallet. funding your debit card is similar
to funding your hot wallet which is similar to funding your LN channels.

don't take the analogy too far though. point is that LN allows you to do is
micropayments without flooding the blockchain. there are tradeoffs involved.
that's it.

------
imaginenore
Have they solved the distributed routing problem? I watched many videos on the
LN, and it's never addressed, it's always this hand-wavy explanation that a
route is somehow found, on a network that changes, potentially, thousands of
times per seconds, and has tens of millions of nodes.

~~~
hossbeast
They are explicitly postponing the sophisticated routing solution until a
later iteration, when we have more experience with how the network will become
arranged.

It's not an omission, it was done this way on purpose.

------
all_blue_chucks
BCH, it should be noted, has nothing to do with Bitcoin other than
appropriating the name...

~~~
a_t48
And forking the BTC blockchain.

~~~
hndamien
And the blockchain history.

~~~
dane-pgp
And living up to Satoshi's original vision of a "purely peer-to-peer version
of electronic cash".

~~~
hndamien
Not really. I think Monero has that mantle. Mining was supposed to be
decentralised and the cash was supposed to be fungible.

~~~
dane-pgp
Is Bitcoin Cash mining not decentralised?

[https://cash.coin.dance/blocks/thisweek](https://cash.coin.dance/blocks/thisweek)

Also I'm not sure what definition of fungible you are using that doesn't
include Bitcoin Cash, but here's another spurious definition for you: A
cryptocurrency isn't fungible if most wallets have balances that can't be
spent because of fees.

[https://www.newsbtc.com/2017/11/17/bitpay-ceo-claims-
current...](https://www.newsbtc.com/2017/11/17/bitpay-ceo-claims-current-
average-bitcoin-fee-makes-57-26-wallet-balances-unspendable/)

~~~
shanusmagnus
The usual definition of fungible is that one coin (more precisely, one spend
output) is as good as another (e.g., the same amount coming from a different
UTXO) and they are not distinguishable from each other due to their
provenance.

Put more simply, if the coins can be 'tainted' because they were transferred
to you from a ransomware hoard then they're not fungible because a merchant
could say: "I'm not taking those coins, I don't want to be associated with
ransomware. You have to pay me with other coins."

Neither BTC nor BCH has this kind of fungibility, though Monero does.

~~~
dane-pgp
I could see (some) merchants applying a blacklist to wallets that are known to
be "evil" (as decided by some third party, somehow), but it's hard to imagine
a non-negligible proportion of the bitcoin marketplace ever blacklisting all
coins which have at any time in history been held by a ransomeware writer. The
possibility of denying business to innocent customers is too great, and the
benefits too small.

If some bizarre counter-productive legislation does come in requiring such a
system for bitcoin, then yes, Monero might suddenly become more fungible in
practice.

~~~
hndamien
There is no "more fungible". It is either fungible or it isn't. Provenance can
either be determined, or it can't. Sure there may be a degree of difficulty to
determine provenance for some things, but if you cannot determine provenance
at all, there is no degree.

~~~
dane-pgp
"Fungible: being something (such as money or a commodity) of such a nature
that one part or quantity may be replaced by another equal part or quantity in
paying a debt or settling an account"

That definition doesn't mention provenance, even if I concede that something
can't be "more (easily) determined" or "less (easily) determined".

My point is that if 99% of debts can, in practice, be paid (or transactions
made) without either party paying any attention to the provenance of the
coins, then the coins are fungible.

If there were reports of a significant number of a people being unable to
transact because their bitcoins were blacklisted, then I would believe that
bitcoin is significantly less fungible.

Whether that lack of fungibility is more significant than Monero's differing
level of merchant adoption (for which I also don't have statistics) is then
another question that a user has to weigh up.

~~~
hndamien
It would be very unfortunate to be in that 1%, particularly if the
implications were dire economically or for liberty. 1% is an enormous
percentage. I personally wouldn’t even settle for 0.1%.

