<blockquote>
  <p>So the question is: are commitment transactions between two nodes revoked through hashlocks or through private keys exchange?</p>
</blockquote>

<p>Either way will work, but hashlocks are simpler. They're described in section 4 of the paper you linked. In a private key exchange-based system, you need to store every breach remedy transaction, (about 250 bytes) but in a hashlock system, you only need 20 bytes for each preimage.</p>

<p>You don't need to store every preimage, either. Murch explains and links a system to store every hash in a channel with 64*20 bytes of memory at most here: <a href="https://bitcoin.stackexchange.com/questions/48053/what-is-a-hash-pre-image-as-it-is-used-for-the-breach-remedy">What is a hash pre-image as it is used for the breach remedy?</a></p>

CC BY-SA 3.0
2017-03-02T00:04:01.753Z
Thank you for the insight! So I have one more question: is there any reason why in the LN paper they considered hashlocks for multihop channels but did not consider them for two-parties channels?
Simone Bronzini
CC BY-SA 3.0
2017-03-02T00:18:59.480Z
I think they do consider hashlocks for two party channels. That's what they're describing in 4.2.
Nick ODell
CC BY-SA 3.0
2017-03-01T22:52:22.010Z
2017-03-01T22:52:22.010Z
2017-04-13T12:47:36.707Z
Nick ODell
<p>I am reading the <a href="https://lightning.network/lightning-network-paper.pdf" rel="nofollow noreferrer">Lightning Network paper</a> and noticed that when describing bidirectional payment channels, the authors used "Breach Remedy transactions" and the exchange of the two parties' private keys to discourage any of the parties to broadcast an old commitment transaction. This is indeed an effective solution, however I read in more than one place (e.g. <a href="https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791/" rel="nofollow noreferrer">here</a>, <a href="https://www.reddit.com/r/Bitcoin/comments/4egobx/how_does_the_lightning_network_work_in_simple/d20om2v/" rel="nofollow noreferrer">here</a>) that this is actually achieved through hashlocks (i.e. the two parties create hashlocked transactions from their commitment transactions and share the hashlock secret instead of exchanging their private keys to discourage the broadcasting of previous commitment transactions when they update the channel). In the paper, hashlocks are used when the bidirectional payment channels are used to relay payments among more than two nodes, however they are not used for payment channels between two nodes.</p>

<p>So the question is: are commitment transactions between two nodes revoked through hashlocks or through private keys exchange?</p>

<lightning-network><ln-penalty-transaction><hash-time-locked-contract><ln-commitment-transaction>
Lightning Network: hashlocks vs private keys exchange
Simone Bronzini
# Lightning Network: hashlocks vs private keys exchange

(Asked by: username_0 on 2017-03-01)

I am reading the [Lightning Network paper](https://lightning.network/lightning-network-paper.pdf) and noticed that when describing bidirectional payment channels, the authors used "Breach Remedy transactions" and the exchange of the two parties' private keys to discourage any of the parties to broadcast an old commitment transaction. This is indeed an effective solution, however I read in more than one place (e.g. [here](https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791/), [here](https://www.reddit.com/r/Bitcoin/comments/4egobx/how_does_the_lightning_network_work_in_simple/d20om2v/)) that this is actually achieved through hashlocks (i.e. the two parties create hashlocked transactions from their commitment transactions and share the hashlock secret instead of exchanging their private keys to discourage the broadcasting of previous commitment transactions when they update the channel). In the paper, hashlocks are used when the bidirectional payment channels are used to relay payments among more than two nodes, however they are not used for payment channels between two nodes.

So the question is: are commitment transactions between two nodes revoked through hashlocks or through private keys exchange?

**Tags:** lightning-network, ln-penalty-transaction, hash-time-locked-contract, ln-commitment-transaction


---

## 1 answers

### Answer by username_1 on 2017-03-01. Score: 2 | Accepted answer

> So the question is: are commitment transactions between two nodes revoked through hashlocks or through private keys exchange?

Either way will work, but hashlocks are simpler. They're described in section 4 of the paper you linked. In a private key exchange-based system, you need to store every breach remedy transaction, (about 250 bytes) but in a hashlock system, you only need 20 bytes for each preimage.

You don't need to store every preimage, either. Murch explains and links a system to store every hash in a channel with 64\*20 bytes of memory at most here: [What is a hash pre-image as it is used for the breach remedy?](https://bitcoin.stackexchange.com/questions/48053/what-is-a-hash-pre-image-as-it-is-used-for-the-breach-remedy)

> **Comments:**
> **username_0**: Thank you for the insight! So I have one more question: is there any reason why in the LN paper they considered hashlocks for multihop channels but did not consider them for two-parties channels?  
> **username_1**: I think they do consider hashlocks for two party channels. That's what they're describing in 4.2.  

---

