3

As I know, Transaction ID is calculated from

H( H(tx_prefix) || H(tx_stuff) || H(Signatures) )

Where

tx_prefix = {tx version || keyoffset || keyimage || one-time addresses || extra}
tx_stuff = {signature type || tx fee || pseudo output commitments || ecdhInfo || output commitments}
Signatures = {MLSAGs || range proofs}

So I test a example tx: b43a7ac21e1b60ad748ec905d6e03cf3165e5d8c9e1c61c263d328118c42eaa6 with MiniNero but failed nevertheless.

tx_version = "02"
key_offset = "c8e230afe12f958d49809d0dfaaf33"
key_image = "595a612d0df27181c46a8af70a9bd682f2a000124b873ba5d2b9f4b4e4efd672"

signature_type = "01"
ont_time_addr = "aa9595f55f2cfaed3bd2a67453bb064dc7fd454a09c2418d7338782790185fe30ccb48ed2ebbcaa8e8831111029f3300069cff0d1408acffbfc3810b362ea217"
extra = "02210081464dc2f85d185e0f6be900e552aff37b3acc87ab6465c02abb9da8de62c06e0101b957162674517c5544242ce5eb2e9f8b72ead332291c5c1af9b8e4c5408b05"
txnfee = "8088e2ed60"
ecdhInfo = "68f508c5515694ce5a33b316b990e8b67a944725c93d806767e61b2e0b13d300fbc3e5bdb36fc58e5800ffc549ab7bd533fadb7e6b64898c82ea620d749fc80e913372a2424b22bd9712183f5a7c8027c8d9af89b52d1e7d06fd1f87a1e5d20db9335c3dc0afb774f812f9f58a412c849f3c828d873f1c16ab102963799d9809"
output_commitment = "cf141f5dfe04df14afad6b451d600aa5826a9be44a76a1630850c1d5951d482ee10bb69b66af5dabec765c7f5f7528926088877fa36746833828a0575896ae57"
MLSAG = ""a8120b96f5f2a...611e395a409""
range_proof = "b9b544a75ad5a4df48156aff...16119b7a023303a6752"

L = MiniNero.cn_fast_hash(tx_version+key_offset+key_image+ont_time_addr+extra)
M = MiniNero.cn_fast_hash(signature_type+txnfee+ecdhInfo+output_commitment)
R = MiniNero.cn_fast_hash(MLSAG+range_proof)
result = MiniNero.cn_fast_hash(L+M+R)

What I get is 60f983800f9791b97368318d21924f8e7ec63012af70db4b45dc831528e28e20. Not the right transaction id. Is there any wrong with my thought? Many thanks!

  • 2
    Your 3 parts (that get hashed to make up the tx hash) are wrong. See: monero.stackexchange.com/a/11268/7493 – jtgrassie May 25 at 0:42
  • 1
    Mooooo, ZtM2 isn't as accurate as a real spec would be. For exact implementation you'll have to refer to the code itself. In this case function calculate_transaction_hash(). The margin notes of ZtM2 should always (or usually) point you in the right direction. – koe May 25 at 1:41
  • Thank you jtgrassie and koe! BTW, Is there any difference between calculate message and transaction ID? It looks so similar. – Mooooo May 25 at 5:34
  • 1
    I believe the only broad difference is the tx ID includes MLSAGs, although how they are serialized may differ as well. – koe May 25 at 8:57
  • @koe, thank you very much! – Mooooo May 25 at 9:32
3

Where are you getting your information about the structure of a transaction?

