1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-03-16 15:55:37 +00:00

BIP-352: add test vector for exceeding K_max limit [sender side]

Test case: as the (only) recipient group contains 2324 addresses and
thus exceeds the K_max limit by one, sending fails.

Can be tested by
`$ ./bip-0352/reference.py ./bip-0352/send_and_receive_test_vectors.json`
This commit is contained in:
Sebastian Falbesoner
2026-02-26 17:48:06 +01:00
parent f14132fc77
commit 9830fad214

View File

@@ -3185,5 +3185,50 @@
}
}
]
},
{
"comment": "Maximum per-group recipient limit K_max is exceeded (2324 matches): sending fails, receiver doesn't scan beyond limit",
"sending": [
{
"given": {
"vin": [
{
"txid": "3cde0e7ad8adf24a4e52fd18efafffb94f73f4c7facf2627a5b588ad1c9db87f",
"vout": 0,
"scriptSig": "",
"txinwitness": "01407ce01bc5ef2e4aae353e7f291fec32623d6a491b5421be6dccc70345f32ebae5baa6654c60c074e72da76fd06b343474370e56d3ec0413156ec6261757125ad4",
"prevout": {
"scriptPubKey": {
"hex": "5120bca87f72e604e8850064552bedf380ca4584227057efe12a6cc238470658aaa3"
}
},
"private_key": "0000000000000000000000000000000000000000000000000000000000001337"
}
],
"recipients": [
{
"address": "sp1qqtnvg7hxjck9ag24naytgd7pjwsmevwh95ydwht58w3uh7uw0ta7kqmk4a3pm24z0yepw6aw27pku56md0hq5ace0l3p3jstkqaajwrsjqc5dde5",
"scan_pub_key": "02e6c47ae6962c5ea1559f48b437c193a1bcb1d72d08d75d743ba3cbfb8e7afbeb",
"spend_pub_key": "0376af621daaa27932176bae57836e535b6bee0a77197fe218ca0bb03bd9387090",
"count": 2324
}
]
},
"expected": {
"outputs": [
[]
],
"shared_secrets": [
null
],
"input_private_key_sum": "0000000000000000000000000000000000000000000000000000000000001337",
"input_pub_keys": [
"02bca87f72e604e8850064552bedf380ca4584227057efe12a6cc238470658aaa3"
]
}
}
],
"receiving": [
]
}
]