0

In trying to understand the Lightning Network further. To do so, I was looking at the link below (it shows how it is being used with Docker): https://hub.docker.com/r/cdecker/lightning-ci/

Based on the information in the link, I had questions.

  • STEP 1: # Returns an address cli/lightning-cli newaddr
    ^^^^ Ques: Is this a new address created on LIGHTNING NETWORK? Is it on the BITCOIN NETWORK? Is it in "No-Mans-Land/Purgatory"? Where is the Private-Key? Can many addresses be created?
  • STEP 2: # Returns a transaction id bitcoin-cli -testnet sendtoaddress
    ^^^^ Ques: So, if you forget / lose this address (after sending money to it), you are out-of-luck? Also, "bitcoin-cli" commands are executed under the "btcd" BITCOIN dameon?
  • STEP 3: # Retrieves the raw transaction bitcoin-cli -testnet getrawtransaction
  • STEP 4: # Notifies lightningd that there are now funds available: cli/lightning-cli addfunds ^^^^ Ques: It is at this point the funds are actually added to the LIGHTNING NETWORK. I take it that the funds are associated with the created in STEP 1 above?

TIA

0

The documentation you are following is using the bitcoind wallet, so the address generated in Step1 will be derived from your bitcoind master private key.

Checking the current c-lightning documentation, this seems outdated, step 3 and 4 are no longer needed.

  • Q1: this returns an address from the bitcoind wallet
  • Q2: you send a bitcoin transaction from any wallet you like, here the local bitcoind (Bitcoin Core) node is used.
  • Q4: here, you notify lightningd to use the funds when opening channels. But no channel is opened and thus no funds are committed to the Lightning Network yet. (as mentioned, seems obsolete now with current release)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.