Skip to content

Commit df54795

Browse files
committed
BIP-352: add test vector for exceeding K_max limit [sender side]
Test case: as the (only) recipient group contains 2325 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`
1 parent 282a24a commit df54795

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

bip-0352/send_and_receive_test_vectors.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,5 +3185,50 @@
31853185
}
31863186
}
31873187
]
3188+
},
3189+
{
3190+
"comment": "Maximum per-group recipient limit K_max is exceeded (2325 matches): sending fails, receiver doesn't scan beyond limit",
3191+
"sending": [
3192+
{
3193+
"given": {
3194+
"vin": [
3195+
{
3196+
"txid": "3cde0e7ad8adf24a4e52fd18efafffb94f73f4c7facf2627a5b588ad1c9db87f",
3197+
"vout": 0,
3198+
"scriptSig": "",
3199+
"txinwitness": "01407ce01bc5ef2e4aae353e7f291fec32623d6a491b5421be6dccc70345f32ebae5baa6654c60c074e72da76fd06b343474370e56d3ec0413156ec6261757125ad4",
3200+
"prevout": {
3201+
"scriptPubKey": {
3202+
"hex": "5120bca87f72e604e8850064552bedf380ca4584227057efe12a6cc238470658aaa3"
3203+
}
3204+
},
3205+
"private_key": "0000000000000000000000000000000000000000000000000000000000001337"
3206+
}
3207+
],
3208+
"recipients": [
3209+
{
3210+
"address": "sp1qqtnvg7hxjck9ag24naytgd7pjwsmevwh95ydwht58w3uh7uw0ta7kqmk4a3pm24z0yepw6aw27pku56md0hq5ace0l3p3jstkqaajwrsjqc5dde5",
3211+
"scan_pub_key": "02e6c47ae6962c5ea1559f48b437c193a1bcb1d72d08d75d743ba3cbfb8e7afbeb",
3212+
"spend_pub_key": "0376af621daaa27932176bae57836e535b6bee0a77197fe218ca0bb03bd9387090",
3213+
"count": 2325
3214+
}
3215+
]
3216+
},
3217+
"expected": {
3218+
"outputs": [
3219+
[]
3220+
],
3221+
"shared_secrets": [
3222+
null
3223+
],
3224+
"input_private_key_sum": "0000000000000000000000000000000000000000000000000000000000001337",
3225+
"input_pub_keys": [
3226+
"02bca87f72e604e8850064552bedf380ca4584227057efe12a6cc238470658aaa3"
3227+
]
3228+
}
3229+
}
3230+
],
3231+
"receiving": [
3232+
]
31883233
}
31893234
]

0 commit comments

Comments
 (0)