Bitcoin Forum
May 07, 2024, 11:54:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Discussion / Does anyone have the code to do a lightning channel probing? on: September 22, 2022, 04:35:35 PM
Hi guys, I am working on a project that requires me to figure out the lightning channel balance. I am wondering if anyone here has the code of a prober?
2  Bitcoin / Development & Technical Discussion / Re: Is there a way to figure out a HTLC's time and date? on: July 21, 2022, 02:53:24 PM
Thank you!
3  Bitcoin / Development & Technical Discussion / Re: Is there a way to figure out a HTLC's time and date? on: July 21, 2022, 07:27:13 AM
They are entirely done off-chain using multi-sig and scripting which allows for decentralized contracts. HTLC allows the two parties involved in the transaction  to update the balances in the channel instead of broadcasting on the blockchain making it impossible to figure out the time and date any HTLC commitment transaction was done since it wasn't hashed on the blockchain which means each commitment has two versions of the same output and each can only broadcast their own version of the transaction.

With the use of this nLockTime this transaction can remain open indefinitely and the final output locked via sequential number


If I ask the two parties to provide these HTLCs to me, is there a way to figure out exact time/date?
4  Bitcoin / Development & Technical Discussion / Is there a way to figure out a HTLC's time and date? on: July 21, 2022, 02:27:49 AM
Hi guys,

does anyone know the best way to figure out the time and date of a specific HTLC commitment transaction?
5  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 18, 2022, 02:44:21 AM
Do you think this is the best way to proof ownership of funds in a lightning channel?
No. Suppose we have 3 commitment transactions. (Amounts represent sending capacities)

Code:
Commitment #0: (Channel opening transaction, revoked)
Alice: 0.10000000 BTC, Bob: 0.00000000 BTC
--------------------------------------------------------------------
Commitment #1: (Revoked)
Alice: 0.50000000 BTC, Bob: 0.50000000 BTC
--------------------------------------------------------------------
Commitment #2: (Revoked)
Alice: 0.20000000 BTC, Bob: 0.80000000 BTC
--------------------------------------------------------------------
Commitment #3: (Not revoked)
Alice: 0.10000000 BTC, Bob: 0.90000000 BTC
--------------------------------------------------------------------

Alice chooses to give you the transaction of the revoked commitment #2, without the revocation keys, hereby telling you it's the latest state of their channel. Can you prove otherwise? As I said,
Quote
You have to take their word that what they say is true.

@BlackHatCoiner

What if they gave us commitment #2 (revoked), which we can prove them and channel peer signed. And then they gave us commitment #3 (not revoked), which we can prove the channel peer signed. And commit 3 can be proved be to the next commitment after commit 2. We could prove commit 3 and “roll back” to commit 2 to prove balances at that time?
6  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 06:37:28 PM
Do you think this is the best way to proof ownership of funds in a lightning channel?
No. Suppose we have 3 commitment transactions. (Amounts represent sending capacities)

Code:
Commitment #0: (Channel opening transaction, revoked)
Alice: 0.10000000 BTC, Bob: 0.00000000 BTC
--------------------------------------------------------------------
Commitment #1: (Revoked)
Alice: 0.50000000 BTC, Bob: 0.50000000 BTC
--------------------------------------------------------------------
Commitment #2: (Revoked)
Alice: 0.20000000 BTC, Bob: 0.80000000 BTC
--------------------------------------------------------------------
Commitment #3: (Not revoked)
Alice: 0.10000000 BTC, Bob: 0.90000000 BTC
--------------------------------------------------------------------

Alice chooses to give you the transaction of the revoked commitment #2, without the revocation keys, hereby telling you it's the latest state of their channel. Can you prove otherwise? As I said,
Quote
You have to take their word that what they say is true.


That's right. If I just simply ask Alice to provide latest state of their channel, I cannot prove the true state. How about this, I would ask Alice to make a specific commitment transaction, for example I would require Alice to transfer 0.0012345 btc between 22:00 and 22:05 on 07/15/2022.
And provide this commitment transaction to me.

7  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 06:07:19 PM
@Rath
Quote
No, that would be too dangerous.
You could broadcast someone's revoked commitment transaction which would allow their channel partner to publish a penalty transaction and claim all of the funds locked up in the channel.

If all the "commitment transactions" information provided by the lightning node owner was open to public. Yes, someone who is malicious would be able to do the replay attack and the channel partner would publish a penalty transaction.

What if the "commitment transactions" information was sent to me only (assuming I am honest and trustworthy). Do you think this is the best way to proof ownership of funds in a lightning channel?
8  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 03:55:06 PM
I am thinking I can request the owner of the lightning node to first sign a message via node's secret key to proof ownership of the node. Then, I can request the node owner to provide all the "commitment transactions" so far and since these transactions use HTLC, these transactions are pretty much "linked" via secrets and hashes.

Hence, when we need to proof ownership/balances in a channel at a specific time, I can request the node owner to create a new "commitment transaction" and use the previous "commitment transactions" to proof it is not just a random or a fake "commitment transaction".

Do you guys think this is feasible?



-----------------------------------------------------------------------------------------------------------------------

I just found a channel tool (https://github.com/guggero/chantools). This might be helpful.
This tool provides helper functions that can be used to rescue funds locked in lnd channels in case lnd itself cannot run properly anymore. It has a command called dumpchannels (dump all channel information from an lnd channel database).



9  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 03:15:08 AM
Quote
Also, you could just get them to send a payment to prove ownership (even with a code in the amount of coins they send).

Hi Jackg, could you please elaborate on this?
10  Bitcoin / Development & Technical Discussion / Re: How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 02:26:09 AM
Quote
I never tried to do this, but looks like there is a way to sign a message from your node private key using eclair:
https://acinq.github.io/eclair/#signmessage

Thank you! Let me dive into this! I appreciate it!


Quote
This is not true. Anyone can just close the channel and make an on-chain transaction to get his balance on-chain in the next block.
Then he can just sign a message.

IMO, this is the best way.

Right, if the channel is closed, the final balances between the two parties will be published on the Bitcoin Blockchain. This is indeed the best way.
However, I am trying to proof balances when the channel is open.
11  Bitcoin / Development & Technical Discussion / How to proof ownership of BTCs when using lightning network? on: July 14, 2022, 01:38:11 AM
I am learning lightning network and I encountered an issue.

Purpose: We need to prove someone owns a certain amount of BTCs.

When the BTCs are in Bitcoin's original network (layer 1). If a person claims he owns 1BTC, we can simply have the person digitally sign a message for the related addresses (to prove ownership) and then we can check through a bitcoin node (using an indexer) to find the BTC balance as of a specific block height.

The problem is that with the proliferation of the lightning network (or other off-chain state channels), we now are unable to simply “go to the blockchain” to find the balances at a specific block height.

Given this person could have his lightning channels available stored on his own node, and this person is not objective (and could be lying). Is there a way to compile lightning channel balances from an objective source? What would be the best way to prove this person owns the BTCs while these BTCs are being used in the lightning network?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!