fix nut-29 test vector, clarify concatenation rules. #362

Open
robwoodgate wants to merge 1 commit from robwoodgate/nut29-tests into main
robwoodgate commented 2026-04-09 11:07:03 +00:00 (Migrated from github.com)

The NUT-29 test vector was not correctly using NUT-20 message-to-sign rules.

This PR fixes the test vector, clarifies the rules, and adds the intermediate steps for verification (eg message hash)

Note for reviewers:

I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect.

The NUT-29 test vector was not correctly using NUT-20 message-to-sign rules. This PR fixes the test vector, clarifies the rules, and adds the intermediate steps for verification (eg message hash) Note for reviewers: I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect.
thesimplekid commented 2026-04-09 11:44:58 +00:00 (Migrated from github.com)

I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect.

Do they already use these test vectors then or we need to add them probably?

> I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect. Do they already use these test vectors then or we need to add them probably?
robwoodgate commented 2026-04-09 13:42:52 +00:00 (Migrated from github.com)

I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect.

Do they already use these test vectors then or we need to add them probably?

Cashu-ts uses the specific NUT-29 vector (how I found out it was wrong), cdk uses other tests, but not that vector specifically

> > I confirmed that cashu-ts and cdk both were doing NUT-29 message aggregation correctly. It was only the test vector which was incorrect. > > Do they already use these test vectors then or we need to add them probably? Cashu-ts uses the specific NUT-29 vector (how I found out it was wrong), cdk uses other tests, but not that vector specifically
This pull request has changes conflicting with the target branch.
  • tests/29-tests.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin robwoodgate/nut29-tests:robwoodgate/nut29-tests
git switch robwoodgate/nut29-tests

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff robwoodgate/nut29-tests
git switch robwoodgate/nut29-tests
git rebase main
git switch main
git merge --ff-only robwoodgate/nut29-tests
git switch robwoodgate/nut29-tests
git rebase main
git switch main
git merge --no-ff robwoodgate/nut29-tests
git switch main
git merge --squash robwoodgate/nut29-tests
git switch main
git merge --ff-only robwoodgate/nut29-tests
git switch main
git merge robwoodgate/nut29-tests
git push origin main
Sign in to join this conversation.
No description provided.