Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightning-network]

Proposed payment system leveraging payment channels which allow re-negotiation of balances that finally get executed on the Bitcoin blockchain.

0
votes
1answer
116 views

c-lightning - CHANNELD_AWAITING_LOCKIN - Freeze

I have open 3 channels with a c-lightning node (with rompert.com and satoshis.place and HP). When I look for the funding_txid field on the blockchain the transactions are all confirms for more than ...
1
vote
1answer
154 views

Can you use the same seed for normal BTC and Lightning wallets?

If I generated 24 words from a Ledger Nano, can I import these to a lightning network wallet e.g. Eclair?
2
votes
0answers
18 views

How to transmit fraudulent commitment transaction on lightning channel?

I'm trying to simulate a fraudulent commitment transaction on lightning. How would you submit an earlier commitment transaction. It doesn't seem like this can be done with a command. Does anyone know ...
5
votes
1answer
459 views

Opening Lightning network channel: who is paying?

When opening a lightning network channel between two parties, which of the following is true: 1) They must both pay a fee to open the channel 2) They might both pay a fee to open the channel 3) ...
5
votes
2answers
883 views

Receiving payment in Lightning Network is a big problem?

There are some requirements to receive Lightning funds. According to here, Nothing can be received immediately after creating a new payment channel, as ‘room’ for incoming funds has to be made by ...
5
votes
1answer
74 views

How to migrate lightning nodes?

I am wondering what steps to take to migrate a lighting node to a different server, keeping the pubkey/identity. The safest option is obviously to close the channels first. How is the identitiy pubkey ...
5
votes
1answer
52 views

Can the lightning network be subject to DoS attacks due to message flooding?

In the current implementations of the Lightning network protocol (c-lightning, eclair and lnd), is there any check that stops spamming/flooding of channel_announcement, mode_announcement or ...
4
votes
2answers
494 views

How is a doublespend prevented in the Lightning Network?

How Lightning Network handles double-spend? What will happen when the other person is not available online to enforce the integrity of the transactions? PFB my understanding of the Lightning Network. ...
4
votes
1answer
95 views

What is the purpose of the announcement_signatures message as specified by the Lightning Network RFC?

Isn't the channel_announcement message enough for channel advertisement? Why is the announcement_signatures message required? Reference BOLT #7
3
votes
1answer
488 views

Do relay nodes need to have money in order to relay transactions?

Imagine Alice wants to send 0.5 btc to Bob. They both open channels with Carol, a relay node that has no money. They create single funded channels each of 1 btc. Now Alice updates her channel to be 0....
5
votes
1answer
401 views

In a Lightning Network who commits to the blockchain the final transaction?

So let's imagine a Lightning Network made up of thousand of nodes. Transactions are routed until the moment comes where all the channels need to be closed and commited I presume. Which node actually ...
0
votes
1answer
36 views

What happens when invoices get paid more than once?

Until today I thought, that lightning invoices can only be paid once. Where do the funds go when an invoice is paid more than once? Will every payment reach the destination node or can reusage be ...
0
votes
1answer
125 views

Lightning Network transaction, how many transactions will be created

A simple Lightning Network transaction, how many transactions will be created on the main bitcoin chain? I guess is three transactions. Example: Alice create 2-to-2 multi-sig address AC Alice put ...
1
vote
1answer
33 views

What are the consequences if I spoof an IP address in the node_announcment message?

