Bitcoin Forum
April 30, 2024, 09:47:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Lightning Network -QA  (Read 484 times)
jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 06, 2018, 10:32:30 AM
Merited by amishmanish (4), ABCbits (2)
 #1

I'm running LND in mainnet, and I have some questions about it.
All my future questions I'll ask here, and make some QA in this topic.


so, first. What is push_amt in LND?
According to RFC - https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md- here is explanation:
Quote
The sender can unconditionally give initial funds to the receiver using a non-zero push_msat — this is one case where the normal reserve mechanism doesn't apply. However, like any other on-chain transaction, this payment is not certain until the funding transaction has been confirmed sufficiently (with a danger of double-spend until this occurs) and may require a separate method to prove payment via on-chain confirmation.


Why I wanna use it in with another nodes? Whats use cases?


And some global question, how to build biggest LN Node? Just fund it with some bitcoins and open channel to every big node? Or, I can just run Node with Autopilot and wait?
Already waiting more than week,  and here is statistics: Active channels 6
How to open 100 channels? 1000?

1714513651
Hero Member
*
Offline Offline

Posts: 1714513651

View Profile Personal Message (Offline)

Ignore
1714513651
Reply with quote  #2

1714513651
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714513651
Hero Member
*
Offline Offline

Posts: 1714513651

View Profile Personal Message (Offline)

Ignore
1714513651
Reply with quote  #2

1714513651
Report to moderator
1714513651
Hero Member
*
Offline Offline

Posts: 1714513651

View Profile Personal Message (Offline)

Ignore
1714513651
Reply with quote  #2

1714513651
Report to moderator
1714513651
Hero Member
*
Offline Offline

Posts: 1714513651

View Profile Personal Message (Offline)

Ignore
1714513651
Reply with quote  #2

1714513651
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6565


Just writing some code


View Profile WWW
April 06, 2018, 03:06:57 PM
Merited by ABCbits (2), suchmoon (1), Xynerise (1)
 #2

so, first. What is push_amt in LND?
Why I wanna use it in with another nodes? Whats use cases?
It lets you immediately pay the other party when you create the channel instead of creating the channel and then updating the commitment immediately afterwards to pay the other person.

And some global question, how to build biggest LN Node? Just fund it with some bitcoins and open channel to every big node?
You would have to open as many channels as possible with every other node on the network. Autopilot won't do this for you.

Or, I can just run Node with Autopilot and wait?
Already waiting more than week,  and here is statistics: Active channels 6
Autopilot does not just open as many channels as possible. It isn't designed for that. Autopilot will not magically make you the biggest node on the network, nor will it open tens or even hundreds of channels for you.

How to open 100 channels? 1000?
Use the channel opening commands and open then manually.

jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 12, 2018, 12:08:53 PM
 #3


Autopilot does not just open as many channels as possible. It isn't designed for that. Autopilot will not magically make you the biggest node on the network, nor will it open tens or even hundreds of channels for you.


understand, thanks. But how can I open bi-directional channel with any node?

Quote
To illustrate how this works, consider that Alice and Bob have each contributed 1BTC to a shared channel. The entire channel now has a total of 2BTC in it, but it has a cap in each direction.

how can I open such channel with some (not mine) node?
amishmanish
Legendary
*
Offline Offline

Activity: 1904
Merit: 1158


View Profile
April 12, 2018, 02:59:44 PM
Merited by digaran (1)
 #4

Hello jrian. Good thread. I am waiting for some hardware to arrive to start working on an LN node myself. Saw your post history and it seems like you will be a good source for information and help, in case i need any.

So I am doing you a solid for the amount of sMerit I had to spare. Remember this when i ask for your help..LOL.. Wink Thanks in advance.

Also, would you care to explain the reason behind contemplating about becoming the biggest LN node. Wouldn't that be a lot of spare BTC plus you'd need to have an equal amount of parties interested to open a channel with you too (with some balance committed from the other side).

Is that even possible until you are, say, an exchange or a major seller?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6565


Just writing some code


View Profile WWW
April 12, 2018, 03:19:27 PM
 #5

understand, thanks. But how can I open bi-directional channel with any node?

how can I open such channel with some (not mine) node?
Using whatever channel opening functionality the LN software you are using provides. All channels are bidirectional; it doesn't matter who creates them, both parties in the channel can send money to and receive money from the other party in the channel.

jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 13, 2018, 10:45:01 AM
 #6

understand, thanks. But how can I open bi-directional channel with any node?

how can I open such channel with some (not mine) node?
Using whatever channel opening functionality the LN software you are using provides. All channels are bidirectional; it doesn't matter who creates them, both parties in the channel can send money to and receive money from the other party in the channel.

maybe I  ask wrong question.

according to this tutorial https://dev.lightning.community/tutorial/01-lncli/
If I open channel from Alice to Bob - Alice can pay to Bob, right?
But how can I force Bob to put some satoshi in this channel? So Bob can pay back to Alice?

