BOLT #2: order htlc_signatures by BIP69 + increasing CLTV.#491
Merged
cdecker merged 2 commits intolightning:masterfrom Jan 22, 2019
Merged
BOLT #2: order htlc_signatures by BIP69 + increasing CLTV.#491cdecker merged 2 commits intolightning:masterfrom
cdecker merged 2 commits intolightning:masterfrom
Conversation
This was referenced Oct 22, 2018
Collaborator
|
Can we just throw out the reference to BIP 69 and write out the full context there? (#456). This is really actually just a bug in BIP 69 as it should specify everything you need, but its a very poorly-written BIP. |
Collaborator
Author
|
Implemented in c-lightning. Waiting on second implementation by LND or Eclair... |
Contributor
|
What about adding test vectors for the resulting htlc transactions? Although we should test against the htlc_signatures (in commitment_signed) having a test vector that specify the order of the htcl-tx associated with the commit-tx would be helpful for the implementers. |
Collaborator
Author
|
We should definitely have more test vectors, though this should be applied meanwhile IMHO. |
We express it has how the outputs are ordered, but the only way you can detect that is by the htlc_signatures order, which is the part which really matters. I finally reproduced this, BTW, which is why I'm digging it up! Closes: lightning#448 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: rustyrussell <rusty@rustcorp.com.au>
Collaborator
|
Merging as decided during the 2019/01/21 IRC meeting. |
t-bast
pushed a commit
that referenced
this pull request
Mar 5, 2021
…used as tie-breaker for sorting (#539) Add a serialized transactions test vector for the edge case of sorting htlc-timeout-tx when there are multiple offered htlc with the same amount and preimage. The test vector reuses previous preimages and creates a case scenario with 1 received htlc and 2 offered, the two offered will have same scriptPubKey and redeemScript, but different CLTV value. It is asserted the order in which the htlc transactions should be kept internally and we assume the same order is used to construct the commitment_signed message. This complements #491 .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We express it has how the outputs are ordered, but the only way you can
detect that is by the htlc_signatures order, which is the part which really
matters.
I finally reproduced this, BTW, which is why I'm digging it up!
Closes: #448
Signed-off-by: Rusty Russell rusty@rustcorp.com.au