bolt3: test vector fixes#1056
Merged
t-bast merged 4 commits intoFeb 28, 2023
Merged
Conversation
The commitment transaction tests are all meant to use the same funding transaction which has an amount of 10000000000 msat. The LocalBalance and RemoteBalance along with the value of any htlcs should always add up to this amount. This commit updates the `simple commitment tx with no HTLCs and single anchor` anchors test to comply with the above.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the legacy test accordingly.
wpaulino
reviewed
Feb 22, 2023
Contributor
wpaulino
left a comment
There was a problem hiding this comment.
Since rust-lightning only supports static remote key out of all of the test vectors updated here (legacy, static remote key, simple anchors), I was only able to verify those match.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the static-remote test accordingly.
The `commitment tx with 3 htlc outputs, 2 offered having the same amount and preimage` test was not correctly updated after the value of test htlc 6 was changed to 5000001 and the cltv expiry of test htlc 5 was changed to 506. This commit updates the anchors test accordingly.
1805926 to
d8b8b1e
Compare
26 tasks
t-bast
added a commit
to ACINQ/eclair
that referenced
this pull request
Feb 28, 2023
Add latest fixes from lightning/bolts#1056
t-bast
approved these changes
Feb 28, 2023
Collaborator
t-bast
left a comment
There was a problem hiding this comment.
Thanks, I've updated eclair to match these tests, LGTM 👍
t-bast
added a commit
to ACINQ/eclair
that referenced
this pull request
Feb 28, 2023
Add latest changes from lightning/bolts#1018 Add latest fixes from lightning/bolts#1056
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.
It seems as if the test vectors were not correctly updated after the change in this PR was applied. This could lead to different
test results depending on if the test used the
ToLocalBalancedefined by the test orinstead derived the balance by taking the funding amount and subtracting the htlc
amounts, remote balance and fees.
The PR also fixes the test called "simple commitment tx with no HTLCs and single anchor"
which currently does not have the correct channel capacity.