for example:
Code:
bitcointest@zabbix:/root$ lncli-alice openchannel --node_key=XXXXX --local_amt=80000
{
        "funding_txid": "XXXXXX"
}


bitcointest@zabbix:/root$ lncli-alice listchannels
{
    "channels": [
        {
            "active": true,
            "remote_pubkey": "XXXXXXX",
            "channel_point": "XXXXXXXXX:1",
            "chan_id": "XX",
            "capacity": "80000",
            "local_balance": "77199",
            "remote_balance": "0",
            "commit_fee": "191",
            "commit_weight": "600",
            "fee_per_kw": "250",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "0",
            "num_updates": "0",
            "pending_htlcs": [
            ],
            "csv_delay": 144,
            "private": false
        }
    ]
}





now we have channel from Alice to Bob. But I want Bob to pay Alice invoice.

Code:
bitcointest@zabbix:/root$ lncli-alice addinvoice 5000
{
        "r_hash": "XXXXX5cfd2a4949adc680b01ad0f002553c",
        "pay_req": "lnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXf5mvr"
}

bitcointest@zabbix:/root$ lncli-bob payinvoice lnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXf5mvr
{
        "payment_error": "unable to route payment to destination: TemporaryChannelFailure: insufficient capacity in available outgoing links: need 5000000 mSAT, max available is 0 mSAT",
        "payment_preimage": "",
        "payment_route": null
}


so, question is - how to force Bob to put some money into channel?
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 13, 2018, 11:14:29 AM
Last edit: April 13, 2018, 03:49:05 PM by Xynerise
 #7


maybe I  ask wrong question.

according to this tutorial https://dev.lightning.community/tutorial/01-lncli/
If I open channel from Alice to Bob - Alice can pay to Bob, right?
But how can I force Bob to put some satoshi in this channel? So Bob can pay back to Alice?


so, question is - how to force Bob to put some money into channel?
If I understood you correctly, Alice and Bob have a channel whose balance is essentially funded by Alice alone, and you want Bob to be able to send funds to Alice over the channel?
In that case it's impossible unless Bob has funds of his in the channel.
Eg
Alice and Bob open a channel.
Alice contributes 1 BTC, while Bob doesn't contribute anything (let's say Alice is Bob's employer),
Alice's balance in the channel is 1 BTC, while Bob's is 0.
Bob can't send any funds to Alice because he has no balance in the channel.
However, if after some transactions, Bob has more funds in the transaction eg Alice now has 0.6BTC while Bob owns 0.4 BTC, then Bob can send funds to Alice from his 0.4BTC balance.
If he has no balance in the channel initially then he can't send to someone else.
Also, the channel balance cannot be increased by just sending more bitcoins to the channel as the Lightning Network channels work on UTXOs, not balances or addresses, so if Bob sends 0.5 BTC to the multisig address that holds the channel funds, the channel balance will not be increased at all.

In the example in the tutorial, Bob had no Bitcoins (only Alice and Charlie got) so he can't send any in the channel.
After Alice sent him 10000 sats, he can send some of that back to Alice.
Alice had to create an invoice first, and send it to Bob, then Bob can pay the invoice thereby sending money to Alice.

Either that or you send some of the mining rewards to Bob's address BEFORE opening the channel so that he has enough money to send to Alice.

Edit: Now I understand what you're trying to achieve.
Right now the channel can only be funded by one person and is biased towards the funder (i.e if Alice opens the channel with 0.1 BTC, Alice has 0.1 BTC in the channel balance while Bob has 0.) so they're unilateral at startup even though they're technically bilateral meaning that Bob can send Alice money back once he has received money from Alice.
There's currently a work in progress for implementing "dual funded" channels where Alice and Bob both construct the funding transaction so they both start out with balances equal to the amount they funded.

Till that is implemented you can use
Code:
push_msat
nematoadz
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
April 13, 2018, 03:19:29 PM
 #8

