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
5

Plugins can be written in any language as long as a client library for that language exists. The command line API and the Plugins communicate with lightningd over a unix domain socket using JSON RPC 2.0. As far as I know no Java / Scala lib exists. I have started creating one at this pull request: https://github.com/ElementsProject/lightning/pull/2223 ...


5

First of all welcome to the lightning network and keep asking excellent questions! the important information is within the result of the listfunds command. For example here: "channel_sat": 500000, "channel_total_sat": 500000, The channel_total_sat says that the capacity of your channel is 500k satoshi. Whereas the channel_sat says that you own 500k ...


5

With the current specification it is not possible to make a spontaneous payment to somebody on the network. However, this will likely change very soon, as it is one of the features on the roadmap and will be discussed in the specification group in November. There are tricks on how to do a payment by delivering a large fee at the destination and continue ...


4

The first three scenarios are indeed possible, the last one is identical to the second. This is called a collaborative close. It has the advantage of using a lower on-chain fee since the transactions are not time critical and the users get their coins back immediately (no dispute time). If the other node is unresponsive (offline or doesn't sign a ...


4

Here's a site with all the nodes on mainnet https://1ml.com


3

Natively c-lightning does not support paying invoices to yourself. But I have provided a trick described in this video: https://www.youtube.com/watch?v=Dwl-0cY6KkU&t=1s: The trick is to create an invoice and then use getroute to find a route to some node and then go back (possible over another route with another getroute call). once you have such a ...


3

It is possible to run Lightning (both LND and c-lightning) with bitcoind pruned mode. There is a lot of conflicting information online, because it became possible only recently in Bitcoin Core 0.16.0. The change that enabled txid lookups in pruned mode is BIP159. There are already packages turning the pruned mode on when disk space is limited: Lightning ...


3

OK, the three figures you care about here are: "msatoshi_total": 1600000, "msatoshi_to_us": 1599884, "their_channel_reserve_satoshis": 546, They have 1600000 - 1599884 millisatoshis, ie 116. But they need to keep at least 546 satoshis reserve, ie. 546,000. Until they do, we won't let them spend any. Hence the warning when you created an invoice: there's ...


3

When I set up a lightning channel with a node, have I need to put some bitcoins in it? Generally, yes. The person who initiates the channel creation process (i.e. the person that says "I want to open a channel with you") is the one who funds the channel. Then, if I wanted to buy something using lightning network (for example, a sticker from Blockstream), ...


3

One lightweight alternative that I use quite often when setting up a Lightning node is spruned. The following will get you up and running: Install some dependencies: apt-get install -y git python3 \ libleveldb-dev \ python3-dev \ git \ gcc \ g+...


3

Whether you run a full node or a lightweight node is a first layer question. It is a question about how you keep track about what happens on the blockchain. And even though this is important for you, the Lightning nodes that are communicating with your Lightning node do actually not care about it and in fact they don't even (have to) know about your Bitcoin ...


3

In order for list nodes to provide some output you need to first connect to at least one peer on the network. Because the peer is giving you all the information from the gossip protocol about announced nodes and announced channels. So do lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735 to peer with ...


2

The specification of the short_channel_id describes the format as follows: The short_channel_id is the unique description of the funding transaction. It is constructed as follows: the most significant 3 bytes: indicating the block height the next 3 bytes: indicating the transaction index within the block the least significant 2 bytes: ...


2

https://github.com/lightningnetwork/lnd/blob/8379bbaa9b259544c2c8591782a78d7384680b2a/lnwire/short_channel_id.go#L25-L43 // NewShortChanIDFromInt returns a new ShortChannelID which is the decoded // version of the compact channel ID encoded within the uint64. The format of // the compact channel ID is as follows: 3 bytes for the block height, 3 bytes // for ...


2

Use the RPC-Interface listfunds lightning-cli listfunds which lists all payment channels and UTXO. If you wish to have a more nicely display you can use this small tool: https://github.com/renepickhardt/lightning-helpers git clone https://github.com/renepickhardt/lightning-helpers.git cd lightning-helpers sudo make install listfunds it aggregates ...


2

After a lot of research I found the solution to my problem. I didn't know this, but in nodejs there's a huge difference if your server runs on 127.0.0.1 and on 0.0.0.0. It isn't said in the lightning-charge docs, but except the --port attribute you also have --host which you can set. Starting lightning-charge with this line charged --api-token ...


2

when starting lightningd, you want to add the option: --addr=[insert your IP address here] so maybe when starting your lightning node, at your command line you would enter: lightningd --alias DavideRivola --network bitcoin --log-level debug --port 9735 -ipaddr 192.168.1.1 Where 192.168.1.1 you would of course, put your own IP address. Also, since you ...


2

I am developer of https://lightblock.me It's a tool which lets you search for nodes which you wish to connect to, take the URI of the node you want to connect and use it with "connect" command.


2

The protocol is purposefully built in such a way that DoS attacks are mitigated and reduced in impact. Each channel_announcement contains a reference to the funding transaction, and each node verifies that this funding transaction matches the information in the announcement. This makes the creation of a channel_announcement non-free, and binds some resources ...


2

Short answer: yes. However that depends on the question if liquid supports segwit and creation of a lightning network. I have not looked at the details of liquid but I believe it does. The lightning network protocol itself is pretty agnostic to the underlaying blockchain. If you look at the channel announcement messages defined in BOLT7 you will see that ...


2

First of all yes these are your earnings from routing. You can check lightning-cli listforwards to get a list (in json) to see through wich channel routings have been attempted and settled or failed. In particular you can analyze the routing fees per channel from the output of that command. If you are interested in channel balances you can use lightning-cli ...


2

I found it. The port 9735 is not open to the public. Go to google cloud console Home -> VPC network -> Firewall rules + Create firewall rule: Name Type Targets Filters Protocols / ports Action Priority Network lightning Ingress Apply to all IP ranges: 0.0.0.0/0 tcp:9735 Allow 1000 default


2

LND is experimenting with the new Neutrino BIP157-style SPV at the moment. Check out their repo for news. Both Bitcoin Lightning Wallet and Eclair on Android use a trusted server for syncing with the network. BIP-37-style SPV is not a good choice for anyone (because of privacy issues), but particularly not for Lightning wallets, because it is very easy ...


2

I thought we had that question before but the only one similar I could find was this one 1ML shows larger number of nodes comparing to other lightning network explorers which was not quite the same. So to answer your question: listchannels depicts information your node knows from the gossip protocol. If your node is new this could take some time which is ...


2

c-lightning uses this code to obtain the node's private key from the hsm_secret. I've came up with a way to do the same using Python and posted my highly-commented tutorial-like code in this gist. Basically you have to call an hkdf function with the hsm_secret contents, a salt which will usually be zero, \x00, and the label "nodeid".


2

Port 9735 is the lightning port. What BTCPay wants is the API. C-Lightning does not support TCP natively, but one can use socat as I did in the docker entrypoint to bridge unix to TCP.


1

In your c-lightning node you have configured your maximum fee rate which is used by the pay command to do the payment. The BOLT04 describes how overpaying up to twice the amount to obfuscate payments in order to have better privacy is part of the protocol: if the amount paid is more than twice the amount expected: SHOULD fail the HTLC. SHOULD ...


1

c-lightning internally calls bitcoin-cli and will pass a couple of commandline arguments to it. These arguments are all prefixed with --bitcoin-* and will match the ones that bitcoin-cli accepts. So for your use-case you first need to make sure that bitcoin-cli is available on the machine that you will be running the c-lightning instances on. If it isn't ...


1

As far as I know there is no way of knowing this on a protocol level... What you could do is to set up your own nodes (each node with a certain implementation) or some people say publicly which nodes they run. For example my node is c Lightning, ACINQ is using eclair and I believe rompert is running on lnd. Also on 1ml.com some owners register their nodes ...


1

In theory, the way that Lightning works allows for the use of a Hardware Security module to perform a lot of the logic which would allow for secret material to be stored externally on a secure device similar to a Trezor. However none exists at the time of writing, and persistent access to many of the files is likely required in the current software. The ...


Only top voted, non community-wiki answers of a minimum length are eligible