1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

fix(core/cardano): make witnesses order deterministic

This commit is contained in:
gabrielkerekes 2021-03-23 16:05:24 +01:00 committed by matejcik
parent 25411e22c9
commit 3cb686d452
2 changed files with 9 additions and 5 deletions

View File

@ -147,7 +147,7 @@
},
"result": {
"tx_hash": "7e16a0b47bdfc37abf4ddd3143f7481af07ffe7abd68f752676f5b0b2890d05b",
"serialized_tx": "83a400848258201af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc00825820a34dc95d806a3b206aab5e0c2aaa5ff0704f84868fe65793053f6ae9a7970979008258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b70082582033ad5e2a8f298053da804c30c9f72836bfac0a58a30aef2ff87656418b01f70b00018182582b82d818582183581c9e1c71de652ec8b85fec296f0685ca3988781c94a2e1a5d89d92f45fa0001a0d0c25611a002dd2e802182a030aa20082825820e246aa6392958f01fc8fafd5ac1cf5f28ef34af05820b49c98919753a76109c05840517ca4c901a9cded7b4ab3b1d576f41b28a05aed9ed96ef86a78556099aaa5e996a38c74783262d807d86d48c131b1cb91cbab4ef4b6b52dc8d49708b0f40d068258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c15840e661d9d1002bc2f8b310e0b0541f9bb9c3357e8e6e7f772ca72fdfd4dfc27f9ae040197d4ef69c98dc16a105f00c7ff2cebf2d85920307606bff087e550b470d028284582089053545a6c254b0d9b1464e48d2b5fcf91d4e25c128afb1fcfc61d0843338ea5840ca7325ac3280708a12a70f794699243fa1c2a3e3981dccd7e5a1200f521e19fad52489c9be81e8a8ccaccd3c42d917ffd1719e6808e11fbcd1ef495f7324b10b582026308151516f3b0e02bb1638142747863c520273ce9bd3e5cd91e1d46fe2a63541a084582040ed7b4134e85866f55ec896a8a81e9d41c20969af8f88c532e5ad1f9c9425ab5840e11444cf81b94754a15e244259d983cc3099ff04a8212dde814d6e0a9cb7e4423caa440cdee9e2d663b59e5005dbfeee8057765245b96711f1ff20caf8cfb3025820ec19de133d3c5a598212a3b8ad9249453c4ca10e0b9228714700eeaed944590941a0f6"
"serialized_tx": "83a400848258201af8fa0b754ff99253d983894e63a2b09cbb56c833ba18c3384210163f63dcfc00825820a34dc95d806a3b206aab5e0c2aaa5ff0704f84868fe65793053f6ae9a7970979008258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b70082582033ad5e2a8f298053da804c30c9f72836bfac0a58a30aef2ff87656418b01f70b00018182582b82d818582183581c9e1c71de652ec8b85fec296f0685ca3988781c94a2e1a5d89d92f45fa0001a0d0c25611a002dd2e802182a030aa200828258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c15840e661d9d1002bc2f8b310e0b0541f9bb9c3357e8e6e7f772ca72fdfd4dfc27f9ae040197d4ef69c98dc16a105f00c7ff2cebf2d85920307606bff087e550b470d825820e246aa6392958f01fc8fafd5ac1cf5f28ef34af05820b49c98919753a76109c05840517ca4c901a9cded7b4ab3b1d576f41b28a05aed9ed96ef86a78556099aaa5e996a38c74783262d807d86d48c131b1cb91cbab4ef4b6b52dc8d49708b0f40d06028284582040ed7b4134e85866f55ec896a8a81e9d41c20969af8f88c532e5ad1f9c9425ab5840e11444cf81b94754a15e244259d983cc3099ff04a8212dde814d6e0a9cb7e4423caa440cdee9e2d663b59e5005dbfeee8057765245b96711f1ff20caf8cfb3025820ec19de133d3c5a598212a3b8ad9249453c4ca10e0b9228714700eeaed944590941a084582089053545a6c254b0d9b1464e48d2b5fcf91d4e25c128afb1fcfc61d0843338ea5840ca7325ac3280708a12a70f794699243fa1c2a3e3981dccd7e5a1200f521e19fad52489c9be81e8a8ccaccd3c42d917ffd1719e6808e11fbcd1ef495f7324b10b582026308151516f3b0e02bb1638142747863c520273ce9bd3e5cd91e1d46fe2a63541a0f6"
}
},
{
@ -472,7 +472,7 @@
},
"result": {
"tx_hash": "439764b5f7e08839881536a3191faeaf111e75d9f00f83b102c5c1c6fa9fcaf9",
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048282008200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b427783028200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b4277581cf61c42cbf7c8c53af3f520508212ad3e72f674f957fe23ff0acb4973a10082825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e58400dbdf36f92bc5199526ffb8b83b33a9eeda0ed3e46fb4025a104346801afb9cf45fa1a5482e54c769f4102e67af46205457d7ae05a889fc342acb0cdc23ecd038258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c158405ebe8eff752f07e8448f55304fdf3665ac68162099dcacd81886b73affe67fb6df401f8a5fa60ddb6d5fb65b93235e6a234182a40c001e3cf7634f82afd5fe0af6"
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048282008200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b427783028200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b4277581cf61c42cbf7c8c53af3f520508212ad3e72f674f957fe23ff0acb4973a100828258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c158405ebe8eff752f07e8448f55304fdf3665ac68162099dcacd81886b73affe67fb6df401f8a5fa60ddb6d5fb65b93235e6a234182a40c001e3cf7634f82afd5fe0a825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e58400dbdf36f92bc5199526ffb8b83b33a9eeda0ed3e46fb4025a104346801afb9cf45fa1a5482e54c769f4102e67af46205457d7ae05a889fc342acb0cdc23ecd03f6"
}
},
{
@ -504,7 +504,7 @@
},
"result": {
"tx_hash": "3aca1784d151dc75bdbb80fae71bda3f4b26af3f5fd71bd5e9e9bbcdd2b64ad1",
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b4277a10082825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e584084f321d313da67f80f7fab2e4f3996d3dbe3186659e6f98315e372dbe88c55d56f637ccc7534890c3601ddd31ba885dc86ba0074c230869f20099b7dd5eeaf008258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c15840e563a8012e16affd801564e8410ca7b2c96f76f8ecb878e35c098a823c40be7f59dc12cb44a9b678210d4e8f18ab215133eef7ca9ece94b4683d3db0fd37e105f6"
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b4277a100828258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c15840e563a8012e16affd801564e8410ca7b2c96f76f8ecb878e35c098a823c40be7f59dc12cb44a9b678210d4e8f18ab215133eef7ca9ece94b4683d3db0fd37e105825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e584084f321d313da67f80f7fab2e4f3996d3dbe3186659e6f98315e372dbe88c55d56f637ccc7534890c3601ddd31ba885dc86ba0074c230869f20099b7dd5eeaf00f6"
}
},
{
@ -544,7 +544,7 @@
},
"result": {
"tx_hash": "22c67f12e6f6aa0f2f09fd27d472b19c7208ccd7c3af4b09604fd5d462c1de2b",
"serialized_tx": "83a600818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b427705a1581de1122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b42771903e8a10082825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e58400202826a8b9688cf978000e7d1591582c65b149bb9f55dc883ae1acf85432618ca32be8a06fef37e69df503a294e7093006f63ababf9fcea639390226934020a8258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c158407efa634e42fa844cad5f60bf005d645817cc674f30eaab0da398b99034850780b40ab5a1028da033330a0f82b01648ec92cff8ca85a072594efb298016f38d0df6"
"serialized_tx": "83a600818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b427705a1581de1122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b42771903e8a100828258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c158407efa634e42fa844cad5f60bf005d645817cc674f30eaab0da398b99034850780b40ab5a1028da033330a0f82b01648ec92cff8ca85a072594efb298016f38d0d825820bc65be1b0b9d7531778a1317c2aa6de936963c3f9ac7d5ee9e9eda25e0c97c5e58400202826a8b9688cf978000e7d1591582c65b149bb9f55dc883ae1acf85432618ca32be8a06fef37e69df503a294e7093006f63ababf9fcea639390226934020af6"
}
},
{
@ -580,7 +580,7 @@
},
"result": {
"tx_hash": "cc068a25994ef6a90cdab8adfbe302d6f742de9901ba2495dd64a09f2ef951f5",
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c58e438148441c6409537ebd82bb04924362cce2912f3494693fcb000a10082825820d1a07f06b872c68120def0203d0fc3d582ac4ce3897d5eaf448026960875f76d5840b67d2af9de2bdfcf552f92ae12a16ed9f9cce9e34adbfe492ff75917a8a0277e125bac8f0dbdd0c4f11fd95ab6d94cb937a5b708f47ec338a00cab2931ba14038258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c1584019b71c5b97a188cf9ff479b6ef7a45a0df94a917845d15c03a5fa508042724dcee1e8f944b91141ed91e6faa228806b3644e2560cb231470d09788ac5065ff00f6"
"serialized_tx": "83a500818258203b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b700018182583901eb0baa5e570cffbe2934db29df0b6a3d7c0430ee65d4c3a7ab2fefb91bc428e4720702ebd5dab4fb175324c192dc9bb76cc5da956e3c8dff0102182a030a048182018200581c58e438148441c6409537ebd82bb04924362cce2912f3494693fcb000a100828258205d010cf16fdeff40955633d6c565f3844a288a24967cf6b76acbeb271b4f13c1584019b71c5b97a188cf9ff479b6ef7a45a0df94a917845d15c03a5fa508042724dcee1e8f944b91141ed91e6faa228806b3644e2560cb231470d09788ac5065ff00825820d1a07f06b872c68120def0203d0fc3d582ac4ce3897d5eaf448026960875f76d5840b67d2af9de2bdfcf552f92ae12a16ed9f9cce9e34adbfe492ff75917a8a0277e125bac8f0dbdd0c4f11fd95ab6d94cb937a5b708f47ec338a00cab2931ba1403f6"
}
},
{

View File

@ -525,6 +525,8 @@ def _cborize_shelley_witnesses(
witness = _cborize_shelley_witness(keychain, tx_body_hash, list(path))
shelley_witnesses.append(witness)
shelley_witnesses.sort()
return shelley_witnesses
@ -567,6 +569,8 @@ def _cborize_byron_witnesses(
byron_witnesses.append((public_key, signature, chain_code, address_attributes))
byron_witnesses.sort()
return byron_witnesses