NUT-14: add HTLC test vectors - #407
Open
robwoodgate wants to merge 3 commits into
Open
Conversation
Re-encodes the SIG_ALL message to the domain-separated, length-framed byte format used by NUT-20/29 (tag "Cashu_SigAllSig_v1"). The quote id is framed directly after the tag and is empty for swaps, so one layout serves both transaction types. Adds a normative signature validation rule (ignore signatures that do not verify, count unique public keys) and canonical message vectors in tests/11-test.md.
Removes the superseded string-concatenation SIG_ALL vectors so the spec carries one canonical message aggregation, retitles the length-framed vector set, and notes why the output keyset id is not part of the message.
Preimage, keyless hashlock and SIG_ALL cases; the SIG_ALL vector uses the length-framed NUT-11 aggregation.
69 tasks
70 tasks
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.
NUT-14 had no test vectors. Adds
tests/14-test.mdwith preimage (valid and invalid), keyless hashlock, and SIG_ALL cases, signed by the well-known test key. All hashlocks commit to the familiar all-zeros-then-one preimage already used in the NUT-14 examples.Builds on #404: the SIG_ALL vector uses the length-framed aggregation, so this contains #404's commits until it merges and should be reviewed for the
tests/14-test.mdaddition only.