BIP-379: add test vectors from rust-miniscript - #2240
Open
guggero wants to merge 1 commit into
Open
Conversation
Member
|
Concept ACK. It may be handy to provide a file here that runs/verifies the test vectors. |
guggero
force-pushed
the
bip379-test-vectors
branch
from
August 7, 2026 08:56
3ef799a to
9334aa2
Compare
Contributor
Author
That's a great idea. I've added that in the latest push. $ cd bip-0379; go run main.go
Checking the BIP379 test vectors in . against
github.com/btcsuite/btcd/descriptors/miniscript.
Testing vectors in valid_from_alloy.txt [positive]: 5896/5896 done (type column not compared)
Testing vectors in valid_8f1e8_from_alloy.txt [positive]: 3492/3492 done (type column not compared)
Testing vectors in malleable_from_alloy.txt [positive/negative]: 7024/7024 + 7024/7024 done
Testing vectors in conflict_from_alloy.txt [positive]: 1773/1773 done (1586 of them are rejected by the sanity checks)
Testing vectors in edge_cases.txt [positive]: 42/42 done
Testing vectors in opcodes.txt [positive]: 18185/18185 done (type and op count columns not compared)
Testing vectors in invalid.txt [negative]: 5574/5574 done
Testing vectors in props_from_rust.tsv [positive]: 8198/8198 done (op_count and exec_stack columns not compared)
Testing vectors in props_from_rust_tap.tsv [positive/negative]: 6728/6728 + 1470/1470 done (op_count and exec_stack columns not compared)
Testing vectors in scripts_from_rust.tsv [positive]: 8198/8198 done
Testing vectors in scripts_from_rust_tap.tsv [positive/negative]: 6728/6728 + 1470/1470 done
Testing vectors in redeem.json [positive/negative]: 12/12 + 34/34 done (each spend is executed in the script engine)
All 81848 vectors passed (0 skipped).
|
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.
The BIP-379 currently has a
TBDin the test vector section.I have extracted a bunch of test vectors from the
rust-miniscriptproject, either directly or by slightly modifying test code to dump them into text/TSV files.They have been very helpful for re-implementation in another language, so I think they should be made easily available here.