Skip to content

lnwallet: update Bolt3 test vectors#7439

Merged
guggero merged 9 commits into
lightningnetwork:0-16-1-stagingfrom
ellemouton:bolt3-test-vectors
Mar 16, 2023
Merged

lnwallet: update Bolt3 test vectors#7439
guggero merged 9 commits into
lightningnetwork:0-16-1-stagingfrom
ellemouton:bolt3-test-vectors

Conversation

@ellemouton
Copy link
Copy Markdown
Collaborator

@ellemouton ellemouton commented Feb 22, 2023

This PR updates adds the option-zero-fee-htlc-tx test vectors.
It also adds the new "same amount and preimage" tests that were missing from the existing legacy and anchor tests.

Fixes #7407

@ellemouton ellemouton force-pushed the bolt3-test-vectors branch 2 times, most recently from 7701631 to 3977c35 Compare February 22, 2023 20:37
@Roasbeef Roasbeef requested a review from sputn1ck February 23, 2023 23:37
Copy link
Copy Markdown
Collaborator

@sputn1ck sputn1ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK and LGTM! 🚀

Comment thread lnwallet/test_vectors_anchors.json Outdated
@ellemouton
Copy link
Copy Markdown
Collaborator Author

Just FYI: the Bolts PR got merged. Can confirm that LDK & Eclair match with these vectors

Copy link
Copy Markdown
Member

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🥳 Thanks for taking care of the format fixes!

Comment thread lnwallet/transactions_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

niiiice

Comment thread lnwallet/transactions_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah - weird I know 🙃 but the spec does actually define this test like this 🙈

@guggero guggero added this to the v0.16.1 milestone Mar 6, 2023
@saubyk saubyk changed the base branch from master to 0-16-1-staging March 16, 2023 15:23
In this commit, an assertion is added to the bolt 3 commitment tx tests
that ensures that the local and remote balances add up to the expected
funding amount. Adding this assertion uncovered a borked test vector
which is also fixed in this commit.
Add a new test htlc set comprised of htlc 1 from the original set and
two new htlcs, 5 and 6, that use the same preimage and have the same
output value (in sats). This htlc set is used in tests that assert the
ordering of htlcs  that have the same preimage and output value.
@guggero guggero merged commit 2e8dc7b into lightningnetwork:0-16-1-staging Mar 16, 2023
@ellemouton ellemouton deleted the bolt3-test-vectors branch March 16, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: add new anchor tx test vectors

4 participants