be #craeful with
Code:
push_amt
, it allows instant payment during channel creation, you are _paying_ them when you do this, whether intended or not, so basically don't do it unless there is some agreement with the other party. What you want to use mainly is
Code:
local_amt
, this funds your side of the channel, available to you whenever you want to close out (generally don't close channels unless you really need onchchain funds)

For now, channel creation is only "1 sided" where people can fund their side of a new channel with others, but later it will be possible for 2 nodes to simultaneously fund their own side of the same channel _during creation_.

One of the most exciting things I'm looking forward to is AMP (atomic multi-path) payments, which allow a single atomic payment to be split up among multiple routes, and summed back on the destination, this is a major feature that will take advantage of smaller channels and prevent the need for massive channels (centralization pressure). Lots of cool stuff coming for LN.
jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 13, 2018, 06:25:06 PM
 #9

Hello jrian. Good thread. I am waiting for some hardware to arrive to start working on an LN node myself. Saw your post history and it seems like you will be a good source for information and help, in case i need any.

So I am doing you a solid for the amount of sMerit I had to spare. Remember this when i ask for your help..LOL.. Wink Thanks in advance.

Also, would you care to explain the reason behind contemplating about becoming the biggest LN node. Wouldn't that be a lot of spare BTC plus you'd need to have an equal amount of parties interested to open a channel with you too (with some balance committed from the other side).

Is that even possible until you are, say, an exchange or a major seller?

Hello! I'll be happy to help you!

I'm still thinking about "supernode", I think it's possible with some services, like LN wallet, or payment processing. Reason? LN it's like POS crypto-currency. You can earn some interest in the future with big node Smiley
jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 13, 2018, 06:35:21 PM
 #10

There's currently a work in progress for implementing "dual funded" channels where Alice and Bob both construct the funding transaction so they both start out with balances equal to the amount they funded.

Till that is implemented you can use
Code:
push_msat

dual funded channels  - exactly what i'm asking about! thanks! i'll follow this pull.

about push_msat, yes, better not to use it, if you dont want just give you money as a gift to some node.
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 13, 2018, 08:30:21 PM
Last edit: April 13, 2018, 08:42:32 PM by Xynerise
 #11


about push_msat, yes, better not to use it, if you dont want just give you money as a gift to some node.
You can use that in lieu of dual funded channels for now.
You want a scenario whereby Alice and Bob both contribute to craft a channel and Alice contributes 0.6BTC while Bob contributes 0.4 BTC, so when the channel is created they each have their respective balances.
That isn't currently possible, because only Alice (or Bob) can open a channel and they'll get the full amount of the channel on their side because they're the funder.
According to LN BOLT 2 the funder of the channel can, in the open_channel message send a push_msat value to the counterparty (as long a stage amount is less than or equal to funding_satoshis * 1000.)
So Alice here can set the push_msat value to be the equivalent of 0.4BTC, which is sent to Bob.
So when the channel gets created Alice will have her 0.6BTC, while Bob will have his 0.4BTC, and the channel will be bidirectional by default without the need of an subsequent commitment transaction.
jrian (OP)
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
April 16, 2018, 04:45:50 PM
 #12

next questions:

1. is there any "lightweight"  Bitcoin client I can use for Lightning?

I know about Neutrino https://github.com/lightninglabs/neutrino, but they dont recommend use their client in mainnet
Quote
Neutrino is an experimental Bitcoin light client written in Go and designed with mobile Lightning Network clients in mind. It uses a new proposal for compact block filters to minimize bandwidth and storage use on the client side, while attempting to preserve privacy and minimize processor load on full nodes serving light clients.

There are multiple known major issues with the client, so it is not recommended to use it with real money at this point.

2. How can I move my Lightning Node to another server/ip address? How can I save all channels and peers after move?
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 16, 2018, 06:03:25 PM
Last edit: April 16, 2018, 06:31:09 PM by Xynerise
 #13

next questions:

1. is there any "lightweight"  Bitcoin client I can use for Lightning?
Not right now, no, but there are plans to make it work with a pruned node
Quote
I know about Neutrino https://github.com/lightninglabs/neutrino, but they dont recommend use their client in mainnet]
Yeah, Neutrino isn't mature enough for mainnet yet.

Quote
2. How can I move my Lightning Node to another server/ip address? How can I save all channels and peers after move?
Stop LND with
Code:
lncli stop
Then backup .lnd folder
Restoring the folder should preserve your channels and peers.

You don't need to worry about changes in IP address; your node will gossip the change to your peer and other nodes in the network.
buzzie
Copper Member
Newbie
*
Offline Offline

Activity: 157
Merit: 0

Forum Thread Opening Services


View Profile
April 17, 2018, 11:21:19 AM
 #14

will Lightning end Mining?
HeRetiK
Legendary
*
Online Online

Activity: 2912
Merit: 2091


Cashback 15%


View Profile
April 17, 2018, 01:19:41 PM
 #15

will Lightning end Mining?

No.

While LN transactions are off-chain, it still requires on-chain settlement (ie. channel opening and closing transactions) thus the Bitcoin blockchain beneath it. The aim is not to replace miners and the Bitcoin blockchain, but rather to move a large part of transactions off-chain while using the Bitcoin blockchain as a decentralized, permissionless, trustless arbiter for settling the final balances.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Wind_FURY
Legendary
*
Offline Offline

Activity: 2898
Merit: 1823



View Profile
April 20, 2018, 06:23:28 AM
 #16

I was going to open a new thread for this but I believe it would be better if I share it in this thread.

https://medium.com/@thecryptoconomy/dont-count-your-fud-before-the-lightning-strikes-15-claims-against-lightning-answered-9671d4a663a9

Quote
Don’t Count Your FUD Before the Lightning Strikes: 15 Claims Against Lightning, Answered

...


It's long and I have not read all of it yet to be honest. But it is good to have it bookmarked and ready to use as a reference against the LN doubters. Cool

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!