Questions tagged [hash-time-locked-contract]
The hash-time-locked-contract tag has no usage guidance.
52
questions
0
votes
0
answers
18
views
Can eltoo's no-penalty design be exploited by malicious submissions of old state?
Eltoo uses the no-penalty submission mechanism, where the cost for an adversary to submit an old state is the transaction fee. This action seems unprofitable, but if we add HTLC to Eltoo, things seem ...
4
votes
1
answer
165
views
Unilateral close because of HTLC in remote commitment
I run lnd on my node and sometimes see messages like this:
[INF] CNCT: ChannelArbitrator(CHANPOINT): immediately failing htlc=HTLCID from remote commitment
The corresponding close transaction sent ...
0
votes
1
answer
25
views
Lightning protocol modification for app
I'm currently building a Lightning platform for online sellers. I have found that timing can be very problematic: For example, two people want to buy the last item in stock or a unique item like a ...
3
votes
1
answer
46
views
Difference between capacity and max_htlc in Lightning Network?
What is the difference between capacity and max_htlc in the routing of payments in the network?
3
votes
1
answer
57
views
How would PTLC's change invoices?
I am wondering how would switching from HTLCs to PTLCs change invoices? I assume there would not be a payment-hash anymore, but what would replace it. A payment-point?
Also, is there already support ...
0
votes
1
answer
53
views
UNIX END TIME January 19, 2038 - Will it affect Timelock nLOCKTIME smart contracts past that date?
So UNIX END TIME is January 19, 2038.
What will happen then to the btc TX that looks at Unixtime for nLOCKTIME transactions?
Will any Locktime transaction past that date, say to 2040 be an issue? Or ...
1
vote
1
answer
35
views
Is it possible to run a Lightning Network node with multiple entities holding parts of the private key?
What's the technical limitation stopping multiple entities from collectively managing an LN node?
I understand all parties (entities that share the Node private key) need to be online to sign routing/...
1
vote
1
answer
131
views
Taproot PTLC: Non-Multisig partly timelocked spending conditions
(Taproot environment) What I came up with is the following logic:
$alice = A;
$bob = B;
pk($bob) || (pk($alice) && older(10))
(See on Minsc).
I looked at the generated / resulting Bitcoin ...
7
votes
2
answers
198
views
What does the abbreviation "HTLC" stand for?
An HTLC is a contract making use of both a hashlock and a timelock. I noticed a discrepancy in what various sources state the abbreviation HTLC is short for. I've found:
"Hashed Timelock ...
7
votes
1
answer
356
views
Can PTLCs and HTLCs be mixed along a route?
When PTLCs get introduced on the Lightning Network, do all hops along a route need to use either HTLCs or PTLCs, or would it be possible to create a route where some nodes use PTLCs and some use HTLCs?...
1
vote
2
answers
66
views
What would happen to Bitcoin if GPS/Galileo timing ceased to be available?
According to this web site, the timing from a system like GPS is essential to "financial networks [which] rely on precision timing for synchronization and operational efficiency." Is the ...
1
vote
1
answer
91
views
how many htlcs can a lightning channel have pending at a given time
Channels can have pending HTLCs, or even handle multiple payments concurrently. Is there a max number of pending HTLCs a channel can entertain? What is that max, why is it set to that number, and what ...
3
votes
1
answer
57
views
Do BIP199's HTLCs suffer from script malleability?
Do BIP199 HTLCs suffer from sigscript malleability like multisigs do due to OP_CHECKMULTISIG?
0
votes
1
answer
124
views
Atomicity on HTLC payment chain
I have a doubt about HTLC on a lightning network payment. I have this scenario:
Alice wants to pay 100 sats to David using a route she found with Bob and Chad, this would be:
Alice -> Bob -> ...
0
votes
1
answer
93
views
Why, how, and when should an intermediate LN node terminate/resolve its HTLC(s) off-chain?
I once heard an attack against LN, which was called "flood & loot": https://medium.com/blockchains-huji/flood-loot-a-systemic-attack-on-the-lightning-network-5c3dac7bba24
The 3rd step of ...
1
vote
1
answer
50
views
Decode script return different value from my relative timelock
I want to lock a UTXO for 90 days.
My Binary is:
00000000010000000011101101010011
And my sequence is: 533B40
When I decode the witness script with bitcoin-cli decodescript I can see 4209491.
Where ...
0
votes
0
answers
61
views
Time locked puzzle for payment in Lightning Network
Currently HTLC's timeout transaction relies on absolute timelock enforced on the script. It allows a counterparty to withdraw the money from the contract if the other party doesn't release the ...
3
votes
1
answer
57
views
Lightning Network state deprecation secret keeping
When using a lightning channel, two sides are sending transactions representing the current state (or balance) between them, and for each state sent, they invalidate the previous state by sending a ...
0
votes
1
answer
41
views
Simulate HTLC in regtest c-lightning
I have three nodes in regtest environment l1, l2, and l3
l1 create a channel with l2
l2 create a channel with l3
l3 create an invoice for l1.
l1 can pays it because use the route l1-l2-l3
I presume ...
1
vote
1
answer
106
views
Who bears the transaction fee for settling HTLC in Lightning Network?
Given a channel that exist between Alice and Bob, where Alice wants to transfer 0.0001 BTC to Bob. Alice makes HTLC payment to Bob contingent to the secret for the payment hash within a timelock of ...
1
vote
1
answer
233
views
Reuse of payment hash in Lightning Network
Suppose there exist two such payment transfer request: A transfers 1 msat to R via A->B->C->R and S transfers 5 msat to R via S->B->C->R. Let the two HTLCs be formed across both the paths ...
3
votes
2
answers
101
views
Why do multihop LN payments start settling from the recipient's end?
In HTLC, after all the parties have locked their funds in the contract, claiming payment happens in a reverse way, starting with the receiver who reveals the preimage of the corresponding payment hash....
2
votes
1
answer
68
views
settling timelocked contracts based on amount of time elapsed in Lightning network
Suppose in a payment route A->B->C, A desires to pay 0.01 BTC to C. It locks in 0.01 BTC with B in the HTLC having timeout period of say 2 days and B locks 0.01 BTC with C in HTLC having timeout ...
3
votes
1
answer
231
views
Why does every HTLC in a commitment transaction require its own signature?
From BOLT 02 we can learn
When a node has changes for the remote commitment, it can apply them,
sign the resulting transaction (as defined in BOLT #3), and send a
commitment_signed message.
1. type: ...
0
votes
0
answers
213
views
non-mandatory-script-verify-flag (Locktime requirement not satisfied) (code 64)
I'm attempting to redeem the following htlc ( the python script below ) via timeout, however the redemption tx errors out upon validation with the error below:
bitcoin.rpc.VerifyRejectedError: {'code'...
1
vote
2
answers
261
views
Can someone explain how an HTLC is redeemed?
I'm looking at Bolt 3 in the Lightning rfc. My question is about how a HTLC is redeemed. Example HTLC script for reference:
# To remote node with revocation key
OP_DUP OP_HASH160 <RIPEMD160(SHA256(...
3
votes
2
answers
279
views
Why do we need revocation in both the offered/received HTLC outputs and HTLC timeout/success outputs?
The witness script for the output in the HTLC success/timeout transaction is:
OP_IF
# Penalty transaction
<revocationpubkey>
OP_ELSE
`to_self_delay`
OP_CHECKSEQUENCEVERIFY
...
2
votes
1
answer
153
views
Possible race condition(double spend) on HTLC-Timeout in the lightning network?
From the offered HTLC Outputs,
# To remote node with revocation key
OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
OP_IF
OP_CHECKSIG
OP_ELSE
<remote_htlcpubkey> ...
3
votes
2
answers
835
views
Single-hop Payment vs Multi-hop payments
I am beginner of lightning network. When i am looking roughly lightning network whitepaper, i was confused about the types of contracts used in single-hop and multi-hop.
As far as I understand, In ...
1
vote
1
answer
69
views
Do HTLCs get "carried over" in the subsequent commitment transactions?
With regular commitment transactions, current transaction invalidates the previous one. This is fine, since TXs between A and B in their channel happen one after another. However, HTLCs are sort of ...
0
votes
1
answer
58
views
lightning to lightning non custodial swaps [closed]
Do you know the way to freeze funds in lightning tx to implement atomic swap between two independent lightning networks?
0
votes
0
answers
145
views
Method to create P2SH address
I am trying to create a htlc smart contract manually by writing a script and finding the hex using the btcc compiler. Now node A has to create a transaction using that hex and lock money in that p2sh ...
2
votes
1
answer
136
views
HTLCs and commitment transactions
Why commitment transactions can't simply be HTLCs instead of contracts revocable by having the second half of the Revocable Private Key? I mean, why bother to create a Revocable Public Key from two ...
0
votes
1
answer
147
views
BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node?
According to the BOLT #3 documentation, the offered HTLC output has the following script that allows the remote node to claim the funds with the payment pre-image and the local node to claim it after ...
2
votes
1
answer
171
views
Remote node signature for HTLC-success and HTLC-timeout transactions
According to BOLT #3, when constructing a HTLC output in the version of the local node (both received and offered HTLC), it requires that the payment to the local node is locked with CHECKMULTISIG ...
0
votes
1
answer
38
views
How multiple unfinished payments in single LN channel work?
I think I understand HTLCs, at least if they are on chain. I also have a basic understanding of how off chain channel looks like.
I understand it as follows. It is a 2-of-2 multisig transaction ...
2
votes
2
answers
469
views
Why do we use CLTV instead of CSV in the HTLC output of the commitment transaction?
In lightning network commitment transactions, the HTLC offered/received outputs generally pay the offering node after a timeout which is scripted using CLTV. In other parts of the commitment ...
0
votes
1
answer
191
views
Implement HTLC manually by writing scripts
Is there any way to implement HTLC manually for locking funds in the channels in lightning network for a period of time (by setting intervals) and releasing the funds after the time lock expired using ...
0
votes
1
answer
185
views
How can I create HTLCs below dust_limit_satoshi in Lightning Network?
BOLT#2 documentation for open_channel message has two points (dust_limit_satoshi and htlc_min_msat) in the data message that I found confusing. Below is the statement related to dust_limit_satoshi:
...
10
votes
3
answers
2k
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?
0
votes
1
answer
54
views
Destination address(es) when redeeming an HTLC
Starting from this text at https://en.bitcoin.it/wiki/Script:
"The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two ...
3
votes
1
answer
100
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
1
answer
65
views
Security implications of removing CHECKSIG in a test
If I conduct an htlc transaction on testnet that does not include OP_CHECKSIG will it still cost an attacker more than (say) $10 in processing power or storage to subvert my tests?
Details: I'm ...
1
vote
1
answer
157
views
What is the relation between a Hash Time Lock Contract(HTLC) and a Commitment transaction?
I want to know about what happens to the commitment transactions as the HTLC's are sent and cleared along to peers in a route.
0
votes
1
answer
315
views
How to perform atomic swap Bitcoin-Litecoin
I am running Bitcoin and Litecoin nodes fully synced on testnet.Can I perform atomic swapping by using this networks?
I heard it can be done through HTLC(Hash Time Locked Contracts). How can I do ...
2
votes
1
answer
453
views
Basic questions about lightning network HTLC
I'm reading about lightning and I have a few questions:
The HTLC contract seems to be different at each new path payment channel is opened (due to a different Hash value that needs to be provided), ...
0
votes
0
answers
21
views
Hash Time Locked Contract (HTLC) using bitcoin-qt [duplicate]
Is it possible to manually create a Hash Time Locked Contract using the bitcoin-qt command line?
I have dabbled with manually creating createrawtransaction / sendrawtransaction using the bitcoin-qt ...
5
votes
2
answers
2k
views
HTLC (Hash Time Lock Contract) using bitcoin-qt
Is it possible to manually create a HTLC using the bitcoin-qt command line?
I know how to manually creating createrawtransaction/sendrawtransaction using the bitcoin-qt clients command line, and ...
2
votes
1
answer
580
views
Lightning Network: hashlocks vs private keys exchange
I am reading the Lightning Network paper and noticed that when describing bidirectional payment channels, the authors used "Breach Remedy transactions" and the exchange of the two parties' private ...
1
vote
1
answer
196
views
Do HTLC transactions work today or do they need a new soft-fork?
I thought that HTLCs were just a kind of a script construct that would allow to unlock funds for a period of time, which can be unlocked to anyone that provides the original string that matches the ...