You forgot to include the hex 0001020005, which consists of the unlock time 00, the number of real inputs in the transaction 01, the input type of the first real input 02, the input amount 00 (0 to indicate it's an encrypted amount), and 05 indicating the number of key offsets that are listed.

You also forgot the hex 020002 which is the number of outputs 02, the amount of the first output 00, the type of the first output 02. Then you're missing the hex 0002 prior to the second output public key, which again indicates the output amount and type.

Then, you've not specified the size of the tx_extra field as 44. I'm sure there is much more.

Please cross check your work with the C source code, then you'll have a definitive list of things you need to include. At the very least, you should know something is wrong if you're missing out things which you can obviously observe are part of the raw hex of the transaction. The JSON summary of a transaction is not the same as the raw bytes of the transaction, as it excludes things such as the hex of the field lengths and input counts etc.

| improve this answer | |
  • 1
    This is a bit my fault, pg. 71 of ZtM2 is not extremely accurate (not that I was trying to make a spec to begin with). The function calculate_transaction_hash() is where details can be explored. – koe May 25 at 1:34
  • @knaccc, Thanks for your answer! It really helps! However, I tried again with your correction but not succeed yet. Is there an example for calculating transaction ID? – Mooooo May 25 at 5:41
  • I can calculate it now! Really appreciate your help! – Mooooo May 25 at 9:31
  • @Mooooo would you mind posting an answer to this question with the complete calculation you made? – koe May 25 at 18:46
  • 1
    @koe I post an answer! If there is anything wrong, please correct me. Thank you! – Mooooo May 26 at 3:42
3

Also take tx b43a7ac21e1b60ad748ec905d6e03cf3165e5d8c9e1c61c263d328118c42eaa6 as an example.

We calculate H( H(prefix) || H(base) || H(prunable) ) for TXID. Actually, we can divide the transaction into 3 parts perfectly without removing any bit.

The first part prefix should be

L = "020001020005c8e230afe12f958d49809d0dfaaf33595a612d0df27181c46a8af70a9bd682f2a000124b873ba5d2b9f4b4e4efd672020002aa9595f55f2cfaed3bd2a67453bb064dc7fd454a09c2418d7338782790185fe300020ccb48ed2ebbcaa8e8831111029f3300069cff0d1408acffbfc3810b362ea2174402210081464dc2f85d185e0f6be900e552aff37b3acc87ab6465c02abb9da8de62c06e0101b957162674517c5544242ce5eb2e9f8b72ead332291c5c1af9b8e4c5408b05"

which includes components from version to extra.

The second part base should be

M = "018088e2ed6068f508c5515694ce5a33b316b990e8b67a944725c93d806767e61b2e0b13d300913372a2424b22bd9712183f5a7c8027c8d9af89b52d1e7d06fd1f87a1e5d20dfbc3e5bdb36fc58e5800ffc549ab7bd533fadb7e6b64898c82ea620d749fc80eb9335c3dc0afb774f812f9f58a412c849f3c828d873f1c16ab102963799d9809cf141f5dfe04df14afad6b451d600aa5826a9be44a76a1630850c1d5951d482ee10bb69b66af5dabec765c7f5f7528926088877fa36746833828a0575896ae57"

which includes all components of rct_signatures, that is from type to outPK.

The last part prunable is all the rest content.

R = "b9b544a75ad5a4df48156aff37800994cb906cef835709b0d139eee1c85e39037f79e2434edb0038971775926ced8de2df00a0ba91eec023e2adb2bfc6aa9907178d6faffcf66cfe2acb5a9b2d24ed2336b4520a0250a6cf08f2817572d42a07b786ac61b76124d41048d59126f1df353d959692154fcef4d4bcf1874c70d9074c8415afe5a4a251199dbb9c66fdaa27b052b94daddaec96d14d3b6166004600759f38fda5a18bd49d196a442a56e17709b0f86f4b87a95cefa26d0ccde7c3042f4599f6bc41e5c8c1c19ec63dfdc660870339c67c1bdc2e1828023d36d76e0d578c13bf4119e6b336e48030419f78488f08981a9f078b808030951317eb18052b94fa43bc9618efd0d1f3917f935f49a292d61f109ee166fdbe0b2f9541ce058569df9d95a99eb320a43c3a5a73b2a0e7d04c48de5092dc102339e9f635150db7546f948d586645b32575735131b9bbaa7882810bb6a3c5c9089a4f84f6a90e26cd5be07a1e86cbbed36e855f4027b4f492c9c646967e4f77c58e877f094606254f655312ff61b206d4091e93eb2a7ee781a7d1d2f0f00fe17b7e284b1f4609e9d80c4905415867ecdd5917c5b2b4329e194dd81d593d318f5f55d126f959036c93dd1f0525729056c3ed594cd9f85d282844ef213b196ba3b18bbe28166a02c25d5b58d1af1ddde3605b641a491165fd5895b8e58ab26ba54f13c68765ab00da449fed7f9499f963b72fdcdfcc61e80186510a457b5a15647fd39d4e8e060e7dca3f84ced64fd1d6c7d6892991b63bd84b53713b642551f2cc1a67a4b4ca06fa74e4d75cb4af8c4ceb9c06b9047a177db103600a55ec0740afc8e5e1f9710e3467d35b2e2c19eb9fe8a96ff8a12670b89d4cb5432aa035f4b0d4cb0497720760dc701f225f06b1731e12cf9e8e6e58653e037db0ccd628065f3caff715d00637054d156f1bf76e7538ab5c11ecd18059093e3abd377b42b6f6470e817fa30b201ff5ac0a9e79e4cfcf3e4fb5a3e5db8f8e39ebd837124545b252b28f8fdf03ffe44f4357b907c95b6386161a612a7658d685be7415a79348370a8dd7421c0bd5718484434c11d1095daa16581181d4eec075dce940d30873e596957b90160114c841108e32e4a50be7a69ea297d05af86be46ebe0e5e0777945380cf903a06bda79071fb1ac71991786fe64438bc3ecb7cf9edf273653158db5e5a82fd0e03da379c768c036c4de2b44feb13fbf7caa7bb24e1471e2c71fdaa6caa0179fa0b878e3b16e58fd012167f6735952cc6546b0cd92028aecbd036e15e4f0aac9903fd6d1cef10a6359c1af7e7e486b9ba2825bd78586cd4736a90b705ca724a98045cd53d8facfa077c33c689b51ea40468721660e63fc3950f3abf524a7017420f0939e0d6c66bbdb1663ddc1344ee8360bf18918ad24fc6212bfd7d3b7691a302be42b78b2f9f1d7059b1c8a0de00ef4e4d5638828d6904cfe2417099d4e1d204b0b094b00e02aad6c0463e3b1729ab5fea7b274d301254d609379cfc575de30c0d9b2926a06b7500c34c189d6275e8f0e6f12dacf97cc6f6c99f8d4f981917016847bd2288347cd398bd29b26875e1447ff606e3827c450a73cac8dc0a63ac0daac031698dce131aad69ca9da8fb2f2c2d3d17dec7169bfc96f15851e257cf0fa894c5406d0bac021890f1bb1da3e577be0ad4598836b8c27938c6a6acaf46049322c38075d773d83af782ad6e13597ca84221d04f1a428a5b1651e97fdf680ef36ee19580700d6574b2b8894c32ac3840a3f3a3a675cdec32caef0b1923660f6706028988cdb7d7fed7de65380db888a597d45d9c55b9ab54ec5ec411c50301b2e6f580109c4a4085e1e96995f171f58211d3ed1c4ab4ded6d811fe7524ae0b14bc7e2583b1f5b05fbfd0c1e2be67c089bc4502074165be32c97fe944fbf909dd59a1a45c338f94cffb4959587d18e6047b18eeac71cca77205742310bb2e009488d439d37c63d9a1e6b33b8f525c77049412208f86e4adc640e4f340668f0d27a5fa83d84feeff791f3bd96f88f1476bd490c175fc6e055e4992ebb0845e0c5f84219b03d618ee62d5c41b71cb9eef13a625381ce750116711f220e4461b021323f986e18d05080696bcf81440512255b1daee5eb449267736a35f757a71015ceaae0cde58d4deea0c8c1f6d60d3b9f0bb54e5351b36e5c69f7115c14c750cd8ad7ac3dfe49ab74c5952a06ccd94ab5d6a16cba583509bc1aed108d8eaf10e31be0a5e537ca6227030cf1f36e22226863ed8c396e9f6eed26447a5c1e5f108162a2d9b88c7efaa297f92d9cde1e3be521b6cf270d285f11976d82c8387cb0e5c81468fc8f89e207d7ace46f9f5e2a3cd84119e0ab6c99757f1182abe5c3c0bd6461930c3061105c0e64db80efb9120c3e991cc08ac0904fd4235d07e67a50967ec8d97c476392975e5f6d7b62b44abe7ae27795a025b2262dbb0c42cd3790ab204e08f91508dab69ae9cb2b273f0d286153537d8af06a7f17443667c830c0293bea634ff203f3feada7c8792d5a5547e51d25be453b2f19b18c348cb6fff0352f2fb6d6b65ffa528df82d0beba7f5b824f5ca44befe7b5b773ed0fa2df090c9798cc81e4c5fe8c32aa9b3d231046232566af93e142c9931df040c2bacfab0db340f9bdf8747d37fe21cfd16891b2aa01db915371a1a68afa395d09019896037b1f50dc40fde64538462aacf26f8e4007eae0897c18389b77a7c036c18cf90f71c966569970bb842151a9346017390e0cf24d39d3e2a94f84d80c035719540df8e1c6465c2260cc8dc965efa9efc84f5bb7e4e3c186d6a8346d8687f0eeab0fed4b9baf3287c0ef58f82d83c5811cb231efa93b9ed90d894661a8951489c50c0f567c73ab8a3b7c052fa24f5c70fe265718bd10acebe1323bc507a5b94bbb01d1bd15dd880bb37a79f4ead21cc3a7074264ce4afd24f946a83dc1cea53c71024a81583ae0a8d03daee6980190cb2e74ae69e0c1161f9583d24de34803626303b548fd8e8e5c18dfed0e3a413037bf73481d69715dfdccb978ecac108c18fe005dff08ddc912fb33aec32cf829b69d7db49e90ebede4491fefdb9cf2eddfdf020fd1b878c4d4799c07bbb2b770f5d88617a6685b218a8257bb92ac2173331c0929c630beddaca6916d7e1d24ef5b77d80c322cb56ba2d586dfae9d414667240b94e1d8cd984eca91d4486ea2a41c3ea48fb8ef5a5180c2b4361ed9ba63d078080955a46d68a0d0c1b6b744d5844c3f3136f98c611b50e8840a396c688499e70336f72284464be3abe75728d90e4bf625bffc5a1baf3fcf7844d45a872f627a0ae98e5487097369551fd27527fe36f643625571c0765d700ddeb3c99d8e4fbb0967f2de04de741b44ea52b463fa9aeaf9b6cfa42575b27f3bc5b946670c5fe103e273cc1490ee97b6e166d3b970f8e1ae3627f877dd0a4ebddb776097fae9f30f58745e588c5fd0dbd71fdf775f98c991c9381c568ba6d94d75e93ffed3de6f08aa7e1203e02f87daae4aa657059ad04b038523e9fda514c0b3c63f2970d4a00981c8047c2852b000f505e8c5a211a8d1755539d529ba36dbb699e1a6e380bf03e999d2247573e424276f485b17b20f39dab133c07b83fa40d47bab2e7424b30df768a7c5c9fd12546c95592103cc33c0ce743da65faeec410434ec3c379bb00cebc8a21967b05cc65886efe944a7b487a0fa9c133d85763f3423e30fec75a20c7468d43f7e292c5b2e6fbfbbf7514ca6fc9fd567e9e2d764da6946919482d90c23e5d3403d19ff42b26620144a58c9f7528c975553256c92232bbbac2dbc170c7722209157c82078b855d439b6fa81d2d090e55903b1e9111624c7ee32347c04f4ae622af2ec4781d71d9f201a197bdb05c73f05f2ec33b25498a665e4b7a408d3e6ec1aaedaf79cfee296f8251451e0d616b5ebc5383ec61a05d7eb3ed09d0bb85d8b361a16d94b6c24437a73b8f9effe05da721a3fb576409d20d250105a0d47e90c5538580dab2546944aecbbfb9f86a07e0b6617f72b0d7e6f33e5d9790609b81aa9808f51e675d1ee2ee9f29552b07470c6f8a2d49c0c545da259dd550be8835585ab93a9c381eed54f08ef36192198f76611fafe6744a18e6674338b0319935792e2f0893d743b6435a099ef70374dc1c6800aa67472e7ad16bdef880209a66f3062a9bf89e53f3106c72fc10857f3e7be924f4589a10f47745832f306e8584a6e66975d5ba3a526cabe7d24dbd75c5031045fe1bc4ff77e94d102d20eeb0a62f43bc3788bc22002f69ca56758a5952f3352db399c370e5ad89085130927bb7c640f316fa7bed901c3bf9a0a630936c625234278694056bda9a9b876058135500d62f19256ea06a948df06b7e559f425f61767e8c6cf4e04ae49324c057de8b5ad070930bcb8c0850b7cf510b56f832dad2220769570a29489ee4d5c054f77113f1fe96a4dd2a8e65c553e8d2c06686a3aaa9362636a7118473fb3510d7c6ed1e296f0cae069853407ee0435d674b011f9e50fdf6e56180546b5f2f40701cfd424df1504e695c1c62e7ccd447087242fe9bb5e4afea5f665cf2c6e63018b51b441984dcb5d03316ac0aa7d08054c2836f61b1fba50ade6401c5c222601c830a10844b17248dfa99c96e2a90968d37b34738db7137f37d144f1fd92fc0c84c219de0366728a4caea612d786ff2d7031deea627153699442e48dbe6358012ba373eed74ffb992f5e5732faa8b26ac4b402db5a2aca25ea626b040434be0fa01de4134dbed0fb99735c439058fd88278bbb4cd7c21237620840d71271bd0b30f33f612edbcdab36e64dd6cc50ee0b9494e2344bc41669dab5d6e1b01fbc0ab973d1edaf017dbbede2f1efb064f44d8709e936b10674f0254f600b822a3809684f1c856325f77217ebe97774dfd710478a50c6005641629b7a57c1145ce40e69e192b0fc155601669ce9af0511789ba5a18345ffe0de0b5eb7fb09c50eb90c1ef575e2c29b7acbbeee84f962c65a14c28461e8169fa8e6f0d3886ff9e96209c10cae6f4a5e34b20589df86cfd55fd48ac2aec18f42a12fc68e6598d63c3309c0bdb65b9eb9649e281d7974f7a7a8f4d9d939af486790e727c7afefa0922101927afda118c80abb1fab7952481e2fb7b3c5ece0bc7cb147bbfddb8bd4438d017856c235fdf7be47d86d704d0357e8e013ceacbd3e1ed77d209c9b0467a3e40dea113e03c68a8cebedce66c9b55f03a4a87d891ca29d972253e4f35190f6a101168a092bd04765870929f594c2c32081a010da282aa87f60b8b5b97c95ee950461706b0336e5546f0b8bd6104363a4b18d73be08e2fb4a077eca3517af52920be8265ef2320ff112fc1a35ff4623918f60b764d1dfba38e2d3954b692c0d790124c9659c1b0d2f5a396015aa2f9c9ecd798170abef0d4827ff6f2ca63fa3830b205f48e2e29662f8b8f226153ab4ee2e87ac901ab53da7035a67af9f77e11c0aa6946d116eef66980338ed755ea60671b96a258e7b682a2b66da8cd17582ba0a56d09bc74961d24fe63d1d077b977a8b273c9592b8f4ab44bad8b4365f35cc0f7fc2a37cdff5b8a8322fd1d358cbcfaef36465a4150b19ad0804613c76292200804367e16fe88b4b407c1459ccaff2cfa87e0acfb5780f17373cc3352041f50219db8bf88e9a70b25504f12cc0a1d088466b99e15710ea711a983f69576a6c0cdba2e78ee911db97c306bffb1220fe9574a6b75a64e9676066218dfd0accb908f053a9122876fae57498147740331e64c73bd4c5726e81c4c4b6205dacc05208bc7ae45729f2084c01b10a766c7c397cc1039798d86cbfe9789cd196a60f32cf2f9a3c9d9854b355978830e39350fe6ef04b71c33b72d9fdb72a34cbc90a370dc99ca464e53b4110018a50f32e8521afe1bb69e8a08f15a8229b4c925db0baabb76d47e110d644ccb0c68c2039584caa0712045076aaecfbdc26d248fa31d8696178fcec6cba1fd54356300538653317fa990b3ddf7e9bf0eeabbf7df4d3a9383561b9fbbbd0457026dd6b1b171731f418aaf08b72d6fac50bd5485b10994b8b09419ade40de119ecad69eb6fa116f4a3256c70e179aed4370dfa20bec1eb9b97a0f5f6fdb7bae2f4051100fad7070e6d065845290675baa98851dcd8677b5b964df38b0a8945d8b1a27f7c49e947ca801cb3abaa24b2bac58fd1edbd69736722f522b4719970e1255e8b344d3e309eadda2f9fccd423604cab35b89227f90b28febefe091c738a9dd1804e610fbe17ba1578c83616d73df305a12a2cdc5c087336af4646e32ec09460c3e8d0a14686808e3290c9e341404d937ee520ab2844c5bc85735faa42388dc2c1b4844cb2abb4dafe5e6047a676beee9f7aecb782bfad8f106fd87b62a47e4cd9f040819b24e51ad4dec266548eef2e3306d235a5da0d558535a010b8dfe196b7a9e624e1bc5bd5a37142a327b84e92e0d4bc86b280c7074b799ca34eeb76bbf316700d275a6c0e96de73642f8f3aaedbdc1795f803be947a47fd67773053373e4013f8fa20419166a0b81ca93a64427c8e2f5b529d28dd776e455b89d4061ab97f53efdab8698b37a0bd9cc1b34a656a848ef6e8f22c778ca59e806480d2b64f0cb522d2dc5c330c3db93a25e96d18b77d0c24fbc3a636375af4fd726b96834ef6e0495eb7c8ddc57504e162ad42c1dc2513b8e0502de93f9992e41121779abbfde8fb5f8ce11866d037c77bf03c3323985e979376133a57be3f1bdca2d4983cc2abd0ac9a0189f0e5ce8687c25f50707f1c07d35783da76f4a30b736f3a050f22dd902027eb4b2fc2f38b98dc8d24512330c9a6e270197693fd266f45d9c5f53da116865f20969ee0528837bcf7ca190446ffb64842f154637f32c59874c7f3596ead221836fa4e562bbfef3a47ee4accad55c85ad3ff2336672b66a6ec897287da6d991872debf9ae2d740a0be79f9d4871b8a89558427c677dfc5f61d612ac889918c61410d8908e0844e79318c6e93d491ce0764eabca769b96ccbcce8f670805f05bd5e8ef183956265a9abdc20376af2615c032c21da6bbbd0affb571695968f26d08d14140dc7bd3fb7fb91f32e35d4ee8c08439f3055eaebb395888c5744122a6f4064d587262b6cb31c3ac1275a0c11a4cce9b5aa64a2f2d5cc930035834f009f5c8987b1f354e527e82093967f022bdc4bd818f9557ec18164653d3e3ca8be896fe94a844a4c0541f111165ff9c23d39ddade586a884fe2a962c1499d03077bd0d9d1354a05bcdbb97c03bc66de933ee433c2e7e085688032c4cd5e4e963887927a6339dd5926108e661edb07a6c7e8830ddb320f25aab848cba850235ff18b2c2dc0fa3ca8d63b01da36fb93906899fd83f4bc86b02a768a5d321ad7acf9877e82e4ce4a20f49a8d0938f5a44f84a3720c20c70e56ff70bda03d3d7cdf7d29fe91aaaf3e7dc80ed8d2729a2e5a6301f54132a57759fc438ad7fa207d329955442f11d4247ec6c83aadb9b20cc54f09d1d53952aa3444942f3512365d001fc08794b4258a7812a05d0afc19fe656be7da8236b3676e8178ea5735dd30bd4a710ada19c6a7909c07be8aeb2a5a563709a9b4f1838440ba2212959abedd2978f390106a0c87b54afbf6f587366c5535119767517ab9e8e9b8d4848b6e772df73aa637ab0e02610fe910d22ccea347c35d3451f5e44ca052604678f327b6bdc47fe100312fbf1b27da2f79b35e64c16d8e482f6b7118efd22e335df149c822ea172d632327fabc4697bcea7b64e1d8f67da7fd939d026c121e664b1c4ad376daf614f09981afe72f1256ee0d4d0f41d5b5035f0264bb60a37c6e520e959673499f28ce17bf30596c898115a59aad5d7711f73b18b4c3f0015b39ee3a88e054ed43797aaefffb154ac1f730be3275fbb6b0c2f67cd060f2b92dc24e1727a15be1a23bdd4e2068272c384a95467feb069d1516d3e87678b0ec6701a28f6b2a36c7a0bdb67cb886949a1ac828e0448dab09bf916fabb1d883ee176669b9370311ec7edefe264c13f08f66ceae4e0fc46d9cb634f190be84eb0d908505950c2326948adb55944a065e879dd3f75302c008609011c331881c6a9f61efe5b9c5e17fe73f5b91b554cc0e3e2a7398b97c389d6f9cf98fd603c028712d8ff01d823b2733cb592cca1004913864c825c86a5adedc97273fdb2059d485dee00b67110f2ddc3c67df3a4538ffe41c0aeb0c1cedade043eba962a81b4bbf619b783a184865c8d0dc51ee48b71b4012e742be7cd585c915f5ceb4acf9b783ba903dc1c29100dcc429b1c0e7134ce9620a31e2413057c337463b802eefe4d49796315d90502a0527859375ef8ca024a4ad624b239248ee41bb0d34ffd1772c23264d43b6f59750a9626e7f36c36b996a5e5305fc1e09c371937ab63135c6549b4bcac37a9f4d11750eaabc459bf2b1b385f4cbc1d544db17b1c139beba46bbec36e48414d9fef616a1a6ba9f0ac30c9f605d735dba79ecd1e26f5dac664b332620d67a003838aa1eca9f28120a463fbd2c673a6617bbeea0cf269749d7d0773b717c1838660e71d2d7a69b7516972288aa37ca4f1618a4d2fedbc11285743f6e3b5324a804efad66ff8d56580e4ab28de551435c9f149658f9eb0df04567532381f428eb6e7647937f4ddd8b879b7cc5756bb8743dfe4904589c457b41c6a1d707927c1100cddfe78614db787a90910560737b9f4139459904e26b1389647992e2fea7b4752922dc4dff1eb72db9e47852d425345cb625b503f152c7e4fe0e57a3c49209c1007acedc5f8d235c3397e63ea619239c44a5710f01f7581c9e51dcafa9de25f0d2c8c68c56ea156001ae8eb621ac39daef6906075bc8a3390976987b3b190b697f99fcfb01fd8213acc8d9862e88acf75db0b402f5035d7c4e1bb28958d4bafc0ab4ad254558a3d2246d3e863393d68d054d86058f2b826c5a6e6399360a5fa017b774a564788f3232a2a784692fc8dbdbf2a80ccde4c338b6966f0bbb8479378b7ad3957eeced127be03fc074849417830a990098ffe9886d7c96b3d759f06a0d5e935b32eb11acc5d0fec4e073b11433ddb7068ddafe4d5dd3436c9bbbb75f8583d888f331e6c36978327019d2af92c2fa290d3a7c0580daf16f050911b1fa10cd82ebc5ce9f1db1961a40a2acc58e7880040959ffb8eeecc356619669a6f3753856639f21f5b2fcce1d1460833bb1c3adc506afc599da2915ea35eb962d8d03bd05cb3893ba52edddc14e2364a723001a110c5abc4733703a50d9a4bf9a8d97754cd691185575cb59d168f8d02d93db6f1e031782fe8a9c6a77e686646295d50a952cc7fc11f9c93c2382d54fe6eaa69c1b02c58a67a1b12151645fa89ec89ff91d0c069d3949c403e265732c1445641a520fc15bb242f4547c0192a754d99babf922b5d8a82839e1fc8e5b7916be3172c90b23f6ca52a97f2bb59534b66ade5416b64ad34823de16884f4e79100a592ab90ad499ee51fbbd24319b836857e8f2ceca82cc87140fc16d0485a92d4279cdea005f6ebceb788544dd85bdef5c2c958e25994917f371ac1e83e910bdeab86a1b0e90060c6547dace6aa366ff8d17eb821e7b054ac04438718e468be5935730550cc835940e70f201d8b24a88653152bcf5fbcb32705d0e6549b818521ed07d4b020014832548538e7f2711030218b7222c223acb75b79e363d068094ef6649de00ccca86fc0c5eba687a50479d7561fd1f302e3710823341117f08682ed832ba04fc737d02593d12925979cde82ca4ee9c83e3909ad08488adaf30465ba878d005bddfa62c350a8e113437275b29afeeb6a12e7fe9d15a77fccd3b9ea943ecdb0c303e111cae708d64da96a2101f9b30142805d3618a2ac365579254b310d9b705824cc4815dcfbc5eb521d5f4bd53b179f006ba0ac42af5efdab9e79771851a0982692fa51f9f6f9680f5798332c10975adf806970d53d6b03d8c97131a6e54093e7a22626ae1f34b257c4d2856c1e34679ef6a6633e38b5461568f5ccf43e30ef34ae6849c01d60846c577d350ec60bdc0a725e96229cd5ffa73cdd30242f2031280e05bee09aeb0577b3a5cf440aff5ebea52a45eb070ce4e7d1b8f5f229f0eb4f3363dc070a2a6fe7e943c68f8898920e1e66aaf07f00f2cfa0979faeea20c7f3e08a5f3ae59c8e83a2d6a1e8f20e12b21d1f581efc933a12741f2326c5f0fe109ff44c08cf054c1e9109beb7602853925696d8010ffdd2bd0edb46dbbe80a2564b8e46c0621fecc482adf12e304a851744e8bff4e992e9b2e425163016a06edf4af5be36b2d06b2fded36d7aba838e8483f4608b8ec85aff29c464c7567054d66d5c48e151ac7617ffd5a521143fdb3c50e5cba7b894ca44840e601737c04084d566f70299cca8d19cfc1f7c80c93b6fd4ba9621b3009993a27ad5713880c5108995c9e16032bdb17d98072d6e9d65a2141a5d7b38c3637868ed07a712407705e2f6e341e7d9a4089cd580d1f015fff0bd274fa13e9124cabf3d0d5ade20eabd9394903d96665f31cb19034ef5a43dc6334eb6e582093439f07bf6c915f052e2419068081cda7d9df91bf81560fbf4ece15281872c82a83ef2878794af70ed78ab91baa65f2d8019bc190fcf0be67347fc0de5122882cb2adad5eed0da80666cb4e78a3de2a9b58da3dcf74d250d06793269be80b2321a5f003721b501b086ef7127d82a6ec20cad15a64b1b4735a4b02ddba821738b8f56214977e81710121703f8cede950103745dd65feb9c8e5ed4ba3d4b0f0320d840ac7d986df540d60f8d4c463fb629a3fd22c818d1010d48c839ba51a47845f7cf8bfd7dec5e203030b301be1dfe78e63f79427f7590db8b4ef9e9cb1b1e0eb67f76aa40d57a20a0763940c78c989bb96a07e6decf9fd44b374854e19867e414c9bd92c0997f309180081889e3a344d634c5431cd39ced4c6d391d20fb788f2025af58e093d730b834f55f7054611be0052ab23bf6b1d2a26dafc24ab8315cd1c23c25d92fd58013342ddec6208a908e1c30957680b4d2cfce4efd30372a5d046ecc0f7f6af840d8853f6afa8f505e1c8ebab215d1cac88f965dfe9ad470d326e8bfc6df6c25e0234d468be1b6aff31cf039cf0449905addb7c1703d31f13ec767bb52b9c6b3908d8e6abdad80c399d2e11803fda8e2612546a526b9198632575c8d20df159020f8da6cd3f62663a2c80e143dbab9b3d4c3d76d92ed89ef00c18588a50393b93067dd7dce2162c53503c9e1e0429f0aa6ed9748dd0a78152f17b1dd9c77dd91c09ab493cbf705e3713e15fe66ef70fecd0541ea7dbd714c545ca6f53a4936f44034cd24a272bd96eb3fda5eef11713dda72edd90c38400d12993073c66f2ae500f059d37276090ee82eda3464a70d736c80c5908d1f6d0a8bdc357782b7e0704093835b8c0c177efa0ed5306940dae54a6a219b027f92412875e9a923e30c34c007abfbbfe86bc8f63e91432c257a209fdac1113e818250e06642062c851cbaf0de593fd896c50b79dc41d1f000ff91953d2b873b7b914dac3417cb96dadbe5301e9ca564f0725d1f615314edba8defe6258c9b06b956fa3aa801cb7bc4aa0420e9905c97da1a9bc23e6a734f119ab6b9df325b5117cdb269ac41a0a0421ed440abc7c49a1cf2a9c4e4273e126ae007cf9105c5ed173cbfe1d9149f97e5944ff03e8896aa936a8a3004c4b50d8a7c61629a426f6c0e884731f9b5195085ed28e017c8b725d90c378987a2061a31309f8939f2896514a73260200eb4cb270e0e70608310723f2695d1cc0fa57ca6a138738dd91d457f1b0f1997a59765edbfb3308a404a338c84e0b45bb8612bf338dbc75c55c4ffee07fce100221b848b1b6530f95024d84991f25c6faa28356a3310afaffeddc1b5353040ec3ca02ed19ce5106c13862b9a7766beff32fec523e7df45bd0b53b35233f09bcc3783b7c76c2dc0ad96ec0340142b39e48e3bd5bda2d131c4ec4578d9bf18ed558e1027f2192cb0e0cc91480a3d46e06063c2361e79c9bee1b00ca4ad316c959713f4e9d9780fe07db5f9b5e6cb4d42eb08579b1034fc56049ec167053d808724e5eb2e77445890fc2c9a76ccb8e909de5398938dd7c05771a1398863b97603568fa5e3813f6fb08fc8ecddcf7a93b0b3f6b9322e49d0c953e146fab601082be1669fa0607efd40eb7ce0f14563fbbf4024332ac3f18fd3fb214742c3096b443708f7183b13fd40c1afed3aa0920ded62d548537f6331068b276d1d7654915bd60f9941df5f5bb02c54580a5aa93b97c313e0ff666c8afb7cbf908bcf910de426d7a9b6925966600995d9b366be7117ada0b9382001d1d01161e84a64e687a379c807d7f333b9d0cfb299503633f34dddff2d6a45c452cbb9242cf0e025b3150a155747af1f4d50374d7005291f4aee6da5bdef01c5190f3edaef57eb650a500c6c9a362490db90b5895387b6a033e3e6a1c8920f19c33fc3695ad45691ae7f281bb2bbadb655407cf55137956898b9c34c7dd376615ab59b0964a7060eeafbcd239ed9d052dde0dc406b6e75ef9127c915681c21e01a77b8f465ee86d8799b1e49879bbacb22a0335ee2d638293933bec08e578542d414cb212e8d36247e1c029a9ebf41eb2c3015e015cb15da1cd43ffc77499597d3ed9cd41f961675911d5b0062c54b037d7072d08b4006986d134da8ae46b9336eb82f8fc4bf2d17a15274ffedf8a8c7457014840eb5f9cef06bbc2d7b30055e4e9443e6975fc49998dd9dc14012ccd9b740c5dbe585679da613bc26d4f5428a522f049c93adc2ad63030ef94cae2cfc2900d1f31fde0103a9a2f26b093030a202b8221d5191c2a5443756c57a4a94e9a96067364ba04194d6d91ea306ef1d85d9d17d4a83429ab2d3ac6588518526505310a48d661f15675da76fd6d68b7eb629051f397a37938f585fd49c865d3c3d0810b0f232d738e89ce41d5bc267ef33d2857a464c15960a4b9fcfcf13d399be94a056258ceb9573fc3f542afe6c6b4c201f6d57ae82f5448626f60603f66f9b91e066f60fb6f19c95b297114f8f70ecb0dcfbffa12ff30e2353d5aeee0bf5ec161025a331757596166745263bc41cf7f8eb5abe2ee8c4f39a85b180644c5a9a22b0daf2168e6daf31648ab66ef91a5278b2cdf52634551eccff8a30c658df523ed0fed5617c86c86a54d09d40e816a5ff8d8a807c659b1157f8cdecea87cb330920e15b637dd3f2ea0f7f23f6bd33a3fc6eade81996556166b13f50c736a2ce3c4026921c3bd1aa389a4120cbb3c19a1c31925949a0338139127c7bc54d4a88e0c00a1bc7c9e34f5ca33ef4230b8edb8170bc4dcd15ed50ca572fb74d9dd4d6e0a0f44aca3fa73545015787d863e09357dbdaf40eea3718874b7ef4f36198ec2da0f6a6893f8c0acb9b5493b971c41acd84c0e615301a553e1808844ee5704cdd2092be870fe2bba328710158aee9db8bb36c8ca97702cf8e341854b631b43f4d40a062907a24c75033bc35139a39941f2e8155fdd3c48eea383f23320d978c9d80ff210f00a238934f2333cfdf3ac96efef4893b9d867c4c63b6d16f57b869b4107c8213624aec445eda3203a8cb2703bd81fdc7f51447b39d1941d4baca54faa00bff17b060790b3e8c3ae205dec7f219464eae97fa42d5aa9149be82aa8438e06c648638e71d96a4a851e7e7ce7d076c3613e8bfab2997be48b1cdda8d1244c02aff3a9c626bf7f69b5ce24d69fe42881d7ca2a00f1fecbf3a15c21437d99e500baf164c04866d4d87d6e9106df2ec4319afa0fe9d9113acdf0b16c0f24bc910754bec182fa30834a7a770552d281122d6071bb3fe18b1bb52fff909a7c20310c773db70173495068d6be8cb854f3a0d54ac1950caea9127881debb02c712ac059ad333a502945c4b3b86ffbcba095daed54803d9212dae24c9113ddcf52d070f6ef7402e80ffedfb6b86735f57f8e9e92edbcffa5b1beb71e52757f3c0cf5105ab9bce4baaa97fbd49833a9616849a39a11c651e1ad29d8351b18c6aa2cfeb07673976c52d8ac842d15e7291e0c51b17133aef0581c9e877f096f103ccd3cf068ea205cd2739d696cc8221d7dee0155d85914d8035630facc31a9df91b255f0117bac7f463096ff75c659789797e9049c90f86086202ee7fc3461e65de47010424284674d8b55e5b1efdbccc01d0f3cda1b9e32724730e863c995b486d5fd803b8041e2602e6d3417b9ec4750a26722c2d637908fecf87aadd9f350ab42f410460641fa6c13cc522f4cf8216dbae6c7e1faf7fc4ec2b62ed7044309fb6f7d30853bbfd66e74025e3b9f8f7c620308352041536f7909ba25a28ac7a3c7a65a406d32f6a062c5fa12d3baaf6d3d3b4fbb50516ac71807cc957c536de77c3bffa09699d4acf6397b524dec855e28b4deec81e10475aae4d866575405f642e9bb70a334591f85d2c857a3666958e9b7fcda278360f757743f14ed6d715ac9545b60cce9b4d8e8d47438f9c68c10c9f6723afe1bd934de98c65e49cfdda190f48b30f64316c6a4c30cbc655d1e9fe8e03f59e6a681f57fccce3ff379d73ee569f59248c85ec86e1c62d56f06d6fd01a04f2835d1642f984a9223f08c63985d9e88995a0d127229a56cd984e16d15a9c3a4be49fe7d62f8c92e541d99815f46a5fb2224f7b062830d2b23d9721cae65991255e37413b2de2a18844ec33c9f03f4da8a56115e5c04ecb90bb38a7e298a736316f282af5b97f336e209168d4611c1cf393b8c497b260b0f78ec078d6a75249c0db3a477eb50d8b6203af1bd9948e030011097f5a0df86cccc36ef276f77d245a3715932f3dbbcf85c86a64a153e18754443391ba3a435fb321409ce0e7fb59f5338851c9de1d848fbf2b82d0b662dca9165c2ad84b6e8fed9fd77cdc85ba93ec5a6dbdd346c1c967a62469cece6b1630e9cb1eaedb1ad2b8db823cb777d4b11e66fabf3ce45d5027a4653ea13c01b21e97255f329314fd0eb7142c209a1afc50ba53474fe13a4c180f1b5aa9e362803ebd783175efb84e1d277c4cc9d72f36c1416cb5d6f7a497013c3a1a2f4ac3f032fcb21884725ec368486a864f72d3369791c61759da5696d8130428d79220558bbff572aed0fe4ec56ec7749e54c8fb74daef5ce9a593e84244e167cd1c8e901cae04bedc416b434d6cb680620f6e2beb388b7afaa78a6504f6bef96be108e989019082812bf28e97c1f75e587a84a805702de5322cb14b20662614fe90fec010b5a2d3a5407c3d5756c8e3ed6e670a036114589e15499544bd60e517d6f99acf44fa106c05ec7ca78b8a5914f912cdcc3629f1a08dd3987c4e38bad85557d81f2b48e11d6935c5ac57aff5390a73d348e50fa8f4be41fdcf329d781730b6fe1da73d157c25c568e194bbe7a4871b9e4e7d2b48609eb5771990a8f3bf58fe30bccfa94ed3128fe2ccc3b46d954de3d98a9f341c7253ece281eccd425740ad0d3ca6a2c8b706a384233385ff076d9338702b507b18e20c7509fdf622cf27dd49374fb092432fc6466ec51a35bf39571d48cb8672a76a9d87f7cad8baaa1a1b30e261057960b5d4a8a1080f19c960a2e78917ce1b5dd4e198ec98739361dc45c963e7ed3ac4cc38d828c97fe760df726bd81fc767084babd313421c6eb26d0cb7924ee8e11a573e332f03aa83d96b4c27b770b13558745df6ef92a981f177720dbd46269f51a7f23c70817b9c9f9c2916cf4895038ec5b0357e5f847df1ceaa038d078783cf7d3c8ee8fe686f0597340ed9fca3b0e61c0c69830437ec2660befa6cdba55af99b82427b395bec0c406b16553deac18e9314551d3bbe3ec87ad91adef9c4f9c38ef3f6082ac4571aa29b5016dc34de4865b02291b866c7ecf61b138f2da19d7e855dfeab0eee712ea875954c9811c9309c186a55e71786de2f4ff1c5979a6730183d391d386619b539cf2f364c83876ffcfee73eb367dc3a8c373650718df4efaf0e8e3265d56f0831d19fb08b98b67e33bfc262389c9bab0b3f898995d8bd03416bb02add44825c9afda58503780672e8103490922e73a957841ad7a2ae9d5669e2939bc6df9ee10d634fef50bf2151284be28440ca65697631b7ebb637068053eb834356b52e44e74964dc5f430b8b02c58632b9a3f632b3635f0987fe251eca196a3ea7a3ddeccc1c902f266ee8145c582d35050cbef4142f0ad507d6dafdc8e44adedff4f9cab3146e3baa2a755aff2919483341e4f718c0bb14b6439c18c9cd41d82cef22e9f20ba71fe8a942da03b21a67dc9a306dfa92c449716fc6731a8161faede3d77edab637e4aa1ba4b2285dde10d665f77e491cfdfcbe01f821095952dfe843de2b477cfda6e9eff69f71e98d12902dd3eda64d24cfe63e02bc9faee523d4d0427c19f8f8b27251a9a52024006f6e17bd5d5fe8727a458d2d0f891fa97acc06127b6f3a5d34e1f2be868c37e82e1439b6f98caf3b706eb24a82dd34eaf508e4a5acf789c166a8c5389439d08f4ebcb2918334918ed39ef397ac3e8d36e4a2a2c1913ac9b621681d5b190b73dda5d44991062a3638b0ba3fedc1055d551509b5dcfe92d0a18175b424a215b7cabac6e0495dc818abe4c28e1d5dbfd8d5c4c04f75d426a7da4f2922344b77edb3a69b64356789436fc718def84bb93877d9d0efbbe9351e2ab2949ce6883e9c648e22f38e94a9ae861c37b2c0d6ec1f5048fee351e2955576b3c80e0195e5d607c940047a63a58e06c56d1db5df03eef9ca00fc0cb7c8d362d83037eda9e7e8a02798ec5294243dddaa60c3e29f03d9aa48d5b5f14df3971e7c4ec8807c7fcc637699e27d3435ee0ad4b71ee8047be2ae1ae4b972041ece4efa82ade156c9b136626873a1dd8be66a172478c882e28d030392e0fedf04a5a681575c0cfc1bfbf67bb978e86c7f4521255d260b8615f2792d5c01e1a8e9234809d69255cb8c587a5a092885125103ea3f6bee9aae7c8a72b474d8c91362d80191712404dd816de7ee03166bf200c4d53823e32f15523a9095fd61ff540fa21cdc71b7daeca8b34c271ae69b233896e566ec4490e7a31ec19cd09af191ba1f718cb2fd1db65786bd2b19a04434c5c34136e84d2b1571582a9d396ab3ff389e93a51b86026d1bd87187e57a11eacf3e1421c534930af853c9e894cf4a07237382eee450c4335d5c9221e86d6b9c8892996140b65fd7e3f8637ba203a4415be2c653d6120c05fade3227cd1d4cabd3bd22b16f1199344d9297749f87a1958cf79ff550d1c5978db49f6d4eef732a62991a82e77450611cb13951a624652405201955345b9e9cd1eae27ca256513b24491b460b3d776ce8bfa7b118cd16e2926c0f80aeba8d6753bebf716119b7a023303a6752a8120b96f5f2ac5bceab37f7d6bf8d86554d87c4af3441007cad92f54a24d9082e6bc016297a5d398936c9f45e7a80215138f69e55179b337922e2d51c1a9f001e1052a68c38bb88b6e8f257d999c13f1d5f4fa219cc23479ccbfa6b14b5960ae914d35eed0d27344fbc3a89b91bd445d433b561efc844c9f466a61ebb5f6d09e04d011f515461fdbd8d13536c23143dc365d87dd323defb1af834e540a8fc0ef9b41a117a1415fec54f1cc16aeef859b2cab1494b9e26a95fc9eaf4f571fa00de7a7b30795cab310b632f708c6c2546847a5cbcc27ff48e75c1556c3f6f180c6218695558359d115e308b008d9aa368c38672732d2fc21c6317ad7d15918c050ca70bbdea0e391b1e24e2540f33b48dd9dc554c61ebf23bb3691aab5094e40fdafecd436b2448504c0a3a1997b356c141f1d4b5977cc66e5f55592f137315015059757cf06216215955aaa108e8dd40be157856749a9d883bcac611e395a409"

Hash them respectively.

L1 = MiniNero.cn_fast_hash(L)
M1 = MiniNero.cn_fast_hash(M)
R1 = MiniNero.cn_fast_hash(R)

The last step is to concatenate each result and hash again.

result = MiniNero.cn_fast_hash(L1+M1+R1)

The result is the same with TXID

b43a7ac21e1b60ad748ec905d6e03cf3165e5d8c9e1c61c263d328118c42eaa6
| improve this answer | |
  • Interesting, so you just chunk the transaction blob directly into 3 parts and hash them? I suppose it makes a lot of sense. – koe May 26 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.