From e42444fd2020e1e9ad785421ce29c78ce0956929 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 7 Aug 2023 21:55:46 +0200 Subject: [PATCH 01/17] update assetchains.old, remove old (deprecated) chains --- src/assetchains.old | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/assetchains.old b/src/assetchains.old index 286a212988c..f5fd18f43cd 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -3,27 +3,14 @@ set -x delay=60 source pubkey.txt echo $pubkey - -./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 $1 & -./komodod -pubkey=$pubkey -ac_name=CLC -ac_supply=99000000 -ac_reward=50000000 -ac_perc=100000000 -ac_founders=1 -ac_cc=45 -ac_public=1 -ac_snapshot=1440 -ac_pubkey=02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9 -addnode=node.cryptocollider.com -ac_adaptivepow=6 $1 & -./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 $1 & -./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 $1 & -./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 $1 & -./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -ac_ccactivate=320000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=MORTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=95.217.44.58 -addnode=138.201.136.145 $1 & -./komodod -pubkey=$pubkey -ac_name=MSHARK -ac_supply=1400000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 $1 & -./komodod -pubkey=$pubkey -ac_name=REVS -ac_supply=1300000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=RICK -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=95.217.44.58 -addnode=138.201.136.145 $1 & -./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 $1 & -./komodod -pubkey=$pubkey -ac_name=ZILLA -ac_supply=11000000 -ac_sapling=5000000 -addnode=51.68.215.104 $1 & +komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=CLC -ac_supply=99000000 -ac_reward=50000000 -ac_perc=100000000 -ac_founders=1 -ac_cc=45 -ac_public=1 -ac_snapshot=1440 -ac_pubkey=02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9 -addnode=node.cryptocollider.com -ac_adaptivepow=6 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=DOC -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=MARTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & From a6ce7c81e47d906816f38918d4ddc276d7f15f4d Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Tue, 8 Aug 2023 22:52:11 +0200 Subject: [PATCH 02/17] add events related unit tests --- src/Makefile.ktest.include | 3 +- src/test-komodo/test_legacy_events.cpp | 139 +++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 src/test-komodo/test_legacy_events.cpp diff --git a/src/Makefile.ktest.include b/src/Makefile.ktest.include index b8877f09efc..fca00ac891b 100644 --- a/src/Makefile.ktest.include +++ b/src/Makefile.ktest.include @@ -30,7 +30,8 @@ bin_PROGRAMS += komodo-test test-komodo/test_haraka_removal.cpp \ test-komodo/test_miner.cpp \ test-komodo/test_oldhash_removal.cpp \ - test-komodo/test_kmd_feat.cpp + test-komodo/test_kmd_feat.cpp \ + test-komodo/test_legacy_events.cpp if TARGET_WINDOWS komodo_test_SOURCES += test-komodo/komodo-test-res.rc diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp new file mode 100644 index 00000000000..cd27dcc06b4 --- /dev/null +++ b/src/test-komodo/test_legacy_events.cpp @@ -0,0 +1,139 @@ +#include +#include +#include +#include + +#include "util.h" +#include "chainparams.h" + +#include "komodo_globals.h" +#include "main.h" +#include "primitives/transaction.h" +#include "core_io.h" +#include "komodo.h" + + +namespace fs = boost::filesystem; + +namespace LegacyEventsTests { + + class LegacyEvents: public ::testing::Test { + + private: + boost::filesystem::path pathDataDir; + void printMessage(const std::string &message) { + std::cout << "[ ] " << message; + } + public: + LegacyEvents() : pathDataDir("") {} + + std::ostream& LogMessage() { + std::cout << "[ ] "; + return std::cout; + } + + void SetUp( ) { + + /* Set environment for each test */ + pathDataDir.clear(); ClearDatadirCache(); + + fPrintToConsole = true; + fPrintToDebugLog = false; + + fs::path tempDir = fs::temp_directory_path(); + fs::path uniqueDir = tempDir / fs::unique_path(); + if (fs::create_directories(uniqueDir)) { + mapArgs["-datadir"] = uniqueDir.string(); + pathDataDir = GetDataDir(false); + } + + STAKED_NOTARY_ID = -1; // should be set via komodo_args call in real world + SelectParams(CBaseChainParams::MAIN); // by default it's a CBaseChainParams::REGTEST, see ./src/test-komodo/main.cpp + chainName = assetchain(); + + komodo_setactivation(Consensus::NetworkUpgrade::ALWAYS_ACTIVE); // act as UpdateNetworkUpgradeParameters for regtest, to set sapling & overwinter activation height, but for mainnet + + KOMODO_REWIND = 0; + chainActive.SetTip(nullptr); + } + + void TearDown( ) { + + fPrintToDebugLog = true; + fPrintToConsole = false; + + if (!pathDataDir.empty()) { + fs::remove_all(pathDataDir); + } + + mapArgs.erase("-datadir"); + pathDataDir.clear(); + + chainActive.SetTip(nullptr); + komodo_setactivation(Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT); + SelectParams(CBaseChainParams::REGTEST); + } + }; + + TEST_F(LegacyEvents, PhantomOpReturnEvent) { + + int32_t fakeBlockHeight = 3507273; + + std::vector vHexTxes = { + /* 2b4a299ed7c9b3444b9bbfd091783f4f1d4b1b70987505de926312a4ba5d9026 */ "0400008085202f890de75353322bad6580d8d349b47f80362b73d7a391ebf76cb455c9a22da81162d51d000000484730440220436b3772c4f508b8ea0904b7c1c05b93b72dcbbfe284ef98c2314cc7761dd289022044207efe4d61201ba1c3fdaab9aa9b164bf9da983cfdc884532f2556d2e3332001ffffffffc2fb445d59fdf56fbdee6da85182626006e3965f6543b552408a439414784a8f0e00000048473044022053fb98f7e7a99398a2745ca6982e72a0cd29b6dc35eb7d267af60776399ad64c02206435029c413dc68227dcb4055e7f0ffd8cc53d40452d13ad8ad11e762e4b3b4301fffffffff25ba9881d55c5f7e52984ba7b8e708e0a9536335076301b74b8af648af88ba50400000049483045022100c591e4148e583a721e42dadf0c137253913a1613714580e76dcf8a59260d026902205655a76161b912a992e716341c12f43d4f74942c3105b2a4a385631287e3873301ffffffff861026dc3790e6c59292dd8db9581f317e0cf4137283668b7b1686a91291e9770a000000484730440220551301509286c016e05c1db5b6e2a052791cb7295b54cd00f396a05c0cf89dee02200450fee4174fa93b1b5e40b3ff8bc9baec19f45080c1f8c73d452d09783ddd8801ffffffff5703a4413921d8bf3b719678094419f46948b41e4bda01863c11c61f803649db020000004948304502210091c5ccade0b5e4174fbba895bc8105c2f1ca0149c5f8b071f0176b97147e20c00220563254719049becb4f8bb5a50faa737077d378ffc15e93a96f357228182ba5d201ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910600000049483045022100c9561b0754a17f55c4b35d36e46df6d3845b83de88efd565d73bc50e83cbecba0220183865eb8446ad165733b9360d8ab9a0fdda7e73a3114d0feed7352c70d9972f01ffffffff1ed36a28c72c36710e4ae6849ee5f90511341c99f6a34235f150661f4445d2650000000049483045022100c7a7300841d671379f65075405eb85ee2930b417b5ede49ddb83d7717644cebd0220432e9aa745c65a0c30f408b5a9473dc38e1cb375eca5c640c7ed630444d503cf01fffffffff84acac4ddf0c87b9bbb40eadc485b891776153dff371872a4957ad1b40c07b50c0000004948304502210098d3c2b126f6f6022c6982c2a1ba600f575622911bdc1dff0a05fd093044340902207c50e568da145c751be8ded10bef6aabe1d4429f67253dbaac95242e2b8def2901ffffffff508000fa6bd1131fae49413a5ec8b1d3f479314e94527e39063532055aa8edde0700000049483045022100c7cb0a95afd3602ab07d2b9c1f390f3e81f438e555a8adf9fa52b810361920950220488ef1ef6b5fc50590b3d847fbffaaf9868c0f379750f0921acb73512d3a798901ffffffff4de7e7744f14114711defb6bb517bdf0b3edf53013d030da4d5ac7aad45542311300000049483045022100e6a4fe994cfbc028692eee048c4ed8d6dd9c63daa16c644bdd8ae72e3dcea56e02207597d0ceebb6e5a4a5d9802c5b9da2cf37a21f85f344b6acd8577b029410d21201ffffffffc14defef7bbd2dcf06502e18b8b0012fed83f5e644213401c8a1113501df1e6802000000494830450221009f414593f661a7b8c06defa585bdc428dac04234042357ac9a3b11108a26071d02204a862f72675dd8b46f9a1b93d44bd388eb819667bd3e7e7a30266491f8f5710501ffffffffd87d4c2d10fbf27c9800523e05bb43b2599bb9c8e9486b42b012f66c7a6f77ea13000000484730440220047c5eaabd6df36c8bfdd0737a367a12161629aa530c6012241cc36a88fa837d02207eda8879273887b954656e29ba1e98a7dce17cd66061d861e39a12521d6474fa01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e1d00000049483045022100cfb0758d9c1bcbb797d54ad0849b77055f1a2811b559ba2a59aaf38ac4cfb17802202d36f77b6bd9f41281937e39154708e58c82932386fdd8a75ef50d0feeff1c1701ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000004a6a48a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a283093c843500238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f4b4d440000000000000000000000000000000000000000", + /* c495d8b31491bf5ef3d5f123344b9596ac84d604ca509d7f982400f33a6fc7ec */ "0400008085202f8901a2efbc1573128738a37fa5638800357eb309db7aee22eef3c7825aa962a86b380600000048473044022073e8a265ac732ddd480d9ccfbade1f71c98976d91061bc7abeaae96665fd00dd0220299fd6a23e4ab5e4b299f7d29a2da9c87a893901975ed38722c69dd0126f8bd201ffffffff0288130000000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000226a20e9a57645780b4559dbefc76111e450a37937d8ce5d70b0f2063e88d1c7dbd24c00000000000000000000000000000000000000" + }; + + std::vector txes; + + bool fAllTxesConverted = true; + std::transform(vHexTxes.begin(), vHexTxes.end(), std::back_inserter(txes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + + ASSERT_TRUE(fAllTxesConverted); + + CBlock b; + + // Create coinbase transaction + CMutableTransaction mtx; + mtx.vin.push_back(CTxIn(COutPoint(), CScript() << OP_1, 0)); + mtx.vout.push_back(CTxOut(300000000, CScript() << ParseHex("031111111111111111111111111111111111111111111111111111111111111111") << OP_CHECKSIG)); + CTransaction tx(mtx); + + // Compose a block + b.vtx.push_back(tx); + b.vtx.insert(b.vtx.end(), txes.begin(), txes.end()); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); + + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* + we shouldn't have matched == 1 on 3rd transaction in a block here, as a result, + we shouldn't have komodo_voutupdate -> komodo_stateupdate -> write_event call + and komodoevents file should be empty + */ + + uintmax_t stateFileSize = 0; + fs::path filePath = GetDataDir(false) / KOMODO_STATE_FILENAME; // instead of komodo_statefname call + if (fs::exists(filePath) && fs::is_regular_file(filePath)) { + stateFileSize = fs::file_size(filePath); + } + + ASSERT_TRUE(stateFileSize == 0); + } + + TEST_F(LegacyEvents, NextUsefulTest) { + + } +} \ No newline at end of file From 9c32d6e1fc8cd2f70591ea4cf1af37804f514d25 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Wed, 9 Aug 2023 20:37:44 +0200 Subject: [PATCH 03/17] add NormalKMDLTCNota unit test --- src/test-komodo/test_legacy_events.cpp | 126 ++++++++++++++++++++++--- 1 file changed, 115 insertions(+), 11 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index cd27dcc06b4..182251954a6 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -11,12 +11,39 @@ #include "primitives/transaction.h" #include "core_io.h" #include "komodo.h" +#include "komodo_notary.h" +// https://bitcointalk.org/index.php?topic=1605144.msg32538076#msg32538076 - notarization txes explained namespace fs = boost::filesystem; namespace LegacyEventsTests { + constexpr const char* strKMDLTCNotaHex = /* 2b4a299ed7c9b3444b9bbfd091783f4f1d4b1b70987505de926312a4ba5d9026 */ "0400008085202f890de75353322bad6580d8d349b47f80362b73d7a391ebf76cb455c9a22da81162d51d000000484730440220436b3772c4f508b8ea0904b7c1c05b93b72dcbbfe284ef98c2314cc7761dd289022044207efe4d61201ba1c3fdaab9aa9b164bf9da983cfdc884532f2556d2e3332001ffffffffc2fb445d59fdf56fbdee6da85182626006e3965f6543b552408a439414784a8f0e00000048473044022053fb98f7e7a99398a2745ca6982e72a0cd29b6dc35eb7d267af60776399ad64c02206435029c413dc68227dcb4055e7f0ffd8cc53d40452d13ad8ad11e762e4b3b4301fffffffff25ba9881d55c5f7e52984ba7b8e708e0a9536335076301b74b8af648af88ba50400000049483045022100c591e4148e583a721e42dadf0c137253913a1613714580e76dcf8a59260d026902205655a76161b912a992e716341c12f43d4f74942c3105b2a4a385631287e3873301ffffffff861026dc3790e6c59292dd8db9581f317e0cf4137283668b7b1686a91291e9770a000000484730440220551301509286c016e05c1db5b6e2a052791cb7295b54cd00f396a05c0cf89dee02200450fee4174fa93b1b5e40b3ff8bc9baec19f45080c1f8c73d452d09783ddd8801ffffffff5703a4413921d8bf3b719678094419f46948b41e4bda01863c11c61f803649db020000004948304502210091c5ccade0b5e4174fbba895bc8105c2f1ca0149c5f8b071f0176b97147e20c00220563254719049becb4f8bb5a50faa737077d378ffc15e93a96f357228182ba5d201ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910600000049483045022100c9561b0754a17f55c4b35d36e46df6d3845b83de88efd565d73bc50e83cbecba0220183865eb8446ad165733b9360d8ab9a0fdda7e73a3114d0feed7352c70d9972f01ffffffff1ed36a28c72c36710e4ae6849ee5f90511341c99f6a34235f150661f4445d2650000000049483045022100c7a7300841d671379f65075405eb85ee2930b417b5ede49ddb83d7717644cebd0220432e9aa745c65a0c30f408b5a9473dc38e1cb375eca5c640c7ed630444d503cf01fffffffff84acac4ddf0c87b9bbb40eadc485b891776153dff371872a4957ad1b40c07b50c0000004948304502210098d3c2b126f6f6022c6982c2a1ba600f575622911bdc1dff0a05fd093044340902207c50e568da145c751be8ded10bef6aabe1d4429f67253dbaac95242e2b8def2901ffffffff508000fa6bd1131fae49413a5ec8b1d3f479314e94527e39063532055aa8edde0700000049483045022100c7cb0a95afd3602ab07d2b9c1f390f3e81f438e555a8adf9fa52b810361920950220488ef1ef6b5fc50590b3d847fbffaaf9868c0f379750f0921acb73512d3a798901ffffffff4de7e7744f14114711defb6bb517bdf0b3edf53013d030da4d5ac7aad45542311300000049483045022100e6a4fe994cfbc028692eee048c4ed8d6dd9c63daa16c644bdd8ae72e3dcea56e02207597d0ceebb6e5a4a5d9802c5b9da2cf37a21f85f344b6acd8577b029410d21201ffffffffc14defef7bbd2dcf06502e18b8b0012fed83f5e644213401c8a1113501df1e6802000000494830450221009f414593f661a7b8c06defa585bdc428dac04234042357ac9a3b11108a26071d02204a862f72675dd8b46f9a1b93d44bd388eb819667bd3e7e7a30266491f8f5710501ffffffffd87d4c2d10fbf27c9800523e05bb43b2599bb9c8e9486b42b012f66c7a6f77ea13000000484730440220047c5eaabd6df36c8bfdd0737a367a12161629aa530c6012241cc36a88fa837d02207eda8879273887b954656e29ba1e98a7dce17cd66061d861e39a12521d6474fa01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e1d00000049483045022100cfb0758d9c1bcbb797d54ad0849b77055f1a2811b559ba2a59aaf38ac4cfb17802202d36f77b6bd9f41281937e39154708e58c82932386fdd8a75ef50d0feeff1c1701ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000004a6a48a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a283093c843500238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f4b4d440000000000000000000000000000000000000000"; + /* + OP_RETURN: + + a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a28309 + = 0983a2c9709e524a2a66887266455c2141aebbae558ef9b78718fda8db7094a9 - KMD Block #3507260 // srchash + c843500 - 3507260 // notarizedheightp + 238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f + - echo "$1" | dd conv=swab 2> /dev/null | rev + = https://blockchair.com/litecoin/transaction/1f7f887a8fbf2b48129fee471de3910cf2314ca17385e81f0a56dfa5fec48e23 - if name matched current chain // desttxid + + 4b4d4400 + */ + + CTransaction CreateCoinBaseTransaction(int nBlockHeight) { + // Create coinbase transaction + auto consensusParams = Params().GetConsensus(); + CMutableTransaction mtx = CreateNewContextualCMutableTransaction(consensusParams, nBlockHeight); + CScript scriptSig = (CScript() << nBlockHeight << CScriptNum(1)) + COINBASE_FLAGS; + mtx.vin.push_back(CTxIn(COutPoint(), scriptSig, 0)); + mtx.vout.push_back(CTxOut(300000000, CScript() << ParseHex("031111111111111111111111111111111111111111111111111111111111111111") << OP_CHECKSIG)); + CTransaction tx(mtx); + return tx; + } + class LegacyEvents: public ::testing::Test { private: @@ -55,6 +82,8 @@ namespace LegacyEventsTests { KOMODO_REWIND = 0; chainActive.SetTip(nullptr); + + mempool.clear(); } void TearDown( ) { @@ -72,6 +101,8 @@ namespace LegacyEventsTests { chainActive.SetTip(nullptr); komodo_setactivation(Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT); SelectParams(CBaseChainParams::REGTEST); + + mempool.clear(); } }; @@ -80,7 +111,7 @@ namespace LegacyEventsTests { int32_t fakeBlockHeight = 3507273; std::vector vHexTxes = { - /* 2b4a299ed7c9b3444b9bbfd091783f4f1d4b1b70987505de926312a4ba5d9026 */ "0400008085202f890de75353322bad6580d8d349b47f80362b73d7a391ebf76cb455c9a22da81162d51d000000484730440220436b3772c4f508b8ea0904b7c1c05b93b72dcbbfe284ef98c2314cc7761dd289022044207efe4d61201ba1c3fdaab9aa9b164bf9da983cfdc884532f2556d2e3332001ffffffffc2fb445d59fdf56fbdee6da85182626006e3965f6543b552408a439414784a8f0e00000048473044022053fb98f7e7a99398a2745ca6982e72a0cd29b6dc35eb7d267af60776399ad64c02206435029c413dc68227dcb4055e7f0ffd8cc53d40452d13ad8ad11e762e4b3b4301fffffffff25ba9881d55c5f7e52984ba7b8e708e0a9536335076301b74b8af648af88ba50400000049483045022100c591e4148e583a721e42dadf0c137253913a1613714580e76dcf8a59260d026902205655a76161b912a992e716341c12f43d4f74942c3105b2a4a385631287e3873301ffffffff861026dc3790e6c59292dd8db9581f317e0cf4137283668b7b1686a91291e9770a000000484730440220551301509286c016e05c1db5b6e2a052791cb7295b54cd00f396a05c0cf89dee02200450fee4174fa93b1b5e40b3ff8bc9baec19f45080c1f8c73d452d09783ddd8801ffffffff5703a4413921d8bf3b719678094419f46948b41e4bda01863c11c61f803649db020000004948304502210091c5ccade0b5e4174fbba895bc8105c2f1ca0149c5f8b071f0176b97147e20c00220563254719049becb4f8bb5a50faa737077d378ffc15e93a96f357228182ba5d201ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910600000049483045022100c9561b0754a17f55c4b35d36e46df6d3845b83de88efd565d73bc50e83cbecba0220183865eb8446ad165733b9360d8ab9a0fdda7e73a3114d0feed7352c70d9972f01ffffffff1ed36a28c72c36710e4ae6849ee5f90511341c99f6a34235f150661f4445d2650000000049483045022100c7a7300841d671379f65075405eb85ee2930b417b5ede49ddb83d7717644cebd0220432e9aa745c65a0c30f408b5a9473dc38e1cb375eca5c640c7ed630444d503cf01fffffffff84acac4ddf0c87b9bbb40eadc485b891776153dff371872a4957ad1b40c07b50c0000004948304502210098d3c2b126f6f6022c6982c2a1ba600f575622911bdc1dff0a05fd093044340902207c50e568da145c751be8ded10bef6aabe1d4429f67253dbaac95242e2b8def2901ffffffff508000fa6bd1131fae49413a5ec8b1d3f479314e94527e39063532055aa8edde0700000049483045022100c7cb0a95afd3602ab07d2b9c1f390f3e81f438e555a8adf9fa52b810361920950220488ef1ef6b5fc50590b3d847fbffaaf9868c0f379750f0921acb73512d3a798901ffffffff4de7e7744f14114711defb6bb517bdf0b3edf53013d030da4d5ac7aad45542311300000049483045022100e6a4fe994cfbc028692eee048c4ed8d6dd9c63daa16c644bdd8ae72e3dcea56e02207597d0ceebb6e5a4a5d9802c5b9da2cf37a21f85f344b6acd8577b029410d21201ffffffffc14defef7bbd2dcf06502e18b8b0012fed83f5e644213401c8a1113501df1e6802000000494830450221009f414593f661a7b8c06defa585bdc428dac04234042357ac9a3b11108a26071d02204a862f72675dd8b46f9a1b93d44bd388eb819667bd3e7e7a30266491f8f5710501ffffffffd87d4c2d10fbf27c9800523e05bb43b2599bb9c8e9486b42b012f66c7a6f77ea13000000484730440220047c5eaabd6df36c8bfdd0737a367a12161629aa530c6012241cc36a88fa837d02207eda8879273887b954656e29ba1e98a7dce17cd66061d861e39a12521d6474fa01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e1d00000049483045022100cfb0758d9c1bcbb797d54ad0849b77055f1a2811b559ba2a59aaf38ac4cfb17802202d36f77b6bd9f41281937e39154708e58c82932386fdd8a75ef50d0feeff1c1701ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000004a6a48a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a283093c843500238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f4b4d440000000000000000000000000000000000000000", + strKMDLTCNotaHex, /* c495d8b31491bf5ef3d5f123344b9596ac84d604ca509d7f982400f33a6fc7ec */ "0400008085202f8901a2efbc1573128738a37fa5638800357eb309db7aee22eef3c7825aa962a86b380600000048473044022073e8a265ac732ddd480d9ccfbade1f71c98976d91061bc7abeaae96665fd00dd0220299fd6a23e4ab5e4b299f7d29a2da9c87a893901975ed38722c69dd0126f8bd201ffffffff0288130000000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000226a20e9a57645780b4559dbefc76111e450a37937d8ce5d70b0f2063e88d1c7dbd24c00000000000000000000000000000000000000" }; @@ -97,14 +128,8 @@ namespace LegacyEventsTests { CBlock b; - // Create coinbase transaction - CMutableTransaction mtx; - mtx.vin.push_back(CTxIn(COutPoint(), CScript() << OP_1, 0)); - mtx.vout.push_back(CTxOut(300000000, CScript() << ParseHex("031111111111111111111111111111111111111111111111111111111111111111") << OP_CHECKSIG)); - CTransaction tx(mtx); - // Compose a block - b.vtx.push_back(tx); + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); b.vtx.insert(b.vtx.end(), txes.begin(), txes.end()); CBlockIndex indexDummy(b); @@ -113,7 +138,7 @@ namespace LegacyEventsTests { chainActive.SetTip(&indexDummy); int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); - komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] ASSERT_TRUE(state_ptr != nullptr); ASSERT_TRUE(state_ptr->events.size() == 0); @@ -133,7 +158,86 @@ namespace LegacyEventsTests { ASSERT_TRUE(stateFileSize == 0); } - TEST_F(LegacyEvents, NextUsefulTest) { + TEST_F(LegacyEvents, NormalKMDLTCNota) { + + /* Test for normal KMD -> LTC nota in KMD chain */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507273; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/d56211a82da2c955b46cf7eb91a3d7732b36807fb449d3d88065ad2b325353e7/%3E/29 */ "0400008085202f8901f7c7cb7594b9f1d34d06de01b434410d6b30f4e5ea02ff9807c05c345d5697f31b0000006b483045022100afff458392eb0094e98eea5852fd79abd75caf2440836bd12b50a73178542eae02205ec4160a96b43ae3794e595a182e0a8e56c19e3630b23feb04458f17e4ae2884012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff1f1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4aca54b0ac1010000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88ac2a94b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8f4a781494438a4052b543655f96e30660628251a86deebd6ff5fd595d44fbc2/%3E/14 */ "0400008085202f8901a7bf96918e451370f1554ba6b04fc35abc7b4ac4f1eb96fd0767096112fa213f1c0000006b483045022100eb8283c33341c5da0af0f5f4ce34ca72858b28112dc01fa7f554fdf58a5dccc8022071113a8dc659c70850701df5c4c7a210f5a02fe65cefc75dc278448e4cd5e3fc012102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ffffffff1e1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac67638fe0000000001976a91409b5e12290f48bc1d9dc5b8d26807252be95656388ac2a94b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/a58bf88a64afb8741b3076503336950a8e708e7bba8429e5f7c5551d88a95bf2/%3E/4 */ "0400008085202f89019e8b1e02b1ea4a0c2096031531e50f4d135a461f67e61b635ed05b0df4f35daf200000006b4830450221008cf781a9fcc8080037d8fc914649cd085ff6161e33fb28505de77458171bc52a02201a6bba76bc3ca910a6fa32284d18707c8f68e9cb5cf8c52f4da7e9da4988a1a7012102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acffffffff1b1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac70659393070000001976a9146deb008e8c10fb4783a1c5d09e8099710f98bedc88ac228db564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/77e99112a986167b8b66837213f40c7e311f58b98ddd9292c5e69037dc261086/%3E/10 */ "0400008085202f89016be666653aeb9b8f56f27452e602c8232a3cd8d287c9cb3158a68dfa2beb5d58220000006a473044022026280c80a8faf08e7d309287066b97bfbfbdc0affaa6ab557c631661e2b9bb5802200c62637648dc2e87135a3337c285d98ab80767c174403e4ec9c7680cd3153e2e0121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff1f10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac81b254b30f0000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788acd291b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/db4936801fc6113c8601da4b1eb44869f41944097896713bbfd8213941a40357/%3E/2 */ "0400008085202f8901d98abab325206b3a72ef09403850260b3704bd36f7b658961687eecc3c10766e0b0000006b48304502210093cc9efb948134858c8033fe2bef73d64df45cc6446ca54e13ce2c493f3fe5ec02202c73c9010bcf710b687eb9bcadad6f15706d5ef34a5162da16550bf335f19a13012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff0e1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac80115302000000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9154df2973b35450eda7438d7350e836f1aade87109faec7accc68ff4c7e9caf/%3E/6 */ "0400008085202f8901faac01550081530fa7ac000aad923c39ec15972d15aef06bae2770c22f1238330b0000006a47304402202ce1d5a92cdc5962b4243f179fbe3d65d60ea4addb560d2e8c0f347782ed3036022014e679afb75494a4879320c15206286f699ab0a826b21c02741fae262412716f012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff101027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdacf86f620d000000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/65d245441f6650f13542a3f6991c341105f9e59e84e64a0e71362cc7286ad31e/%3E/0 */ "0400008085202f890199ed45b0f4b2d5f20952a8c7d017fa7bcafd3ebfc5273b1c44e6c42a7351e34f0c0000006b483045022100f82e67c52f7ca63344b18085a74adbd57edff32fdc475a8dec4ca6a44ffcb4e5022034f4f597d39b3df66ac376c8be27ff809140baddf6e70977c19d7dce1884f97e012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff0e1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8acd8a4b310000000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/b5070cb4d17a95a4721837ff3d157617895b48dcea40bb9b7bc8f0ddc4ca4af8/%3E/12 */ "0400008085202f8901acd5998aa532c8d7453626c047b11ed17d0132f2fad014aa81fdca492259819b370000006b483045022100c8a59aef8d3d95769b6699da83e18c853735a046405c0f97a183b2c67bb8e3cc022057c59b13cfc09ab2f7d7a04cd02d7e49e5579cc3784f6e8451738193c40ade54012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff2e1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac6a22b604000000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/deeda85a05323506397e52944e3179f4d3b1c85e3a4149ae1f13d16bfa008050/%3E/7 */ "0400008085202f89015d96e2c7947571ffdd0ae0a5a57d842db902427aa02eace4cf69d08698ba526d0f0000006b4830450221009e7ff18404c17f3339ae290e7dbff2fdd66c282251a7f7c1ea6752cd045d981c022070512e525940eb656654bed189d79ec91d5dc449f84774aff8ad9b6ee19691d60121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac6a9e3765000000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/314255d4aac75a4dda30d01330f5edb3f0bd17b56bfbde114711144f74e7e74d/%3E/19 */ "0400008085202f890193a6435e1a0bb7c61d351344ac5b42817a62dd71199c40738560f82e24e4858a140000006b483045022100f95f2bb13b63f8664f0971e3f008fdb21dd06074259d9dda880d867a634ada560220089f36d09494d5af0b3efe665f098b52f716b780fa929f9ee797dcc336fab20c0121022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acf2ffffff1710270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac0b9d5f8e010000001976a914740a3bd4ce730e3e4109d05f0944f369321f43ee88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/681edf013511a1c801342144e6f583ed2f01b0b8182e5006cf2dbd7befef4dc1/%3E/2 */ "0400008085202f8901c1cf11b23674bc7a14c4ca813fc012005ea75bf84ca679534a4b0a1028a1e0ac150000006b48304502210082aa302e68e057a4e8a34c8c3157fccff4b85971ec8921342a5ff97c053ce31a02205cb0a3c149f8cf13dddb3e7737edd885ed5ca73716a151a1a58d53bfdf7c14e3012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff151027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac0b43a123010000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ea776f7a6cf612b0426b48e9c8b99b59b243bb053e5200987cf2fb102d4c7dd8/%3E/19 */ "0400008085202f89014ad8ae2c0be0248cc0fea0a831d2e98a52d9718f2206a33f01b4595edcab1a4f140000006b48304502210085f09a897505bff7cece2c8a94027e6d276f79c8404aa57a76a5264cf0376b54022072049b9e8c9f0ea5ce66e45d723cc4363374fdc577467bfa434dea5a9d1dee6c0121026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efef2ffffff1710270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac744bf8ff000000001976a914bb3c96b371e912efc77d5312bd39bbc12abb7c5a88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8e337cdd2e489809ef656753e67739c0c84e8f2cf39656f8ee73da4ee5de4c77/%3E/29 */ "0400008085202f89012c147d87c9e8bcbe017209e2e1652f955eb624a90ef08edef3617490b9545f793f0000006a4730440220294cf60304a4c98509bce01cef2f7716c9e4949922f2856a0f78ed317a0c1b8a022062cd890d2b6663fbc3e69b939d94668a5b541afbadd5065dfbb65880adaf0747012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff2f1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812facbd335c04000000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000" + /* */ + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strKMDLTCNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); + ASSERT_TRUE(state_ptr->SAVEDHEIGHT == fakeBlockHeight); + + /* + komodo_stateupdate will be called 2 times here: + + 1. [ komodo::event_notarized ] + inside komodo_voutupdate komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,sp->LastNotarizedMoM(),sp->LastNotarizedMoMDepth()); and + this call will trigger komodo::event_notarized creation inside komodo_stateupdate and write_event to disk. Then in komodo_eventadd_notarized + it will call komodo_state::add_event, but it will not be added (!) in events list because add_event adds events to + the list only for assetchains (!). Is it expected behavior? Then komodo_notarized_update will be called and checkpoint to numpoints will be + added via AddCheckpoint. + 2. [ komodo::event_kmdheight ] + Second time komodo_stateupdate will be called from komodo_connectblock: komodo_stateupdate(height,0,0,0,zero,0,0,height,(uint32_t)pindex->nTime,0,0,0,0,zero,0) + and for this time it will trigger komodo::event_kmdheight event creation. it will also be written to disk, but will not be added to events list + in komodo_eventadd_kmdheight, bcz add_event adds events to this list only for assetchains. Additionally komodo_eventadd_kmdheight will be called + with future call to komodo_setkmdheight (or rewind event create) and SAVEDHEIGHT, SAVEDTIMESTAMP and CURRENT_HEIGHT possible update. + */ } -} \ No newline at end of file +} From 0ecea4a760fbb49ae09443f134b99cf52d82a906 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Wed, 9 Aug 2023 22:21:47 +0200 Subject: [PATCH 04/17] add advanced clear of all variables between tests --- src/test-komodo/test_legacy_events.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 182251954a6..75fea51f370 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -15,6 +15,7 @@ // https://bitcointalk.org/index.php?topic=1605144.msg32538076#msg32538076 - notarization txes explained +void adjust_hwmheight(int32_t in); // declared in komodo.cpp (should be used only in unit-tests) namespace fs = boost::filesystem; namespace LegacyEventsTests { @@ -51,6 +52,19 @@ namespace LegacyEventsTests { void printMessage(const std::string &message) { std::cout << "[ ] " << message; } + void ClearKomodoGlobals() { + + // clear global structures between tests (should be called in SetUp and TearDown as well) + + adjust_hwmheight(0); + for(size_t i = 0; i < KOMODO_STATES_NUMBER; ++i) + { + /* The destructors of all members, including NPOINTS (std::vector) and events (std::list), + will be called correctly after this assignment, and the memory will be freed. + */ + KOMODO_STATES[i] = komodo_state(); + } + } public: LegacyEvents() : pathDataDir("") {} @@ -84,6 +98,11 @@ namespace LegacyEventsTests { chainActive.SetTip(nullptr); mempool.clear(); + ClearKomodoGlobals(); + /* We want to ensure that global variables are cleared after the current test execution + because the next test that will be run may be different and may not use this fixture. + Therefore, we should provide clear globals for this test as well. + */ } void TearDown( ) { @@ -103,6 +122,7 @@ namespace LegacyEventsTests { SelectParams(CBaseChainParams::REGTEST); mempool.clear(); + ClearKomodoGlobals(); } }; @@ -240,4 +260,10 @@ namespace LegacyEventsTests { */ } + + TEST_F(LegacyEvents, OtherTest) { + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + std::cerr << "state_ptr->NumCheckpoints() = " << state_ptr->NumCheckpoints() << std::endl; + } } From 13ea74ee715281c2edfab61ba976c7f9e4f2c998 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Fri, 11 Aug 2023 18:35:02 +0200 Subject: [PATCH 05/17] add MIL->KMD notarisation test (3p coin nota test) temp disable other tests to make debugging simpler. TODO: don't forget to enable them again. --- src/test-komodo/test_legacy_events.cpp | 94 +++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 75fea51f370..329be3c9c6d 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -20,6 +20,7 @@ namespace fs = boost::filesystem; namespace LegacyEventsTests { + /* KMD to LTC Nota in KMD chain */ constexpr const char* strKMDLTCNotaHex = /* 2b4a299ed7c9b3444b9bbfd091783f4f1d4b1b70987505de926312a4ba5d9026 */ "0400008085202f890de75353322bad6580d8d349b47f80362b73d7a391ebf76cb455c9a22da81162d51d000000484730440220436b3772c4f508b8ea0904b7c1c05b93b72dcbbfe284ef98c2314cc7761dd289022044207efe4d61201ba1c3fdaab9aa9b164bf9da983cfdc884532f2556d2e3332001ffffffffc2fb445d59fdf56fbdee6da85182626006e3965f6543b552408a439414784a8f0e00000048473044022053fb98f7e7a99398a2745ca6982e72a0cd29b6dc35eb7d267af60776399ad64c02206435029c413dc68227dcb4055e7f0ffd8cc53d40452d13ad8ad11e762e4b3b4301fffffffff25ba9881d55c5f7e52984ba7b8e708e0a9536335076301b74b8af648af88ba50400000049483045022100c591e4148e583a721e42dadf0c137253913a1613714580e76dcf8a59260d026902205655a76161b912a992e716341c12f43d4f74942c3105b2a4a385631287e3873301ffffffff861026dc3790e6c59292dd8db9581f317e0cf4137283668b7b1686a91291e9770a000000484730440220551301509286c016e05c1db5b6e2a052791cb7295b54cd00f396a05c0cf89dee02200450fee4174fa93b1b5e40b3ff8bc9baec19f45080c1f8c73d452d09783ddd8801ffffffff5703a4413921d8bf3b719678094419f46948b41e4bda01863c11c61f803649db020000004948304502210091c5ccade0b5e4174fbba895bc8105c2f1ca0149c5f8b071f0176b97147e20c00220563254719049becb4f8bb5a50faa737077d378ffc15e93a96f357228182ba5d201ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910600000049483045022100c9561b0754a17f55c4b35d36e46df6d3845b83de88efd565d73bc50e83cbecba0220183865eb8446ad165733b9360d8ab9a0fdda7e73a3114d0feed7352c70d9972f01ffffffff1ed36a28c72c36710e4ae6849ee5f90511341c99f6a34235f150661f4445d2650000000049483045022100c7a7300841d671379f65075405eb85ee2930b417b5ede49ddb83d7717644cebd0220432e9aa745c65a0c30f408b5a9473dc38e1cb375eca5c640c7ed630444d503cf01fffffffff84acac4ddf0c87b9bbb40eadc485b891776153dff371872a4957ad1b40c07b50c0000004948304502210098d3c2b126f6f6022c6982c2a1ba600f575622911bdc1dff0a05fd093044340902207c50e568da145c751be8ded10bef6aabe1d4429f67253dbaac95242e2b8def2901ffffffff508000fa6bd1131fae49413a5ec8b1d3f479314e94527e39063532055aa8edde0700000049483045022100c7cb0a95afd3602ab07d2b9c1f390f3e81f438e555a8adf9fa52b810361920950220488ef1ef6b5fc50590b3d847fbffaaf9868c0f379750f0921acb73512d3a798901ffffffff4de7e7744f14114711defb6bb517bdf0b3edf53013d030da4d5ac7aad45542311300000049483045022100e6a4fe994cfbc028692eee048c4ed8d6dd9c63daa16c644bdd8ae72e3dcea56e02207597d0ceebb6e5a4a5d9802c5b9da2cf37a21f85f344b6acd8577b029410d21201ffffffffc14defef7bbd2dcf06502e18b8b0012fed83f5e644213401c8a1113501df1e6802000000494830450221009f414593f661a7b8c06defa585bdc428dac04234042357ac9a3b11108a26071d02204a862f72675dd8b46f9a1b93d44bd388eb819667bd3e7e7a30266491f8f5710501ffffffffd87d4c2d10fbf27c9800523e05bb43b2599bb9c8e9486b42b012f66c7a6f77ea13000000484730440220047c5eaabd6df36c8bfdd0737a367a12161629aa530c6012241cc36a88fa837d02207eda8879273887b954656e29ba1e98a7dce17cd66061d861e39a12521d6474fa01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e1d00000049483045022100cfb0758d9c1bcbb797d54ad0849b77055f1a2811b559ba2a59aaf38ac4cfb17802202d36f77b6bd9f41281937e39154708e58c82932386fdd8a75ef50d0feeff1c1701ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000004a6a48a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a283093c843500238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f4b4d440000000000000000000000000000000000000000"; /* OP_RETURN: @@ -34,6 +35,9 @@ namespace LegacyEventsTests { 4b4d4400 */ + /* MIL to KMD Nota in KMD chain */ + constexpr const char* strMILKMDNotaHex = /* b07c36ddcb015c7289f1d23225d7684087ee9c2e04f06e85522ef458db19f67e */ "0400008085202f890d31084ff2a066800cbeb8141a93e5c9d1e8690f29045fa9257fab1a3b8f6f64530200000049483045022100f93c131b3b89dd72c37a15abdd1be40646e4353730c1a12b6fbda6254f34cde6022064b937b920fe6173425453b4a7d97ab65ae095eb1b4796d62e8482fae1c9d9cb01ffffffff1a836a427a22549888adc54e902f09ee1077f70ed3a251125fd54a13413afbad1300000048473044022042bc15552e6a83c2daaf629f7506f849ee5ff5e2eceaf986d2e6a060f04f31b802200bf26040b761bf9e71e06a88079a62d3a50002a371119208334c8de1e3965c7601ffffffff3e224fd5f1b4c90b0a8d9bd4cb4e50eca6b79134e045bac25c87e8d6e25598f11b00000049483045022100ca25b6a74adbca68fa7101ddcf9728cc1ce4bef9bd0d92ca1b6373846cbea52002204957ea93f22439d1f443823f28b21b5194d1a0560dac511f9f88cae263e3444001ffffffffe96aeb8d55ca3c8673df8d9e7c3c8d93fafbbdd8a31b51afbe236bd3e5b3fe7e06000000494830450221009e744a2da5926f4e6e4f673a9c99921532f7d1036b46123d52b7de043f34f67202204af6d029e11be1b8a73e618ceb8c5149ce2e2737a38a03e8c63b213853ddc80d01ffffffff66c0a3b25a2f28222ccc7b24fcf467cb407ade77e64e63b4293e9f7e6439d79e040000004847304402205cce10f605b789fd50da53b6a671abda96f84c8511ccdd8bc4edfd80e52f8823022065bb2197bb99201acfec6dc5ddd3ecfa7690a2f69090073aa9621a40f249a35801ffffffff3be57bdde228c7b963116386ea82cd739d072017bad80966db222bcfdd3c1ee50c00000049483045022100ac555dc33a83af65ef04d95d5771cac9ea699265294f46ad8794264160388f1f0220449ad91f8ed769ea3d44edbeae5e27d78030f9af2fb0861160989b012bf3e5a501ffffffff25617f0b9249855f811804eb8fc80777dab9153f144adc05929ab7b237146c960800000048473044022035c05112d62e3fe2cb9a22dd53a0808998565539fd4d415a0b5ce8c76788803d02202aa0fa919abc3221d594f4ec0e374538dc6ca0f6fb31f93dbdec63436a3e125c01ffffffff76358aa1770a4021bd0ca18995eb1e25ef7cc098e11675ba75f035e27d74d28d030000004847304402207dbb57edd0a6f687d1168adad129e2bc3d0f609e7503faf3d6314e75600bcd700220038e56a301013b56373b54cbba004b7ce277f629974e2a2950fcd3761294d0c001ffffffffcbe3d3a2a43eaba8ca75abbdc5f517f68eefaaf5a05f24309247f2309381c30d0d000000494830450221008acdc662d28d67a87bf714d5841e52ec7bb0240e9020c2b7cc888bf1384a0d03022000faebab45b71f907eb51b8490795bce626ffe42fb95f69e5e3b4596e6f1f5d001ffffffffe78c00cf8a90459be040f137a485c05777ab751a5c8af1ad23eb12dad47854ca2f00000048473044022037a25f0622e8e52c4f267437f3d0c4297725e4ae085fc2249d515bb41dd9162002202faa1aa6d73b43917d8e9ec1b93cdee9a083c922ad536d1f5ae449ef3a25069d01ffffffffd6e4cb34a0fff3cb53e36226b36a15caeaffdbb824382e315f3c6d5d87744d240600000048473044022049a688a61ec0b1dca9e4bbd200b4f3ac7f511b8b367fe367f4485b041afda8f002203763c2c591674f054bdc4fb428da7a933448d4b4b7e1380c3dedce5f0fc5c11f01ffffffffe43d28a33d433f0c72636bf728097e00b3e6ceb4c1fb5588b07228c5963aff0b0700000049483045022100edcdb743bf49498a3243f761e70ce6256e4fe8df98dba9e6b9422fea3ca856730220676f37c062c20e22aad4f9b64f6a6066fbe52647381fb629aecfa32dd6fb91ce01ffffffffed91f6f406c9652025a4cfc2021b9ff59d5d122afcd1b63ebbd208c5ed54d09c0a00000049483045022100a3565007b2b9dadb91346d260c7f193da01fc7a260ae1ac288ca14fc61ae3fc40220616c5289aed3ade2345661f5322ecbcbd392c88c938d196f3f14a05bf773f2c001ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000002a6a28459e3d4b93db370fc2dbc92488e6b2ef5563bb61f9da874ae63312049beec9a4b6cc09004d494c0000000000000000000000000000000000000000"; + CTransaction CreateCoinBaseTransaction(int nBlockHeight) { // Create coinbase transaction auto consensusParams = Params().GetConsensus(); @@ -126,7 +130,7 @@ namespace LegacyEventsTests { } }; - TEST_F(LegacyEvents, PhantomOpReturnEvent) { + TEST_F(LegacyEvents, DISABLED_PhantomOpReturnEvent) { int32_t fakeBlockHeight = 3507273; @@ -178,7 +182,7 @@ namespace LegacyEventsTests { ASSERT_TRUE(stateFileSize == 0); } - TEST_F(LegacyEvents, NormalKMDLTCNota) { + TEST_F(LegacyEvents, DISABLED_NormalKMDLTCNota) { /* Test for normal KMD -> LTC nota in KMD chain */ @@ -261,6 +265,92 @@ namespace LegacyEventsTests { } +TEST_F(LegacyEvents, NormalMILKMDNota) { + + /* Test for MIL -> KMD in KMD chain (MIL is 3P coin) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507454; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/53646f8f3b1aab7f25a95f04290f69e8d1c9e5931a14b8be0c8066a0f24f0831/%3E/2 */ "0400008085202f8901c24c4390ec637242f7683c8bf1778f80132fe893bd36d78b38744323ed181c8d1a0000006b483045022100a762afbb4c53a2d6bc8bb68c352f59e92e1fa56f5272ffad54077ce3f3dc4b62022009f6610ebe01a412dc8f1488fe624ff0fd6627166ebd82b40e6fd18f1bfefd740121032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ffffffff1c10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac88790c10000000001976a9147b61a7a15c36b9a7dd8d048da113454db9b40b5188ac9aabb564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/adfb3a41134ad55f1251a2d30ef77710ee092f904ec5ad889854227a426a831a/%3E/19 */ "0400008085202f8901bd4ba0d2c785edeac233807ad621d49b6088aa16056058dd502b6c07d8f0280c1b0000006b483045022100dbc057bf13a8c3c8ff0f0242915d845d8bae985a219fbb453c969aee6d190e3802205d2c846c51fd9c00808bb08d1733948da70d7098cb225c2f352294245c986bec01210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ffffffff1c102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac674bdd0f000000001976a914100b86f4ad905feaaf8c839476aca644ef2ba9cb88ac0ea1b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f19855e2d6e8875cc2ba45e03491b7a6ec504ecbd49b8d0a0bc9b4f1d54f223e/%3E/27 */ "0400008085202f8901e73fde8d1ddfbc580488c62810fbaa27b3d4fa855ee66ac16ef752eea2d8745e1a0000006a47304402205c396ac131983fe47aba450d7532bfb73454ecdb104791f6bacec2e6da16c57b0220256b711903b88f54cb2d5f46064275d97699aaa766f9cf70ad3913c4845e67760121035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ffffffff1e10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05acf2bfa218000000001976a9148e760a2ff05bd7cc3f8ac63ee2b122a3eb6c2b7188ac0ea1b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/7efeb3e5d36b23beaf511ba3d8bdfbfa938d3c7c9e8ddf73863cca558deb6ae9/%3E/6 */ "0400008085202f8901c6f1f6f005ae37d2b735f64dd9ccf60c1e62e49ebaae386e8f686a52f7c29b830b0000006b483045022100faaff32d1bd8bcb0d5f89c29a3eb9275fdf027118ccd3b80341bd814603771ba022039a43320fe9545451330b1011334606813aaca51013020f1b9c9e5dd5ce981990121022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ffffffff0c10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac7c20740e000000001976a914bc8d4359ee1efbcf25b7859a05bb712f0223023588ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9ed739647e9f3e29b4634ee677de7a40cb67f4fc247bcc2c22282f5ab2a3c066/%3E/4 */ "0400008085202f8901c6a0d0de7174d8e182d422899ab7cbadf4a659e4d92fc881f82a89ef749d45210b0000006a47304402200293051c48ed50fa0565646b64b53a3704df98b37bc46e05f962265b78297f1a02203bf8849d4bf0d0e36aed43101717ef5ac225628c80764f7730d142ffce40fd020121022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ffffffff0e10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac328d2613000000001976a9140ba28b3d03c03bf8c35b6ef394cf5824f31b38dc88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/e51e3cddcf2b22db6609d8ba1720079d73cd82ea86631163b9c728e2dd7be53b/%3E/12 */ "0400008085202f890136e8a312265efe8af39cdcbbd41923face423f04beb6365550e83d3ffa3a326b0b0000006b48304502210093e68097a03af1241c35944327119cce2735e6afc5675d2d0dd155973d9992a1022078bba29ab637909b2b68c03c9832d930cafcce862d572a53434e9522d096b7b70121025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ffffffff0f10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac88fdae1b000000001976a914a4c4b39a3b4c5aceb61fca2835de699f7dd9097688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/966c1437b2b79a9205dc4a143f15b9da7707c88feb0418815f8549920b7f6125/%3E/8 */ "0400008085202f8901429c6e55bb965689e4109108a4961704ac44186c986d256e7d274c1095b73629320000006b483045022100bb59198685ac9866e5676e13ed39bf3ad111629a240a93e03b49c95d55ce2fd80220504578b870aff3680f811955aebaa1d1a1ea5a5cb4f6e64f15624d15165863fb0121036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ffffffff3310270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac80ae0b02000000001976a914c15cbce8b854fa25d08ce349c81c0c16c8240ad088ac26b6b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8dd2747de235f075ba7516e198c07cef251eeb9589a10cbd21400a77a18a3576/%3E/3 */ "0400008085202f8901ff54599bb71f4aa28f0a366d5c7c2706dbc95376a381b3e043a2cb31d4bc41ed1f0000006a4730440220736d0cb449f717a9617ea50db521edfef7fb46030a297f2300ff65a0ff7636f9022076bb50c98ff8ba3f3b773bd2b3e2b838903bcf51035cc21f464a0900794342b30121022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ffffffff1e10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac7e0ea80f000000001976a91496598a3ef2782e0f48f6a4f061542a29d4ed609d88ac8a9db564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/0dc3819330f2479230245fa0f5aaef8ef617f5c5bdab75caa8ab3ea4a2d3e3cb/%3E/13 */ "0400008085202f8901bddbf699d789f2b6ce0857c06e18f7362d67bf84bb1d565274451d3ef7b453060f0000006a47304402207dc10a89b365e4e687b7e331b165c3eaa46cfe630aacca655197f1a94be20a6002200b6cff591ff1eb48d457623f76628294c66898172cf70d069948754cfd95765f0121035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184bef2ffffff1010270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac8c523824000000001976a914673d81653f225176da6d4351787921dd1689e29788ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ca5478d4da12eb23adf18a5c1a75ab7757c085a437f140e09b45908acf008ce7/%3E/47 */ "0400008085202f890109fb73e0dae1d9ac5f591fb1d3aca116ae6a902b6fa246fb8684bbf328f1c7464c0000006b4830450221008f23411e6088de9cbfd7d5c15c5f4884db903828a9f0110dbfdad0ace3641a9d0220527445f7df5a793ae2c93e64554bc29003b0f415e0151663a91618dc38f4c15e0121026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ffffffff4b10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac08685805000000001976a914945b764e756263161fa2c1ddeb772967c345c32788ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/244d74875d6d3c5f312e3824b8dbffeaca156ab32662e353cbf3ffa034cbe4d6/%3E/6 */ "0400008085202f8901884bc77cce7802931e9671773fb26a72aa44ea666e1a18701a195e57cf5fc6740a0000006a47304402200dbedd3c629290d82e6571b09332586c67c8d1cfbb48cc7c933c68f446e4bec102200e8c121c0aec6faddafb7ca94a2f8953c736e7860107e7a6593da109042a467c01210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278af2ffffff0b102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac70e42116000000001976a9140d31c3c48485210e361cefbb802596795086fee188ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/0bff3a96c52872b08855fbc1b4cee6b3007e0928f76b63720c3f433da3283de4/%3E/7 */ "0400008085202f89011b71b922d6e1cb86da07e019849fb79ba5e0b02edaa0f32fafe875ca4d1d25170a0000006a4730440220163e7948e5efe2aeed7a8acfec69f874aad3e38bd41f2f5465750bdd9e036a1102204c257368e9e73a161a17c431d08b16b9d9f3022a7dafbeb39449c6d6fdfa0f0901210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01f2ffffff0b102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac6d2f160f000000001976a91414f205aee134f85aa42d5f878d562beac9eba68688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9cd054edc508d2bb3eb6d1fc2a125d9df59f1b02c2cfa4252065c906f4f691ed/%3E/10 */ "0400008085202f8901f00aff7f6994c78a94a80df4a5d961d3a46aca8df0422ea0ae19335507f5cd140a0000006a47304402206a4f1ce3c37baacb1337db5f9e9eecc91357a690c6ea846638e6f4b3c12ec33602204118f1c4db972c206d5e90def7bd3c643697da0a8d5b1da15553c3181927a6d8012103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497def2ffffff0c1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac51c15331000000001976a914bb3c96b35f6bbc4f4e878591e12afd30dbb9af1588ac00000000000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strMILKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* + As it "back notarization", mean confirmation in KMD chain for the following MIL block: + + srchash (block) = a4c9ee9b041233e64a87daf961bb6355efb2e68824c9dbc20f37db934b3d9e45 + *notarizedheightp = 642230 + + There is no additional events should be added in events list, no new checkpoints added, etc. The only thing + the komodo_stateupdate may be called from the komodo_connectblock here: + + if ( !fJustCheck && pindex->nHeight == hwmheight ) + komodo_stateupdate(height,0,0,0,zero,0,0,height,(uint32_t)pindex->nTime,0,0,0,0,zero,0); + + and komodo::event_kmdheight will be written via write_event to komodoevents file. + + This test added for fast debug "back notarisations" inside komodo_connectblock -> komodo_voutupdate. + + Also as MIL is 3p coin it uses 3rd party notaries, so, notarized variable inside the check will be 0. + May be for 3P we should skip all checks and calculations at all? Like if chain is KMD and notarized is 0 + (and matched = 0), then skip it at all inside komodo_voutupdate? + */ + + } + TEST_F(LegacyEvents, OtherTest) { komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] ASSERT_TRUE(state_ptr != nullptr); From e06aa5bc440bce9ebdf83a88f37654a82d58ce92 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Fri, 11 Aug 2023 21:17:41 +0200 Subject: [PATCH 06/17] add MARTY->KMD notarisation test (AC nota test in KMD chain) --- src/test-komodo/test_legacy_events.cpp | 84 +++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 329be3c9c6d..0c8b3e4f2c9 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -37,6 +37,19 @@ namespace LegacyEventsTests { /* MIL to KMD Nota in KMD chain */ constexpr const char* strMILKMDNotaHex = /* b07c36ddcb015c7289f1d23225d7684087ee9c2e04f06e85522ef458db19f67e */ "0400008085202f890d31084ff2a066800cbeb8141a93e5c9d1e8690f29045fa9257fab1a3b8f6f64530200000049483045022100f93c131b3b89dd72c37a15abdd1be40646e4353730c1a12b6fbda6254f34cde6022064b937b920fe6173425453b4a7d97ab65ae095eb1b4796d62e8482fae1c9d9cb01ffffffff1a836a427a22549888adc54e902f09ee1077f70ed3a251125fd54a13413afbad1300000048473044022042bc15552e6a83c2daaf629f7506f849ee5ff5e2eceaf986d2e6a060f04f31b802200bf26040b761bf9e71e06a88079a62d3a50002a371119208334c8de1e3965c7601ffffffff3e224fd5f1b4c90b0a8d9bd4cb4e50eca6b79134e045bac25c87e8d6e25598f11b00000049483045022100ca25b6a74adbca68fa7101ddcf9728cc1ce4bef9bd0d92ca1b6373846cbea52002204957ea93f22439d1f443823f28b21b5194d1a0560dac511f9f88cae263e3444001ffffffffe96aeb8d55ca3c8673df8d9e7c3c8d93fafbbdd8a31b51afbe236bd3e5b3fe7e06000000494830450221009e744a2da5926f4e6e4f673a9c99921532f7d1036b46123d52b7de043f34f67202204af6d029e11be1b8a73e618ceb8c5149ce2e2737a38a03e8c63b213853ddc80d01ffffffff66c0a3b25a2f28222ccc7b24fcf467cb407ade77e64e63b4293e9f7e6439d79e040000004847304402205cce10f605b789fd50da53b6a671abda96f84c8511ccdd8bc4edfd80e52f8823022065bb2197bb99201acfec6dc5ddd3ecfa7690a2f69090073aa9621a40f249a35801ffffffff3be57bdde228c7b963116386ea82cd739d072017bad80966db222bcfdd3c1ee50c00000049483045022100ac555dc33a83af65ef04d95d5771cac9ea699265294f46ad8794264160388f1f0220449ad91f8ed769ea3d44edbeae5e27d78030f9af2fb0861160989b012bf3e5a501ffffffff25617f0b9249855f811804eb8fc80777dab9153f144adc05929ab7b237146c960800000048473044022035c05112d62e3fe2cb9a22dd53a0808998565539fd4d415a0b5ce8c76788803d02202aa0fa919abc3221d594f4ec0e374538dc6ca0f6fb31f93dbdec63436a3e125c01ffffffff76358aa1770a4021bd0ca18995eb1e25ef7cc098e11675ba75f035e27d74d28d030000004847304402207dbb57edd0a6f687d1168adad129e2bc3d0f609e7503faf3d6314e75600bcd700220038e56a301013b56373b54cbba004b7ce277f629974e2a2950fcd3761294d0c001ffffffffcbe3d3a2a43eaba8ca75abbdc5f517f68eefaaf5a05f24309247f2309381c30d0d000000494830450221008acdc662d28d67a87bf714d5841e52ec7bb0240e9020c2b7cc888bf1384a0d03022000faebab45b71f907eb51b8490795bce626ffe42fb95f69e5e3b4596e6f1f5d001ffffffffe78c00cf8a90459be040f137a485c05777ab751a5c8af1ad23eb12dad47854ca2f00000048473044022037a25f0622e8e52c4f267437f3d0c4297725e4ae085fc2249d515bb41dd9162002202faa1aa6d73b43917d8e9ec1b93cdee9a083c922ad536d1f5ae449ef3a25069d01ffffffffd6e4cb34a0fff3cb53e36226b36a15caeaffdbb824382e315f3c6d5d87744d240600000048473044022049a688a61ec0b1dca9e4bbd200b4f3ac7f511b8b367fe367f4485b041afda8f002203763c2c591674f054bdc4fb428da7a933448d4b4b7e1380c3dedce5f0fc5c11f01ffffffffe43d28a33d433f0c72636bf728097e00b3e6ceb4c1fb5588b07228c5963aff0b0700000049483045022100edcdb743bf49498a3243f761e70ce6256e4fe8df98dba9e6b9422fea3ca856730220676f37c062c20e22aad4f9b64f6a6066fbe52647381fb629aecfa32dd6fb91ce01ffffffffed91f6f406c9652025a4cfc2021b9ff59d5d122afcd1b63ebbd208c5ed54d09c0a00000049483045022100a3565007b2b9dadb91346d260c7f193da01fc7a260ae1ac288ca14fc61ae3fc40220616c5289aed3ade2345661f5322ecbcbd392c88c938d196f3f14a05bf773f2c001ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000002a6a28459e3d4b93db370fc2dbc92488e6b2ef5563bb61f9da874ae63312049beec9a4b6cc09004d494c0000000000000000000000000000000000000000"; + /* MARTY to KMD Nota in KMD chain */ + constexpr const char* strMARTYKMDNotaHex = /* 3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 */ "0400008085202f890df7c7cb7594b9f1d34d06de01b434410d6b30f4e5ea02ff9807c05c345d5697f30a00000048473044022076ef2a020a9cc24b2d54d1d70a2c234118dd3ab8bec5649be16845f131781d69022078fa6187b335f830340e9112bd7a55331d1d3be04d8b4f8588628ce6264f2c4701ffffffff6be666653aeb9b8f56f27452e602c8232a3cd8d287c9cb3158a68dfa2beb5d581600000048473044022040bd4cd1b7bd147c0c4ccf2c1b1685bb463604ba5f1e2a8167ce35705e8692810220713b6d96da86bbcf346622510e17470187b0b6febdcb42b25200c8abf9eb493101ffffffff0672e192a8a4b2718fcac08f860a8d57c0d917b12828f149f8de02f74ccfff840700000049483045022100d9e21b9902f46983385c5453c3b04ba3a5ee58ce291e90d0763e64dc403fc93602204a6e79498aa269adf3a33ad812ab452e3cdf61205c1d656e352ed43c89e9e25101ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910900000049483045022100df4e559c943a438652449813ee9ebe2c59ed294c542e508db9317ff84101386a022069b93f1acff2fd22b7ef65d0d524564412922a50be9b4d1cd1ec64d10732f97301ffffffff3f3604c882ddf4641bd68714ba22e89180fa1d75613a95feef8b2f243a9776f60000000049483045022100f0c9cccc5ad1fbc8f6d5d84e3b3aa4ffecfc2c722e7d5f4196cf03b222aea8bb0220238fc0c6dda7b0e82514717c38e82d64b8193d1ef83bc245a786d3b03548ae4f01ffffffff3b3a8e814d408a0c3ff841b6613f452568a5e9bc110429d623493b6af52197ef1500000048473044022029ded64cddf64e10e3a17322127c1ad2b8cc350679cb0004f3ff88adcc8a7b51022062fd807e184ae85d4b6239e3a8caea09ff966962cc221696073492f3ebb382a201ffffffffce93bf31c85222b7fc95e956a77ee3cb3ad24482297f85a4e0967d61d7ac73eb2a000000494830450221009ef5def03f9e8485c12763f6eb41b7e3ea1db6ebd30916895d1ed514f0d3dc220220354d8a1d617779fcb2bf95c45d2e39480465d46a6abb637a915509725247436501ffffffff5d96e2c7947571ffdd0ae0a5a57d842db902427aa02eace4cf69d08698ba526d02000000484730440220350e8d4c12c5fd635786804c55974f760d555702d5ac78aa5a949f3ec9102ed402205ff23f1a18f897ce93ddacdb70ee6d3f81f751f83009172e3968f701562b2adc01ffffffff2cc17a206344f3110af938c68016d422f86b2e499024913fc00e997b6b8319f103000000484730440220044b491275577fca35438a02e3acd218b5de2ba8ce8846abb5ecef78293d2c0802201252386782bd6e7dc8543a4b6ade118024f960ad684efc5d593cdc0f8a15051501ffffffffb8691fa8cdd709e4560671cf203ab1703b21e747800583dde9ff2760a077a9a60300000049483045022100d1e9c9b401c90f7d3dd5d3822afd6056486d50325eae7f84cfe203f66684a182022035ce96f036b8005d933078295f9776b44df4d6970eb94d4a6cb8a3d4021a1fbc01ffffffffa89eca8dbfa4a0739f8d18dc144bb4208a7336957db6b5552c2658646d33bf8a0000000049483045022100a5b3ebcb349540ec776ade7e531a9e50278ab9f64629dbf812e1899d763729ae02201e412771d4b54a3bac2a941af7e6b6c78461bcb7382d6c0f7ff67c1d6dceb02a01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e0f00000048473044022023a7f4898ef8e6e2dda4ee236a0b47bbed979a972751f71c5d5f5650e0edd50702207cc25962aafa6dd35fe16b934be5e8e89b314072d3a273c9e946464a17627fdd01ffffffffd0125e4675f6ac48482e57d5c60dc955a8736ef16e90226ef8f219af7fd6c1e90800000049483045022100d9d88f9ea4e77cd191449146560f52b98b98f776283c9681c5c25489bac3c4420220577a9e42b09d0ffee60c40ae2ae4f54ad4bd0055ea6f8eae2ee62ec2cbc3fc9d01ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000516a4c4e43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f007003e1602004d415254590077079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a411400030000000000000000000000000000000000000000"; + /* + OP_RETURN: + + 43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f00700 + = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766// srchash + 3e160200 // *notarizedheightp = 136766 + 4d4152545900 // MARTY + 77079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a41 + = 416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 // MoM + 14000300 // MoMdepth = 196628, MoMdepth & 0xffff = 20 + */ CTransaction CreateCoinBaseTransaction(int nBlockHeight) { // Create coinbase transaction @@ -265,7 +278,7 @@ namespace LegacyEventsTests { } -TEST_F(LegacyEvents, NormalMILKMDNota) { + TEST_F(LegacyEvents, DISABLED_NormalMILKMDNota) { /* Test for MIL -> KMD in KMD chain (MIL is 3P coin) */ @@ -351,6 +364,75 @@ TEST_F(LegacyEvents, NormalMILKMDNota) { } + TEST_F(LegacyEvents, NormalMARTYKMDNota) { + + /* Test for MARTY -> KMD in KMD chain (MARTY is AC) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507245; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/f397565d345cc00798ff02eae5f4306b0d4134b401de064dd3f1b99475cbc7f7/%3E/10 */ "0400008085202f8901257fa39ebbcc1975260c47be2a2b1abcab775e16f0170ce8fcf27d9def8720a31b0000006b483045022100c771f08d3901e37e46cd2918e3dd07fbb7da5f8b4b48ed73bc5423d52bafa78c022059e90d54ace2dc0d1b96a277e2384747a542b76e9889c044d4d01edc1dc164aa012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff1c1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4acc57b0fc1010000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88acca8ab564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/585deb2bfa8da65831cbc987d2d83c2a23c802e65274f2568f9beb3a6566e66b/%3E/22 */ "0400008085202f89017fa9f37be4b1df06f604d0b9c82bac3211a51c20a97f92aefd7dfba55e0e4659200000006a47304402201b78d424c6dff2ee0e704a6dfb18b5ecba8195f2c6cd3a63ec90c273bcdde24902202326fb3a71f7a24625c77c07d6db0711c1fc51d6a66ff8a0bee4388ac8a93a4f0121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff2310270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938aca1e259b30f0000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788ac7288b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/84ffcf4cf702def849f12828b117d9c0578d0a868fc0ca8f71b2a4a892e17206/%3E/7 */ "0400008085202f890140e69b4ca48cb8d9f04e135e8867f7b8b75645a68b677a3840a3cf7cb9d262e10b0000006a473044022075940052176bb861659c0feeadf141b4239fa647f07b16ef25808dcfd2c37fa802203d0b26700b7ae673127303ecd9f215e3818d04f4391fca3bb9f40b3991f6d4e8012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff0d1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac20095702000000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9154df2973b35450eda7438d7350e836f1aade87109faec7accc68ff4c7e9caf/%3E/9 */ "0400008085202f8901faac01550081530fa7ac000aad923c39ec15972d15aef06bae2770c22f1238330b0000006a47304402202ce1d5a92cdc5962b4243f179fbe3d65d60ea4addb560d2e8c0f347782ed3036022014e679afb75494a4879320c15206286f699ab0a826b21c02741fae262412716f012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff101027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdacf86f620d000000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f676973a242f8beffe953a61751dfa8091e822ba1487d61b64f4dd82c804363f/%3E/0 */ "0400008085202f890101f509fd8fb00d5fcaf536d246e0718be4ad1058c754b9e75779d53a6d92b9a40b0000006a47304402203ec1b6ad71816eaa776667614e4d535d57f32790a2e94a51569b5b4ab333c02902202cdb642798f0ac1e5ea983cdd92a50d2095982ae732709d3d28aebded37626fe012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff0c1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac88c3b710000000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ef9721f56a3b4923d6290411bce9a56825453f61b641f83f0c8a404d818e3a3b/%3E/21 */ "0400008085202f8901447144577c9ff9cc627ad033e09755ab37023a68aefbee73cd74091764f08219320000006b4830450221009b70dce873ebcba20ae131d26b313729e6d71aabc02637d45753f1b70ba745a5022000d328ebe5b2724c7fdccf439b58faa958d4f2ffe945809c657d01abd1138d2d01210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbffffffff33102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac701f0c06000000001976a91450e1ea45b5dc98c41b2a4df0999f327941ab858688acf217b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/eb73acd7617d96e0a4857f298244d23acbe37ea756e995fcb72252c831bf93ce/%3E/42 */ "0400008085202f89018bf5611ccae8600d509d0e7fa3ed97d57531f7c6325e8976407e88d060689648390000006a47304402202a5ad8322a795d70e273dad76694d0db2275de542be540ea0b8ebbdf538dc6b002205160170f4177b0d354b9f76a8b22e1e0260272dadb51256ce57f712e1bf78cb1012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff2e1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183acee00c604000000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/6d52ba9886d069cfe4ac2ea07a4202b92d847da5a5e00addff717594c7e2965d/%3E/2 */ "0400008085202f89016fe30be8e5926bc91189a6121967b1b8ebadce19a44ffb20abc52232beb75af00f0000006b483045022100de62fd20bb68ae8863a8974705c2e6f08af29d3df9c2483b62bca4265c0dc262022059f93345cc9351d28be78a13bbfea9b5b09c1232bf29094d98bb16c54352acef0121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac8df23965000000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f119836b7b990ec03f912490492e6bf822d41680c638f90a11f34463207ac12c/%3E/3 */ "0400008085202f8902b249129b90e6e3fc10971e3f6a9b69e0e2c10c112c162e78459aa5824055df62000000004847304402207754fbd3f4ca5c3f719872cddebc9bbdb4423aa9668db8d6eebffb5e1433fe72022010b2bf829582bec509ac4e5bfa680133367547fe55e4d75f436168587d19abf801f2ffffff038d96ec6dcf59fbb996204936fcfe392c3413cc5214145871891772f664d32c140000006a473044022038fd47570415e9ecb885cd878f397edf523fd05f9e1a70f3069c016e25ba64f00220595c4584940f91fb4bc1484a98876769cb731196b5233b4bedc09ce573351eaa012102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82af2ffffff151027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aacf9cda66a150000001976a9146fec2bd5e24ec5c6848747193952d2155fcd844688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/a6a977a06027ffe9dd83058047e7213b70b13a20cf710656e409d7cda81f69b8/%3E/3 */ "0400008085202f8901638a295039bbd3a7118cff06b56cd9c27628102836501860fec31df4fb4ae21b1e0000006a47304402200b3d4669f51788e09264fa10eb0e2140b0849de49f997a1806a127de52082352022005ffdfe64303a5b49252126df507df507bbe3f465d8b7b376edb0a5c42919a1c0121021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bffffffff1f10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bace0a2a4d9030000001976a914a816c58c6371b66db484f644bc07894befffb34588ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8abf336d6458262c55b5b67d9536738a20b44b14dc188d9f73a0a4bf8dca9ea8/%3E/0 */ "0400008085202f8901f3cf85e7e1b4f6831e62b55de8a030b865edd059067a09fe6f802aac143faceb140000006b483045022100f21d230b0e2ae3da7cce137317a7de0702d244e3420f3c0127daba23bfb463530220091bf3a848c95ec42aa5c66bc42c98c16d5a4cd48bbf729bed05dd05d2c7f009012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff151027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac450e9b23010000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8e337cdd2e489809ef656753e67739c0c84e8f2cf39656f8ee73da4ee5de4c77/%3E/15 */ "0400008085202f89012c147d87c9e8bcbe017209e2e1652f955eb624a90ef08edef3617490b9545f793f0000006a4730440220294cf60304a4c98509bce01cef2f7716c9e4949922f2856a0f78ed317a0c1b8a022062cd890d2b6663fbc3e69b939d94668a5b541afbadd5065dfbb65880adaf0747012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff2f1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812facbd335c04000000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/e9c1d67faf19f2f86e22906ef16e73a855c90dc6d5572e4848acf675465e12d0/%3E/8 */ "0400008085202f8901b91be96543d49b86b0789baaa8acbb97105eec0ac5f110c43a73aff9922b3420280000006b483045022100e856b08fd11f03e915f8502cc5ee74b6797ee08279927fc35b94ed932240a647022058a9872446787fd216d351724012ecce635c738b8e87136dc41449df5d2afbad012102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafffffffff291027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafacadaae384000000001976a9145c781a32992c3c07f350a72e4f6ca88f3630b0c788ac213bb564000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strMARTYKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* Same as in NormalMILKMDNota test, we have back notarization of MARTY in KMD chain ... + but we haven't any events or so related to it added, except writing of komodo::event_kmdheight in komodoevents file. + */ + + } + TEST_F(LegacyEvents, OtherTest) { komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] ASSERT_TRUE(state_ptr != nullptr); From 347941010411fed2b38db952f44b193fbb09ca17 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Fri, 11 Aug 2023 23:29:18 +0200 Subject: [PATCH 07/17] add MARTY->KMD notarisation test (AC nota test in MARTY chain) TODO: add needed checks, also add komodoevents file check in all tests --- src/test-komodo/test_legacy_events.cpp | 117 ++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 2 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 0c8b3e4f2c9..f8df758af54 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -43,7 +43,7 @@ namespace LegacyEventsTests { OP_RETURN: 43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f00700 - = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766// srchash + = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766 // srchash 3e160200 // *notarizedheightp = 136766 4d4152545900 // MARTY 77079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a41 @@ -51,6 +51,35 @@ namespace LegacyEventsTests { 14000300 // MoMdepth = 196628, MoMdepth & 0xffff = 20 */ + /* MARTY to KMD Nota in MARTY chain */ + constexpr const char* strOtherMARTYKMDNotaHex = /* 5652d2c4280f3ae87115d1c34308d426ef19a3d12506c741aae9849c9692108e */ "0400008085202f890d7ec758fa6783ec2fdabdd7f110032b2776a885f308f0a4354767f2db0bd7acea0000000049483045022100aec03e70c4c10d7159f9b34172167636fc720b7a37b698c51f5792c1d59b67b802205084d893c77f6605747e3e26b7fc3f30fe4682a8cff3d2900171c0e00d0b6b2701ffffffffbce3c2c64767eb766fec6e4c037ed6e42dc5c053ee4b36c000bc5e0346d56702020000004948304502210095ea79085436136388f85566973768abe073f73e29863dad12b27d52a71ebb6d022014ba587f87786c5eb969389185d9cae07bd13df1cd85b2d1b14fcef8ee519f0f01ffffffff460d180832c974a85c1548fc3ab3df1e9a36d043dcae5d75641eac4dda3b71c4010000004847304402203b274d9b0a31211e8d68be9207789d52bb7ba633727c29432a4db561fc21b73f02203861a11a7fef13c2da575d226ba640f0e37d292f8be99cf660ad097b262ac1fd01ffffffff01e2fbfff7c9dabb60bd5e7dd5739ddb8888ed4fbf85aeb2670a2937e5c8e7b70200000049483045022100aa9164f6e8bcaa3ba6c5fe914320fba87fa28896afa7a4734a084a9cec0eec4802204a1f32b245fef25b15914abe22a5413bde65130456bf9b9b8602916ba64101a601ffffffff004899d14421817c6356fbdb48cba1d1109fdcae450a9b4e4ea1dc7429d97e230100000048473044022059782fce0a2d96e5955071df1dc7ceddb4ba97ecc6bacefad4a4417415514b7d022039f02e517a5935c00432175cccd47e7fa3f28cfaedb1c592d5041177bcb56df101ffffffff5ecd6f6c6868783bb8230cf10bfe38ba144ef52774a75a2fc3979289a308d3af2c00000049483045022100fd6a891ac32178e8a0d1b6229fd52215edc9b36775217627ac14ad797f74bd1b0220092678942659e188b9bf774b7aaf37df6f1324a9191d3f11c847c55e7ea1bb1201ffffffffd2b3e6188c21a7967e5bf0478cefa10b89ae54c79c9df1ea0aa5ac7e81748b910600000049483045022100c30b5bcee4c3aaaf04e4e8f97b5d011f0f9ba117febf6170935119255c8708f4022041d0d99a2cd7939c308a2cf826ef5a41fea6612b3230b486605a1e3f9f2a994b01ffffffff2380813ff427ae3e25bbfae0d0aab992e75b648e0d5d5988390c42eb3a070bc6020000004847304402205c29ecbf0b3b316425c72c290aa187e7f7aa8c67c2edd7c35787065764a064440220383ae0d842f5a51f15ec15b20e22386bef2992c95c97991cdeb7fb4d495b97db01ffffffff1807c403327c887424439fcd6f25d3482721b4cc139e15a10c9481b4db57ab8600000000484730440220676f105a1a7bdd046eb8887adb8445545f738375a674d1f31854451e33bd5a54022042514bbab7b4292704ae6acb595feec948912da986376fc0fd7f2277cc73f13001ffffffff6a33459f7633589547376ad35ed6976a8740ad3c37ec721ef913df2cf8ab51820100000049483045022100c114a0533dd8317cf3f24f4346109a8e691e1455929d4c2b0f7462481b54b57102206ccddb3f8c36ce2a14c49260cc83eca746d08ce7420aa13e006a18c1659f696501fffffffff1410cdb724ae369fd1654e87cf6eba08793acc19c0fccc759edd13f7e9dbae003000000484730440220697acd17030dcf389c08e4bcbeca853759712a01c3d045f6b41423eff158876d02205280dd15a6c71be53aada2fd2c4e69fe0fb152b59863f4c0c15c977c6c1c6a9201ffffffff830194770d1bf4b56da36c6ded3b31f300e44a2d346b56ec5cf9ec976746efe4070000004847304402203506bcc68fcd2a8b9254954dc6fb68e119b3c4f981c52d6ead5bdeec4abec87402205e09f78cbe18805a6b78ed057bc655305735937abec5e678d957765387c6c45b01ffffffff3a787505f87ad95fb0880cce2c0939f7f6275b182e197f54a67a1959f90e2d98110000004847304402202190642267a0bfc82253100ce4036a24adb2b5034cad6f8288a7d4e4acafa41302201abbe9e5ca7c2841db6368186d17176cba92ab85707931ed07bfb7a8d385818d01ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000956a4c9243531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f007003e16020076c31c0790592e2f4cc6e10d1d94c87225d055ba390576f289e7d8b209cdbf3b4d415254590077079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a411400030086d7ead2472d0bc65d1e532add98fb837739057d5d2e428db90740884f1b36070000000000000000000000000000000000000000000000"; + /* + + 2023-08-11 20:07:15 ConnectBlock: wrote 1 block notarisations in block: 00044cf05e394ac80f3be126baf421cb7d604e30cf6a68171504889789bb53df + 2023-08-11 20:07:15 [MARTY] ht.136773 txi.1 signedmask.80820204410001b9 numvins.13 numvouts.2 <<<<<<<<<<< notarized + 2023-08-11 20:07:15 [MARTY] matched.1 VALID (MARTY) MoM.416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 [20] CCid.3 + 2023-08-11 20:07:15 [MARTY] ht.136773 NOTARIZED.136766 MARTY.0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 KMDTXID.3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 lens.(146 117) MoM.416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 196628 + + OP_RETURN: + + 43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f00700 + = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766 // srchash + 3e160200 // *notarizedheightp = 136766 + 76c31c0790592e2f4cc6e10d1d94c87225d055ba390576f289e7d8b209cdbf3b + = 3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 // desttxid + 4d4152545900 // MARTY + 77079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a41 + = 416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 // MoM + 14000300 // MoMdepth = 196628 (0x00030014), MoMdepth & 0xffff = 20 + 86d7ead2 // ccdata.CCid = 3538605958 (0xd2ead786) + 472d0bc65d1e532add98fb837739057d5d2e428db90740884f1b360700000000 - Garbage (!) + + expected MoMoM, depth, numpairs, (notarization ht, MoMoM offset) 48 bytes, but have only unknown 32 bytes (!) + produced by iguana. + + TODO: a) if srchash will end on `K` in AC, it will be counted as KV OPRET bcz of this condition ... + */ + CTransaction CreateCoinBaseTransaction(int nBlockHeight) { // Create coinbase transaction auto consensusParams = Params().GetConsensus(); @@ -364,7 +393,7 @@ namespace LegacyEventsTests { } - TEST_F(LegacyEvents, NormalMARTYKMDNota) { + TEST_F(LegacyEvents, DISABLED_NormalMARTYKMDNota) { /* Test for MARTY -> KMD in KMD chain (MARTY is AC) */ @@ -433,7 +462,91 @@ namespace LegacyEventsTests { } + TEST_F(LegacyEvents, OtherMARTYKMDNota) { + + /* Test for MARTY -> KMD in MARTY chain (MARTY is AC) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + + chainName = assetchain("MARTY"); + int32_t fakeBlockHeight = 136773; + + std::vector vHexNotaInputsTxes = { + /* https://marty.explorer.dexstats.info/tx/eaacd70bdbf2674735a4f008f385a876272b0310f1d7bdda2fec8367fa58c77e/%3E/0 */ "0400008085202f890132f6ccdb4590fe17f8013eff64d07b1868a67d8eabde820a63a8ea9b66c7aa5a060000006a47304402204f7b9648b1c17e3d4ef52c9ec8eeb2c6cbf9d70e245875c94b232af2632f92530220284019341ca6bd284509ac9d2dc1d2788bb357c4fb264a0a906ef52e688569e7012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff071027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4acd0ace8d0050000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/0267d546035ebc00c0364bee53c0c52de4d67e034c6eec6f76eb6747c6c2e3bc/%3E/2 */ "0400008085202f89013077bde0d3cc59d60b09141e10aacbbf2f58ffe30eb3242a8a8b872e268c9a0a060000006a47304402203c9395eefea2717de404c559cf21e7c9736b8307246a0dda179131915b2101be022032695b6648b9447631bda26dfd99250aa40366de6a9eb876f9f710f383ef17110121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff0710270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ace0780cd1050000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/c4713bda4dac1e64755daedc43d0369a1edfb33afc48155ca874c93208180d46/%3E/1 */ "0400008085202f8901fbc9fe09894f6f6f0ecd77c3328a994532c93592642bf109b093c310b0865bdb040000006b48304502210091f5d87e99b60fcd4af61d6fcbae2c23f650a9a08444568e7b8b8010b9724ea502206fb2d1a3c37949e844a3e6fbc5702a77ba731ff14ce8df201e1a45e4d4ce6f5b012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff051027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8acc013544a060000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/b7e7c8e537290a67b2ae85bf4fed8888db9d73d57d5ebd60bbdac9f7fffbe201/%3E/2 */ "0400008085202f8901ee8e81bea5ff24b717a216c0fb220c8f3d968a40a71872d17f56dd78cd2ec6bf040000006a47304402203e7d9ca0ef45d70f68ae598ee3ab39299f12564bbf60718dd33aee5219042f3902204017e40e3e59daf1f25d15e51362509fb9f2b9ccb911af44e4b4d3d4d9ff3465012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff051027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac3be5c860060000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/237ed92974dca14e4e9b0a45aedc9f10d1a1cb48dbfb56637c812144d1994800/%3E/1 */ "0400008085202f8901c64d36422e767c9e5aa45952d3dab03552439ba10f3caf1662135245e50589c3040000006a473044022079c97424113a2c5ecda6caec91e9a7cd800ea3b7f54007e0638a981078b8e19a02201c82ca5f42c5518ed7194da97b53e0f31cb97f4453e6a6bc5fb7e8014927a1be012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff051027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac98eff422060000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/afd308a3899297c32f5aa77427f54e14ba38fe0bf10c23b83b7868686c6fcd5e/%3E/44 */ "0400008085202f89017c1d05b5aa7dc45c6f66cbe2844e57f7eb55faad66b789a5ff86a74fa39753e9320000006b483045022100c5a349004a06eb7b88edb811be84ef89be645ddde31457ce2eee4778ef3c070002206d4c35647d4a274318a3f6f128a47be7f61650c8c21f85873e3cf1e846d7ee9501210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbffffffff33102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac8000f3d1050000001976a91450e1ea45b5dc98c41b2a4df0999f327941ab858688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/918b74817eaca50aeaf19d9cc754ae890ba1ef8c47f05b7e96a7218c18e6b3d2/%3E/6 */ "0400008085202f890184cdcb5ad5520b0cb50041abc34fa1361ac1da3fca563ec4a67ca741a985cf9a110000006b483045022100b76dd21741a3db679582717a292e64486967ddbf8e700950f7d311d5d66ee0e0022011be0988a61a0e085879bc2e458de8c079252570597a1969a7150546e70cc30d012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff111027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac8811c2f0050000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/c60b073aeb420c3988595d0d8e645be792b9aad0e0fabb253eae27f43f818023/%3E/2 */ "0400008085202f89019e54d13296a98fe2b3187d4375880cadf802df5e9096c858ebd26792198ba5f60f0000006b4830450221008eaf3285e7acd130b1eec289f9eb477c5a8a3c3b8c28870f6d45d42e09e1683002204cd68be01eabf659b0a27dc9f837a0d094b9308e3fd25cc27f7ecca910e2e2680121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac398c66d1050000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/86ab57dbb481940ca1159e13ccb4212748d3256fcd9f432474887c3203c40718/%3E/0 */ "0400008085202f8901ae8ac72bc66166f1cb0f71aaa9091c8aa24d897c183fe8cd0fb7b7161352a49d0a0000006a47304402201a87c9e0deaca4eafaee201e1398b66da7699a4233c28ad536e3ede71604b95302204bdea239c33e1b3893eff9d88508200b154865de54c1abf632f574478d6ff4c5012102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82af2ffffff0b1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac8451fcd1050000001976a9146fec2bd5e24ec5c6848747193952d2155fcd844688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/8251abf82cdf13f91e72ec373cad40876a97d65ed36a3747955833769f45336a/%3E/1 */ "0400008085202f890114a1bf072dc6bb996c5b496fae0b55606c2b56e430918ad96c3a589785b58e9b1e0000006a47304402201e7c36c5a3f4210b35c4d265e933f47d19967b7363edfe455d31144bdf819df602207438defcd57bd42e37c93a0c9d03df03d9dadc14d675eaa2eea9d8655bfcc9c30121021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bffffffff1f10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac146d06d2050000001976a914a816c58c6371b66db484f644bc07894befffb34588ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/e0ba9d7e3fd1ed59c7cc0f9cc1ac9387a0ebf67ce85416fd69e34a72db0c41f1/%3E/3 */ "0400008085202f8901d0ccb27930d3c94cf78663381819563ebdfef0a500dbaa957922b3c62b1c94360a0000006b483045022100ec756fb8c96a24cafe8e0a9b64f25e77d55599993647f1566061d67136b4e35102206d83282d48cd299515d8489ce9b4e974405e09df81f7e213264485d1c741bffa012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff0b1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9acbc1210d1050000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/e4ef466797ecf95cec566b342d4ae400f3313bed6d6ca36db5f41b0d77940183/%3E/7 */ "0400008085202f8901ffa79f8c1488e13f7c7b69b6d791bbd611aca1b3948078e5aa3f94335231cee4100000006b483045022100abca2ac4fbd58719ec964b8b4751b3b84cd296e5ae9ab700dbbd57daf8112413022009117d5c4ec5dee63262160edc36bc35ed69212427abb938cd89a52fe4af2078012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff121027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac85d4ed20060000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/982d0ef959197aa6547f192e185b27f6f739092cce0c88b05fd97af80575783a/%3E/17 */ "0400008085202f89015a86976810d88ced70417ad042121f1f447d78ae18caf72aac5df315bc5cbec9000000006a47304402202ab7b8596f7b8a816ad9098fcf60344e7ebeb0ffef3110fda38b90293ec92a88022028969e25c1ea1b4749e3a68a61d4ab746c123614999f782a611a5e88feee680f012102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafffffffff151027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac90fddc3779c311001976a9145c781a32992c3c07f350a72e4f6ca88f3630b0c788ac00000000000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strOtherMARTYKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + indexDummy.nTime = 1689620962; /* for AC tests set blockindex time is mandatory (!) */ + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 2); + + /* + This is MARTY -> KMD notarization in MARTY chain. In this test: + + 1. signedmasks file should be filled like this { 0x45, 0x16, 0x02, 0x00, 0xb9, 0x01, 0x00, 0x41, 0x04, 0x02, 0x82, 0x80 }, + first 4 bytes is a int32_t height and 8 bytes of uint64_t signedmask after. signedmask.80820204410001b9 + 2. komodo::event_notarized and komodo::event_kmdheight added in the events list, because it's AC + 3. TODO: ??? events in file written check ... + 4. TODO: ??? state_ptr changes check ... + */ + + } + TEST_F(LegacyEvents, OtherTest) { + + // chainName = assetchain("MARTY"); + // struct komodo_ccdata ccdata; + // std::memset(ccdata.symbol, 0, sizeof(ccdata.symbol)); + // std::copy_n("MARTY", std::min(sizeof(ccdata.symbol), strlen("MARTY")), ccdata.symbol); + // ASSERT_TRUE(chainName.isSymbol(ccdata.symbol)); + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] ASSERT_TRUE(state_ptr != nullptr); std::cerr << "state_ptr->NumCheckpoints() = " << state_ptr->NumCheckpoints() << std::endl; From 00cb01d641cfa28be1c2556531c8005705b5bf42 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 18:59:54 +0200 Subject: [PATCH 08/17] enable all tests, add missed checks --- src/test-komodo/test_legacy_events.cpp | 79 ++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 12 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index f8df758af54..06f333afa55 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -172,7 +172,7 @@ namespace LegacyEventsTests { } }; - TEST_F(LegacyEvents, DISABLED_PhantomOpReturnEvent) { + TEST_F(LegacyEvents, PhantomOpReturnEvent) { int32_t fakeBlockHeight = 3507273; @@ -224,7 +224,7 @@ namespace LegacyEventsTests { ASSERT_TRUE(stateFileSize == 0); } - TEST_F(LegacyEvents, DISABLED_NormalKMDLTCNota) { + TEST_F(LegacyEvents, NormalKMDLTCNota) { /* Test for normal KMD -> LTC nota in KMD chain */ @@ -287,7 +287,16 @@ namespace LegacyEventsTests { komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] ASSERT_TRUE(state_ptr != nullptr); ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); - ASSERT_TRUE(state_ptr->SAVEDHEIGHT == fakeBlockHeight); + ASSERT_TRUE(state_ptr->events.size() == 0); + + ASSERT_TRUE(state_ptr->SAVEDHEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->CURRENT_HEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->SAVEDTIMESTAMP==0); + ASSERT_TRUE(state_ptr->LastNotarizedHash().ToString() == "0983a2c9709e524a2a66887266455c2141aebbae558ef9b78718fda8db7094a9"); + ASSERT_TRUE(state_ptr->LastNotarizedDestTxId().ToString() == "1f7f887a8fbf2b48129fee471de3910cf2314ca17385e81f0a56dfa5fec48e23"); + ASSERT_TRUE(state_ptr->LastNotarizedMoM().ToString() == "0000000000000000000000000000000000000000000000000000000000000000"); + ASSERT_TRUE(state_ptr->LastNotarizedHeight() == 3507260); + ASSERT_TRUE(state_ptr->LastNotarizedMoMDepth() == 0); /* komodo_stateupdate will be called 2 times here: @@ -296,7 +305,7 @@ namespace LegacyEventsTests { inside komodo_voutupdate komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,sp->LastNotarizedMoM(),sp->LastNotarizedMoMDepth()); and this call will trigger komodo::event_notarized creation inside komodo_stateupdate and write_event to disk. Then in komodo_eventadd_notarized it will call komodo_state::add_event, but it will not be added (!) in events list because add_event adds events to - the list only for assetchains (!). Is it expected behavior? Then komodo_notarized_update will be called and checkpoint to numpoints will be + the list only for assetchains (!). Then komodo_notarized_update will be called and checkpoint to numpoints will be added via AddCheckpoint. 2. [ komodo::event_kmdheight ] Second time komodo_stateupdate will be called from komodo_connectblock: komodo_stateupdate(height,0,0,0,zero,0,0,height,(uint32_t)pindex->nTime,0,0,0,0,zero,0) @@ -307,7 +316,7 @@ namespace LegacyEventsTests { } - TEST_F(LegacyEvents, DISABLED_NormalMILKMDNota) { + TEST_F(LegacyEvents, NormalMILKMDNota) { /* Test for MIL -> KMD in KMD chain (MIL is 3P coin) */ @@ -393,7 +402,7 @@ namespace LegacyEventsTests { } - TEST_F(LegacyEvents, DISABLED_NormalMARTYKMDNota) { + TEST_F(LegacyEvents, NormalMARTYKMDNota) { /* Test for MARTY -> KMD in KMD chain (MARTY is AC) */ @@ -523,20 +532,66 @@ namespace LegacyEventsTests { chainActive.SetTip(&indexDummy); int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); - komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] - ASSERT_TRUE(state_ptr != nullptr); - ASSERT_TRUE(state_ptr->events.size() == 2); - /* This is MARTY -> KMD notarization in MARTY chain. In this test: 1. signedmasks file should be filled like this { 0x45, 0x16, 0x02, 0x00, 0xb9, 0x01, 0x00, 0x41, 0x04, 0x02, 0x82, 0x80 }, first 4 bytes is a int32_t height and 8 bytes of uint64_t signedmask after. signedmask.80820204410001b9 - 2. komodo::event_notarized and komodo::event_kmdheight added in the events list, because it's AC + 2. komodo::event_notarized and komodo::event_kmdheight added in the events list, because it's AC 3. TODO: ??? events in file written check ... - 4. TODO: ??? state_ptr changes check ... + 4. state_ptr changes check ... */ + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 2); + + // (1) Check signedmasks + fs::path fileSignedMasksPath = GetDataDir(false) / "signedmasks"; + uintmax_t signedMasksFileSize = 0; + if (fs::exists(fileSignedMasksPath) && fs::is_regular_file(fileSignedMasksPath)) { + signedMasksFileSize = fs::file_size(fileSignedMasksPath); + } + + std::vector expectedBytes = { 0x45, 0x16, 0x02, 0x00, 0xb9, 0x01, 0x00, 0x41, 0x04, 0x02, 0x82, 0x80 }; + ASSERT_TRUE(signedMasksFileSize == expectedBytes.size()); + std::vector sm_bytes(signedMasksFileSize); + std::ifstream file(fileSignedMasksPath.string(), std::ios::binary); + if (file) { + file.read((char *)sm_bytes.data(), signedMasksFileSize); + file.close(); + } else { + ASSERT_TRUE(false) << "Failed to open signedmasks file ..."; + } + ASSERT_TRUE(expectedBytes == sm_bytes); + + // (2) Check events count + std::map eventCounter; + for (const std::shared_ptr& e : state_ptr->events) { + ++eventCounter[e->type]; + } + auto notarized_it = eventCounter.find(komodo::komodo_event_type::EVENT_NOTARIZED); + auto kmdheight_it = eventCounter.find(komodo::komodo_event_type::EVENT_KMDHEIGHT); + bool fAllEventsCorrect = (notarized_it != eventCounter.end() && notarized_it->second == 1) + && (kmdheight_it != eventCounter.end() && kmdheight_it->second == 1); + ASSERT_TRUE(fAllEventsCorrect); + + // (3) Check the komodoevents file content + + // TODO ... + + // (4) Check komodo_state changes + + ASSERT_TRUE(state_ptr->SAVEDHEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->CURRENT_HEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->SAVEDTIMESTAMP==indexDummy.nTime); + ASSERT_TRUE(state_ptr->LastNotarizedHash().ToString() == "0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343"); + ASSERT_TRUE(state_ptr->LastNotarizedDestTxId().ToString() == "3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376"); + ASSERT_TRUE(state_ptr->LastNotarizedMoM().ToString() == "416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777"); + ASSERT_TRUE(state_ptr->LastNotarizedHeight() == 136766); + ASSERT_TRUE(state_ptr->LastNotarizedMoMDepth() == 196628); + ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); + } TEST_F(LegacyEvents, OtherTest) { From 81581d07d946744862c42b3073dfb0e131e8139c Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 20:40:32 +0200 Subject: [PATCH 09/17] correct opretlen calculations for BIG_ENDIAN __BYTE_ORDER != __LITTLE_ENDIAN --- src/komodo.cpp | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index 0164301d2d6..fbcd55090bc 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -399,14 +399,44 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar { struct komodo_ccdata ccdata; struct komodo_ccdataMoMoM MoMoMdata; int32_t validated = 0,nameoffset,opoffset = 0; - if ( (opretlen= scriptbuf[len++]) == 0x4c ) - opretlen = scriptbuf[len++]; - else if ( opretlen == 0x4d ) - { - opretlen = scriptbuf[len++]; - opretlen += (scriptbuf[len++] << 8); + + if (scriptlen - len < 1) + return notaryid; + + uint8_t opcode = scriptbuf[len++]; + + if (opcode <= OP_PUSHDATA4) { + opretlen = 0; + if (opcode < OP_PUSHDATA1) { + opretlen = opcode; + } else if (opcode == OP_PUSHDATA1) { + if (scriptlen - len < 1) + return notaryid; + opretlen = scriptbuf[len++]; + } else if (opcode == OP_PUSHDATA2) { + if (scriptlen - len < 2) + return notaryid; + uint16_t x; + memcpy((char*)&x, &scriptbuf[len], 2); + opretlen = le16toh(x); + len += 2; + } else if (opcode == OP_PUSHDATA4) { + if (scriptlen - len < 4) + return notaryid; + uint32_t x; + memcpy((char*)&x, &scriptbuf[len], 4); + opretlen = le32toh(x); + len += 4; + } + } else { + return notaryid; } + + if (scriptlen - len < 0 || (unsigned int)(scriptlen - len) < opretlen) + return notaryid; + opoffset = len; + matched = 0; if ( chainName.isKMD() ) { From ce4d34497fbe24663490fcbf7c444d4533087719 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 21:09:10 +0200 Subject: [PATCH 10/17] remove deprecated KV OPRET in assetchains --- src/komodo.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index fbcd55090bc..7ee1902bf4e 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -445,12 +445,6 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar } else { - if ( scriptbuf[len] == 'K' ) - { - //fprintf(stderr,"i.%d j.%d KV OPRET len.%d %.8f\n",i,j,opretlen,dstr(value)); - komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,value,&scriptbuf[len],opretlen,j,zero,0); - return(-1); - } if ( strcmp(chainName.symbol().c_str(),(char *)&scriptbuf[len+32*2+4]) == 0 ) matched = 1; } From e5023e2b4091a36a5c4b60c6949aeca04c833d62 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 22:09:15 +0200 Subject: [PATCH 11/17] fix PhantomOpReturnEvent test --- src/test-komodo/test_legacy_events.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 06f333afa55..3fd4d169de1 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -212,7 +212,9 @@ namespace LegacyEventsTests { /* we shouldn't have matched == 1 on 3rd transaction in a block here, as a result, we shouldn't have komodo_voutupdate -> komodo_stateupdate -> write_event call - and komodoevents file should be empty + for komodo::event_opreturn, only for komodo::event_kmdheight, so the komodostate + filesize should be equal size of written komodo::event_kmdheight, i.e. 9. but + let's calculate this size here. */ uintmax_t stateFileSize = 0; @@ -221,7 +223,12 @@ namespace LegacyEventsTests { stateFileSize = fs::file_size(filePath); } - ASSERT_TRUE(stateFileSize == 0); + komodo::event_kmdheight kmd_ht(fakeBlockHeight); + kmd_ht.kheight = fakeBlockHeight; + kmd_ht.timestamp = 0; + std::stringstream ss; ss << kmd_ht; std::string buf = ss.str(); // see write_event + + ASSERT_TRUE(stateFileSize == buf.size()); } TEST_F(LegacyEvents, NormalKMDLTCNota) { From b435ecc8b71f6d603d4c571741f60658b120dfe9 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 22:59:32 +0200 Subject: [PATCH 12/17] refactor opret chain search and compare --- src/komodo.cpp | 53 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index 7ee1902bf4e..f37ed2cc29b 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -347,6 +347,34 @@ int32_t komodo_validate_chain(uint256 srchash,int32_t notarized_height) } else return(1); } +namespace { + bool CheckChainNameInScript(uint8_t* scriptbuf, int32_t scriptlen, size_t offsetInScript) + { + std::string chainPattern = chainName.ToString(); + size_t chainPatternSize = chainPattern.size(); + + if (offsetInScript + chainPatternSize < scriptlen) { + if (std::equal(chainPattern.begin(), chainPattern.end(), &scriptbuf[offsetInScript]) && scriptbuf[offsetInScript + chainPatternSize] == '\0') { + return true; + } + } + return false; + } + + std::string GetChainNameFromScript(uint8_t* scriptbuf, int32_t scriptlen, size_t offsetInScript) + { + std::string chainPattern = ""; + const size_t maxChainName = sizeof(komodo_ccdata::symbol); + + while (offsetInScript < scriptlen && scriptbuf[offsetInScript] != '\0' && chainPattern.size() < maxChainName) { + chainPattern.push_back(scriptbuf[offsetInScript]); + ++offsetInScript; + } + + return chainPattern; + } +} + int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notaryid,uint8_t *scriptbuf, int32_t scriptlen,int32_t height,uint256 txhash,int32_t i,int32_t j,uint64_t *voutmaskp, int32_t *specialtxp,int32_t *notarizedheightp,uint64_t value,int32_t notarized, @@ -438,21 +466,22 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar opoffset = len; matched = 0; - if ( chainName.isKMD() ) - { - if ( strcmp("KMD",(char *)&scriptbuf[len+32 * 2 + 4]) == 0 ) - matched = 1; - } - else - { - if ( strcmp(chainName.symbol().c_str(),(char *)&scriptbuf[len+32*2+4]) == 0 ) - matched = 1; + + if (CheckChainNameInScript(scriptbuf, scriptlen, len + 32 * 2 + 4)) { + matched = 1; } + offset = 32 * (1 + matched) + 4; - nameoffset = (int32_t)strlen((char *)&scriptbuf[len+offset]); + + std::string fromScriptChainName = GetChainNameFromScript(scriptbuf, scriptlen, len + offset); + if (fromScriptChainName.empty()) + return notaryid; + + nameoffset = fromScriptChainName.size(); nameoffset++; memset(&ccdata,0,sizeof(ccdata)); - strncpy(ccdata.symbol,(char *)&scriptbuf[len+offset],sizeof(ccdata.symbol)); + std::copy_n(fromScriptChainName.begin(), std::min(fromScriptChainName.size(), sizeof(ccdata.symbol)), ccdata.symbol); + if ( j == 1 && opretlen >= len+offset-opoffset ) { memset(&MoMoMdata,0,sizeof(MoMoMdata)); @@ -586,7 +615,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar } else if ( matched != 0 ) { - if ( opretlen >= 32*2+4 && strcmp(chainName.ToString().c_str(),(char *)&scriptbuf[len+32*2+4]) == 0 ) + if ( opretlen >= 32*2+4 && CheckChainNameInScript(scriptbuf, scriptlen, len + 32 * 2 + 4) ) { for (k=0; k<32; k++) if ( scriptbuf[len+k] != 0 ) From 54ebb286bb28ee76a930e74df735a7ed228d98e7 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 23:23:42 +0200 Subject: [PATCH 13/17] more get rid of strcmp in komodo_voutupdate --- src/komodo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index f37ed2cc29b..cd1fa42d8c6 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -487,7 +487,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar memset(&MoMoMdata,0,sizeof(MoMoMdata)); if ( matched == 0 && signedmask != 0 && bitweight(signedmask) >= KOMODO_MINRATIFY ) notarized = 1; - if ( strcmp("PIZZA",ccdata.symbol) == 0 || strncmp("TXSCL",ccdata.symbol,5) == 0 || strcmp("BEER",ccdata.symbol) == 0) + if (fromScriptChainName == "PIZZA" || fromScriptChainName == "BEER" || fromScriptChainName.substr(0, 5) == "TXSCL") notarized = 1; len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&srchash); len += iguana_rwnum(0,&scriptbuf[len],sizeof(*notarizedheightp),(uint8_t *)notarizedheightp); From c645cb68dd65cd0d92f7a1e9c12751164e4751f9 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 23:31:53 +0200 Subject: [PATCH 14/17] get rid of legacy PAX related specific oprets --- src/komodo.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index cd1fa42d8c6..5f376057e5b 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -594,13 +594,6 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar fwrite(&signedmask,1,sizeof(signedmask),signedfp); fflush(signedfp); } - if ( opretlen > len && scriptbuf[len] == 'A' ) - { - //for (i=0; i 600000 && matched != 0 ) @@ -626,9 +619,6 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar printf("ISRATIFICATION (%s)\n",(char *)&scriptbuf[len+32*2+4]); } } - - if ( *isratificationp == 0 && (signedmask != 0 || (scriptbuf[len] != 'X' && scriptbuf[len] != 'A')) ) // && scriptbuf[len] != 'I') - komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,value,&scriptbuf[len],opretlen,j,zero,0); } } return(notaryid); From b8678b41fe8c781c119c943a5e95fc2298493e68 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 14 Aug 2023 23:33:49 +0200 Subject: [PATCH 15/17] remove unneded OtherTest --- src/test-komodo/test_legacy_events.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp index 3fd4d169de1..81bc3972199 100644 --- a/src/test-komodo/test_legacy_events.cpp +++ b/src/test-komodo/test_legacy_events.cpp @@ -600,17 +600,4 @@ namespace LegacyEventsTests { ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); } - - TEST_F(LegacyEvents, OtherTest) { - - // chainName = assetchain("MARTY"); - // struct komodo_ccdata ccdata; - // std::memset(ccdata.symbol, 0, sizeof(ccdata.symbol)); - // std::copy_n("MARTY", std::min(sizeof(ccdata.symbol), strlen("MARTY")), ccdata.symbol); - // ASSERT_TRUE(chainName.isSymbol(ccdata.symbol)); - - komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] - ASSERT_TRUE(state_ptr != nullptr); - std::cerr << "state_ptr->NumCheckpoints() = " << state_ptr->NumCheckpoints() << std::endl; - } } From e94d98d62e91f30b81768b5a12c6585ab773cf7d Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Tue, 15 Aug 2023 20:11:22 +0200 Subject: [PATCH 16/17] limit the scope of ratification transactions to KMD --- src/komodo.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/komodo.cpp b/src/komodo.cpp index 5f376057e5b..7c226a59a5c 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -828,25 +828,28 @@ int32_t komodo_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block) } if ( specialtx != 0 && isratification != 0 && numvouts > 2 ) { - numvalid = 0; - memset(pubkeys,0,sizeof(pubkeys)); - for (j=1; j= sizeof(uint32_t) && len <= sizeof(scriptbuf) ) + numvalid = 0; + memset(pubkeys,0,sizeof(pubkeys)); + for (j=1; j= sizeof(uint32_t) && len <= sizeof(scriptbuf) ) { - memcpy(pubkeys[numvalid++],scriptbuf+1,33); - for (k=0; k<33; k++) - printf("%02x",scriptbuf[k+1]); - printf(" <- new notary.[%d]\n",j-1); + memcpy(scriptbuf,(uint8_t *)&block.vtx[i].vout[j].scriptPubKey[0],len); + if ( len == 35 && scriptbuf[0] == 33 && scriptbuf[34] == 0xac ) + { + if (numvalid < 64) { + memcpy(pubkeys[numvalid++],scriptbuf+1,33); + for (k=0; k<33; k++) + printf("%02x",scriptbuf[k+1]); + printf(" <- new notary.[%d]\n",j-1); + } + } } } - } - if ( !chainName.isKMD() || height < 100000 ) - { + if ( ((signedmask & 1) != 0 && numvalid >= KOMODO_MINRATIFY) || bitweight(signedmask) > (numnotaries/3) ) { memset(&txhash,0,sizeof(txhash)); From 2d5f55be154344ee25dd8b666769edff65110c84 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Tue, 15 Aug 2023 21:20:29 +0200 Subject: [PATCH 17/17] komodo_voutupdate: don't try to process staking oprets and notary proofs --- src/komodo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/komodo.cpp b/src/komodo.cpp index 7c226a59a5c..176196791b9 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -463,6 +463,9 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar if (scriptlen - len < 0 || (unsigned int)(scriptlen - len) < opretlen) return notaryid; + if (opretlen < 34) // Stop processing of OP_RETURNs that do not contain significant data, + return notaryid; // such as a 33-byte staking opret or a 32-byte notary proof in a mined block. + opoffset = len; matched = 0;