Ensure that unknown items are included in Unified Address test vectors.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2022-02-14 02:52:28 +00:00
parent 3872f29af5
commit ccf1e5d7df
4 changed files with 16 additions and 7 deletions

View File

@ -1,7 +1,7 @@
[
["From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/unified_address.py"],
["p2pkh_bytes, p2sh_bytes, sapling_raw_addr, orchard_raw_addr, unknown_typecode, unknown_bytes, unified_addr, root_seed, account, diversifier_index"],
["e6cabf813929132d772d04b03ae85223d03b9be8", null, null, "d4714ee761d1ae823b6972152e20957fefa3f6e3129ea4dfb0a9e98703a63dab929589d6dc51c970f935b3", 65533, "f6ee6921481cdd86b3cc4318d9614fc820905d042bb1ef9ca3f24988c7b3534201cfb1cd8dbf69b8250c18ef41294ca97993db546c1fe0", "7531353966636630777639336c366464666d396c726434736a6177373272646a716b657779736367377038667166307563366b766479386b796a7133667263756376356e6a66767065756a676c71327433667a6763706e77613336356d6e616139346e78706634337373633575707433717970773363747235717930356d6c6b33376565777532396a37686b64", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 0, 0],
["e6cabf813929132d772d04b03ae85223d03b9be8", null, null, "d4714ee761d1ae823b6972152e20957fefa3f6e3129ea4dfb0a9e98703a63dab929589d6dc51c970f935b3", 65533, "f6ee6921481cdd86b3cc4318d9614fc820905d042bb1ef9ca3f24988c7b3534201cfb1cd8dbf69b8250c18ef41294ca97993db546c1fe0", "753179793677386e336a6d6a73676a39777663656e7238723570366833387679636c686d71307767396b7a70786c7534367a387636346b3567737a72387966777a346a7672796c76766733673633337a30326c756b38356e6d73636b366432736578336e3564376b6e3638687a7a3574763475647439703673793770676c6565756c76676c767832363237646666353771396665703577676478386d3065737832386d307a767578706d7779617a74336a756e3272707177386e75366a326663657167686b353563656436366a73366b366a786e387932787475653866337061716a726b3871366e70746e6e", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 0, 0],
["7bec9de217c04f7ce1a86f1fb458aa881c8f39e4", null, null, "d8e5ecb4e005c28718e61a5c336a4f369e771ccdb3363f4f7a04b02a966901a4c05da662d5fd75678f7fb4", 65530, null, "75317a35677538783364766b7677636d726a30716b3568727839706361646c3536683834663777647970366e7635337233643563636365646563686d77393835746765357733633272353639716137326c676775753578727178683739616a7a63376b716d65733230706b747a71726a6c707835367168676d716d3536686e39777432686379787064616d616b", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 1, 0],
["aa6d43480fd9d91375ce6c4a020706361bd296de", null, "88533c398a49c2513dc85162bf220abaf47dc983f14e908ddaaa7322dba16531bc62efe750fe575c8d149b", null, 65530, null, "7531343367706a3772643934766d39356d7a73757537746a74716161677934706d6678386c6b77656d70786a7463777a33357a746361383530796e6c7a323932307477617a6171703270367168787878337a357178616b6e73716372676c7578716a337070757367776635757963686c61677938376b376874613768773965793336776d7930367065776c6470", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 2, 0],
[null, "a8d7551db5fd9313e8c7203d996af7d477083756", "52fd6aedefbf401633c2e4532515ebcf95bcc2b4b8e4d676dfad7e17925c6dfb8671e52544dc2ca075e261", null, 65534, null, "753178797970646a307a7978637466666b6878796d766a6e6b376e383371666c376e7365356c3071726b346e3266376465376c3733727a79787970347463727975356d6b7875617a6c646e633279306479747a7567797a79636739373034616a66786173376b63757761776d706877776e383839743938743735376579716667346a766566746b687672337167", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 3, 0],
@ -14,7 +14,7 @@
[null, "af9db6990ed83dd64af3597c04323ea51b0052ad", null, "cdf7fed0d0822fd849cffb20a4d5ee701ad8141e66d81ddfabf87875117c05092240603c546b8dc187cd8c", 65532, null, "753165353471636e30746570796c33307a7a326672677a37713461366d736e326530326e7076326e6666736433683532336d747838643232616a7666767371757235736a7a3876666e6d77327973363730387170386b6139306a3561343330757938763833616c6a63306330357a6a7535347879356e7677336d66686b376e7737366b6b7964796c713466656c", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 10, 0],
[null, null, null, "24fd59f32b2d39dde66e46c39206a31bc04fa5c6847976ea6bbd3163ee14f58f584acc131479ea558d3f84", 65530, null, "75317a38777372686d66366d3967766136766c33737a636b303670393730783577686d36336a666a3266726d6d63396e39756d34796373387975746a37673833387672676832306c667879353279306832367474386e6776643267796370797176396b793032716b6373", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 11, 0],
[null, null, "78d85bd0db639043377987cdd814c6390016964b684016faf1ad4f166c5f72399a5e8d469ec6beb873d55d", null, 65535, null, "75317861686a333570376d7639756c6b3337327333766465687172663438753077646633786c3772787a7270653461307468753864306d396d7961617078376b35767836747a357074636a76637675346472667137753771777a6d667565336b74387376736333736535", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 12, 0],
["33a6dd87b4d872a4895d345761e4ec423b77928d", null, null, "5178924f7067eac261044ca27ba3cf52f798486973af0795e61587aa1b1ecad333dc520497edc61df88980", 65533, "91e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1", "75316439356e6a7630783035643671747a703779757976667765647438796734746a306e663063727038656a74666430653866637a3271617939346b3463667877376666363070636c747076776c3378326b646c646a65617335336e686e613567393578326c7533763370723233657430643063726e7a63396e636477636d7233766a306b6c73653474793538", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 13, 0],
["33a6dd87b4d872a4895d345761e4ec423b77928d", null, null, "5178924f7067eac261044ca27ba3cf52f798486973af0795e61587aa1b1ecad333dc520497edc61df88980", 65533, "91e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1", "7531687970706c733364776d616c783373756c746b72397564763237376679716a6478307378716c746638676a6e777976343968743575327270336c6c767632756e796d7330383675616a6b6638393837636175616a7136383670356638687276393474616336663078796637796d7a3636747279366b7936726179336d6a633567786661683030637370766b3564676d67736e3737663274336775763270307861366b6c6138717479376d6b6e6b6d337a68303932306c77733633326166743071686b3532363579736c337067323237747866373461736d7075656e326c746533616a6330667a376b34736878797a656d6e7035773770336b746c6874643030366d6b61787979306d746637646a73646175397a666b657332616e387661687a6737647173677938326330707830396d39683061657a736e7936786c66706767667268656d7661786a3578747871356a6e67763076306167726c3073757079676639636574656a35323779727a7a6574386471747164616771", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 13, 0],
["a56c057ef71dab58aa90e47025695c5faaea5123", null, "a75a6de421d2ad1ee8f4b25e398adda9c0aaa6ab1f2518981a9ddb1de6a3957d77842332d6289dbe94e832", "b208c9235c8d40e49b76100b2d010f3783f12c66e7d3beb117b2c96321b7f6562adb4efc144e39d909e728", 65533, null, "7531646670723876647335683361756e79657a7a7877726d38756461353273743837733876726c676732746730357430713070783336686368783974676b786b6c77747370753332786a6135617271336b7470326e387a613470773779776a30676d68713372776539353072386b3973756e736a76773734743538716c3333347065673464766b616c6b746d6e676e716b7077723332353837653779747932376e6d673636747371377976723779343639776570366b7077346a3530786e6c6d78306a78786737766c6735796c6671387566657664", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 14, 0],
[null, null, null, "9e5445d6cd3cb9f98b0df1062bda47adffd5a66c0c2c483c8bf15c3176d755914a3576496b5c35fee28a88", 65531, null, "75316a676c686a326d617936646674777a39753271796e786a717a6e75743637343768617375306d646d6c63303266636173756178756764797a776a326c38346d6a3966677a6a3779306b396663706a373336736c6d6a38676b37377567386c6c61766367326c666d6d", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 15, 0],
["b02aec10f6fa02a08667bf9b924c3d0574a1334f", null, null, "2598d84dffb34f5908b90732490f3881399150d4c694fce9bf30d1560b2c56f09829fe123b9add20e5d71c", 65534, null, "7531397163617a647761793438707566366a77616a78307732386d307871756d746d6e6435677974796c6c6e79676867396c76393978356d3872387439673566396a307a30786e34787a6d6e7866747a3772746633756164786b79367178706e6b7438666b66686c78386b63396d6e72646c6e7874733536786378656a7a6472776c65787a7637377876797634", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 16, 0],

View File

@ -27,7 +27,7 @@
0xf6, 0xee, 0x69, 0x21, 0x48, 0x1c, 0xdd, 0x86, 0xb3, 0xcc, 0x43, 0x18, 0xd9, 0x61, 0x4f, 0xc8, 0x20, 0x90, 0x5d, 0x04, 0x2b, 0xb1, 0xef, 0x9c, 0xa3, 0xf2, 0x49, 0x88, 0xc7, 0xb3, 0x53, 0x42, 0x01, 0xcf, 0xb1, 0xcd, 0x8d, 0xbf, 0x69, 0xb8, 0x25, 0x0c, 0x18, 0xef, 0x41, 0x29, 0x4c, 0xa9, 0x79, 0x93, 0xdb, 0x54, 0x6c, 0x1f, 0xe0
]),
unified_addr: vec![
0x75, 0x31, 0x35, 0x39, 0x66, 0x63, 0x66, 0x30, 0x77, 0x76, 0x39, 0x33, 0x6c, 0x36, 0x64, 0x64, 0x66, 0x6d, 0x39, 0x6c, 0x72, 0x64, 0x34, 0x73, 0x6a, 0x61, 0x77, 0x37, 0x32, 0x72, 0x64, 0x6a, 0x71, 0x6b, 0x65, 0x77, 0x79, 0x73, 0x63, 0x67, 0x37, 0x70, 0x38, 0x66, 0x71, 0x66, 0x30, 0x75, 0x63, 0x36, 0x6b, 0x76, 0x64, 0x79, 0x38, 0x6b, 0x79, 0x6a, 0x71, 0x33, 0x66, 0x72, 0x63, 0x75, 0x63, 0x76, 0x35, 0x6e, 0x6a, 0x66, 0x76, 0x70, 0x65, 0x75, 0x6a, 0x67, 0x6c, 0x71, 0x32, 0x74, 0x33, 0x66, 0x7a, 0x67, 0x63, 0x70, 0x6e, 0x77, 0x61, 0x33, 0x36, 0x35, 0x6d, 0x6e, 0x61, 0x61, 0x39, 0x34, 0x6e, 0x78, 0x70, 0x66, 0x34, 0x33, 0x73, 0x73, 0x63, 0x35, 0x75, 0x70, 0x74, 0x33, 0x71, 0x79, 0x70, 0x77, 0x33, 0x63, 0x74, 0x72, 0x35, 0x71, 0x79, 0x30, 0x35, 0x6d, 0x6c, 0x6b, 0x33, 0x37, 0x65, 0x65, 0x77, 0x75, 0x32, 0x39, 0x6a, 0x37, 0x68, 0x6b, 0x64
0x75, 0x31, 0x79, 0x79, 0x36, 0x77, 0x38, 0x6e, 0x33, 0x6a, 0x6d, 0x6a, 0x73, 0x67, 0x6a, 0x39, 0x77, 0x76, 0x63, 0x65, 0x6e, 0x72, 0x38, 0x72, 0x35, 0x70, 0x36, 0x68, 0x33, 0x38, 0x76, 0x79, 0x63, 0x6c, 0x68, 0x6d, 0x71, 0x30, 0x77, 0x67, 0x39, 0x6b, 0x7a, 0x70, 0x78, 0x6c, 0x75, 0x34, 0x36, 0x7a, 0x38, 0x76, 0x36, 0x34, 0x6b, 0x35, 0x67, 0x73, 0x7a, 0x72, 0x38, 0x79, 0x66, 0x77, 0x7a, 0x34, 0x6a, 0x76, 0x72, 0x79, 0x6c, 0x76, 0x76, 0x67, 0x33, 0x67, 0x36, 0x33, 0x33, 0x7a, 0x30, 0x32, 0x6c, 0x75, 0x6b, 0x38, 0x35, 0x6e, 0x6d, 0x73, 0x63, 0x6b, 0x36, 0x64, 0x32, 0x73, 0x65, 0x78, 0x33, 0x6e, 0x35, 0x64, 0x37, 0x6b, 0x6e, 0x36, 0x38, 0x68, 0x7a, 0x7a, 0x35, 0x74, 0x76, 0x34, 0x75, 0x64, 0x74, 0x39, 0x70, 0x36, 0x73, 0x79, 0x37, 0x70, 0x67, 0x6c, 0x65, 0x65, 0x75, 0x6c, 0x76, 0x67, 0x6c, 0x76, 0x78, 0x32, 0x36, 0x32, 0x37, 0x64, 0x66, 0x66, 0x35, 0x37, 0x71, 0x39, 0x66, 0x65, 0x70, 0x35, 0x77, 0x67, 0x64, 0x78, 0x38, 0x6d, 0x30, 0x65, 0x73, 0x78, 0x32, 0x38, 0x6d, 0x30, 0x7a, 0x76, 0x75, 0x78, 0x70, 0x6d, 0x77, 0x79, 0x61, 0x7a, 0x74, 0x33, 0x6a, 0x75, 0x6e, 0x32, 0x72, 0x70, 0x71, 0x77, 0x38, 0x6e, 0x75, 0x36, 0x6a, 0x32, 0x66, 0x63, 0x65, 0x71, 0x67, 0x68, 0x6b, 0x35, 0x35, 0x63, 0x65, 0x64, 0x36, 0x36, 0x6a, 0x73, 0x36, 0x6b, 0x36, 0x6a, 0x78, 0x6e, 0x38, 0x79, 0x32, 0x78, 0x74, 0x75, 0x65, 0x38, 0x66, 0x33, 0x70, 0x61, 0x71, 0x6a, 0x72, 0x6b, 0x38, 0x71, 0x36, 0x6e, 0x70, 0x74, 0x6e, 0x6e
],
root_seed: vec![
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
@ -281,7 +281,7 @@
0x91, 0xe0, 0x0c, 0x7a, 0x1d, 0x48, 0xaf, 0x04, 0x68, 0x27, 0x59, 0x1e, 0x97, 0x33, 0xa9, 0x7f, 0xa6, 0xb6, 0x79, 0xf3, 0xdc, 0x60, 0x1d, 0x00, 0x82, 0x85, 0xed, 0xcb, 0xda, 0xe6, 0x9c, 0xe8, 0xfc, 0x1b, 0xe4, 0xaa, 0xc0, 0x0f, 0xf2, 0x71, 0x1e, 0xbd, 0x93, 0x1d, 0xe5, 0x18, 0x85, 0x68, 0x78, 0xf7, 0x34, 0x76, 0xf2, 0x1a, 0x48, 0x2e, 0xc9, 0x37, 0x83, 0x65, 0xc8, 0xf7, 0x39, 0x3c, 0x94, 0xe2, 0x88, 0x53, 0x15, 0xeb, 0x46, 0x71, 0x09, 0x8b, 0x79, 0x53, 0x5e, 0x79, 0x0f, 0xe5, 0x3e, 0x29, 0xfe, 0xf2, 0xb3, 0x76, 0x66, 0x97, 0xac, 0x32, 0xb4, 0xf4, 0x73, 0xf4, 0x68, 0xa0, 0x08, 0xe7, 0x23, 0x89, 0xfc, 0x03, 0x88, 0x0d, 0x78, 0x0c, 0xb0, 0x7f, 0xcf, 0xaa, 0xbe, 0x3f, 0x1a, 0x84, 0xb2, 0x7d, 0xb5, 0x9a, 0x4a, 0x15, 0x3d, 0x88, 0x2d, 0x2b, 0x21, 0x03, 0x59, 0x65, 0x55, 0xed, 0x94, 0x94, 0xc6, 0xac, 0x89, 0x3c, 0x49, 0x72, 0x38, 0x33, 0xec, 0x89, 0x26, 0xc1
]),
unified_addr: vec![
0x75, 0x31, 0x64, 0x39, 0x35, 0x6e, 0x6a, 0x76, 0x30, 0x78, 0x30, 0x35, 0x64, 0x36, 0x71, 0x74, 0x7a, 0x70, 0x37, 0x79, 0x75, 0x79, 0x76, 0x66, 0x77, 0x65, 0x64, 0x74, 0x38, 0x79, 0x67, 0x34, 0x74, 0x6a, 0x30, 0x6e, 0x66, 0x30, 0x63, 0x72, 0x70, 0x38, 0x65, 0x6a, 0x74, 0x66, 0x64, 0x30, 0x65, 0x38, 0x66, 0x63, 0x7a, 0x32, 0x71, 0x61, 0x79, 0x39, 0x34, 0x6b, 0x34, 0x63, 0x66, 0x78, 0x77, 0x37, 0x66, 0x66, 0x36, 0x30, 0x70, 0x63, 0x6c, 0x74, 0x70, 0x76, 0x77, 0x6c, 0x33, 0x78, 0x32, 0x6b, 0x64, 0x6c, 0x64, 0x6a, 0x65, 0x61, 0x73, 0x35, 0x33, 0x6e, 0x68, 0x6e, 0x61, 0x35, 0x67, 0x39, 0x35, 0x78, 0x32, 0x6c, 0x75, 0x33, 0x76, 0x33, 0x70, 0x72, 0x32, 0x33, 0x65, 0x74, 0x30, 0x64, 0x30, 0x63, 0x72, 0x6e, 0x7a, 0x63, 0x39, 0x6e, 0x63, 0x64, 0x77, 0x63, 0x6d, 0x72, 0x33, 0x76, 0x6a, 0x30, 0x6b, 0x6c, 0x73, 0x65, 0x34, 0x74, 0x79, 0x35, 0x38
0x75, 0x31, 0x68, 0x79, 0x70, 0x70, 0x6c, 0x73, 0x33, 0x64, 0x77, 0x6d, 0x61, 0x6c, 0x78, 0x33, 0x73, 0x75, 0x6c, 0x74, 0x6b, 0x72, 0x39, 0x75, 0x64, 0x76, 0x32, 0x37, 0x37, 0x66, 0x79, 0x71, 0x6a, 0x64, 0x78, 0x30, 0x73, 0x78, 0x71, 0x6c, 0x74, 0x66, 0x38, 0x67, 0x6a, 0x6e, 0x77, 0x79, 0x76, 0x34, 0x39, 0x68, 0x74, 0x35, 0x75, 0x32, 0x72, 0x70, 0x33, 0x6c, 0x6c, 0x76, 0x76, 0x32, 0x75, 0x6e, 0x79, 0x6d, 0x73, 0x30, 0x38, 0x36, 0x75, 0x61, 0x6a, 0x6b, 0x66, 0x38, 0x39, 0x38, 0x37, 0x63, 0x61, 0x75, 0x61, 0x6a, 0x71, 0x36, 0x38, 0x36, 0x70, 0x35, 0x66, 0x38, 0x68, 0x72, 0x76, 0x39, 0x34, 0x74, 0x61, 0x63, 0x36, 0x66, 0x30, 0x78, 0x79, 0x66, 0x37, 0x79, 0x6d, 0x7a, 0x36, 0x36, 0x74, 0x72, 0x79, 0x36, 0x6b, 0x79, 0x36, 0x72, 0x61, 0x79, 0x33, 0x6d, 0x6a, 0x63, 0x35, 0x67, 0x78, 0x66, 0x61, 0x68, 0x30, 0x30, 0x63, 0x73, 0x70, 0x76, 0x6b, 0x35, 0x64, 0x67, 0x6d, 0x67, 0x73, 0x6e, 0x37, 0x37, 0x66, 0x32, 0x74, 0x33, 0x67, 0x75, 0x76, 0x32, 0x70, 0x30, 0x78, 0x61, 0x36, 0x6b, 0x6c, 0x61, 0x38, 0x71, 0x74, 0x79, 0x37, 0x6d, 0x6b, 0x6e, 0x6b, 0x6d, 0x33, 0x7a, 0x68, 0x30, 0x39, 0x32, 0x30, 0x6c, 0x77, 0x73, 0x36, 0x33, 0x32, 0x61, 0x66, 0x74, 0x30, 0x71, 0x68, 0x6b, 0x35, 0x32, 0x36, 0x35, 0x79, 0x73, 0x6c, 0x33, 0x70, 0x67, 0x32, 0x32, 0x37, 0x74, 0x78, 0x66, 0x37, 0x34, 0x61, 0x73, 0x6d, 0x70, 0x75, 0x65, 0x6e, 0x32, 0x6c, 0x74, 0x65, 0x33, 0x61, 0x6a, 0x63, 0x30, 0x66, 0x7a, 0x37, 0x6b, 0x34, 0x73, 0x68, 0x78, 0x79, 0x7a, 0x65, 0x6d, 0x6e, 0x70, 0x35, 0x77, 0x37, 0x70, 0x33, 0x6b, 0x74, 0x6c, 0x68, 0x74, 0x64, 0x30, 0x30, 0x36, 0x6d, 0x6b, 0x61, 0x78, 0x79, 0x79, 0x30, 0x6d, 0x74, 0x66, 0x37, 0x64, 0x6a, 0x73, 0x64, 0x61, 0x75, 0x39, 0x7a, 0x66, 0x6b, 0x65, 0x73, 0x32, 0x61, 0x6e, 0x38, 0x76, 0x61, 0x68, 0x7a, 0x67, 0x37, 0x64, 0x71, 0x73, 0x67, 0x79, 0x38, 0x32, 0x63, 0x30, 0x70, 0x78, 0x30, 0x39, 0x6d, 0x39, 0x68, 0x30, 0x61, 0x65, 0x7a, 0x73, 0x6e, 0x79, 0x36, 0x78, 0x6c, 0x66, 0x70, 0x67, 0x67, 0x66, 0x72, 0x68, 0x65, 0x6d, 0x76, 0x61, 0x78, 0x6a, 0x35, 0x78, 0x74, 0x78, 0x71, 0x35, 0x6a, 0x6e, 0x67, 0x76, 0x30, 0x76, 0x30, 0x61, 0x67, 0x72, 0x6c, 0x30, 0x73, 0x75, 0x70, 0x79, 0x67, 0x66, 0x39, 0x63, 0x65, 0x74, 0x65, 0x6a, 0x35, 0x32, 0x37, 0x79, 0x72, 0x7a, 0x7a, 0x65, 0x74, 0x38, 0x64, 0x71, 0x74, 0x71, 0x64, 0x61, 0x67, 0x71
],
root_seed: vec![
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f

View File

@ -1,7 +1,7 @@
[
["From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/unified_address.py"],
["p2pkh_bytes, p2sh_bytes, sapling_raw_addr, orchard_raw_addr, unknown_typecode, unknown_bytes, unified_addr, root_seed, account, diversifier_index"],
["e6cabf813929132d772d04b03ae85223d03b9be8", null, null, "d4714ee761d1ae823b6972152e20957fefa3f6e3129ea4dfb0a9e98703a63dab929589d6dc51c970f935b3", 65533, "f6ee6921481cdd86b3cc4318d9614fc820905d042bb1ef9ca3f24988c7b3534201cfb1cd8dbf69b8250c18ef41294ca97993db546c1fe0", "7531353966636630777639336c366464666d396c726434736a6177373272646a716b657779736367377038667166307563366b766479386b796a7133667263756376356e6a66767065756a676c71327433667a6763706e77613336356d6e616139346e78706634337373633575707433717970773363747235717930356d6c6b33376565777532396a37686b64", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 0, 0],
["e6cabf813929132d772d04b03ae85223d03b9be8", null, null, "d4714ee761d1ae823b6972152e20957fefa3f6e3129ea4dfb0a9e98703a63dab929589d6dc51c970f935b3", 65533, "f6ee6921481cdd86b3cc4318d9614fc820905d042bb1ef9ca3f24988c7b3534201cfb1cd8dbf69b8250c18ef41294ca97993db546c1fe0", "753179793677386e336a6d6a73676a39777663656e7238723570366833387679636c686d71307767396b7a70786c7534367a387636346b3567737a72387966777a346a7672796c76766733673633337a30326c756b38356e6d73636b366432736578336e3564376b6e3638687a7a3574763475647439703673793770676c6565756c76676c767832363237646666353771396665703577676478386d3065737832386d307a767578706d7779617a74336a756e3272707177386e75366a326663657167686b353563656436366a73366b366a786e387932787475653866337061716a726b3871366e70746e6e", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 0, 0],
["7bec9de217c04f7ce1a86f1fb458aa881c8f39e4", null, null, "d8e5ecb4e005c28718e61a5c336a4f369e771ccdb3363f4f7a04b02a966901a4c05da662d5fd75678f7fb4", 65530, null, "75317a35677538783364766b7677636d726a30716b3568727839706361646c3536683834663777647970366e7635337233643563636365646563686d77393835746765357733633272353639716137326c676775753578727178683739616a7a63376b716d65733230706b747a71726a6c707835367168676d716d3536686e39777432686379787064616d616b", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 1, 0],
["aa6d43480fd9d91375ce6c4a020706361bd296de", null, "88533c398a49c2513dc85162bf220abaf47dc983f14e908ddaaa7322dba16531bc62efe750fe575c8d149b", null, 65530, null, "7531343367706a3772643934766d39356d7a73757537746a74716161677934706d6678386c6b77656d70786a7463777a33357a746361383530796e6c7a323932307477617a6171703270367168787878337a357178616b6e73716372676c7578716a337070757367776635757963686c61677938376b376874613768773965793336776d7930367065776c6470", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 2, 0],
[null, "a8d7551db5fd9313e8c7203d996af7d477083756", "52fd6aedefbf401633c2e4532515ebcf95bcc2b4b8e4d676dfad7e17925c6dfb8671e52544dc2ca075e261", null, 65534, null, "753178797970646a307a7978637466666b6878796d766a6e6b376e383371666c376e7365356c3071726b346e3266376465376c3733727a79787970347463727975356d6b7875617a6c646e633279306479747a7567797a79636739373034616a66786173376b63757761776d706877776e383839743938743735376579716667346a766566746b687672337167", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 3, 0],
@ -14,7 +14,7 @@
[null, "af9db6990ed83dd64af3597c04323ea51b0052ad", null, "cdf7fed0d0822fd849cffb20a4d5ee701ad8141e66d81ddfabf87875117c05092240603c546b8dc187cd8c", 65532, null, "753165353471636e30746570796c33307a7a326672677a37713461366d736e326530326e7076326e6666736433683532336d747838643232616a7666767371757235736a7a3876666e6d77327973363730387170386b6139306a3561343330757938763833616c6a63306330357a6a7535347879356e7677336d66686b376e7737366b6b7964796c713466656c", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 10, 0],
[null, null, null, "24fd59f32b2d39dde66e46c39206a31bc04fa5c6847976ea6bbd3163ee14f58f584acc131479ea558d3f84", 65530, null, "75317a38777372686d66366d3967766136766c33737a636b303670393730783577686d36336a666a3266726d6d63396e39756d34796373387975746a37673833387672676832306c667879353279306832367474386e6776643267796370797176396b793032716b6373", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 11, 0],
[null, null, "78d85bd0db639043377987cdd814c6390016964b684016faf1ad4f166c5f72399a5e8d469ec6beb873d55d", null, 65535, null, "75317861686a333570376d7639756c6b3337327333766465687172663438753077646633786c3772787a7270653461307468753864306d396d7961617078376b35767836747a357074636a76637675346472667137753771777a6d667565336b74387376736333736535", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 12, 0],
["33a6dd87b4d872a4895d345761e4ec423b77928d", null, null, "5178924f7067eac261044ca27ba3cf52f798486973af0795e61587aa1b1ecad333dc520497edc61df88980", 65533, "91e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1", "75316439356e6a7630783035643671747a703779757976667765647438796734746a306e663063727038656a74666430653866637a3271617939346b3463667877376666363070636c747076776c3378326b646c646a65617335336e686e613567393578326c7533763370723233657430643063726e7a63396e636477636d7233766a306b6c73653474793538", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 13, 0],
["33a6dd87b4d872a4895d345761e4ec423b77928d", null, null, "5178924f7067eac261044ca27ba3cf52f798486973af0795e61587aa1b1ecad333dc520497edc61df88980", 65533, "91e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1", "7531687970706c733364776d616c783373756c746b72397564763237376679716a6478307378716c746638676a6e777976343968743575327270336c6c767632756e796d7330383675616a6b6638393837636175616a7136383670356638687276393474616336663078796637796d7a3636747279366b7936726179336d6a633567786661683030637370766b3564676d67736e3737663274336775763270307861366b6c6138717479376d6b6e6b6d337a68303932306c77733633326166743071686b3532363579736c337067323237747866373461736d7075656e326c746533616a6330667a376b34736878797a656d6e7035773770336b746c6874643030366d6b61787979306d746637646a73646175397a666b657332616e387661687a6737647173677938326330707830396d39683061657a736e7936786c66706767667268656d7661786a3578747871356a6e67763076306167726c3073757079676639636574656a35323779727a7a6574386471747164616771", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 13, 0],
["a56c057ef71dab58aa90e47025695c5faaea5123", null, "a75a6de421d2ad1ee8f4b25e398adda9c0aaa6ab1f2518981a9ddb1de6a3957d77842332d6289dbe94e832", "b208c9235c8d40e49b76100b2d010f3783f12c66e7d3beb117b2c96321b7f6562adb4efc144e39d909e728", 65533, null, "7531646670723876647335683361756e79657a7a7877726d38756461353273743837733876726c676732746730357430713070783336686368783974676b786b6c77747370753332786a6135617271336b7470326e387a613470773779776a30676d68713372776539353072386b3973756e736a76773734743538716c3333347065673464766b616c6b746d6e676e716b7077723332353837653779747932376e6d673636747371377976723779343639776570366b7077346a3530786e6c6d78306a78786737766c6735796c6671387566657664", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 14, 0],
[null, null, null, "9e5445d6cd3cb9f98b0df1062bda47adffd5a66c0c2c483c8bf15c3176d755914a3576496b5c35fee28a88", 65531, null, "75316a676c686a326d617936646674777a39753271796e786a717a6e75743637343768617375306d646d6c63303266636173756178756764797a776a326c38346d6a3966677a6a3779306b396663706a373336736c6d6a38676b37377567386c6c61766367326c666d6d", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 15, 0],
["b02aec10f6fa02a08667bf9b924c3d0574a1334f", null, null, "2598d84dffb34f5908b90732490f3881399150d4c694fce9bf30d1560b2c56f09829fe123b9add20e5d71c", 65534, null, "7531397163617a647761793438707566366a77616a78307732386d307871756d746d6e6435677974796c6c6e79676867396c76393978356d3872387439673566396a307a30786e34787a6d6e7866747a3772746633756164786b79367178706e6b7438666b66686c78386b63396d6e72646c6e7874733536786378656a7a6472776c65787a7637377876797634", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f", 16, 0],

View File

@ -92,14 +92,23 @@ def main():
(SAPLING_ITEM, sapling_raw_addr),
(P2PKH_ITEM, t_addr if is_p2pkh else None),
(P2SH_ITEM, None if is_p2pkh else t_addr),
(unknown_tc, unknown_bytes),
]
ua = encode_unified(rng, receivers, "u")
expected_lengths = {P2PKH_ITEM: 20, P2SH_ITEM: 20, SAPLING_ITEM: 43, ORCHARD_ITEM: 43}
expected_lengths = {
ORCHARD_ITEM: 43,
SAPLING_ITEM: 43,
P2PKH_ITEM: 20,
P2SH_ITEM: 20,
unknown_tc: unknown_len
}
decoded = decode_unified(ua, "u", expected_lengths)
assert decoded.get('orchard') == orchard_raw_addr
assert decoded.get('sapling') == sapling_raw_addr
assert decoded.get('transparent') == t_addr
assert decoded.get('unknown') == ((unknown_tc, unknown_bytes) if unknown_bytes else None)
assert decoded.get('transparent') == t_addr
test_vectors.append({
'p2pkh_bytes': t_addr if is_p2pkh else None,