According to BOLT 07 the node accountment message looks like this: type: 257 (node_announcement) data: [64:signature] [2:flen] [flen:features] [4:timestamp] [33:node_id] [3:...
1
vote
2answers
34 views

how to transmit commitment transaction (unilateral close) from lightning network channel

How would you transmit a commitment transaction from a lightning network channel instead of closing the channel? I am working on implementing a watchtower and I first need to simulate a double spend ...
0
votes
1answer
480 views

How does the Lightning Network stop flooding nodes (DDoS) with micro transactions? Is this even an issue?

I'm creating a "Megathread" regarding the Lightning Network and have been fielding questions. To help obtain the correct answers with sources, I'm reaching out to the Bitcoin StackExchange. Thank you ...
5
votes
2answers
38 views

Why SHOULD the funding tx consume BIP 141 inputs?

In BOLT 02 we read that the funding TX should only consume segwit inputs. The sender: when creating the funding transaction: SHOULD use only BIP141 (Segregated Witness) inputs. What is the reason ...
2
votes
1answer
519 views

Bitcoin Full Node + Lightning running on single-board-computer, possible?

I know similar questions (regarding a Bitcoin Full Node) were already asked here, but they date all back to 2014 and I think especially the space needed by the blockchain changed a lot since then. I ...
2
votes
3answers
55 views

Lightning: Why would Bitcoin Network Accept a Breach Remedy?

The Lightning Network Whitepaper discusses a situation in which one party of a payment channel broadcasts an outdated commitment transaction. The other party through a breach remedy transaction will ...
3
votes
2answers
209 views

What is Bitcoin's “genesis hash”?

From Lightning Network documentation: Used in several of the BOLT documents to denote the genesis hash of a target blockchain. This allows nodes to create and reference channels on several ...
2
votes
3answers
64 views

Lightning network channel capacities and gambling site jackpot payouts

Let's say I want to make some kind of gambling app: The user creates a channel with the business. (local_amt = 1000, remote_amt = 0, capacity = 1000) User bets a few times and wins a jackpot of 5000 ...
2
votes
1answer
52 views

In which cases could I find funds locked in a failed route?

I received an invoice from node Z and my node (A) suggests me 4 possible routes. If the first two routes fail, are there cases in which funds can get stuck in one of these routes until the HTLC ...
1
vote
1answer
28 views

Purpose of the LN transaction description

According to Bolt 11, an invoice may contain a short description. However, what I fail to understand is who is sending this information to whom. Since the invoice is usually generated by the payee, I'...
6
votes
1answer
593 views

How do “trustless third-party watchers” work in Lightning Network?

The main point with LN is the need to monitor the blockchain. The reason for this is to detect if the counterparty misbehaves by publishing an old channel state to the blockchain. For a node running ...
6
votes
3answers
378 views

Why was transaction malleability fix required for Lightning network?

Transaction malleability is that TXID can be changed modifying the signature slightly without the private key. To implement Lightning Network, it was required to fix the malleability. However, I ...
5
votes
1answer
148 views

Does segregated witness allow to securely create LN channel opening transactions?

In Rusty Russell's paper about the simplified version of the Lightning Network, some problems about the practical implementation of the opening channel method from the original LN paper are mentioned: ...
5
votes
1answer
496 views

Qualities of “Pay to Nested Witness Key Hash”

The lightning dev tutorial mentions the np2wkh or Pay to Nested Witness Key Hash address type, and I would like to find out more about it, so far without success. Can anybody explain how they are ...
6
votes
2answers
2k views

Is it possible to add funds to an already-open lightning network channel?

I would think that user A on a channel should be able to add bitcoins to a channel using the following steps: Create a transaction sending more money into the main multi-sig account Create a refund ...
6
votes
2answers
237 views

Does anyone get custodial control of your funds when using Lightning Network?

When I open a payment channel on Lightning Network, do I need to subject my funds to custodial control of another party? Is there a counterparty risk in Lightning Network?
7
votes
2answers
2k views

When running a Lightning Network hub, who pays the fees when a transaction has to be broadcast to the blockchain?

I've been educating myself on how the Lightning Network protocol works, and I have some questions. Let's say that a user sends a small payment to someone and it makes multiple hops through the ...
9
votes
1answer
495 views

Would it be possible to send money through the Lightning Network to an offline address?

My understanding is that the current Lightning Network spec requires an address receiving money to sign things with its private key - which requires the owner of that key to be online. Are there any ...
9
votes
2answers
2k views

Do parties in a Lightning Network channel need to be online?

I'm thinking of a scenario where users on mobile devices using a LN client will rarely be online. Let's say Alice opens a channel with Bob and they make 10 LN transactions. After Alice has received ...
0
votes
2answers
23 views

Hosting lightning node and non-custodial

In Bitcoin we can have a light wallet where we are connected to a full node, by doing this, we have to trust that the full node is feeding correct information, but at least we can store our keys in ...
6
votes
1answer
101 views

Why do lightning invoices expire?

I'm considering the development of a lightning app, and I'm trying to make it non custodial. I was thinking on pre-generating invoices for all users every x time to make things simpler. To do that I'...
1
vote
2answers
49 views

Why was noise XK fundamental pattern chosen in the transport layer (BOLT 08) of the lightning network

I am currently reviewing the transport layer of the Lightning network protocol. It builds on top of the noise protocol framework handshake patterns. What I don't get: Why was the fundamental pattern ...
1
vote
1answer
38 views

Listen for transaction on specific address

How can you listen for a transaction on a specific address? I'm working on building a lightning network watchtower and the first thing I need to do is detect when someone closes a channel.
1
vote
1answer
14 views

What's the maximum size of the memo in a LN payment request?

What is the maximum size of text held in the memo portion of a lightning network payment request?
0
votes
1answer
245 views

Funding channels In Lightning Network

I was attempting to learn more about LN and came across the post below. https://medium.com/tokensoft/tokensoft-lightning-node-how-to-connect-for-free-62b9aaec18b8 I also made a picture of my ...
1
vote
1answer
20 views

How can “Lightning Loop Out” help me to receive more payments?

In his blogpost, Alex Bosworth describes that “emptying of the channel allows them to receive more payment” (https://blog.lightning.engineering/posts/2019/03/20/loop.html). But how can I allow more ...
0
votes
1answer
16 views

Does the `HTLC fail` routed back to sender using same path if intermediate node does not have enough capacity?

In the Lightning Network, the intermediate hop between the sender and receiver checks for possible errors(like if it has enough balance). And if there is, it sends an HTLCFail message back to the ...
0
votes
2answers
41 views

History of transactions in Lighting Network

I'm just a beginner in lighting network. Have some questions about transactions in LN when im doing the research Transactions in LN are off-chain, so transactions couldn't be stored in main-chain, so ...
0
votes
1answer
13 views

What is a stub from the lightning grpc documentation?

For example, very often in the lightning documentation for their grpc api, you will see the following boilerplate python code: >>> import codecs, grpc, os >>> import rpc_pb2 as ln, ...
0
votes
1answer
28 views

Send coins from bitcoind full node to lnd without fee?

I'm trying to fund my LND node, for that I put some dust on my BTC wallet address and now I want to send to my LND wallet address but when I try to send with fees "paytxfee": 0.00000000 returns an ...
1
vote
1answer
30 views

How do hodl invoices work?

On March 15th, 2019 hodl invoices where added to lnd via this pull request. Hodl invoices allow a recipient to accept or deny a transaction at their discretion, a very useful feature. However, how ...
2
votes
2answers
300 views

Lightning close-channel transaction example?

From this article, I can understand that a punishment-based bidirectional payment channel (the type used by Lightning) would contain roughly this bitcoin script as one of the outputs: OP_IF “+7 days” ...
0
votes
2answers
38 views

where can i do a testnet Lightning Network Reverse Submarine Swap?

i have Testnet LN Node, i have created a wallet, i have send on-chain funds to that wallet i have connected to several peers i have created several channels, all of these are outgoing one side funded ...
0
votes
0answers
21 views

Cannot get feereport due to error “[lncli] rpc error: code = Unknown desc = no policy for outgoing channel”

Lots of my lnd command got stucked with error message like: [lncli] rpc error: code = Unknown desc = no policy for outgoing channel 591836322924134401 I have checked the channel id appeared in 1ml ...
0
votes
1answer
36 views

Why is the privacy for using watch tower services increased with unpredictable commitment tx ids?

In the open channel message in BOLT 02 the following statement is written about the various basepoints. The various _basepoint fields are used to derive unique keys as described in BOLT #3 for ...
2
votes
1answer
105 views

C-lightning lightningd crashing

To run a lightning node I followed the instructions here: https://medium.com/@dougvk/run-your-own-mainnet-lightning-node-2d2eab628a8b except that I downloaded and installed bitcoind and lightningd ...
4
votes
3answers
780 views

“HTLCs don't work for micropayments”?

I read this tweet by Tadge Dryja recently. What exactly did he mean? Is this an issue? If so, is this issue fixable?