From 0a958ae7f6647f54fbcd79d82b020aa817be4e56 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 14 Sep 2016 15:57:54 -0600 Subject: [PATCH 001/281] Write R1CS output to file in GenerateParams. --- src/zcash/GenerateParams.cpp | 6 ++++-- src/zcash/JoinSplit.cpp | 13 +++++++++++-- src/zcash/JoinSplit.hpp | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/zcash/GenerateParams.cpp b/src/zcash/GenerateParams.cpp index 9e27047ab..eadfe7b18 100644 --- a/src/zcash/GenerateParams.cpp +++ b/src/zcash/GenerateParams.cpp @@ -9,18 +9,20 @@ int main(int argc, char **argv) return 1; } - if(argc != 3) { - std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; + if(argc != 4) { + std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName r1csFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; + std::string r1csFile = argv[3]; auto p = ZCJoinSplit::Generate(); p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); + p->saveR1CS(r1csFile); delete p; diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 719564523..b9e72f1c2 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -111,14 +111,23 @@ public: throw std::runtime_error("cannot save verifying key; key doesn't exist"); } } + void saveR1CS(std::string path) { + auto r1cs = generate_r1cs(); - void generate() { + saveToFile(path, r1cs); + } + + r1cs_constraint_system generate_r1cs() { protoboard pb; joinsplit_gadget g(pb); g.generate_r1cs_constraints(); - const r1cs_constraint_system constraint_system = pb.get_constraint_system(); + return pb.get_constraint_system(); + } + + void generate() { + const r1cs_constraint_system constraint_system = generate_r1cs(); r1cs_ppzksnark_keypair keypair = r1cs_ppzksnark_generator(constraint_system); pk = keypair.pk; diff --git a/src/zcash/JoinSplit.hpp b/src/zcash/JoinSplit.hpp index 6acfc2a25..8f17a4c46 100644 --- a/src/zcash/JoinSplit.hpp +++ b/src/zcash/JoinSplit.hpp @@ -62,6 +62,7 @@ public: virtual void saveProvingKey(std::string path) = 0; virtual void loadVerifyingKey(std::string path) = 0; virtual void saveVerifyingKey(std::string path) = 0; + virtual void saveR1CS(std::string path) = 0; virtual ZCProof prove( const boost::array& inputs, From 473ed95199c7a92a109e5c587e8e745d9fff9f71 Mon Sep 17 00:00:00 2001 From: Cameron Boehmer Date: Fri, 28 Oct 2016 16:37:44 -0700 Subject: [PATCH 002/281] point "where do i begin?" readme link to 1.0 guide --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8558c1ef9..846d1512c 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,8 @@ See important security warnings in Where do I begin? ----------------- - -We have a guide for joining the public testnet: -https://github.com/zcash/zcash/wiki/Beta-Guide +We have a guide for joining the main Zcash network: +https://github.com/zcash/zcash/wiki/1.0-User-Guide ### Need Help? From 2b2bc69e8cead1431aec3066c694a8f2364a5b61 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sat, 29 Oct 2016 11:53:16 -0600 Subject: [PATCH 003/281] Properly account for joinsplit value when deciding if a transaction should be placed in a mined block. --- src/miner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index bde9babd5..9289a9f63 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -207,6 +207,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) dPriority += (double)nValueIn * nConf; } + nTotalIn += tx.GetJoinSplitValueIn(); + if (fMissingInputs) continue; // Priority is sum(valuein * age) / modified_txsize From d793f94b8a33040afa35be6899ea6c81e32f26ee Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 30 Oct 2016 14:36:36 -0700 Subject: [PATCH 004/281] Track mined blocks to detect and report orphans and mining revenue Part of #1713 Closes #1716 --- src/chainparams.cpp | 3 +++ src/chainparams.h | 2 ++ src/metrics.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++- src/metrics.h | 5 ++++- src/miner.cpp | 2 +- src/rpcmining.cpp | 1 - 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 8691455e8..59869dff9 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -36,6 +36,7 @@ class CMainParams : public CChainParams { public: CMainParams() { strNetworkID = "main"; + strCurrencyUnits = "ZEC"; consensus.fCoinbaseMustBeProtected = true; consensus.nSubsidySlowStartInterval = 20000; consensus.nSubsidyHalvingInterval = 840000; @@ -202,6 +203,7 @@ class CTestNetParams : public CMainParams { public: CTestNetParams() { strNetworkID = "test"; + strCurrencyUnits = "TAZ"; consensus.nMajorityEnforceBlockUpgrade = 51; consensus.nMajorityRejectBlockOutdated = 75; consensus.nMajorityWindow = 400; @@ -287,6 +289,7 @@ class CRegTestParams : public CTestNetParams { public: CRegTestParams() { strNetworkID = "regtest"; + strCurrencyUnits = "REG"; consensus.fCoinbaseMustBeProtected = false; consensus.nSubsidySlowStartInterval = 0; consensus.nSubsidyHalvingInterval = 150; diff --git a/src/chainparams.h b/src/chainparams.h index ecb4f94c3..0af9920de 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -67,6 +67,7 @@ public: int64_t PruneAfterHeight() const { return nPruneAfterHeight; } unsigned int EquihashN() const { return nEquihashN; } unsigned int EquihashK() const { return nEquihashK; } + std::string CurrencyUnits() const { return strCurrencyUnits; } /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } /** In the future use NetworkIDString() for RPC fields */ @@ -99,6 +100,7 @@ protected: std::vector vSeeds; std::vector base58Prefixes[MAX_BASE58_TYPES]; std::string strNetworkID; + std::string strCurrencyUnits; CBlock genesis; std::vector vFixedSeeds; bool fRequireRPCPassword = false; diff --git a/src/metrics.cpp b/src/metrics.cpp index a5480838e..78b3b4ecc 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -5,9 +5,11 @@ #include "metrics.h" #include "chainparams.h" +#include "main.h" #include "ui_interface.h" #include "util.h" #include "utiltime.h" +#include "utilmoneystr.h" #include #include @@ -20,10 +22,18 @@ AtomicCounter ehSolverRuns; AtomicCounter solutionTargetChecks; AtomicCounter minedBlocks; +boost::synchronized_value> trackedBlocks; + boost::synchronized_value> messageBox; boost::synchronized_value initMessage; bool loaded = false; +void TrackMinedBlock(uint256 hash) +{ + minedBlocks.increment(); + trackedBlocks->push_back(hash); +} + static bool metrics_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style) @@ -121,8 +131,43 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) int mined = minedBlocks.get(); if (mined > 0) { + LOCK(cs_main); + boost::strict_lock_ptr> u = trackedBlocks.synchronize(); + auto consensusParams = Params().GetConsensus(); + auto tipHeight = chainActive.Height(); + std::string units = Params().CurrencyUnits(); + + // Update orphans and calculate subsidies + CAmount immature {0}; + CAmount mature {0}; + for (std::list::iterator it = u->begin(); it != u->end(); it++) { + auto hash = *it; + if (mapBlockIndex.count(hash) > 0 && + chainActive.Contains(mapBlockIndex[hash])) { + int height = mapBlockIndex[hash]->nHeight; + CAmount subsidy = GetBlockSubsidy(height, consensusParams); + if ((height > 0) && (height <= consensusParams.GetLastFoundersRewardBlockHeight())) { + subsidy -= subsidy/5; + } + if (std::max(0, COINBASE_MATURITY - (tipHeight - height)) > 0) { + immature += subsidy; + } else { + mature += subsidy; + } + } else { + it = u->erase(it); + } + } + int orphaned = mined - u->size(); + std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl; - lines++; + std::cout << " " + << strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"), + orphaned, + FormatMoney(immature), units, + FormatMoney(mature), units) + << std::endl; + lines += 2; } } std::cout << std::endl; diff --git a/src/metrics.h b/src/metrics.h index 4a2ca2264..b2cacd03a 100644 --- a/src/metrics.h +++ b/src/metrics.h @@ -2,6 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include "uint256.h" + #include #include @@ -26,7 +28,8 @@ struct AtomicCounter { extern AtomicCounter transactionsValidated; extern AtomicCounter ehSolverRuns; extern AtomicCounter solutionTargetChecks; -extern AtomicCounter minedBlocks; + +void TrackMinedBlock(uint256 hash); void ConnectMetricsScreen(); void ThreadShowMetricsScreen(); diff --git a/src/miner.cpp b/src/miner.cpp index bde9babd5..9ffe6b9c8 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -438,7 +438,7 @@ static bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& rese if (!ProcessNewBlock(state, NULL, pblock, true, NULL)) return error("ZcashMiner: ProcessNewBlock, block not accepted"); - minedBlocks.increment(); + TrackMinedBlock(pblock->GetHash()); return true; } diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 3759bd03a..a23d6b991 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -205,7 +205,6 @@ endloop: CValidationState state; if (!ProcessNewBlock(state, NULL, pblock, true, NULL)) throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); - minedBlocks.increment(); ++nHeight; blockHashes.push_back(pblock->GetHash().GetHex()); } From 848c89cd6725ef1260165b751352520592bbaa58 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 30 Oct 2016 14:37:20 -0700 Subject: [PATCH 005/281] Refresh mining status to detect setgenerate changes Closes #1656 --- src/metrics.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 78b3b4ecc..580c88f6e 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -74,8 +74,11 @@ void ConnectMetricsScreen() uiInterface.InitMessage.connect(metrics_InitMessage); } -void printMiningStatus(bool mining) +int printMiningStatus(bool mining) { + // Number of lines that are always displayed + int lines = 1; + if (mining) { int nThreads = GetArg("-genproclimit", 1); if (nThreads < 0) { @@ -86,11 +89,15 @@ void printMiningStatus(bool mining) nThreads = boost::thread::hardware_concurrency(); } std::cout << strprintf(_("You are running %d mining threads."), nThreads) << std::endl; + lines++; } else { std::cout << _("You are currently not mining.") << std::endl; std::cout << _("To enable mining, add 'gen=1' to your zcash.conf and restart.") << std::endl; + lines += 2; } std::cout << std::endl; + + return lines; } int printMetrics(size_t cols, int64_t nStart, bool mining) @@ -228,10 +235,6 @@ void ThreadShowMetricsScreen() std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl; std::cout << std::endl; - // Miner status - bool mining = GetBoolArg("-gen", false); - printMiningStatus(mining); - // Count uptime int64_t nStart = GetTime(); @@ -252,6 +255,10 @@ void ThreadShowMetricsScreen() // Erase below current position std::cout << "\e[J"; + // Miner status + bool mining = GetBoolArg("-gen", false); + + lines += printMiningStatus(mining); lines += printMetrics(cols, nStart, mining); lines += printMessageBox(cols); lines += printInitMessage(); From eb5b582e1fedb2afe12c80add36c2e199e6058ec Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 30 Oct 2016 15:25:40 -0700 Subject: [PATCH 006/281] Add network stats to metrics screen Closes #1688 --- src/metrics.cpp | 20 +++++++++++++++++++- src/rpcmining.cpp | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 580c88f6e..cfc5c987b 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -28,6 +28,8 @@ boost::synchronized_value> messageBox; boost::synchronized_value initMessage; bool loaded = false; +extern int64_t GetNetworkHashPS(int lookup, int height); + void TrackMinedBlock(uint256 hash) { minedBlocks.increment(); @@ -74,6 +76,18 @@ void ConnectMetricsScreen() uiInterface.InitMessage.connect(metrics_InitMessage); } +int printNetworkStats() +{ + LOCK2(cs_main, cs_vNodes); + + std::cout << " " << _("Block height") << " | " << chainActive.Height() << std::endl; + std::cout << " " << _("Network solution rate") << " | " << GetNetworkHashPS(120, -1) << " Sol/s" << std::endl; + std::cout << " " << _("Connections") << " | " << vNodes.size() << std::endl; + std::cout << std::endl; + + return 4; +} + int printMiningStatus(bool mining) { // Number of lines that are always displayed @@ -88,7 +102,8 @@ int printMiningStatus(bool mining) else nThreads = boost::thread::hardware_concurrency(); } - std::cout << strprintf(_("You are running %d mining threads."), nThreads) << std::endl; + std::cout << strprintf(_("You are mining with the %s solver on %d threads."), + GetArg("-equihashsolver", "default"), nThreads) << std::endl; lines++; } else { std::cout << _("You are currently not mining.") << std::endl; @@ -258,6 +273,9 @@ void ThreadShowMetricsScreen() // Miner status bool mining = GetBoolArg("-gen", false); + if (loaded) { + lines += printNetworkStats(); + } lines += printMiningStatus(mining); lines += printMetrics(cols, nStart, mining); lines += printMessageBox(cols); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index a23d6b991..af34c291c 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -37,7 +37,7 @@ using namespace std; * or over the difficulty averaging window if 'lookup' is nonpositive. * If 'height' is nonnegative, compute the estimate at the time when a given block was found. */ -Value GetNetworkHashPS(int lookup, int height) { +int64_t GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb = chainActive.Tip(); if (height >= 0 && height < chainActive.Height()) From 24f10266894245117f86c620a1be72fba26a6661 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 30 Oct 2016 16:54:05 -0700 Subject: [PATCH 007/281] Show mining info once the node has finished loading Closes #1685 --- src/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index cfc5c987b..d2a15d91a 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -144,7 +144,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) std::cout << "- " << strprintf(_("You have validated %d transactions!"), transactionsValidated.get()) << std::endl; - if (mining) { + if (mining && loaded) { double solps = uptime > 0 ? (double)solutionTargetChecks.get() / uptime : 0; std::string strSolps = strprintf("%.4f Sol/s", solps); std::cout << "- " << strprintf(_("You have contributed %s on average to the network solution rate."), strSolps) << std::endl; From 4e16a7249c9f4ab9e6c7da9ee4d41ed3fe2e1116 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 31 Oct 2016 20:05:48 -0700 Subject: [PATCH 008/281] Closes #1746. Add rpc call z_validateaddress to validate zaddrs. --- doc/payment-api.md | 3 +- src/rpcmisc.cpp | 65 +++++++++++++++++++++++++++++++++++ src/rpcserver.cpp | 1 + src/rpcserver.h | 1 + src/test/rpc_wallet_tests.cpp | 48 +++++++++++++++++++++++++- 5 files changed, 116 insertions(+), 2 deletions(-) diff --git a/doc/payment-api.md b/doc/payment-api.md index dd10c3497..7ea8ae238 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -29,7 +29,7 @@ Optional parameters are denoted in [square brackets]. RPC calls by category: * Accounting: z_getbalance, z_gettotalbalance -* Addresses : z_getnewaddress, z_listaddresses +* Addresses : z_getnewaddress, z_listaddresses, z_validateaddress * Keys : z_exportkey, z_importkey, z_exportwallet, z_importwallet * Operation: z_getoperationresult, z_getoperationstatus, z_listoperationids * Payment : z_listreceivedbyaddress, z_sendmany @@ -55,6 +55,7 @@ Command | Parameters | Description --- | --- | --- z_getnewaddress | | Return a new zaddr for sending and receiving payments. The spending key for this zaddr will be added to the node’s wallet.

Output:
zN68D8hSs3... z_listaddresses | | Returns a list of all the zaddrs in this node’s wallet for which you have a spending key.

Output:
{ [“z123…”, “z456...”, “z789...”] } +z_validateaddress | | Return information about a given zaddr.

Output:
{"isvalid" : true,
"address" : "zcWsmq...",
"payingkey" : "f5bb3c...",
"transmissionkey" : "7a58c7...",
"ismine" : true} ### Key Management diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index f5bef2a07..d5770fc47 100644 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -23,6 +23,8 @@ #include "json/json_spirit_utils.h" #include "json/json_spirit_value.h" +#include "zcash/Address.hpp" + using namespace json_spirit; using namespace std; @@ -213,6 +215,69 @@ Value validateaddress(const Array& params, bool fHelp) return ret; } + +Value z_validateaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "z_validateaddress \"zaddr\"\n" + "\nReturn information about the given z address.\n" + "\nArguments:\n" + "1. \"zaddr\" (string, required) The z address to validate\n" + "\nResult:\n" + "{\n" + " \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n" + " \"address\" : \"zaddr\", (string) The z address validated\n" + " \"ismine\" : true|false, (boolean) If the address is yours or not\n" + " \"payingkey\" : \"hex\", (string) The hex value of the paying key, a_pk\n" + " \"transmissionkey\" : \"hex\", (string) The hex value of the transmission key, pk_enc\n" + + "}\n" + "\nExamples:\n" + + HelpExampleCli("validateaddress", "\"zcWsmqT4X2V4jgxbgiCzyrAfRT1vi1F4sn7M5Pkh66izzw8Uk7LBGAH3DtcSMJeUb2pi3W4SQF8LMKkU2cUuVP68yAGcomL\"") + ); + + +#ifdef ENABLE_WALLET + LOCK2(cs_main, pwalletMain->cs_wallet); +#else + LOCK(cs_main); +#endif + + bool isValid = false; + bool isMine = false; + std::string payingKey, transmissionKey; + + string strAddress = params[0].get_str(); + try { + CZCPaymentAddress address(strAddress); + libzcash::PaymentAddress addr = address.Get(); + +#ifdef ENABLE_WALLET + isMine = pwalletMain->HaveSpendingKey(addr); +#endif + payingKey = addr.a_pk.GetHex(); + transmissionKey = addr.pk_enc.GetHex(); + isValid = true; + } catch (std::runtime_error e) { + // address is invalid, nop here as isValid is false. + } + + Object ret; + ret.push_back(Pair("isvalid", isValid)); + if (isValid) + { + ret.push_back(Pair("address", strAddress)); + ret.push_back(Pair("payingkey", payingKey)); + ret.push_back(Pair("transmissionkey", transmissionKey)); +#ifdef ENABLE_WALLET + ret.push_back(Pair("ismine", isMine)); +#endif + } + return ret; +} + + /** * Used by addmultisigaddress / createmultisig: */ diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 99e529ef3..b990f2040 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -330,6 +330,7 @@ static const CRPCCommand vRPCCommands[] = { "util", "verifymessage", &verifymessage, true }, { "util", "estimatefee", &estimatefee, true }, { "util", "estimatepriority", &estimatepriority, true }, + { "util", "z_validateaddress", &z_validateaddress, true }, /* uses wallet if enabled */ /* Not shown in help */ { "hidden", "invalidateblock", &invalidateblock, true }, diff --git a/src/rpcserver.h b/src/rpcserver.h index 6402a7a16..b8eac08c4 100644 --- a/src/rpcserver.h +++ b/src/rpcserver.h @@ -263,6 +263,7 @@ extern json_spirit::Value z_sendmany(const json_spirit::Array& params, bool fHel extern json_spirit::Value z_getoperationstatus(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp extern json_spirit::Value z_getoperationresult(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp extern json_spirit::Value z_listoperationids(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp +extern json_spirit::Value z_validateaddress(const json_spirit::Array& params, bool fHelp); // in rpcmisc.cpp // in rest.cpp diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index 2f674df0f..2eaeb7e61 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -295,13 +295,59 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_getbalance) BOOST_CHECK_THROW(CallRPC("z_listreceivedbyaddress tnRZ8bPq2pff3xBWhTJhNkVUkm2uhzksDeW5PvEa7aFKGT9Qi3YgTALZfjaY4jU3HLVKBtHdSXxoPoLA3naMPcHBcY88FcF 1"), runtime_error); } +/** + * This test covers RPC command z_validateaddress + */ +BOOST_AUTO_TEST_CASE(rpc_wallet_z_validateaddress) +{ + SelectParams(CBaseChainParams::MAIN); + + LOCK2(cs_main, pwalletMain->cs_wallet); + + Value retValue; + + // Check number of args + BOOST_CHECK_THROW(CallRPC("z_validateaddress"), runtime_error); + BOOST_CHECK_THROW(CallRPC("z_validateaddress toomany args"), runtime_error); + + // Wallet should be empty + std::set addrs; + pwalletMain->GetPaymentAddresses(addrs); + BOOST_CHECK(addrs.size()==0); + + // This address is not valid, it belongs to another network + BOOST_CHECK_NO_THROW(retValue = CallRPC("z_validateaddress ztaaga95QAPyp1kSQ1hD2kguCpzyMHjxWZqaYDEkzbvo7uYQYAw2S8X4Kx98AvhhofMtQL8PAXKHuZsmhRcanavKRKmdCzk")); + Object resultObj = retValue.get_obj(); + bool b = find_value(resultObj, "isvalid").get_bool(); + BOOST_CHECK_EQUAL(b, false); + + // This address is valid, but the spending key is not in this wallet + BOOST_CHECK_NO_THROW(retValue = CallRPC("z_validateaddress zcfA19SDAKRYHLoRDoShcoz4nPohqWxuHcqg8WAxsiB2jFrrs6k7oSvst3UZvMYqpMNSRBkxBsnyjjngX5L55FxMzLKach8")); + resultObj = retValue.get_obj(); + b = find_value(resultObj, "isvalid").get_bool(); + BOOST_CHECK_EQUAL(b, true); + b = find_value(resultObj, "ismine").get_bool(); + BOOST_CHECK_EQUAL(b, false); + + // Let's import a spending key to the wallet and validate its payment address + BOOST_CHECK_NO_THROW(CallRPC("z_importkey SKxoWv77WGwFnUJitQKNEcD636bL4X5Gd6wWmgaA4Q9x8jZBPJXT")); + BOOST_CHECK_NO_THROW(retValue = CallRPC("z_validateaddress zcWsmqT4X2V4jgxbgiCzyrAfRT1vi1F4sn7M5Pkh66izzw8Uk7LBGAH3DtcSMJeUb2pi3W4SQF8LMKkU2cUuVP68yAGcomL")); + resultObj = retValue.get_obj(); + b = find_value(resultObj, "isvalid").get_bool(); + BOOST_CHECK_EQUAL(b, true); + b = find_value(resultObj, "ismine").get_bool(); + BOOST_CHECK_EQUAL(b, true); + BOOST_CHECK_EQUAL(find_value(resultObj, "payingkey").get_str(), "f5bb3c888ccc9831e3f6ba06e7528e26a312eec3acc1823be8918b6a3a5e20ad"); + BOOST_CHECK_EQUAL(find_value(resultObj, "transmissionkey").get_str(), "7a58c7132446564e6b810cf895c20537b3528357dc00150a8e201f491efa9c1a"); +} + /* * This test covers RPC command z_exportwallet */ BOOST_AUTO_TEST_CASE(rpc_wallet_z_exportwallet) { LOCK2(cs_main, pwalletMain->cs_wallet); - + // wallet should be empty std::set addrs; pwalletMain->GetPaymentAddresses(addrs); From 73363c3d9ab56b25b71c889d48dd7371df764ffa Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 1 Nov 2016 09:16:51 -0600 Subject: [PATCH 009/281] Add checkpoint at block 2500. --- src/chainparams.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 8691455e8..c3b9ae2de 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -125,11 +125,12 @@ public: checkpointData = (Checkpoints::CCheckpointData) { boost::assign::map_list_of - ( 0, consensus.hashGenesisBlock), - genesis.nTime, // * UNIX timestamp of last checkpoint block - 0, // * total number of transactions between genesis and last checkpoint - // (the tx=... number in the SetBestChain debug.log lines) - 0 // * estimated number of transactions per day after checkpoint + (0, consensus.hashGenesisBlock) + (2500, uint256S("0x00000006dc968f600be11a86cbfbf7feb61c7577f45caced2e82b6d261d19744")), + 1477973071, // * UNIX timestamp of last checkpoint block + 22063, // * total number of transactions between genesis and last checkpoint + // (the tx=... number in the SetBestChain debug.log lines) + 5083 // * estimated number of transactions per day after checkpoint }; // Founders reward script expects a vector of 2-of-3 multisig addresses From cb7098317d961cecf574df85c89051cb77c7cbb0 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 1 Nov 2016 11:59:40 -0500 Subject: [PATCH 010/281] Improve locking in metrics --- src/metrics.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index d2a15d91a..34896a6b1 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -17,6 +17,8 @@ #include #include +CCriticalSection cs_metrics; + AtomicCounter transactionsValidated; AtomicCounter ehSolverRuns; AtomicCounter solutionTargetChecks; @@ -32,6 +34,7 @@ extern int64_t GetNetworkHashPS(int lookup, int height); void TrackMinedBlock(uint256 hash) { + LOCK(cs_metrics); minedBlocks.increment(); trackedBlocks->push_back(hash); } @@ -151,9 +154,10 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) std::cout << "- " << strprintf(_("You have completed %d Equihash solver runs."), ehSolverRuns.get()) << std::endl; lines += 2; - int mined = minedBlocks.get(); - if (mined > 0) { - LOCK(cs_main); + int mined = 0; + int orphaned = 0; + { + LOCK2(cs_main, cs_metrics); boost::strict_lock_ptr> u = trackedBlocks.synchronize(); auto consensusParams = Params().GetConsensus(); auto tipHeight = chainActive.Height(); @@ -180,8 +184,12 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) it = u->erase(it); } } - int orphaned = mined - u->size(); + mined = minedBlocks.get(); + orphaned = mined - u->size(); + } + + if (mined > 0) { std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl; std::cout << " " << strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"), From c4643bd949b1882cb86996efa4f1311871e77eea Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 31 Oct 2016 12:42:59 -0600 Subject: [PATCH 011/281] Throw more descriptive exceptions when the constraint system is violated. --- src/gtest/test_joinsplit.cpp | 251 +++++++++++++++++++++++++++++++ src/wallet/gtest/test_wallet.cpp | 27 +++- src/zcash/JoinSplit.cpp | 63 +++++++- 3 files changed, 332 insertions(+), 9 deletions(-) diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp index a8da4d51a..bfff30bed 100644 --- a/src/gtest/test_joinsplit.cpp +++ b/src/gtest/test_joinsplit.cpp @@ -154,6 +154,63 @@ void test_full_api(ZCJoinSplit* js) )); } +// Invokes the API (but does not compute a proof) +// to test exceptions +void invokeAPI( + ZCJoinSplit* js, + const boost::array& inputs, + const boost::array& outputs, + uint64_t vpub_old, + uint64_t vpub_new, + const uint256& rt +) { + uint256 ephemeralKey; + uint256 randomSeed; + uint256 pubKeyHash = random_uint256(); + boost::array macs; + boost::array nullifiers; + boost::array commitments; + boost::array ciphertexts; + + boost::array output_notes; + + ZCProof proof = js->prove( + inputs, + outputs, + output_notes, + ciphertexts, + ephemeralKey, + pubKeyHash, + randomSeed, + macs, + nullifiers, + commitments, + vpub_old, + vpub_new, + rt, + false + ); +} + +void invokeAPIFailure( + ZCJoinSplit* js, + const boost::array& inputs, + const boost::array& outputs, + uint64_t vpub_old, + uint64_t vpub_new, + const uint256& rt, + std::string reason +) +{ + try { + invokeAPI(js, inputs, outputs, vpub_old, vpub_new, rt); + } catch(std::invalid_argument const & err) { + EXPECT_EQ(err.what(), reason); + } catch(...) { + FAIL() << "Expected invalid_argument exception."; + } +} + TEST(joinsplit, h_sig) { auto js = ZCJoinSplit::Unopened(); @@ -233,10 +290,204 @@ for test_input in TEST_VECTORS: delete js; } +void increment_note_witnesses( + const uint256& element, + std::vector& witnesses, + ZCIncrementalMerkleTree& tree +) +{ + tree.append(element); + for (ZCIncrementalWitness& w : witnesses) { + w.append(element); + } + witnesses.push_back(tree.witness()); +} + TEST(joinsplit, full_api_test) { auto js = ZCJoinSplit::Generate(); + { + std::vector witnesses; + ZCIncrementalMerkleTree tree; + increment_note_witnesses(uint256(), witnesses, tree); + SpendingKey sk = SpendingKey::random(); + PaymentAddress addr = sk.address(); + Note note1(addr.a_pk, 100, random_uint256(), random_uint256()); + increment_note_witnesses(note1.cm(), witnesses, tree); + Note note2(addr.a_pk, 100, random_uint256(), random_uint256()); + increment_note_witnesses(note2.cm(), witnesses, tree); + Note note3(addr.a_pk, 2100000000000001, random_uint256(), random_uint256()); + increment_note_witnesses(note3.cm(), witnesses, tree); + Note note4(addr.a_pk, 1900000000000000, random_uint256(), random_uint256()); + increment_note_witnesses(note4.cm(), witnesses, tree); + Note note5(addr.a_pk, 1900000000000000, random_uint256(), random_uint256()); + increment_note_witnesses(note5.cm(), witnesses, tree); + + // Should work + invokeAPI(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 0, + tree.root()); + + // lhs > MAX_MONEY + invokeAPIFailure(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 2100000000000001, + 0, + tree.root(), + "nonsensical vpub_old value"); + + // rhs > MAX_MONEY + invokeAPIFailure(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 2100000000000001, + tree.root(), + "nonsensical vpub_new value"); + + // input is not in tree + invokeAPIFailure(js, + { + JSInput(witnesses[0], note1, sk), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 100, + tree.root(), + "joinsplit not anchored to the correct root"); + + // input is in the tree now! this should work + invokeAPI(js, + { + JSInput(witnesses[1], note1, sk), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 100, + tree.root()); + + // Wrong secret key + invokeAPIFailure(js, + { + JSInput(witnesses[1], note1, SpendingKey::random()), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 0, + tree.root(), + "input note not authorized to spend with given key"); + + // Absurd input value + invokeAPIFailure(js, + { + JSInput(witnesses[3], note3, sk), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 0, + tree.root(), + "nonsensical input note value"); + + // Absurd total input value + invokeAPIFailure(js, + { + JSInput(witnesses[4], note4, sk), + JSInput(witnesses[5], note5, sk) + }, + { + JSOutput(), + JSOutput() + }, + 0, + 0, + tree.root(), + "nonsensical left hand size of joinsplit balance"); + + // Absurd output value + invokeAPIFailure(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(addr, 2100000000000001), + JSOutput() + }, + 0, + 0, + tree.root(), + "nonsensical output value"); + + // Absurd total output value + invokeAPIFailure(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(addr, 1900000000000000), + JSOutput(addr, 1900000000000000) + }, + 0, + 0, + tree.root(), + "nonsensical right hand side of joinsplit balance"); + + // Absurd total output value + invokeAPIFailure(js, + { + JSInput(), + JSInput() + }, + { + JSOutput(addr, 1900000000000000), + JSOutput() + }, + 0, + 0, + tree.root(), + "invalid joinsplit balance"); + } + test_full_api(js); js->saveProvingKey("./zcashTest.pk"); diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index a1452e879..474129c34 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -99,7 +99,7 @@ CWalletTx GetValidReceive(const libzcash::SpendingKey& sk, CAmount value, bool r // Prepare JoinSplits uint256 rt; JSDescription jsdesc {*params, mtx.joinSplitPubKey, rt, - inputs, outputs, value, 0, false}; + inputs, outputs, 2*value, 0, false}; mtx.vjoinsplit.push_back(jsdesc); // Empty output script. @@ -147,20 +147,39 @@ CWalletTx GetValidSpend(const libzcash::SpendingKey& sk, // Fake tree for the unused witness ZCIncrementalMerkleTree tree; + libzcash::JSOutput dummyout; + libzcash::JSInput dummyin; + + { + if (note.value > value) { + libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); + libzcash::PaymentAddress dummyaddr = dummykey.address(); + dummyout = libzcash::JSOutput(dummyaddr, note.value - value); + } else if (note.value < value) { + libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); + libzcash::PaymentAddress dummyaddr = dummykey.address(); + libzcash::Note dummynote(dummyaddr.a_pk, (value - note.value), uint256(), uint256()); + tree.append(dummynote.cm()); + dummyin = libzcash::JSInput(tree.witness(), dummynote, dummykey); + } + } + + tree.append(note.cm()); + boost::array inputs = { libzcash::JSInput(tree.witness(), note, sk), - libzcash::JSInput() // dummy input + dummyin }; boost::array outputs = { - libzcash::JSOutput(), // dummy output + dummyout, // dummy output libzcash::JSOutput() // dummy output }; boost::array output_notes; // Prepare JoinSplits - uint256 rt; + uint256 rt = tree.root(); JSDescription jsdesc {*params, mtx.joinSplitPubKey, rt, inputs, outputs, 0, value, false}; mtx.vjoinsplit.push_back(jsdesc); diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 719564523..9f17ab48e 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -16,6 +16,7 @@ #include "libsnark/gadgetlib1/gadgets/merkle_tree/merkle_tree_check_read_gadget.hpp" #include "sync.h" +#include "amount.h" using namespace libsnark; @@ -181,8 +182,44 @@ public: throw std::runtime_error("JoinSplit proving key not loaded"); } - // Compute nullifiers of inputs + if (vpub_old > MAX_MONEY) { + throw std::invalid_argument("nonsensical vpub_old value"); + } + + if (vpub_new > MAX_MONEY) { + throw std::invalid_argument("nonsensical vpub_new value"); + } + + uint64_t lhs_value = vpub_old; + uint64_t rhs_value = vpub_new; + for (size_t i = 0; i < NumInputs; i++) { + // Sanity checks of input + { + // If note has nonzero value, its witness's root must be equal to the + // input. + if ((inputs[i].note.value != 0) && (inputs[i].witness.root() != rt)) { + throw std::invalid_argument("joinsplit not anchored to the correct root"); + } + + // Ensure we have the key to this note. + if (inputs[i].note.a_pk != inputs[i].key.address().a_pk) { + throw std::invalid_argument("input note not authorized to spend with given key"); + } + + // Balance must be sensical + if (inputs[i].note.value > MAX_MONEY) { + throw std::invalid_argument("nonsensical input note value"); + } + + lhs_value += inputs[i].note.value; + + if (lhs_value > MAX_MONEY) { + throw std::invalid_argument("nonsensical left hand size of joinsplit balance"); + } + } + + // Compute nullifier of input out_nullifiers[i] = inputs[i].nullifier(); } @@ -197,12 +234,29 @@ public: // Compute notes for outputs for (size_t i = 0; i < NumOutputs; i++) { + // Sanity checks of output + { + if (outputs[i].value > MAX_MONEY) { + throw std::invalid_argument("nonsensical output value"); + } + + rhs_value += outputs[i].value; + + if (rhs_value > MAX_MONEY) { + throw std::invalid_argument("nonsensical right hand side of joinsplit balance"); + } + } + // Sample r uint256 r = random_uint256(); out_notes[i] = outputs[i].note(phi, r, i, h_sig); } + if (lhs_value != rhs_value) { + throw std::invalid_argument("invalid joinsplit balance"); + } + // Compute the output commitments for (size_t i = 0; i < NumOutputs; i++) { out_commitments[i] = out_notes[i].cm(); @@ -214,7 +268,6 @@ public: ZCNoteEncryption encryptor(h_sig); for (size_t i = 0; i < NumOutputs; i++) { - NotePlaintext pt(out_notes[i], outputs[i].memo); out_ciphertexts[i] = pt.encrypt(encryptor, outputs[i].addr.pk_enc); @@ -249,9 +302,9 @@ public: ); } - if (!pb.is_satisfied()) { - throw std::invalid_argument("Constraint system not satisfied by inputs"); - } + // The constraint system must be satisfied or there is an unimplemented + // or incorrect sanity check above. Or the constraint system is broken! + assert(pb.is_satisfied()); // TODO: These are copies, which is not strictly necessary. std::vector primary_input = pb.primary_input(); From 548bbd95f019cb59924419945528906507b2f122 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 1 Nov 2016 19:58:56 -0500 Subject: [PATCH 012/281] Adjust consensus rule to accept genesis block without height in coinbase Closes #1753 --- src/gtest/test_checkblock.cpp | 43 +++++++++++++++++++++++++++++++++++ src/main.cpp | 5 +++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/gtest/test_checkblock.cpp b/src/gtest/test_checkblock.cpp index be6fde35e..eab73afad 100644 --- a/src/gtest/test_checkblock.cpp +++ b/src/gtest/test_checkblock.cpp @@ -29,3 +29,46 @@ TEST(CheckBlock, VersionTooLow) { EXPECT_CALL(state, DoS(100, false, REJECT_INVALID, "version-too-low", false)).Times(1); EXPECT_FALSE(CheckBlock(block, state, false, false)); } + +TEST(ContextualCheckBlock, BadCoinbaseHeight) { + SelectParams(CBaseChainParams::MAIN); + + // Create a block with no height in scriptSig + CMutableTransaction mtx; + mtx.vin.resize(1); + mtx.vin[0].prevout.SetNull(); + mtx.vin[0].scriptSig = CScript() << OP_0; + mtx.vout.resize(1); + mtx.vout[0].scriptPubKey = CScript() << OP_TRUE; + mtx.vout[0].nValue = 0; + CTransaction tx {mtx}; + CBlock block; + block.vtx.push_back(tx); + + // Treating block as genesis should pass + MockCValidationState state; + EXPECT_TRUE(ContextualCheckBlock(block, state, NULL)); + + // Treating block as non-genesis should fail + mtx.vout.push_back(CTxOut(GetBlockSubsidy(1, Params().GetConsensus())/5, Params().GetFoundersRewardScriptAtHeight(1))); + CTransaction tx2 {mtx}; + block.vtx[0] = tx2; + CBlock prev; + CBlockIndex indexPrev {prev}; + indexPrev.nHeight = 0; + EXPECT_CALL(state, DoS(100, false, REJECT_INVALID, "bad-cb-height", false)).Times(1); + EXPECT_FALSE(ContextualCheckBlock(block, state, &indexPrev)); + + // Setting to an incorrect height should fail + mtx.vin[0].scriptSig = CScript() << 2 << OP_0; + CTransaction tx3 {mtx}; + block.vtx[0] = tx3; + EXPECT_CALL(state, DoS(100, false, REJECT_INVALID, "bad-cb-height", false)).Times(1); + EXPECT_FALSE(ContextualCheckBlock(block, state, &indexPrev)); + + // After correcting the scriptSig, should pass + mtx.vin[0].scriptSig = CScript() << 1 << OP_0; + CTransaction tx4 {mtx}; + block.vtx[0] = tx4; + EXPECT_TRUE(ContextualCheckBlock(block, state, &indexPrev)); +} diff --git a/src/main.cpp b/src/main.cpp index 1cad27fe8..c432bcd63 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3090,7 +3090,10 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet): - if (block.nVersion >= 2) + // Since MIN_BLOCK_VERSION = 4 all blocks with nHeight > 0 should satisfy this. + // This rule is not applied to the genesis block, which didn't include the height + // in the coinbase. + if (nHeight > 0) { CScript expect = CScript() << nHeight; if (block.vtx[0].vin[0].scriptSig.size() < expect.size() || From 22ee0efe25f9a1c402ec3f4561319e6507b0d266 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 1 Nov 2016 20:37:59 -0500 Subject: [PATCH 013/281] Fix previous commit --- src/metrics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 34896a6b1..6b047bbe8 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -156,16 +156,15 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) int mined = 0; int orphaned = 0; + CAmount immature {0}; + CAmount mature {0}; { LOCK2(cs_main, cs_metrics); boost::strict_lock_ptr> u = trackedBlocks.synchronize(); auto consensusParams = Params().GetConsensus(); auto tipHeight = chainActive.Height(); - std::string units = Params().CurrencyUnits(); // Update orphans and calculate subsidies - CAmount immature {0}; - CAmount mature {0}; for (std::list::iterator it = u->begin(); it != u->end(); it++) { auto hash = *it; if (mapBlockIndex.count(hash) > 0 && @@ -190,6 +189,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) } if (mined > 0) { + std::string units = Params().CurrencyUnits(); std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl; std::cout << " " << strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"), From 73a439185d3a52119fbdca6a897ecb18b2faf4f2 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 2 Nov 2016 09:20:35 -0500 Subject: [PATCH 014/281] Ensure that no tracked blocks are skipped during orphan detection --- src/metrics.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 6b047bbe8..4d97312e2 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -165,7 +165,8 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) auto tipHeight = chainActive.Height(); // Update orphans and calculate subsidies - for (std::list::iterator it = u->begin(); it != u->end(); it++) { + std::list::iterator it = u->begin(); + while (it != u->end()) { auto hash = *it; if (mapBlockIndex.count(hash) > 0 && chainActive.Contains(mapBlockIndex[hash])) { @@ -179,6 +180,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) } else { mature += subsidy; } + it++; } else { it = u->erase(it); } From 33efd816ec068e7164813c24781dab9143ef32d0 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 2 Nov 2016 10:35:09 -0500 Subject: [PATCH 015/281] Add build scripts and fetch-params.sh to "make install" and "make dist" Closes #1728 --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7cbd5c69b..2b584b039 100644 --- a/Makefile.am +++ b/Makefile.am @@ -258,10 +258,14 @@ check-local: @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1 endif -dist_noinst_SCRIPTS = autogen.sh +dist_bin_SCRIPTS = zcutil/fetch-params.sh +dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/zcash $(DIST_DOCS) $(BIN_CHECKS) +install-exec-hook: + mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params + CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) .INTERMEDIATE: $(COVERAGE_INFO) From 4bc627b6a342ea7269e663b7c95273c244fcc57c Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Wed, 2 Nov 2016 11:06:55 -0700 Subject: [PATCH 016/281] Improves usability of fetch-params.sh Remove the lockfile at the end (fixes #1731) Makes it clearer what happens in the script output if params already exist. --- zcutil/fetch-params.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zcutil/fetch-params.sh b/zcutil/fetch-params.sh index b344f905e..ac5327ba6 100755 --- a/zcutil/fetch-params.sh +++ b/zcutil/fetch-params.sh @@ -67,6 +67,10 @@ function main() { cat < Date: Wed, 2 Nov 2016 14:50:00 -0500 Subject: [PATCH 017/281] Use uint64_t for AtomicCounter --- src/metrics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics.h b/src/metrics.h index b2cacd03a..2c5e7bd2c 100644 --- a/src/metrics.h +++ b/src/metrics.h @@ -8,7 +8,7 @@ #include struct AtomicCounter { - std::atomic value; + std::atomic value; AtomicCounter() : value {0} { } From 52676958d15987019b4c4b22f4340a33690bc772 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 2 Nov 2016 14:25:07 -0600 Subject: [PATCH 018/281] Test that a pure joinsplit will mine if other transactions are in the mempool. --- qa/rpc-tests/zcjoinsplit.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qa/rpc-tests/zcjoinsplit.py b/qa/rpc-tests/zcjoinsplit.py index b04345a82..961f3a0a8 100755 --- a/qa/rpc-tests/zcjoinsplit.py +++ b/qa/rpc-tests/zcjoinsplit.py @@ -36,6 +36,14 @@ class JoinSplitTest(BitcoinTestFramework): receive_result = self.nodes[0].zcrawreceive(zcsecretkey, joinsplit_result["encryptednote1"]) assert_equal(receive_result["exists"], True) + # The pure joinsplit we create should be mined in the next block + # despite other transactions being in the mempool. + addrtest = self.nodes[0].getnewaddress() + for xx in range(0,10): + self.nodes[0].generate(1) + for x in range(0,50): + self.nodes[0].sendtoaddress(addrtest, 0.01); + joinsplit_tx = self.nodes[0].createrawtransaction([], {}) joinsplit_result = self.nodes[0].zcrawjoinsplit(joinsplit_tx, {receive_result["note"] : zcsecretkey}, {zcaddress: 39.8}, 0, 0.1) From e80490f5ffaad9714c7702a992b9bf5e237d7fce Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 2 Nov 2016 16:45:38 -0500 Subject: [PATCH 019/281] Fix gtest issue introduced into master --- src/Makefile.gtest.include | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 8c41ef783..9c21e2c7f 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -1,12 +1,14 @@ TESTS += zcash-gtest bin_PROGRAMS += zcash-gtest -# tool for generating our public parameters +# tool for generating our public parameters. +# test_checktransaction.cpp MUST be before +# any test that calls SelectParams(). zcash_gtest_SOURCES = \ gtest/main.cpp \ gtest/utils.cpp \ - gtest/test_checkblock.cpp \ gtest/test_checktransaction.cpp \ + gtest/test_checkblock.cpp \ gtest/json_test_vectors.cpp \ gtest/json_test_vectors.h \ gtest/test_foundersreward.cpp \ From 6b820113e96c0f733263a250c76294f882802e5c Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 2 Nov 2016 17:43:37 -0500 Subject: [PATCH 020/281] Fix whitespace in Makefile.gtest.include --- src/Makefile.gtest.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 9c21e2c7f..7cd10cc22 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -10,7 +10,7 @@ zcash_gtest_SOURCES = \ gtest/test_checktransaction.cpp \ gtest/test_checkblock.cpp \ gtest/json_test_vectors.cpp \ - gtest/json_test_vectors.h \ + gtest/json_test_vectors.h \ gtest/test_foundersreward.cpp \ gtest/test_wallet_zkeys.cpp \ gtest/test_jsonspirit.cpp \ From c6ad4f2245239abd1837faf63d5a59fb42844551 Mon Sep 17 00:00:00 2001 From: ITH4Coinomia Date: Thu, 3 Nov 2016 16:51:41 +0530 Subject: [PATCH 021/281] Update security-warnings.md Linked Bitcoin URL --- doc/security-warnings.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/security-warnings.md b/doc/security-warnings.md index b43eed1f7..ab14b9b44 100644 --- a/doc/security-warnings.md +++ b/doc/security-warnings.md @@ -35,10 +35,10 @@ Wallet encryption is disabled, for several reasons: from the earlier issue). - We were concerned about the resistance of the algorithm used to derive wallet - encryption keys (inherited from Bitcoin) to dictionary attacks by a powerful - attacker. If and when we re-enable wallet encryption, it is likely to be with - a modern passphrase-based key derivation algorithm designed for greater - resistance to dictionary attack, such as Argon2i. + encryption keys (inherited from [Bitcoin](https://bitcoin.org/en/secure-your-wallet)) + to dictionary attacks by a powerful attacker. If and when we re-enable wallet + encryption, it is likely to be with a modern passphrase-based key derivation + algorithm designed for greater resistance to dictionary attack, such as Argon2i. You should use full-disk encryption (or encryption of your home directory) to protect your wallet at rest, and should assume (even unprivileged) users who are From df22af008d6a553b8f802c833bef40bd7489558b Mon Sep 17 00:00:00 2001 From: ITH4Coinomia Date: Thu, 3 Nov 2016 18:34:12 +0530 Subject: [PATCH 022/281] Update init.cpp Reformatted Text --- src/init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 384a82bba..3e1a22373 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -62,7 +62,7 @@ CWallet* pwalletMain = NULL; bool fFeeEstimatesInitialized = false; #ifdef WIN32 -// Win32 LevelDB doesn't use filedescriptors, and the ones used for +// Win32 LevelDB doesn't use file descriptors, and the ones used for // accessing block files don't count towards the fd_set size limit // anyway. #define MIN_CORE_FILEDESCRIPTORS 0 @@ -348,7 +348,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-mintxfee=", strprintf("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)", FormatMoney(CWallet::minTxFee.GetFeePerK()))); strUsage += HelpMessageOpt("-paytxfee=", strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK()))); - strUsage += HelpMessageOpt("-rescan", _("Rescan the block chain for missing wallet transactions") + " " + _("on startup")); + strUsage += HelpMessageOpt("-rescan", _("Rescan the blockchain for missing wallet transactions") + " " + _("on startup")); strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup")); strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0)); strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1)); From 74372eaa4c0051c7f1c1cddc3423ff56ac4c0156 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 3 Nov 2016 13:07:54 -0500 Subject: [PATCH 023/281] Initialise walletdb system in a temp dir for all gtests --- src/gtest/main.cpp | 10 ++++++++++ src/gtest/test_wallet_zkeys.cpp | 14 -------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/gtest/main.cpp b/src/gtest/main.cpp index 84e6f867c..810e4df1d 100644 --- a/src/gtest/main.cpp +++ b/src/gtest/main.cpp @@ -1,14 +1,24 @@ #include "gtest/gtest.h" #include "crypto/common.h" +#include "wallet/db.h" #include "libsnark/common/default_types/r1cs_ppzksnark_pp.hpp" #include "libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/r1cs_ppzksnark.hpp" +#include + int main(int argc, char **argv) { assert(init_and_check_sodium() != -1); libsnark::default_r1cs_ppzksnark_pp::init_public_params(); libsnark::inhibit_profiling_info = true; libsnark::inhibit_profiling_counters = true; + + // Get temporary and unique path for walletdb. + // bitdb.Open() only intialises once, so this dir is used for all tests. + // Note: / operator to append paths + boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); + boost::filesystem::create_directories(pathTemp); + bitdb.Open(pathTemp); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/src/gtest/test_wallet_zkeys.cpp b/src/gtest/test_wallet_zkeys.cpp index c7912ae7a..73ec43fd5 100644 --- a/src/gtest/test_wallet_zkeys.cpp +++ b/src/gtest/test_wallet_zkeys.cpp @@ -5,8 +5,6 @@ #include "wallet/walletdb.h" #include "util.h" -#include - /** * This test covers methods on CWallet * GenerateNewZKey() @@ -73,12 +71,6 @@ TEST(wallet_zkeys_tests, store_and_load_zkeys) { TEST(wallet_zkeys_tests, write_zkey_direct_to_db) { SelectParams(CBaseChainParams::TESTNET); - // Get temporary and unique path for file. - // Note: / operator to append paths - boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); - boost::filesystem::create_directories(pathTemp); - mapArgs["-datadir"] = pathTemp.string(); - bool fFirstRun; CWallet wallet("wallet.dat"); ASSERT_EQ(DB_LOAD_OK, wallet.LoadWallet(fFirstRun)); @@ -148,12 +140,6 @@ TEST(wallet_zkeys_tests, write_cryptedzkey_direct_to_db) { SelectParams(CBaseChainParams::TESTNET); - // Get temporary and unique path for file. - // Note: / operator to append paths - boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); - boost::filesystem::create_directories(pathTemp); - mapArgs["-datadir"] = pathTemp.string(); - bool fFirstRun; CWallet wallet("wallet_crypted.dat"); ASSERT_EQ(DB_LOAD_OK, wallet.LoadWallet(fFirstRun)); From d873bd1d586c4f9223261e300dbb9fe801d49177 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 3 Nov 2016 18:04:28 -0500 Subject: [PATCH 024/281] Revert "Initialise walletdb system in a temp dir for all gtests" This reverts commit 74372eaa4c0051c7f1c1cddc3423ff56ac4c0156. --- src/gtest/main.cpp | 10 ---------- src/gtest/test_wallet_zkeys.cpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/gtest/main.cpp b/src/gtest/main.cpp index 810e4df1d..84e6f867c 100644 --- a/src/gtest/main.cpp +++ b/src/gtest/main.cpp @@ -1,24 +1,14 @@ #include "gtest/gtest.h" #include "crypto/common.h" -#include "wallet/db.h" #include "libsnark/common/default_types/r1cs_ppzksnark_pp.hpp" #include "libsnark/zk_proof_systems/ppzksnark/r1cs_ppzksnark/r1cs_ppzksnark.hpp" -#include - int main(int argc, char **argv) { assert(init_and_check_sodium() != -1); libsnark::default_r1cs_ppzksnark_pp::init_public_params(); libsnark::inhibit_profiling_info = true; libsnark::inhibit_profiling_counters = true; - - // Get temporary and unique path for walletdb. - // bitdb.Open() only intialises once, so this dir is used for all tests. - // Note: / operator to append paths - boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); - boost::filesystem::create_directories(pathTemp); - bitdb.Open(pathTemp); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/src/gtest/test_wallet_zkeys.cpp b/src/gtest/test_wallet_zkeys.cpp index 73ec43fd5..c7912ae7a 100644 --- a/src/gtest/test_wallet_zkeys.cpp +++ b/src/gtest/test_wallet_zkeys.cpp @@ -5,6 +5,8 @@ #include "wallet/walletdb.h" #include "util.h" +#include + /** * This test covers methods on CWallet * GenerateNewZKey() @@ -71,6 +73,12 @@ TEST(wallet_zkeys_tests, store_and_load_zkeys) { TEST(wallet_zkeys_tests, write_zkey_direct_to_db) { SelectParams(CBaseChainParams::TESTNET); + // Get temporary and unique path for file. + // Note: / operator to append paths + boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); + boost::filesystem::create_directories(pathTemp); + mapArgs["-datadir"] = pathTemp.string(); + bool fFirstRun; CWallet wallet("wallet.dat"); ASSERT_EQ(DB_LOAD_OK, wallet.LoadWallet(fFirstRun)); @@ -140,6 +148,12 @@ TEST(wallet_zkeys_tests, write_cryptedzkey_direct_to_db) { SelectParams(CBaseChainParams::TESTNET); + // Get temporary and unique path for file. + // Note: / operator to append paths + boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); + boost::filesystem::create_directories(pathTemp); + mapArgs["-datadir"] = pathTemp.string(); + bool fFirstRun; CWallet wallet("wallet_crypted.dat"); ASSERT_EQ(DB_LOAD_OK, wallet.LoadWallet(fFirstRun)); From b7f3640ddabb823eaadf1788ab750f4c82de85b2 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 3 Nov 2016 18:09:34 -0500 Subject: [PATCH 025/281] Change execution order of gtests to avoid bug This is only a workaround; we still need to isolate and fix the root cause. --- src/Makefile.gtest.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 7cd10cc22..3941192b5 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -8,7 +8,6 @@ zcash_gtest_SOURCES = \ gtest/main.cpp \ gtest/utils.cpp \ gtest/test_checktransaction.cpp \ - gtest/test_checkblock.cpp \ gtest/json_test_vectors.cpp \ gtest/json_test_vectors.h \ gtest/test_foundersreward.cpp \ @@ -28,6 +27,7 @@ zcash_gtest_SOURCES = \ gtest/test_txid.cpp \ gtest/test_libzcash_utils.cpp \ gtest/test_proofs.cpp \ + gtest/test_checkblock.cpp \ wallet/gtest/test_wallet.cpp zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC From eb2e2b7043fbe4cad1c73e331ecde28af4e8e27e Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 3 Nov 2016 22:07:56 -0600 Subject: [PATCH 026/281] 1.0.1 release. --- README.md | 10 +++--- configure.ac | 2 +- contrib/DEBIAN/changelog | 6 ++++ contrib/DEBIAN/control | 2 +- contrib/DEBIAN/manpages/zcash-cli.1 | 4 +-- contrib/DEBIAN/manpages/zcashd.1 | 6 ++-- contrib/gitian-descriptors/gitian-linux.yml | 2 +- doc/release-notes/release-notes-1.0.1.md | 34 +++++++++++++++++++++ doc/release-process.md | 2 ++ src/clientversion.h | 2 +- 10 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 doc/release-notes/release-notes-1.0.1.md diff --git a/README.md b/README.md index 846d1512c..5155dbd1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Zcash 1.0.0 +Zcash 1.0.1 =========== What is Zcash? @@ -6,9 +6,9 @@ What is Zcash? [Zcash](https://z.cash/) is an implementation of the "Zerocash" protocol. Based on Bitcoin's code, it intends to offer a far higher standard of privacy -and anonymity through a sophisticated zero-knowledge proving scheme that -preserves confidentiality of transaction metadata. Technical details are -available in our [Protocol Specification](https://github.com/zcash/zips/raw/master/protocol/protocol.pdf). +through a sophisticated zero-knowledge proving scheme that preserves +confidentiality of transaction metadata. Technical details are available +in our [Protocol Specification](https://github.com/zcash/zips/raw/master/protocol/protocol.pdf). This software is the Zcash client. It downloads and stores the entire history of Zcash transactions; depending on the speed of your computer and network @@ -41,7 +41,7 @@ Building -------- Build Zcash along with most dependencies from source by running -./zcutil/build.sh. Currently only Linux is supported. +./zcutil/build.sh. Currently only Linux is officially supported. License ------- diff --git a/configure.ac b/configure.ac index 6d6918ec2..b1636292d 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) diff --git a/contrib/DEBIAN/changelog b/contrib/DEBIAN/changelog index da6e2eb6c..1d0a2c553 100644 --- a/contrib/DEBIAN/changelog +++ b/contrib/DEBIAN/changelog @@ -1,3 +1,9 @@ +zcash (1.0.1) jessie; urgency=medium + + * 1.0.1 release. + + -- Zcash Company Thu, 03 Nov 2016 23:21:09 -0500 + zcash (1.0.0-sprout) jessie; urgency=medium * 1.0.0 release. diff --git a/contrib/DEBIAN/control b/contrib/DEBIAN/control index d7990366c..e7128fcae 100644 --- a/contrib/DEBIAN/control +++ b/contrib/DEBIAN/control @@ -10,7 +10,7 @@ Build-Depends: autoconf, automake, bsdmainutils, build-essential Vcs-Git: https://github.com/zcash/zcash.git Vcs-Browser: https://github.com/zcash/zcash Package: zcash -Version: 1.0.0-sprout +Version: 1.0.1 Architecture: amd64 Depends: libgomp1 Description: An implementation of the "Zerocash" protocol. diff --git a/contrib/DEBIAN/manpages/zcash-cli.1 b/contrib/DEBIAN/manpages/zcash-cli.1 index 985664c05..561c4ac44 100644 --- a/contrib/DEBIAN/manpages/zcash-cli.1 +++ b/contrib/DEBIAN/manpages/zcash-cli.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASH-CLI "1" "October 2016" "Zcash RPC client version v1.0.0-409dcb7" "User Commands" +.TH ZCASH-CLI "1" "November 2016" "Zcash RPC client version v1.0.1" "User Commands" .SH NAME zcash-cli \- RPC client for the Zcash daemon .SH DESCRIPTION -Zcash RPC client version v1.0.0 +Zcash RPC client version v1.0.1 .SS "Usage:" .TP zcash\-cli [options] [params] diff --git a/contrib/DEBIAN/manpages/zcashd.1 b/contrib/DEBIAN/manpages/zcashd.1 index 3e1990dec..85ded2c80 100644 --- a/contrib/DEBIAN/manpages/zcashd.1 +++ b/contrib/DEBIAN/manpages/zcashd.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASHD "1" "October 2016" "Zcash Daemon version v1.0.0-409dcb7" "User Commands" +.TH ZCASHD "1" "November 2016" "Zcash Daemon version v1.0.1" "User Commands" .SH NAME zcashd \- Network daemon for interacting with the Zcash blockchain .SH DESCRIPTION -Zcash Daemon version v1.0.0 +Zcash Daemon version v1.0.1 .SS "Usage:" .TP zcashd [options] @@ -62,7 +62,7 @@ Keep at most unconnectable transactions in memory (default: 100) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-4\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 33fe21ab9..1d6e24e4e 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "zcash-1.0.0" +name: "zcash-1.0.1" enable_cache: true distro: "debian" suites: diff --git a/doc/release-notes/release-notes-1.0.1.md b/doc/release-notes/release-notes-1.0.1.md new file mode 100644 index 000000000..8ee772bf7 --- /dev/null +++ b/doc/release-notes/release-notes-1.0.1.md @@ -0,0 +1,34 @@ +Cameron Boehmer (1): + point "where do i begin?" readme link to 1.0 guide + +Jack Grigg (15): + Track mined blocks to detect and report orphans and mining revenue + Refresh mining status to detect setgenerate changes + Add network stats to metrics screen + Show mining info once the node has finished loading + Improve locking in metrics + Adjust consensus rule to accept genesis block without height in coinbase + Fix previous commit + Ensure that no tracked blocks are skipped during orphan detection + Add build scripts and fetch-params.sh to "make install" and "make dist" + Use uint64_t for AtomicCounter + Fix gtest issue introduced into master + Fix whitespace in Makefile.gtest.include + Initialise walletdb system in a temp dir for all gtests + Revert "Initialise walletdb system in a temp dir for all gtests" + Change execution order of gtests to avoid bug + +Kevin Gallagher (1): + Improves usability of fetch-params.sh + +Sean Bowe (6): + Properly account for joinsplit value when deciding if a transaction should be placed in a mined block. + Add checkpoint at block 2500. + Throw more descriptive exceptions when the constraint system is violated. + Test that a pure joinsplit will mine if other transactions are in the mempool. + 1.0.1 release. + Update man pages. + +Simon (1): + Closes #1746. Add rpc call z_validateaddress to validate zaddrs. + diff --git a/doc/release-process.md b/doc/release-process.md index 5ba8763d4..aded05e0f 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -38,6 +38,8 @@ previous release: contrib/DEBIAN/control contrib/gitian-descriptors/gitian-linux.yml + Build and commit to update versions, and then perform the following commands: + help2man -n "RPC client for the Zcash daemon" src/zcash-cli > contrib/DEBIAN/manpages/zcash-cli.1 help2man -n "Network daemon for interacting with the Zcash blockchain" src/zcashd > contrib/DEBIAN/manpages/zcashd.1 diff --git a/src/clientversion.h b/src/clientversion.h index d58fc64db..34b72e3e0 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -16,7 +16,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 -#define CLIENT_VERSION_REVISION 0 +#define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build From 5e9b555fed49c7ae5ebd710e3ac6ab60c176d561 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 3 Nov 2016 21:28:56 -0700 Subject: [PATCH 027/281] Fixes #1762 segfault when miner is interrupted. Running ./zcash-cli setgenerate false would result in a segfault. The miner thread's boost::signals2::connection was not disconnected when the miner thread was interrupted and shutdown. Subsequently, when a new block arrived, the UpdateTip callback would still be invoked on a now invalid object, resulting in a segfault. --- src/miner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index ddab39f74..85d4a3d01 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -647,11 +647,13 @@ void static BitcoinMiner(CWallet *pwallet) } catch (const boost::thread_interrupted&) { + c.disconnect(); LogPrintf("ZcashMiner terminated\n"); throw; } catch (const std::runtime_error &e) { + c.disconnect(); LogPrintf("ZcashMiner runtime error: %s\n", e.what()); return; } From de9ca8e9a4dbb464f90df95b3bcd444b71f05bcc Mon Sep 17 00:00:00 2001 From: "S. Matthew English" Date: Fri, 4 Nov 2016 13:11:33 +0100 Subject: [PATCH 028/281] enforcing consistency 'tor' to 'Tor' There was only one instance of 'tor', changed it to 'Tor' to better reflect all other references --- doc/tor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tor.md b/doc/tor.md index 4b8c89bb0..61549b631 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -18,7 +18,7 @@ outgoing connections be anonymized, but more is possible. -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy server will be used to try to reach .onion addresses as well. - -onion=ip:port Set the proxy server to use for tor hidden services. You do not + -onion=ip:port Set the proxy server to use for Tor hidden services. You do not need to set this if it's the same as -proxy. You can use -noonion to explicitly disable access to hidden service. From 7c463780cf5339cd04a671b649305e834939070c Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 4 Nov 2016 23:23:48 -0700 Subject: [PATCH 029/281] Fixes #1779 so that sending to multiple zaddrs no longer fails. Commit 2eeb6b randomized the order of input and output notes, but this is now known to prevent the chaining of multiple joinsplits in a single transaction. The root cause has yet to be determined. This patch is a temporary fix and disables the shuffling of input and output notes. It also adds a chained joinsplit test to the python qa test suite. --- qa/rpc-tests/wallet_protectcoinbase.py | 17 +++++++++++++++++ src/primitives/transaction.cpp | 6 ++++-- src/wallet/asyncrpcoperation_sendmany.cpp | 5 ++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index b3d554889..eabe26bf4 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -148,5 +148,22 @@ class Wallet2Test (BitcoinTestFramework): # check balance assert_equal(self.nodes[2].getbalance(), 9) + # Check that chained joinsplits in a single tx are created successfully. + recipients = [] + num_recipients = 3 + amount_per_recipient = Decimal('0.002') + for i in xrange(0,num_recipients): + newzaddr = self.nodes[2].z_getnewaddress() + recipients.append({"address":newzaddr, "amount":amount_per_recipient}) + myopid = self.nodes[0].z_sendmany(myzaddr, recipients) + self.wait_for_operationd_success(myopid) + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + + # check balances + resp = self.nodes[2].z_gettotalbalance() + assert_equal(Decimal(resp["private"]), num_recipients * amount_per_recipient) + if __name__ == '__main__': Wallet2Test ().main () diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 399cd665a..de722eb92 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -57,8 +57,10 @@ JSDescription JSDescription::Randomized( // Randomize the order of the inputs and outputs inputMap = {0, 1}; outputMap = {0, 1}; - MappedShuffle(inputs.begin(), inputMap.begin(), ZC_NUM_JS_INPUTS, gen); - MappedShuffle(outputs.begin(), outputMap.begin(), ZC_NUM_JS_OUTPUTS, gen); + if (gen) { + MappedShuffle(inputs.begin(), inputMap.begin(), ZC_NUM_JS_INPUTS, gen); + MappedShuffle(outputs.begin(), outputMap.begin(), ZC_NUM_JS_OUTPUTS, gen); + } return JSDescription( params, pubKeyHash, anchor, inputs, outputs, diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index f72badc60..fa359206f 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -875,6 +875,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( {info.vjsout[0], info.vjsout[1]}; boost::array inputMap; boost::array outputMap; + std::function emptyFunc; JSDescription jsdesc = JSDescription::Randomized( *pzcashParams, joinSplitPubKey_, @@ -885,7 +886,9 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( outputMap, info.vpub_old, info.vpub_new, - !this->testmode); + !this->testmode, + // Temporary fix for #1779 is to disable shuffling of inputs and outputs. + emptyFunc); if (!(jsdesc.Verify(*pzcashParams, joinSplitPubKey_))) { throw std::runtime_error("error verifying joinsplit"); From b55744e1ada2b815faac9ccae87a79d017e84b3c Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sat, 5 Nov 2016 10:45:25 -0600 Subject: [PATCH 030/281] Regression test for constraint system violation. --- src/gtest/test_joinsplit.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp index bfff30bed..0e732e057 100644 --- a/src/gtest/test_joinsplit.cpp +++ b/src/gtest/test_joinsplit.cpp @@ -206,9 +206,12 @@ void invokeAPIFailure( invokeAPI(js, inputs, outputs, vpub_old, vpub_new, rt); } catch(std::invalid_argument const & err) { EXPECT_EQ(err.what(), reason); + return; } catch(...) { FAIL() << "Expected invalid_argument exception."; } + + FAIL() << "It worked, when it shouldn't have!"; } TEST(joinsplit, h_sig) @@ -368,7 +371,7 @@ TEST(joinsplit, full_api_test) tree.root(), "nonsensical vpub_new value"); - // input is not in tree + // input witness for the wrong element invokeAPIFailure(js, { JSInput(witnesses[0], note1, sk), @@ -381,6 +384,22 @@ TEST(joinsplit, full_api_test) 0, 100, tree.root(), + "witness of wrong element for joinsplit input"); + + // input witness doesn't match up with + // real root + invokeAPIFailure(js, + { + JSInput(witnesses[1], note1, sk), + JSInput() + }, + { + JSOutput(), + JSOutput() + }, + 0, + 100, + uint256(), "joinsplit not anchored to the correct root"); // input is in the tree now! this should work From 5f0a73ce11e7d990a866f55ec9a9dfdf816b6166 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sat, 5 Nov 2016 11:27:23 -0600 Subject: [PATCH 031/281] Improve accuracy of constraint system violation diagnostics. --- src/gtest/test_joinsplit.cpp | 4 +--- src/zcash/IncrementalMerkleTree.cpp | 11 +++++++++++ src/zcash/IncrementalMerkleTree.hpp | 7 +++++++ src/zcash/JoinSplit.cpp | 15 +++++++++++---- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp index 0e732e057..18f293f1d 100644 --- a/src/gtest/test_joinsplit.cpp +++ b/src/gtest/test_joinsplit.cpp @@ -204,14 +204,12 @@ void invokeAPIFailure( { try { invokeAPI(js, inputs, outputs, vpub_old, vpub_new, rt); + FAIL() << "It worked, when it shouldn't have!"; } catch(std::invalid_argument const & err) { EXPECT_EQ(err.what(), reason); - return; } catch(...) { FAIL() << "Expected invalid_argument exception."; } - - FAIL() << "It worked, when it shouldn't have!"; } TEST(joinsplit, h_sig) diff --git a/src/zcash/IncrementalMerkleTree.cpp b/src/zcash/IncrementalMerkleTree.cpp index 3a6501555..cf2d00af7 100644 --- a/src/zcash/IncrementalMerkleTree.cpp +++ b/src/zcash/IncrementalMerkleTree.cpp @@ -70,6 +70,17 @@ void IncrementalMerkleTree::wfcheck() const { } } +template +Hash IncrementalMerkleTree::last() const { + if (right) { + return *right; + } else if (left) { + return *left; + } else { + throw std::runtime_error("tree has no cursor"); + } +} + template void IncrementalMerkleTree::append(Hash obj) { if (is_complete(Depth)) { diff --git a/src/zcash/IncrementalMerkleTree.hpp b/src/zcash/IncrementalMerkleTree.hpp index cd21bf651..6c50192c8 100644 --- a/src/zcash/IncrementalMerkleTree.hpp +++ b/src/zcash/IncrementalMerkleTree.hpp @@ -79,6 +79,7 @@ public: Hash root() const { return root(Depth, std::deque()); } + Hash last() const; IncrementalWitness witness() const { return IncrementalWitness(*this); @@ -138,6 +139,12 @@ public: return tree.path(partial_path()); } + // Return the element being witnessed (should be a note + // commitment!) + Hash element() const { + return tree.last(); + } + Hash root() const { return tree.root(Depth, partial_path()); } diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 702c3bac6..ebcef6b5b 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -205,10 +205,17 @@ public: for (size_t i = 0; i < NumInputs; i++) { // Sanity checks of input { - // If note has nonzero value, its witness's root must be equal to the - // input. - if ((inputs[i].note.value != 0) && (inputs[i].witness.root() != rt)) { - throw std::invalid_argument("joinsplit not anchored to the correct root"); + // If note has nonzero value + if (inputs[i].note.value != 0) { + // The witness root must equal the input root. + if (inputs[i].witness.root() != rt) { + throw std::invalid_argument("joinsplit not anchored to the correct root"); + } + + // The tree must witness the correct element + if (inputs[i].note.cm() != inputs[i].witness.element()) { + throw std::invalid_argument("witness of wrong element for joinsplit input"); + } } // Ensure we have the key to this note. From 38276c6ba2a38c6aa200438bfb3cb1aadff747e5 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 5 Nov 2016 14:12:41 -0700 Subject: [PATCH 032/281] Add GenIdentity, an identity function for MappedShuffle. We use this function in z_sendmany as part of the fix for #1779. --- src/gtest/test_random.cpp | 8 ++++++++ src/primitives/transaction.cpp | 9 +++++---- src/random.cpp | 5 +++++ src/random.h | 5 +++++ src/wallet/asyncrpcoperation_sendmany.cpp | 3 +-- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/gtest/test_random.cpp b/src/gtest/test_random.cpp index 61f81c331..d89702bcd 100644 --- a/src/gtest/test_random.cpp +++ b/src/gtest/test_random.cpp @@ -24,4 +24,12 @@ TEST(Random, MappedShuffle) { std::vector em2 {0, 1, 2, 3, 4}; EXPECT_EQ(ea2, a2); EXPECT_EQ(em2, m2); + + auto a3 = a; + auto m3 = m; + MappedShuffle(a3.begin(), m3.begin(), a3.size(), GenIdentity); + std::vector ea3 {8, 4, 6, 3, 5}; + std::vector em3 {0, 1, 2, 3, 4}; + EXPECT_EQ(ea3, a3); + EXPECT_EQ(em3, m3); } diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index de722eb92..d1e969360 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -57,10 +57,11 @@ JSDescription JSDescription::Randomized( // Randomize the order of the inputs and outputs inputMap = {0, 1}; outputMap = {0, 1}; - if (gen) { - MappedShuffle(inputs.begin(), inputMap.begin(), ZC_NUM_JS_INPUTS, gen); - MappedShuffle(outputs.begin(), outputMap.begin(), ZC_NUM_JS_OUTPUTS, gen); - } + + assert(gen); + + MappedShuffle(inputs.begin(), inputMap.begin(), ZC_NUM_JS_INPUTS, gen); + MappedShuffle(outputs.begin(), outputMap.begin(), ZC_NUM_JS_OUTPUTS, gen); return JSDescription( params, pubKeyHash, anchor, inputs, outputs, diff --git a/src/random.cpp b/src/random.cpp index 0ba0de908..4f197fcac 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -137,3 +137,8 @@ void seed_insecure_rand(bool fDeterministic) insecure_rand_Rw = tmp; } } + +int GenIdentity(int n) +{ + return n-1; +} diff --git a/src/random.h b/src/random.h index 1f6f7fef5..5bc8b5480 100644 --- a/src/random.h +++ b/src/random.h @@ -25,6 +25,11 @@ uint64_t GetRand(uint64_t nMax); int GetRandInt(int nMax); uint256 GetRandHash(); +/** + * Identity function for MappedShuffle, so that elements retain their original order. + */ + int GenIdentity(int n); + /** * Rearranges the elements in the range [first,first+len) randomly, assuming * that gen is a uniform random number generator. Follows the same algorithm as diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index fa359206f..7f9549b74 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -875,7 +875,6 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( {info.vjsout[0], info.vjsout[1]}; boost::array inputMap; boost::array outputMap; - std::function emptyFunc; JSDescription jsdesc = JSDescription::Randomized( *pzcashParams, joinSplitPubKey_, @@ -888,7 +887,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( info.vpub_new, !this->testmode, // Temporary fix for #1779 is to disable shuffling of inputs and outputs. - emptyFunc); + GenIdentity); if (!(jsdesc.Verify(*pzcashParams, joinSplitPubKey_))) { throw std::runtime_error("error verifying joinsplit"); From 7a810efa08e66383fd721b60cbd6e9747a1d2d76 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 6 Nov 2016 12:35:55 -0800 Subject: [PATCH 033/281] Add --disable-tests flag to zcutils/build.sh Closes #1787 --- zcutil/build.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/zcutil/build.sh b/zcutil/build.sh index 0000c6201..c10be652f 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -10,11 +10,13 @@ Usage: $0 --help Show this help message and exit. -$0 [ --enable-lcov ] [ MAKEARGS... ] +$0 [ --enable-lcov || --disable-tests ] [ MAKEARGS... ] Build Zcash and most of its transitive dependencies from - source. MAKEARGS are applied to both dependencies and Zcash itself. If - --enable-lcov is passed, Zcash is configured to add coverage + source. MAKEARGS are applied to both dependencies and Zcash itself. + + If --enable-lcov is passed, Zcash is configured to add coverage instrumentation, thus enabling "make cov" to work. + If --disable-tests is passed instead, the Zcash tests are not built. EOF exit 0 fi @@ -25,11 +27,16 @@ cd "$(dirname "$(readlink -f "$0")")/.." # If --enable-lcov is the first argument, enable lcov coverage support: LCOV_ARG='' HARDENING_ARG='--enable-hardening' +TEST_ARG='' if [ "x${1:-}" = 'x--enable-lcov' ] then LCOV_ARG='--enable-lcov' HARDENING_ARG='--disable-hardening' shift +elif [ "x${1:-}" = 'x--disable-tests' ] +then + TEST_ARG='--enable-tests=no' + shift fi # BUG: parameterize the platform/host directory: @@ -37,5 +44,5 @@ PREFIX="$(pwd)/depends/x86_64-unknown-linux-gnu/" HOST=x86_64-unknown-linux-gnu BUILD=x86_64-unknown-linux-gnu make "$@" -C ./depends/ V=1 NO_QT=1 ./autogen.sh -./configure --prefix="${PREFIX}" --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -Werror -g' +./configure --prefix="${PREFIX}" --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -Werror -g' make "$@" V=1 From 3920292b4368a42cf56c7dc16fa324b60e24a8c8 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 6 Nov 2016 13:08:07 -0800 Subject: [PATCH 034/281] Add transaction size and zaddr output limit checks to z_sendmany. --- qa/rpc-tests/wallet.py | 46 ++++++++++++++++++++++++++++++++++++++++ src/wallet/rpcwallet.cpp | 36 +++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 493f98916..cde7c1aad 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -244,6 +244,52 @@ class WalletTest (BitcoinTestFramework): myvjoinsplits = mytxdetails["vjoinsplit"] assert_equal(0, len(myvjoinsplits)) + # z_sendmany is expected to fail if tx size breaks limit + myzaddr = self.nodes[0].z_getnewaddress() + + recipients = [] + num_t_recipients = 3000 + amount_per_recipient = Decimal('0.00000001') + errorString = '' + for i in xrange(0,num_t_recipients): + newtaddr = self.nodes[2].getnewaddress() + recipients.append({"address":newtaddr, "amount":amount_per_recipient}) + try: + self.nodes[0].z_sendmany(myzaddr, recipients) + except JSONRPCException,e: + errorString = e.error['message'] + assert("Too many outputs, size of raw transaction" in errorString) + + recipients = [] + num_t_recipients = 2000 + num_z_recipients = 50 + amount_per_recipient = Decimal('0.00000001') + errorString = '' + for i in xrange(0,num_t_recipients): + newtaddr = self.nodes[2].getnewaddress() + recipients.append({"address":newtaddr, "amount":amount_per_recipient}) + for i in xrange(0,num_z_recipients): + newzaddr = self.nodes[2].z_getnewaddress() + recipients.append({"address":newzaddr, "amount":amount_per_recipient}) + try: + self.nodes[0].z_sendmany(myzaddr, recipients) + except JSONRPCException,e: + errorString = e.error['message'] + assert("size of raw transaction would be larger than limit" in errorString) + + recipients = [] + num_z_recipients = 100 + amount_per_recipient = Decimal('0.00000001') + errorString = '' + for i in xrange(0,num_z_recipients): + newzaddr = self.nodes[2].z_getnewaddress() + recipients.append({"address":newzaddr, "amount":amount_per_recipient}) + try: + self.nodes[0].z_sendmany(myzaddr, recipients) + except JSONRPCException,e: + errorString = e.error['message'] + assert("Invalid parameter, too many zaddr outputs" in errorString) + # add zaddr to node 2 myzaddr = self.nodes[2].z_getnewaddress() diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 77d7773f7..7356a0c70 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3166,6 +3166,17 @@ Value z_getoperationstatus_IMPL(const Array& params, bool fRemoveFinishedOperati return ret; } + +// Here we define the maximum number of zaddr outputs that can be included in a transaction. +// If input notes are small, we might actually require more than one joinsplit per zaddr output. +// For now though, we assume we use one joinsplit per zaddr output (and the second output note is change). +// We reduce the result by 1 to ensure there is room for non-joinsplit CTransaction data. +#define Z_SENDMANY_MAX_ZADDR_OUTPUTS ((MAX_TX_SIZE / JSDescription().GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION)) - 1) + +// transaction.h comment: spending taddr output requires CTxIn >= 148 bytes and typical taddr txout is 34 bytes +#define CTXIN_SPEND_DUST_SIZE 148 +#define CTXOUT_REGULAR_SIZE 34 + Value z_sendmany(const Array& params, bool fHelp) { if (!EnsureWalletIsAvailable(fHelp)) @@ -3177,6 +3188,7 @@ Value z_sendmany(const Array& params, bool fHelp) "\nSend multiple times. Amounts are double-precision floating point numbers." "\nChange from a taddr flows to a new taddr address, while change from zaddr returns to itself." "\nWhen sending coinbase UTXOs to a zaddr, change is not alllowed. The entire value of the UTXO(s) must be consumed." + + strprintf("\nCurrently, the maximum number of zaddr outputs is %d due to transaction size limits.\n", Z_SENDMANY_MAX_ZADDR_OUTPUTS) + HelpRequiringPassphrase() + "\n" "\nArguments:\n" "1. \"fromaddress\" (string, required) The taddr or zaddr to send the funds from.\n" @@ -3284,6 +3296,30 @@ Value z_sendmany(const Array& params, bool fHelp) } } + // Check the number of zaddr outputs does not exceed the limit. + if (zaddrRecipients.size() > Z_SENDMANY_MAX_ZADDR_OUTPUTS) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, too many zaddr outputs"); + } + + // As a sanity check, estimate and verify that the size of the transaction will be valid. + // Depending on the input notes, the actual tx size may turn out to be larger and perhaps invalid. + size_t txsize = 0; + CMutableTransaction mtx; + mtx.nVersion = 2; + for (int i = 0; i < zaddrRecipients.size(); i++) { + mtx.vjoinsplit.push_back(JSDescription()); + } + CTransaction tx(mtx); + txsize += tx.GetSerializeSize(SER_NETWORK, tx.nVersion); + if (fromTaddr) { + txsize += CTXIN_SPEND_DUST_SIZE; + txsize += CTXOUT_REGULAR_SIZE; // There will probably be taddr change + } + txsize += CTXOUT_REGULAR_SIZE * taddrRecipients.size(); + if (txsize > MAX_TX_SIZE) { + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Too many outputs, size of raw transaction would be larger than limit of %d bytes", MAX_TX_SIZE )); + } + // Minimum confirmations int nMinDepth = 1; if (params.size() > 2) { From 996fccf267eedbd512619acc45e6d3c1aeabf3ab Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 7 Nov 2016 19:03:20 -0700 Subject: [PATCH 035/281] 1.0.2 release. --- README.md | 2 +- configure.ac | 2 +- contrib/DEBIAN/changelog | 6 ++++++ contrib/DEBIAN/control | 2 +- contrib/DEBIAN/manpages/zcash-cli.1 | 4 ++-- contrib/DEBIAN/manpages/zcashd.1 | 4 ++-- contrib/gitian-descriptors/gitian-linux.yml | 2 +- doc/release-notes/release-notes-1.0.2.md | 16 ++++++++++++++++ src/clientversion.h | 2 +- 9 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 doc/release-notes/release-notes-1.0.2.md diff --git a/README.md b/README.md index 5155dbd1e..87f0be58a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Zcash 1.0.1 +Zcash 1.0.2 =========== What is Zcash? diff --git a/configure.ac b/configure.ac index b1636292d..5eecca536 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 2) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) diff --git a/contrib/DEBIAN/changelog b/contrib/DEBIAN/changelog index 1d0a2c553..42a8d6e32 100644 --- a/contrib/DEBIAN/changelog +++ b/contrib/DEBIAN/changelog @@ -1,3 +1,9 @@ +zcash (1.0.2) jessie; urgency=medium + + * 1.0.2 release. + + -- Zcash Company Mon, 07 Nov 2016 19:01:35 -0600 + zcash (1.0.1) jessie; urgency=medium * 1.0.1 release. diff --git a/contrib/DEBIAN/control b/contrib/DEBIAN/control index e7128fcae..18d2944eb 100644 --- a/contrib/DEBIAN/control +++ b/contrib/DEBIAN/control @@ -10,7 +10,7 @@ Build-Depends: autoconf, automake, bsdmainutils, build-essential Vcs-Git: https://github.com/zcash/zcash.git Vcs-Browser: https://github.com/zcash/zcash Package: zcash -Version: 1.0.1 +Version: 1.0.2 Architecture: amd64 Depends: libgomp1 Description: An implementation of the "Zerocash" protocol. diff --git a/contrib/DEBIAN/manpages/zcash-cli.1 b/contrib/DEBIAN/manpages/zcash-cli.1 index 561c4ac44..a277d96ff 100644 --- a/contrib/DEBIAN/manpages/zcash-cli.1 +++ b/contrib/DEBIAN/manpages/zcash-cli.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASH-CLI "1" "November 2016" "Zcash RPC client version v1.0.1" "User Commands" +.TH ZCASH-CLI "1" "November 2016" "Zcash RPC client version v1.0.2" "User Commands" .SH NAME zcash-cli \- RPC client for the Zcash daemon .SH DESCRIPTION -Zcash RPC client version v1.0.1 +Zcash RPC client version v1.0.2 .SS "Usage:" .TP zcash\-cli [options] [params] diff --git a/contrib/DEBIAN/manpages/zcashd.1 b/contrib/DEBIAN/manpages/zcashd.1 index 85ded2c80..0578fb83e 100644 --- a/contrib/DEBIAN/manpages/zcashd.1 +++ b/contrib/DEBIAN/manpages/zcashd.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASHD "1" "November 2016" "Zcash Daemon version v1.0.1" "User Commands" +.TH ZCASHD "1" "November 2016" "Zcash Daemon version v1.0.2" "User Commands" .SH NAME zcashd \- Network daemon for interacting with the Zcash blockchain .SH DESCRIPTION -Zcash Daemon version v1.0.1 +Zcash Daemon version v1.0.2 .SS "Usage:" .TP zcashd [options] diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 1d6e24e4e..c1ad20f89 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "zcash-1.0.1" +name: "zcash-1.0.2" enable_cache: true distro: "debian" suites: diff --git a/doc/release-notes/release-notes-1.0.2.md b/doc/release-notes/release-notes-1.0.2.md new file mode 100644 index 000000000..2625cb909 --- /dev/null +++ b/doc/release-notes/release-notes-1.0.2.md @@ -0,0 +1,16 @@ +ITH4Coinomia (2): + Update security-warnings.md + Update init.cpp + +S. Matthew English (1): + enforcing consistency 'tor' to 'Tor' + +Sean Bowe (1): + Write R1CS output to file in GenerateParams. + +Simon (4): + Fixes #1762 segfault when miner is interrupted. + Fixes #1779 so that sending to multiple zaddrs no longer fails. + Add GenIdentity, an identity function for MappedShuffle. + Add transaction size and zaddr output limit checks to z_sendmany. + diff --git a/src/clientversion.h b/src/clientversion.h index 34b72e3e0..8b37e94d8 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -16,7 +16,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build From 48f9c65b55142b241f02ced41ff1c023312bd9e2 Mon Sep 17 00:00:00 2001 From: ayleph Date: Tue, 8 Nov 2016 13:13:48 -0800 Subject: [PATCH 036/281] Correct spelling error in z_sendmany error output Change "alllowed" -> "allowed." --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 7356a0c70..b10a08efe 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3187,7 +3187,7 @@ Value z_sendmany(const Array& params, bool fHelp) "z_sendmany \"fromaddress\" [{\"address\":... ,\"amount\":...},...] ( minconf )\n" "\nSend multiple times. Amounts are double-precision floating point numbers." "\nChange from a taddr flows to a new taddr address, while change from zaddr returns to itself." - "\nWhen sending coinbase UTXOs to a zaddr, change is not alllowed. The entire value of the UTXO(s) must be consumed." + "\nWhen sending coinbase UTXOs to a zaddr, change is not allowed. The entire value of the UTXO(s) must be consumed." + strprintf("\nCurrently, the maximum number of zaddr outputs is %d due to transaction size limits.\n", Z_SENDMANY_MAX_ZADDR_OUTPUTS) + HelpRequiringPassphrase() + "\n" "\nArguments:\n" From 9384e74c50f8b1b49e283b84ab8132d1251d3dc1 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 10 Nov 2016 16:57:36 -0800 Subject: [PATCH 037/281] Closes #1833. Format currency amounts in z_sendmany error message. Improve coverage of possible error states from z_sendmany. Refactor qa test for z_sendmany operations. --- qa/rpc-tests/wallet_protectcoinbase.py | 29 +++++++++++++++++------ src/wallet/asyncrpcoperation_sendmany.cpp | 12 +++++++--- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index eabe26bf4..e05ccb529 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -8,7 +8,7 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from time import * -class Wallet2Test (BitcoinTestFramework): +class WalletProtectCoinbaseTest (BitcoinTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) @@ -23,21 +23,28 @@ class Wallet2Test (BitcoinTestFramework): self.is_network_split=False self.sync_all() - def wait_for_operationd_success(self, myopid): + def wait_and_assert_operationid_status(self, myopid, in_status='success', in_errormsg=None): print('waiting for async operation {}'.format(myopid)) opids = [] opids.append(myopid) timeout = 120 status = None + errormsg = None for x in xrange(1, timeout): results = self.nodes[0].z_getoperationresult(opids) if len(results)==0: sleep(1) else: status = results[0]["status"] + if status == "failed": + errormsg = results[0]['error']['message'] break print('...returned status: {}'.format(status)) - assert_equal("success", status) + assert_equal(in_status, status) + if errormsg is not None: + assert(in_errormsg is not None) + assert_equal(in_errormsg in errormsg, True) + print('...returned error: {}'.format(errormsg)) def run_test (self): print "Mining blocks..." @@ -94,7 +101,7 @@ class Wallet2Test (BitcoinTestFramework): recipients = [] recipients.append({"address":myzaddr, "amount": Decimal('20.0') - Decimal('0.0001')}) myopid = self.nodes[0].z_sendmany(mytaddr, recipients) - self.wait_for_operationd_success(myopid) + self.wait_and_assert_operationid_status(myopid) self.sync_all() self.nodes[1].generate(1) self.sync_all() @@ -109,7 +116,7 @@ class Wallet2Test (BitcoinTestFramework): recipients = [] recipients.append({"address":mytaddr, "amount":Decimal('10.0')}) myopid = self.nodes[0].z_sendmany(myzaddr, recipients) - self.wait_for_operationd_success(myopid) + self.wait_and_assert_operationid_status(myopid) self.sync_all() self.nodes[1].generate(1) self.sync_all() @@ -128,6 +135,14 @@ class Wallet2Test (BitcoinTestFramework): errorString = e.error['message'] assert_equal("Insufficient funds" in errorString, True) + # z_sendmany will fail because of insufficient funds + recipients = [] + recipients.append({"address":self.nodes[1].getnewaddress(), "amount":Decimal('10000.0')}) + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid, "failed", "Insufficient transparent funds, have 10.00, need 10000.0001") + myopid = self.nodes[0].z_sendmany(myzaddr, recipients) + self.wait_and_assert_operationid_status(myopid, "failed", "Insufficient protected funds, have 9.9998, need 10000.0001") + # Send will fail because of insufficient funds unless sender uses coinbase utxos try: self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 21) @@ -156,7 +171,7 @@ class Wallet2Test (BitcoinTestFramework): newzaddr = self.nodes[2].z_getnewaddress() recipients.append({"address":newzaddr, "amount":amount_per_recipient}) myopid = self.nodes[0].z_sendmany(myzaddr, recipients) - self.wait_for_operationd_success(myopid) + self.wait_and_assert_operationid_status(myopid) self.sync_all() self.nodes[1].generate(1) self.sync_all() @@ -166,4 +181,4 @@ class Wallet2Test (BitcoinTestFramework): assert_equal(Decimal(resp["private"]), num_recipients * amount_per_recipient) if __name__ == '__main__': - Wallet2Test ().main () + WalletProtectCoinbaseTest().main() diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 7f9549b74..f0facdf6e 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -200,11 +200,15 @@ bool AsyncRPCOperation_sendmany::main_impl() { assert(!isfromzaddr_ || t_inputs_total == 0); if (isfromtaddr_ && (t_inputs_total < targetAmount)) { - throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strprintf("Insufficient transparent funds, have %ld, need %ld", t_inputs_total, targetAmount)); + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, + strprintf("Insufficient transparent funds, have %s, need %s", + FormatMoney(t_inputs_total), FormatMoney(targetAmount))); } if (isfromzaddr_ && (z_inputs_total < targetAmount)) { - throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strprintf("Insufficient protected funds, have %ld, need %ld", z_inputs_total, targetAmount)); + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, + strprintf("Insufficient protected funds, have %s, need %s", + FormatMoney(z_inputs_total), FormatMoney(targetAmount))); } // If from address is a taddr, select UTXOs to spend @@ -319,7 +323,9 @@ bool AsyncRPCOperation_sendmany::main_impl() { if (selectedUTXOCoinbase) { assert(isSingleZaddrOutput); throw JSONRPCError(RPC_WALLET_ERROR, strprintf( - "Change %ld not allowed. When protecting coinbase funds, the wallet does not allow any change as there is currently no way to specify a change address in z_sendmany.", change)); + "Change %s not allowed. When protecting coinbase funds, the wallet does not " + "allow any change as there is currently no way to specify a change address " + "in z_sendmany.", FormatMoney(change))); } else { add_taddr_change_output_to_tx(change); LogPrint("zrpc", "%s: transparent change in transaction output (amount=%s)\n", From d25e75c5127fed4f23ae828fe4d723648f5abcbc Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Thu, 10 Nov 2016 18:34:45 -0800 Subject: [PATCH 038/281] Document z_sendmany error code messages in payment-api.md --- doc/payment-api.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/payment-api.md b/doc/payment-api.md index 7ea8ae238..16939f993 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -98,3 +98,14 @@ Command | Parameters | Description z_getoperationresult
| [operationids] | Return OperationStatus JSON objects for all completed operations the node is currently aware of, and then remove the operation from memory.

Operationids is an optional array to filter which operations you want to receive status objects for.

Output is a list of operation status objects, where the status is either "failed", "cancelled" or "success".
[
{“operationid”: “opid-11ee…”,
“status”: “cancelled”},
{“operationid”: “opid-9876”, “status”: ”failed”},
{“operationid”: “opid-0e0e”,
“status”:”success”,
“execution_time”:”25”,
“result”: {“txid”:”af3887654…”,...}
},
] z_getoperationstatus
| [operationids] | Return OperationStatus JSON objects for all operations the node is currently aware of.

Operationids is an optional array to filter which operations you want to receive status objects for.

Output is a list of operation status objects.
[
{“operationid”: “opid-12ee…”,
“status”: “queued”},
{“operationid”: “opd-098a…”, “status”: ”executing”},
{“operationid”: “opid-9876”, “status”: ”failed”}
]

When the operation succeeds, the status object will also include the result.

{“operationid”: “opid-0e0e”,
“status”:”success”,
“execution_time”:”25”,
“result”: {“txid”:”af3887654…”,...}
} z_listoperationids
| [state] | Return a list of operationids for all operations which the node is currently aware of.

State is an optional string parameter to filter the operations you want listed by their state. Acceptable parameter values are ‘queued’, ‘executing’, ‘success’, ‘failed’, ‘cancelled’.

[“opid-0e0e…”, “opid-1af4…”, … ] + +### Asynchronous RPC call Error Codes + +Command | Code | Messages + --- | --- | --- +z_sendmany
| -8 | RPC_INVALID_PARAMETER, (Invalid, missing or duplicate parameter)

- "Minconf cannot be negative"
- "From address parameter missing"
- "No recipients"
- "Memo must be in hexadecimal format"
- "Memo size of __ is too big, maximum allowed is __ "
- "From address does not belong to this node, zaddr spending key not found."
- "Invalid parameter, expected object"
- "Invalid parameter, unknown key: __"
- "expected valid size"
- "expected object"
- "expected hex txid"
- "vout must be positive"
- "duplicated address"
- "amounts array is empty"
- "unknown key"
- "unknown address format"
- "size of memo"
- "amount must be positive"
- "too many zaddr outputs"
- "expected memo data in hexadecimal format"
- "size of memo is larger than maximum allowed __ "
- "Minimum number of confirmations cannot be less than 0" +z_sendmany
| -5 | RPC_INVALID_ADDRESS_OR_KEY, (Invalid address or key)

-"Invalid from address, no spending key found for zaddr"
- "Invalid output address, not a valid taddr."
- "Invalid from address, should be a taddr or zaddr."
- "From address does not belong to this node, zaddr spending key not found." +z_sendmany
| -6 | RPC_WALLET_INSUFFICIENT_FUNDS, (Not enough funds in wallet or account)

- "Insufficient funds, no UTXOs found for taddr from address."
- "Could not find any non-coinbase UTXOs to spend. Coinbase UTXOs can only be sent to a single zaddr recipient."
- "Could not find any non-coinbase UTXOs to spend."
- "Insufficient funds, no unspent notes found for zaddr from address."
- "Insufficient transparent funds, have __, need __ plus fee __"
- "Insufficient protected funds, have __, need __ plus fee __" +z_sendmany
| -4 | RPC_WALLET_ERROR, (unspecified problem with wallet)

- "Could not find previous JoinSplit anchor"
- "Error decrypting output note of previous JoinSplit: __"
- "Could not find witness for note commitment"
- "Witness for note commitment is null"
- "Witness for spendable note does not have same anchor as change input"
- "Not enough funds to pay miners fee"
- "Missing hex data for raw transaction"
- "Missing hex data for signed transaction"
- "Send raw transaction did not return an error or a txid." +z_sendmany
| -16 | RPC_WALLET_ENCRYPTION_FAILED, (Failed to encrypt the wallet)

- "Failed to sign transaction" +z_sendmany
| -12 | RPC_WALLET_KEYPOOL_RAN_OUT, (Keypool ran out, call keypoolrefill first)

- "Could not generate a taddr to use as a change address" From 59ac34e3442d5cc06d1941bf73a7dd3f4a8185c2 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Fri, 11 Nov 2016 11:14:18 -0800 Subject: [PATCH 039/281] s/Bitcoin/Zcash in JSONRPCError --- src/rpcmining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index af34c291c..d6bd4dd3e 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -478,10 +478,10 @@ Value getblocktemplate(const Array& params, bool fHelp) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); if (vNodes.empty()) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Zcash is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Bitcoin is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Zcash is downloading blocks..."); static unsigned int nTransactionsUpdatedLast; From c246c1ea3c6c5d9265d8ca39612e848154bf2c32 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Fri, 11 Nov 2016 15:24:36 -0800 Subject: [PATCH 040/281] Replace bitcoin with zcash in rpcprotocol.cpp --- src/rpcprotocol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp index 95d6b9e53..b60b3e4fd 100644 --- a/src/rpcprotocol.cpp +++ b/src/rpcprotocol.cpp @@ -33,7 +33,7 @@ const size_t POST_READ_SIZE = 256 * 1024; /** * HTTP protocol - * + * * This ain't Apache. We're just using HTTP header for the length field * and to be compatible with other JSON-RPC implementations. */ @@ -42,7 +42,7 @@ string HTTPPost(const string& strMsg, const map& mapRequestHeader { ostringstream s; s << "POST / HTTP/1.1\r\n" - << "User-Agent: bitcoin-json-rpc/" << FormatFullVersion() << "\r\n" + << "User-Agent: zcash-json-rpc/" << FormatFullVersion() << "\r\n" << "Host: 127.0.0.1\r\n" << "Content-Type: application/json\r\n" << "Content-Length: " << strMsg.size() << "\r\n" @@ -77,7 +77,7 @@ string HTTPError(int nStatus, bool keepalive, bool headersOnly) if (nStatus == HTTP_UNAUTHORIZED) return strprintf("HTTP/1.0 401 Authorization Required\r\n" "Date: %s\r\n" - "Server: bitcoin-json-rpc/%s\r\n" + "Server: zcash-json-rpc/%s\r\n" "WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n" "Content-Type: text/html\r\n" "Content-Length: 296\r\n" @@ -104,7 +104,7 @@ string HTTPReplyHeader(int nStatus, bool keepalive, size_t contentLength, const "Connection: %s\r\n" "Content-Length: %u\r\n" "Content-Type: %s\r\n" - "Server: bitcoin-json-rpc/%s\r\n" + "Server: zcash-json-rpc/%s\r\n" "\r\n", nStatus, httpStatusDescription(nStatus), @@ -248,7 +248,7 @@ int ReadHTTPMessage(std::basic_istream& stream, map Date: Mon, 14 Nov 2016 10:13:06 -0700 Subject: [PATCH 041/281] Add tests for witness `element` and tree `last` methods. Strengthen testing by inserting a different commitment into the tree at each step. --- src/Makefile.test.include | 1 + src/gtest/test_merkletree.cpp | 24 +- src/test/data/merkle_commitments.json | 18 ++ src/test/data/merkle_path.json | 241 ++++++++------- src/test/data/merkle_roots.json | 32 +- src/test/data/merkle_serialization.json | 34 +-- .../data/merkle_witness_serialization.json | 274 +++++++++--------- 7 files changed, 328 insertions(+), 296 deletions(-) create mode 100644 src/test/data/merkle_commitments.json diff --git a/src/Makefile.test.include b/src/Makefile.test.include index e29642805..191b2d8a7 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -31,6 +31,7 @@ JSON_TEST_FILES = \ test/data/merkle_serialization.json \ test/data/merkle_witness_serialization.json \ test/data/merkle_path.json \ + test/data/merkle_commitments.json \ test/data/g1_compressed.json \ test/data/g2_compressed.json diff --git a/src/gtest/test_merkletree.cpp b/src/gtest/test_merkletree.cpp index b0c009b2a..0ac417276 100644 --- a/src/gtest/test_merkletree.cpp +++ b/src/gtest/test_merkletree.cpp @@ -5,6 +5,7 @@ #include "test/data/merkle_serialization.json.h" #include "test/data/merkle_witness_serialization.json.h" #include "test/data/merkle_path.json.h" +#include "test/data/merkle_commitments.json.h" #include @@ -55,14 +56,20 @@ void expect_ser_test_vector(B& b, const C& c, const A& tree) { } template -void test_tree(Array root_tests, Array ser_tests, Array witness_ser_tests, Array path_tests) { +void test_tree( + Array commitment_tests, + Array root_tests, + Array ser_tests, + Array witness_ser_tests, + Array path_tests +) +{ + Array::iterator commitment_iterator = commitment_tests.begin(); Array::iterator root_iterator = root_tests.begin(); Array::iterator ser_iterator = ser_tests.begin(); Array::iterator witness_ser_iterator = witness_ser_tests.begin(); Array::iterator path_iterator = path_tests.begin(); - uint256 test_commitment = uint256S("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); - Tree tree; // The root of the tree at this point is expected to be the root of the @@ -75,12 +82,17 @@ void test_tree(Array root_tests, Array ser_tests, Array witness_ser_tests, Array vector witnesses; for (size_t i = 0; i < 16; i++) { + uint256 test_commitment = uint256S((commitment_iterator++)->get_str()); + // Witness here witnesses.push_back(tree.witness()); // Now append a commitment to the tree tree.append(test_commitment); + // Last element added to the tree was `test_commitment` + ASSERT_TRUE(tree.last() == test_commitment); + // Check tree root consistency expect_test_vector(root_iterator, tree.root()); @@ -119,7 +131,8 @@ void test_tree(Array root_tests, Array ser_tests, Array witness_ser_tests, Array std::vector commitment_bv; { - std::vector commitment_v(test_commitment.begin(), test_commitment.end()); + uint256 witnessed_commitment = wit.element(); + std::vector commitment_v(witnessed_commitment.begin(), witnessed_commitment.end()); commitment_bv = convertBytesVectorToVector(commitment_v); } @@ -174,8 +187,9 @@ TEST(merkletree, vectors) { Array ser_tests = read_json(std::string(json_tests::merkle_serialization, json_tests::merkle_serialization + sizeof(json_tests::merkle_serialization))); Array witness_ser_tests = read_json(std::string(json_tests::merkle_witness_serialization, json_tests::merkle_witness_serialization + sizeof(json_tests::merkle_witness_serialization))); Array path_tests = read_json(std::string(json_tests::merkle_path, json_tests::merkle_path + sizeof(json_tests::merkle_path))); + Array commitment_tests = read_json(std::string(json_tests::merkle_commitments, json_tests::merkle_commitments + sizeof(json_tests::merkle_commitments))); - test_tree(root_tests, ser_tests, witness_ser_tests, path_tests); + test_tree(commitment_tests, root_tests, ser_tests, witness_ser_tests, path_tests); } TEST(merkletree, emptyroots) { diff --git a/src/test/data/merkle_commitments.json b/src/test/data/merkle_commitments.json new file mode 100644 index 000000000..7c9ffea77 --- /dev/null +++ b/src/test/data/merkle_commitments.json @@ -0,0 +1,18 @@ +[ + "bab6e8992959caf0ca94847c36b4e648a7f88a9b9c6a62ea387cf1fb9badfd62", + "43c9a4b21555b832a79fc12ce27a97d4f4eca1638e7161a780db1d5ebc35eb68", + "fb92a6142315bb3396b693222bf2d0e260b448cda74e189063cf774048456083", + "e44a57cd544018937680d385817be3a3e35bb5b87ceeea93d536ea95828a4992", + "43f48bfb9ab6f12ef91ce83e8f9190ce5dff2721784c90e08a50a67403367cff", + "fce910561c3c7ebf14ed5d712e6838cdc6f1145c87eec256b7181f9df6d0c468", + "b1e7016392805b227b11e58ba629f9a6684a0b4c34306e85e47548c43ecd168b", + "2d9a49d9425449a449cc62d16febaf9c7f8b32349752ecc39191c36130b4c050", + "53969b31a862b893dde857b8b7d4f53ce0e2c21a0f70d48ba1aef3a05fddff70", + "17f8fabd440fdf9e2eafd75a3407e8bbde048d2d2232cd803d5763004af61ed8", + "9b7805cb5e8ef337c13c73cab58ee719bf33a4a80ecc161bfe714269eca4928b", + "a3ebada94d4329899ae136391604799d8cea39c0c331f9aaaa4a1e73ab63e904", + "12091a20c9ebe67c2793bb71a6fdddb0ffe3ca781fcf1e192428161f186c3fbe", + "e9c65749638df548b8909c0ea1d0f79079a6bb3235c649a8806322c87f968018", + "8e8fddf0438a4263bc926fcfa6733dc201633959f294103533a2cb9328bb65c4", + "206a202bd08dd31f77afc7114b17850192b83948cff5828df0d638cbe734c884" +] diff --git a/src/test/data/merkle_path.json b/src/test/data/merkle_path.json index f84a20b46..97e83a1ac 100644 --- a/src/test/data/merkle_path.json +++ b/src/test/data/merkle_path.json @@ -1,123 +1,122 @@ [ - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000101010001000100000000010100010000000100000000000100010000010001010000010001010101000000010001010000010101010100010100010101000100000100010101000101000101010100000000010101000101010000010001000000000101010000010001010000000000010001000100000001000100010101010100000001010101010101010100000001000000000000000001000000000000000001000101000001000001010000010000000101000101000000010100000100000001010101000001010101000001000000010101000001000100000100010100010101000000010001000000000100000100000000010100000100000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000101000101010001010100010100010001010101010100000101010000010101000001010001000100000000010101000101000101010001010001000101010001010001010000000100000101010000000000000101000001010001010101000001010000000000000101010101010001010101010000000000010000010000000000000001000101000001010100010100000001010001000000010000000000010101000101010000000001000000000100000000010101000101000001000000000100000000010100000001010101000100010101000001010001010101010001000000000000010001000000010101000100010000010000000001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000100010100000101010000000000010101000000010001010100000001000100010000010101000101010000000101010001010101000000010000010000000100000101010101000100010001010001010001010101010001000000000001010000010000000001010000000000010001010001010000000100010101000101000001010001010101010100010100000101010000010101010000000000010001000000010100000101010101000100010100000001000101000001000101000101010000000100010100000100000101010000000100010000000100010001000101010001000000000001010001010100000000000100010100000000000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000101010100010100000001010000010101010101000100010101010100010101010101000001010001000101010001010000000100000101000101000101000100010001000100000001010100000101010001000000000000010000010101000000010000000001010001000000010100010000000000010100000000000000010000000000000001010100010100010100010101010100010001010000000001000101010000000001010001000000010000000001010000010101010001000100010001010101000000010100000101010100010000000001000101010001010001000000010000010101000000000000000101010000010101010100000001fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000100", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000100010000010100000001010100010101010000010000010001010100000000010100010001000100010001010001000000000000010000000001000000000100000101000000000001010101000100000000010101000101000001000001000000010101010100000100010000010101010101010001000100000101010001010001000000010001000000010000010000010100010001010001000101010101010000000100010100000100000101010000010001010100000100000100000101000001000101010100000000000000000000010000000101010000010001010000000101000001010001010001010000010000010101000101000000000100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100000001000101000101010100000000000001000000000001000100000000010000010001000100010000000100010101010000000000010001010001000001010001010100000001000001010101010100000001010000000000000000000101000000010100000000000001010100010001010100010101000000010000010001010000000001000100000101000100010100000001000001000001000100010000000001000001010000010101000100010000000001010100010101010000010001000000010000000100010100010100010100010100000101010001010101010000010000000100000001000101010000010001000001010000000001fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000101", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000100010000000001010001010001000000000100000001010100010001000000010101010000010000000000010101010000010101000101010101000101010001000100000001000000000001010101000100000100000101000000010101000100010000000101010101000000000100000000010000000101010000010100000001000000010001000000000000010000010100010101010101000001000100000000010100000101010100010000000000010101010100000001000001000100010001000000010001000000010001010100000101010101010000000001000100000001000100000000000000010100010001000101000001000001010100fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010000010000010100010101000100010000000001010100000001000100010000010100000000010100000000010000010100000001000100010000000000010001000100000101000101000101010101000001000100000101000000000101000101000101000101000001010101010001010000000101000001000101010000010001010001000000000001000001000100000000010001010100000101000000010001010000000100010000000001000001010001000001000100010001010000010101010001010101010000000100010100010001000000000001000000010101000001010001000001000001010100000101010000010101fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010000", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000101000000000101000100000101010000010000000101010000010100010101010000000101010001010101000101000100000001010000000001010000010001010001000100010000010001000001010000010000010100010101000101010001010101000000010100010000000100000001000000010101000101010101000101000000000001000000000001010100010000010100000101010101000101000100010001000000000000000001000001010101010100000001000100000101000001010101010001010100000001000000010100000101000101010101000001000001000101010100010001010100010000010100010001010001000000fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000100010101010001010000010001000000010100000001010100000000010001000000000101010101000001000100010100010000010001010001010101010000010101000101010100010001000000010100000001010100010001000000000100000101010001000000000100010100000001010000010001000000000000010101000000010101010001000101010101010100010100000000010100010101000101000100010101000000010101000000010101000001000001000101010000000101010000000000000001010101010001010001010100010000000001010100000101000000000101010001010100000101000101010000010000000100fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000100000000000100010001000001010101000000000000000101010001010000000001000000010101010001010001010101010001010001000001000000010000010001000000010101000001000100010100010101010100000001000100000001010001010001000000000100010101000000000100000100010001010101010001000100000001010001010001000100010101010100010000010101010000010001010100000101010100010100000001010101010101000101000001010001000000000100000001010001010101000101000100000001010100010100010101000100010001010001010101010000000001000001000000010000000001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400000101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010400010101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000100", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401000101", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010000", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010001", - "04fd000100010001000100010001010000010000010100010100000100010101000101010000010000000001000100000001000101010001000001000101010000010001000001010100010100000000000001000101000101010100000001000101000101000000010101000000010000000100010001010000000100000000010001000100000000000100000000000001010000000001000100000101010000000000010100010100000001000000010101000100010101010001010100010001000001000000010100010101000101010000000101010000000101010101000000000100010101000001010001010100010001000001000100000001000000000101fd000101010001010100000000010100000101010100000100010001000001000000000101010001000000000101000000000001000100010001010001010000010101000101010000000001010001010000000000010001000101010001000100000101000000010101010000010000000000010101000100010001010100000101000101000100010001010101000000010001010000010001000100000101000100000101000000010101010101000101000000010101010101000101000100000101000101000100000000000001010100000001010101000001010101000101010000010001010100000000010000010000000001010100010001010001010000fd000101000000000101000100000100010001010000000001010100000101010100010001010000000101010101000101000000000000010001010101000001010100010101000100010001010001010001010001000101000101010101010001000001010000010100000101000000010100000101010000010000000101010001000101000001000000000000000000010101010000000000010100000000000100000101000101010101010000000101010101000001010101010001010000010100010000010101010101000000010101000101000000000101000000000000000000010100000000000100010100010001010100000001000001010101010001fd0001000100010001000101000101010000000001000100000100000101010100000000000001010001010100000101000001010000010001000101000100000100000001000001010000010000010000010101000001010001010001010000010000010101000001000000010000000000010100010001010100000001000001010100000100000100000100010101000001000101000101010101000001010000010101000001000000010101010001000001010101010001010100000101000100000000010001000000000001010100000101010101010000010000010100000000010000000001000101000000010000010001010000000001010100000001010401010100" - + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000100010000010101010000010001000001000001000100000001010101010001000001000100000001000001000100010100010101000100000001000000010001000100000001000001010000010001000001010101010101010100000100000101010000000101000100010100000100000101010001000100010101000000010001000001010000010001000101010101000001010101000001010101000001000100000101000101010000000000010001010000010101010000010000000100010000010101000000000001000001000001010001010101010001010001000101010001000000000101000000000100010100000000010000000000fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100000100010000010101010000010001000001000001000100000001010101010001000001000100000001000001000100010100010101000100000001000000010001000100000001000001010000010001000001010101010101010100000100000101010000000101000100010100000100000101010001000100010101000000010001000001010000010001000101010101000001010101000001010101000001000100000101000101010000000000010001010000010101010000010000000100010000010101000000000001000001000001010001010101010001010001000101010001000000000101000000000100010100000000010000000000fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010000000000010100000001000100000100010100010000010001010000000101010101010101010100000000000000010101010100010001000101000001000001010001000101010100000000010000010001010001010101010100010001000100010001010001000100010101000000000000010001000100000100000000000001000100000101000100000101010101010000010100000001010100000001000000010100010100010000010100010100000001010001000100010000000101010000010101010000010101000100010000010001010101000001010101000100000001010000010101000001010101000100000001000100010000fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010000000000010100000001000100000100010100010000010001010000000101010101010101010100000000000000010101010100010001000101000001000001010001000101010100000000010000010001010001010101010100010001000100010001010001000100010101000000000000010001000100000100000000000001000100000101000100000101010101010000010100000001010100000001000000010100010100010000010100010100000001010001000100010000000101010000010101010000010101000100010000010001010101000001010101000100000001010000010101000001010101000100000001000100010000fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010000000000010100000001000100000100010100010000010001010000000101010101010101010100000000000000010101010100010001000101000001000001010001000101010100000000010000010001010001010101010100010001000100010001010001000100010101000000000000010001000100000100000000000001000100000101000100000101010101010000010100000001010100000001000000010100010100010000010100010100000001010001000100010000000101010000010101010000010101000100010000010001010101000001010101000100000001010000010101000001010101000100000001000100010000fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101010000000000010100000001000100000100010100010000010001010000000101010101010101010100000000000000010101010100010001000101000001000001010001000101010100000000010000010001010001010101010100010001000100010001010001000100010101000000000000010001000100000100000000000001000100000101000100000101010101010000010100000001010100000001000000010100010100010000010100010100000001010001000100010000000101010000010101010000010101000100010000010001010101000001010101000100000001010000010101000001010101000100000001000100010000fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101000001000100010101010100000001000101000001000001010100000001010100010001000001000101000001010100010001010000010000010100010101010001000000000001010101000101010001010000010001010101010101000001000001010101000101010100010001000000010001010100010000010001010101010001000000000000000101000101000101000101010001010000010101000101010100010100000001010001000000000101010000010000010101000000010100010101000101000001000001000001000000000100000000000001000001000100000100000000010100000100010000010101010000010001010101fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101000001000100010101010100000001000101000001000001010100000001010100010001000001000101000001010100010001010000010000010100010101010001000000000001010101000101010001010000010001010101010101000001000001010101000101010100010001000000010001010100010000010001010101010001000000000000000101000101000101000101010001010000010101000101010100010100000001010001000000000101010000010000010101000000010100010101000101000001000001000001000000000100000000000001000001000100000100000000010100000100010000010101010000010001010101fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101000001000100010101010100000001000101000001000001010100000001010100010001000001000101000001010100010001010000010000010100010101010001000000000001010101000101010001010000010001010101010101000001000001010101000101010100010001000000010001010100010000010001010101010001000000000000000101000101000101000101010001010000010101000101010100010100000001010001000000000101010000010000010101000000010100010101000101000001000001000001000000000100000000000001000001000100000100000000010100000100010000010101010000010001010101fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000101000001000100010101010100000001000101000001000001010100000001010100010001000001000101000001010100010001010000010000010100010101010001000000000001010101000101010001010000010001010101010101000001000001010101000101010100010001000000010001010100010000010001010101010001000000000000000101000101000101000101010001010000010101000101010100010100000001010001000000000101010000010000010101000000010100010101000101000001000001000001000000000100000000000001000001000100000100000000010100000100010000010101010000010001010101fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000100010100010000010001000001010100000000010100010000000001000000010100010101010101000000010001010000000100000001000001010101000101000101000001010000010101000000010001000100000101000100000100010100010101010101010001010000010001010100010100000101000001010001000101000000000100010000000000000000000001010000000000010000000001010000000000010000000001010101010100010101010001000101010000010000000000010000010100000100010100010001010100000101000001000001000101000101010001000000000100010000000100000000010001010100fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000100010100010000010001000001010100000000010100010000000001000000010100010101010101000000010001010000000100000001000001010101000101000101000001010000010101000000010001000100000101000100000100010100010101010101010001010000010001010100010100000101000001010001000101000000000100010000000000000000000001010000000000010000000001010000000000010000000001010101010100010101010001000101010000010000000000010000010100000100010100010001010100000101000001000001000101000101010001000000000100010000000100000000010001010100fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000100010100010000010001000001010100000000010100010000000001000000010100010101010101000000010001010000000100000001000001010101000101000101000001010000010101000000010001000100000101000100000100010100010101010101010001010000010001010100010100000101000001010001000101000000000100010000000000000000000001010000000000010000000001010000000000010000000001010101010100010101010001000101010000010000000000010000010100000100010100010001010100000101000001000001000101000101010001000000000100010000000100000000010001010100fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000100010100010000010001000001010100000000010100010000000001000000010100010101010101000000010001010000000100000001000001010101000101000101000001010000010101000000010001000100000101000100000100010100010101010101010001010000010001010100010100000101000001010001000101000000000100010000000000000000000001010000000000010000000001010000000000010000000001010101010100010101010001000101010000010000000000010000010100000100010100010001010100000101000001000001000101000101010001000000000100010000000100000000010001010100fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101010001010001000101000100000101000000010101000100010101010001000101000000000000010100000000010001010100000000010001010101010100010101010101010101010001000001000000010100000101010100010001010000010000010001010001010101000101000101010000010000010100000100000001010101000100010000000101010000000100000000000000000101010101010100000100010100000101000001000101000101000101010000010100010101010000010101010101010000010100000101000001010001000101010101000101010001010101000101010001000000010100000100010001010000010001fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101010001010001000101000100000101000000010101000100010101010001000101000000000000010100000000010001010100000000010001010101010100010101010101010101010001000001000000010100000101010100010001010000010000010001010001010101000101000101010000010000010100000100000001010101000100010000000101010000000100000000000000000101010101010100000100010100000101000001000101000101000101010000010100010101010000010101010101010000010100000101000001010001000101010101000101010001010101000101010001000000010100000100010001010000010001fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100000101010101010000000001000100000100000000000000010100000000010100000000000001000000010000000000010001010000010001010001000000010101010101000101000100010101000101010000000101000000000001010000010101010000010101010000000101000001000001010100000101010100000001010000010100010001010001010100000100010001010101010101000001010001000001010101010101000100010101000101010100010001010100010101010101000001010100010100010001010001000000000001000100000001000001010001010100000001010001000101000001010101010100000100000100fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000101000001000101000001000001010101010100010101000001000000010000010101010001000000010000000001010101000001010101010000000100000001010101000100010000000000010000000001010101000000010101010000000101000001010001000001000000010001010000010101010101010000000100010000010101000000010101000000010001010001010101010101000000000101010100000000010100000000000000010000000101010100010000010001000101010101000000010000010001010100000001010101010001000100010000010100010100010100000001000101000001010100000101010101000000010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000100010001000100000101010000010101010001000001000101010001010101000000000000010100010101000001010001010000000001000001010000000101000001000101000100000000000001010001010001000100000001010101000100010101000000000100000101000001010100000101010101010101010101000101010101010000010001010000010001010100000001000101010001010001000001010001010001000101010100010100010100000001010000000000010100010101010000000100010101010100000001000001000101010001000101010000000000010001010000000101000100000100010100000100000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000101000100010100010000010001010100010101010000000001010000000100000001010001010000000000000101000101000000000000000101010001000101010101000100010000010101000100010001010101000000000000000101000100010001010001000101010100000000000101010001010100000101010100010100010101000000000001010000010100000000010001010101000001010000000100000101010101000101010000000100000100000101010100010000010000010101010001000001010000010100010001000101010001000000010000000000000000010101010101010100010100000101010000000000000001010000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100010101000100000100000000010100010100010000010001010101010100010100010100000000010100000001010101010101000001000001010001010101010000010000000001010101010001000101000000000001010000000001010000010001000100010101000101000100000100010101010000000100000100000100010100000100000001000001000001000101000100000101000101000101000101010000000000000100000100000100000101010000010000000001000001000001000001010101000000010100000101000101010001000101010100000100000001000100010100000101000001010000000100000101010000000001fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000100010101000100000100000000010100010100010000010001010101010100010100010100000000010100000001010101010101000001000001010001010101010000010000000001010101010001000101000000000001010000000001010000010001000100010101000101000100000100010101010000000100000100000100010100000100000001000001000001000101000100000101000101000101000101010000000000000100000100000100000101010000010000000001000001000001000001010101000000010100000101000101010001000101010100000100000001000100010100000101000001010000000100000101010000000001fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000100010000010101000101000001000001000000000101010101000100000001000001000100010000000100010100000100000100000000010101000000010100010000010101000100000001000100010100000101000100010101010101000001010001000100010100010000000101000101000100000101010001010101010101010000010100010000000000010100010101000000000001000100000000000001010000000000010000000101010001000100000101010100010001000100010100000100000101000101010000000101010000000100010001000101000101010100010000000001010100010000000101000101010101010100000101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010001010100000001010100010100000101000101010101000100010001010001000001000001000001000101000001010000010101010000010101010001000000010101010000010000010000010101000100010000010101010000010100010101000100000100010100010001000001000000010100010001010101010100010000010001000101000001000100000000000101000100010001000100010100000000010000000100000001000001000001010001000001010100000101010101010000010001000000000101010101010101000001010001000100000100000100000100000000000000010001000001000101010001000001010000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001000000000001000001010100010000010001010000000101010001000100010100010101000001010000000101010100000100000100010001000100010001000100010001000100010101010100000100000101000000010101000000000101010100000000000000000101010000010101010001000100010000000101000001000001010100010001010101000001000000000001000000000001000101000000010101000001000001010001010001010100000000010100000101000100010000000100000100000100010000010001000000000101000100000101000101000100010000010100010001010001010101000100010101000100000001010401000100", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000101000100010101010000010001010100000001010000010101000101000001000100000001010100010000000101010101000001010101010101010101000101010100010000000000000001000001000101010000000100010001010100000100010101000000000001010001010101000100010100000001010000000100010001000101010100010000000001010000010100010000010000000100010001000001010100010101000000000100000101000001000101000101000101000100010000000101010000000001000101010000010101010001000101010000010100010001010101000001000100000100010001000101010101000100010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000100010000000001000101000100010001010100010001000101010000010100010101010101010001000101010100000100000000010101010000010101010100010000000000010100000100010101010000010100010100000101010001000000000001010000010000000001010100000000000000010100000000010100000100000000010001010000010101010101010001000100010001010100000101010000000101000101010100000101010100010101000100000001000000010100000101000001000100010000000001010101000001010100010001000000010100000001000001010001000100010000010101010101000101000000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000100010000000001000101000100010001010100010001000101010000010100010101010101010001000101010100000100000000010101010000010101010100010000000000010100000100010101010000010100010100000101010001000000000001010000010000000001010100000000000000010100000000010100000100000000010001010000010101010101010001000100010001010100000101010000000101000101010100000101010100010101000100000001000000010100000101000001000100010000000001010101000001010100010001000000010100000001000001010001000100010000010101010101000101000000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000100010000000001000101000100010001010100010001000101010000010100010101010101010001000101010100000100000000010101010000010101010100010000000000010100000100010101010000010100010100000101010001000000000001010000010000000001010100000000000000010100000000010100000100000000010001010000010101010101010001000100010001010100000101010000000101000101010100000101010100010101000100000001000000010100000101000001000100010000000001010101000001010100010001000000010100000001000001010001000100010000010101010101000101000000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001000000000001000001010100010000010001010000000101010001000100010100010101000001010000000101010100000100000100010001000100010001000100010001000100010101010100000100000101000000010101000000000101010100000000000000000101010000010101010001000100010000000101000001000001010100010001010101000001000000000001000000000001000101000000010101000001000001010001010001010100000000010100000101000100010000000100000100000100010000010001000000000101000100000101000101000100010000010100010001010001010101000100010101000100000001010401000100", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000100010000000001000101000100010001010100010001000101010000010100010101010101010001000101010100000100000000010101010000010101010100010000000000010100000100010101010000010100010100000101010001000000000001010000010000000001010100000000000000010100000000010100000100000000010001010000010101010101010001000100010001010100000101010000000101000101010100000101010100010101000100000001000000010100000101000001000100010000000001010101000001010100010001000000010100000001000001010001000100010000010101010101000101000000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001010000000100010101000001000001000100010000010000010101000101000000010100010000010001000000000100000101010000000101010101010101000000000101000101000000010001010001010000010100000000000001010100010001000100000001000100000100000000010100000101010001010101010100000001010000010101010000010101010000000101010001000101000100010101000001000100000101010000010100000101010100000101000000000001000001010001010101010101000001010100000001010100000100010101010001010000010001010000000000010001000101010100000001000001010001010401000101", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000100000101010001000000010100000101010000000101000101000000010001010000000000010000000001010101000001010000010101000000000000000001010001000101010101010000000001000100000001010001000000010001000001000101000000000101000101000101000101010000000100000000010100010000000101010000010001010001010000010001010101010100000000010001010000010100000100010001010100010001000000000101010101000001000101010000010101000101000101000101000001000101000001010000010101000100000000000100000001010101010100010001000100000000000001010001fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101000100000101010000000101000101000101010001010000000001010101010001010101000001010000000101010000000000000001010100000001010101000000010101010101010001010000000001010100010000010101010001000000010100010000010000000101000101010000000101000100000000000000010000010100010000010101010001000101010100010101010100000101000000000000010001010001010100010101010101010000010101010001010101010000000000010001010100000100010101000101010100010001000000010001000001010000010001010001000000000101000100010100010100010100010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101000100000101010000000101000101000101010001010000000001010101010001010101000001010000000101010000000000000001010100000001010101000000010101010101010001010000000001010100010000010101010001000000010100010000010000000101000101010000000101000100000000000000010000010100010000010101010001000101010100010101010100000101000000000000010001010001010100010101010101010000010101010001010101010000000000010001010100000100010101000101010100010001000000010001000001010000010001010001000000000101000100010100010100010100010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101000100000101010000000101000101000101010001010000000001010101010001010101000001010000000101010000000000000001010100000001010101000000010101010101010001010000000001010100010000010101010001000000010100010000010000000101000101010000000101000100000000000000010000010100010000010101010001000101010100010101010100000101000000000000010001010001010100010101010101010000010101010001010101010000000000010001010100000100010101000101010100010001000000010001000001010000010001010001000000000101000100010100010100010100010000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001000000000001000001010100010000010001010000000101010001000100010100010101000001010000000101010100000100000100010001000100010001000100010001000100010101010100000100000101000000010101000000000101010100000000000000000101010000010101010001000100010000000101000001000001010100010001010101000001000000000001000000000001000101000000010101000001000001010001010001010100000000010100000101000100010000000100000100000100010000010001000000000101000100000101000101000100010000010100010001010001010101000100010101000100000001010401000100", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101000100000101010000000101000101000101010001010000000001010101010001010101000001010000000101010000000000000001010100000001010101000000010101010101010001010000000001010100010000010101010001000000010100010000010000000101000101010000000101000100000000000000010000010100010000010101010001000101010100010101010100000101000000000000010001010001010100010101010101010000010101010001010101010000000000010001010100000100010101000101010100010001000000010001000001010000010001010001000000000101000100010100010100010100010000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001010000000100010101000001000001000100010000010000010101000101000000010100010000010001000000000100000101010000000101010101010101000000000101000101000000010001010001010000010100000000000001010100010001000100000001000100000100000000010100000101010001010101010100000001010000010101010000010101010000000101010001000101000100010101000001000100000101010000010100000101010100000101000000000001000001010001010101010101000001010100000001010100000100010101010001010000010001010000000000010001000101010100000001000001010001010401000101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000101010001010001000001000100010100010000010100000001000101010101000000000100010101010001010100000101000101000100000001010001000001000101000000010000000101000001010001000100010101010000010100000100010101000101010100000101010101010001010101010001010000010001000100000001010000010101000001000101010001000100000100000100000001010100000000000001010001000001000001010000000100000100000000010101000101010001000101010101010100010101010100000101010100010001000000000101000000000001010001010101000100010000010101000101000000fd0001000000010100000001000000000000000100000100010100000101010101010101010000010000000000010000000100000101000000010101000000000000000100010001000000000100000100000101010000000101000000010100010001000001010000010001000101010001010100010000010100000101010100000101000001000000000101010100010101010100010000000001000100000000010000000001010100010000010101000001000001000000000100010101000000000100000100000001010101000100010100000001010001000101000000010100010000010000010001000100010101010100000001010001010100010000010401010000", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000100000101010000010001000101000101000101010100010101010000010000000001000100000100000101010101010100000000000100010101000001010100000101000000000101000000000100010101010000000100010001000001000001010100010100010101000001000001010001010001010000000001010101010001010100000100010101010100010001000000000101000001000000000001000001000101010001010001010100010101010001000101010100010001000000000000000001010001010101000001000100000001010001000101000100000101010100010001000100010101000000010001000101000000000101000000fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100010101000101000100000001000100000100010100000100010000000001000100010000000000010100000101000100010001000101010100010101000000010000000001010100010001010000010001000101000001010101010001000000000000000000000000000100000101010100000100000101000000000001000001010100000001000001000000000101010100010100010000010100010001010100000000000000010101000101000001000101000001000101000000000001000100010101000001010101010100000101010000010101010000010000000101010001010100010101000001010001010001000100000001000100010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100010101000101000100000001000100000100010100000100010000000001000100010000000000010100000101000100010001000101010100010101000000010000000001010100010001010000010001000101000001010101010001000000000000000000000000000100000101010100000100000101000000000001000001010100000001000001000000000101010100010100010000010100010001010100000000000000010101000101000001000101000001000101000000000001000100010101000001010101010100000101010000010101010000010000000101010001010100010101000001010001010001000100000001000100010000fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100010101000101000100000001000100000100010100000100010000000001000100010000000000010100000101000100010001000101010100010101000000010000000001010100010001010000010001000101000001010101010001000000000000000000000000000100000101010100000100000101000000000001000001010100000001000001000000000101010100010100010000010100010001010100000000000000010101000101000001000101000001000101000000000001000100010101000001010101010100000101010000010101010000010000000101010001010100010101000001010001010001000100000001000100010000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001000000000001000001010100010000010001010000000101010001000100010100010101000001010000000101010100000100000100010001000100010001000100010001000100010101010100000100000101000000010101000000000101010100000000000000000101010000010101010001000100010000000101000001000001010100010001010101000001000000000001000000000001000101000000010101000001000001010001010001010100000000010100000101000100010000000100000100000100010000010001000000000101000100000101000101000100010000010100010001010001010101000100010101000100000001010401000100", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100010101000101000100000001000100000100010100000100010000000001000100010000000000010100000101000100010001000101010100010101000000010000000001010100010001010000010001000101000001010101010001000000000000000000000000000100000101010100000100000101000000000001000001010100000001000001000000000101010100010100010000010100010001010100000000000000010101000101000001000101000001000101000000000001000100010101000001010101010100000101010000010101010000010000000101010001010100010101000001010001010001000100000001000100010000fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001010000000100010101000001000001000100010000010000010101000101000000010100010000010001000000000100000101010000000101010101010101000000000101000101000000010001010001010000010100000000000001010100010001000100000001000100000100000000010100000101010001010101010100000001010000010101010000010101010000000101010001000101000100010101000001000100000101010000010100000101010100000101000000000001000001010001010101010101000001010100000001010100000100010101010001010000010001010000000000010001000101010100000001000001010001010401000101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000100000001010000000000000001010000000001010101000100000001010100000100010000000000000001010100010100010001000100010000000101000001010001000001010000010001000100010000000101010100010101000101000001000000010001010101010100000001000101000000010100000100000000000000000000000100010101010001010100010000010000000000010100000000000001010000000100000101000001000101010100000101000000000000000000000101000101000100010001000000000100000001000000000000000001000100000001010001000100000101010100000101010101000100000100010100fd0001000000010100000001000000000000000100000100010100000101010101010101010000010000000000010000000100000101000000010101000000000000000100010001000000000100000100000101010000000101000000010100010001000001010000010001000101010001010100010000010100000101010100000101000001000000000101010100010101010100010000000001000100000000010000000001010100010000010101000001000001000000000100010101000000000100000100000001010101000100010100000001010001000101000000010100010000010000010001000100010101010100000001010001010100010000010401010000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000100000001010000000000000001010000000001010101000100000001010100000100010000000000000001010100010100010001000100010000000101000001010001000001010000010001000100010000000101010100010101000101000001000000010001010101010100000001000101000000010100000100000000000000000000000100010101010001010100010000010000000000010100000000000001010000000100000101000001000101010100000101000000000000000000000101000101000100010001000000000100000001000000000000000001000100000001010001000100000101010100000101010101000100000100010100fd0001010001010101010000000101010101010001010001010000000000010100000000000001010101010000000100010100000001000100000000000100000100000000000101000001000000010101010001010000010101010000000101010101000101010100000001010000010001000101010000000101010101010101010101000101000000000101000101010001010101010101000101000100000101000001010100000001010001010100010101000001000001010000010000010101000101010101000001010100000101000101010001000101010100000100000100000100000000000000000101000100000000000100000100000001000001000401010001", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000100000001010100010001010000010100010001010001010101000000010001010101000000000101010001010100010100010101000000000000000100010000010101000101000000000100010101000000010100000001010100000101000000010101000100000000010101010001010000010101010001000001010001000100000100000100010101000101010100010001010100000001000000010001010000010100000000000101000001010101010100010000010101000001010000010001000101010000000001000100010001000000010001000101000101000001000100010000010000010100000100000100010000000001010400000000", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000100000101000001010000000101000101010101000000000101000001010000000001000000010001010001010101000101010000000101010000010100010101000100010001000101010100000000010101010000010000010101000000000101010001010101000100010100000101010000010001000101000100010001010001000000010100010001010100000101010100000100000001010001010101000001000001010000010101010000000100010000010100000100010000000100010001000000000000000000000100000101010101010101000001000000000001010000010000000001010001010000000101010100010001010100fd0001000101000000010001010101010100010100010001010001010000010100010101010101010001010101010100000001000101010101000000000101010000000101010001000100000101000000010000010100010001000100000101010000010000010100010101000000010001000101010101000000010001000001010100010000010000000101010000010100010001010001000000000101000101000001010101010000010000000001000001000001000100000101000001000100010101010000000001010000010001000001000101000001000001000100000101000001010000010101010001000000010001010001010001000101010001000400000001", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000010000010000010000010000010100000001000100010000000000010001000001000100010101010001000100000001010001010001010001000100010100000100000101010101000100010001010100010101000001010101010000010001010100000001000101000100010001000101000101010101000000010101000100000001010101010000000101000101010100010101000000000000010100000000010001010100010000010101000000000000000001010100010100010000010000010100000001010000000001000000000000000100010001000001010000010100010001000100010101000100000100010001010100000100000400000100", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100000001000000010000010001010100000101010100000101000100010101010001010000000000000000010100010001000100010001000000010101010000000000000100010000010000010000000101010000010100010100000000010100010101010000010000010100000000010100000101000001000100010100010001000001000101000100010100010000000101000001010001000000000000010001000000010100010101000001010100010000000001000100000101000100010101010001010001010101000001000101000100000100010101010101000001000101010100010101000001010100000101000000000101000101010001fd000101000001010101010001000101000101000001000100010100000001010101000001000001000101010101010001010101010100000101010000010100000001010000000101000100000000010001000000000101010101000100000000000100010101010100000100010000010100010001010101000001000100000001010001010000000000000101010001010100000000000001000001000101000101000001010101000100000001000000010101010000000000000101010001000001000101010000010001000001010000010100010001000100010001010100000101010001000001010101010000010101000000000101000000000101000000fd0001010000000000010100010100000000000001000000010001000100000100000000010000000000000001010100010101010100000101010100010100000001010100000100000000000000010100000000010000010101000100010000010101010100000101000100010000010000000100010100010000000101000000000001010100000001000101000100000000010101010000010000000100010001010000010000000100010000010000010101000101000101000100000100010100000001010000010101000101010001010000000100010001000001000000010100000001000100000100010000010100010000010000010001010101010001010400000101", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001000101000100000001010000000100000101000100000000010101010001010001000001010100010000000101010101000000010100000001000101000101010001000100010100010100000000010001010100010101000100000000010101000100010101000000000001000100000101010100000001010100000001010001010000010100010000010101000000000101000100000000000100010101000001010100000001000100010101000101010100010100010000000100010000010001010101010100010101010101000000010101010000000000010101000000010001000101000000000100000000010101000100000101010101010100000400010000", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000100000000000100010000000001000100000101010001000100000101010001010100010100010000000000010100000100010101000001000000010101000100010001010100010100010101010101010000010000000100000100000100000000010100010100000000010001000100000101010000000101000000000001000101010000000101010000010000000001010101000100000001010101000001000001000001010100010000000001010001000101000101010100000000010001010000000001000101010100010101010101010101000101000100010000010000010101000100010100010000000100000000000100000001010100010000fd0001010101010101010100010101010100000000010100010100000000000000010100010101000100000100010000010100000100010000000001000000010001000101010000000000010000010000000000010000010100000001010101000000000001000000000100000100000101010101010101010101000100010101000101010000010101000100000100000000010000010000000101000000010101010000010101010100010101000100000000000001010100000101010101000001000001000101010001010101000000010100010100010100010000010100010001010101010001010100000001000101010101010001000000010000000001010400010001", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001000100010000000001010000000000000100010100010000000001010000000000010100000000010101000000000101010000010000000101000001000000010101000000000101010101000101000000010001000001000100000100010101000001010001000000000101000001000100000001000101000101010101010101000001010100000100010001010101010101000100010100010100010101010101000100000001000101000000010001010000010100000001000001000001010001000001000000010000010000010001000100010000000100000000010001010001010000010001000001000001010000010100010000000100010100010400010100", + "04fd000100010000000100010100000001010000010001000100010100010000000100000100000100000100010100000101010001000000010000010101000000010100010001010001000100000000000000010001010000000001010101000000000000010001010000000000010101010000000001000000000100000001000100010101010000010101010000010000000000000000010100010100010101000001000101000001000001000100000100010000010101000101000100000100000101010100000000010001000100000100010000000000010001000000010100010001010001000100000001010100000101000001000000010100010001010101fd000100010000000101000101000000000100010101010101010000010001000000000101010001000000010100000001010000010100010001000100000001000101000100000000000000000100010001010101000101010101000000000001010100000001010101010001000100000100010100000001010101010101000100010000000001000001010101010001010101000100000000000001000000010001010000010001010101010101000001010000000101000000010000000001010001000101000001000100000000000100000001010101010000000100010000000100000001000100010000010000010100010100010100010100000101010101fd000101000100010101000101000100010001000000010100010001010100000001010000000101010101000100010100000100010101010101010100000100010101000101000100010101000100010100000000000001010101000101000000010001010000010100010001000101010100000100010001010000000101000001000000000000000101010101000100010001010001000100000100010100010001000001000000000000000100010100010001010000010000000100010100000101010000000100010101000100010000000100010001000000010100000101000101000101010001000101010000010100010101010001000101010100000100fd0001010000000100010100000001000101000101000001010001000001010101010001010000000100000001000001000000000101010001000101010100000100000100000000010001000101000101010000000101000000000000010100010000000100000101000000000000010001010001000001000100000101000100000001000100000101000101010101000001000001000100000101000100000101000100000001000101010101000001000100000001000000010001010101000101000001000000010000010001010001010100000000000000010000010000010000010100000001010000000000000001010101000001010101000101000000010400010101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000101000000000001000100000100000000000001000101010001010001010100010101010100010100000100010001000101000101010100010100000000000000010101010001010000000001000001000100000101010000000001000000010100000101010101000000000100010101010101010000010000000000010101010100010101010000000001000000010001010101000100010100010000000100010001000001000000000101010100010101010000010101010000010001010101000101010101000100010101010001010101000100010001000001000000010000000000000101010101010100010100000100000001000000000001fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001010100010100000000000001010101000101010100010100000100000100010000000000000000000001010000000101000100010001010100000101010100010100000000000000010100000101000100000101000001000000010000000100000001000101000101000000010100010000000000010000010100010101010001000101010001010101010001000000000000000001010100000101000100000001000101000100010100010001010101000100010101010000010001010100010000010101010001010001010101010000000001010101000100000001000001000101010100010101010101000100010101010100000000000001000101010401000000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000101000000000001000100000100000000000001000101010001010001010100010101010100010100000100010001000101000101010100010100000000000000010101010001010000000001000001000100000101010000000001000000010100000101010101000000000100010101010101010000010000000000010101010100010101010000000001000000010001010101000100010100010000000100010001000001000000000101010100010101010000010101010000010001010101000101010101000100010101010001010101000100010001000001000000010000000000000101010101010100010100000100000001000000000001fd000101000100000000010101010000000001000001000101000001010001000101010100010101000101010000000101000100010001000001010000000000000001000101000101000001000101010101010000000000010101000001000100000101010000010101010101000000000001010001010101010001000100010100010100000000010101000100010100000101000100010000010101010001000001000101010100010000010101010101000100010100010001000000000100010000010000000000010001010001000100000001000001010101010000010101000101000100000000000101010101010000010101000100010001000100000000fd0001000101010000000001010101010101010101000101010001000100010101010101000100000000000101010100000101010001000101010001000100000000010100000001000101010100010001000000010101000000000000000001010101000000010100010001010000000001000101010000000100010101000000000000000101010100000101010100010001010100010001000001000101000101010100010101000000000100010001010101010100010000000101000101010001010000010000010101000101010000000001010000000100010001000100000000000101000000010100000101000101010000010001010000010001000001010401000001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000101000000000001000100000100000000000001000101010001010001010100010101010100010100000100010001000101000101010100010100000000000000010101010001010000000001000001000100000101010000000001000000010100000101010101000000000100010101010101010000010000000000010101010100010101010000000001000000010001010101000100010100010000000100010001000001000000000101010100010101010000010101010000010001010101000101010101000100010101010001010101000100010001000001000000010000000000000101010101010100010100000100000001000000000001fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001000000000001000001010100010000010001010000000101010001000100010100010101000001010000000101010100000100000100010001000100010001000100010001000100010101010100000100000101000000010101000000000101010100000000000000000101010000010101010001000100010000000101000001000001010100010001010101000001000000000001000000000001000101000000010101000001000001010001010001010100000000010100000101000100010000000100000100000100010000010001000000000101000100000101000101000100010000010100010001010001010101000100010101000100000001010401000100", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000100000101000000000001000100000100000000000001000101010001010001010100010101010100010100000100010001000101000101010100010100000000000000010101010001010000000001000001000100000101010000000001000000010100000101010101000000000100010101010101010000010000000000010101010100010101010000000001000000010001010101000100010100010000000100010001000001000000000101010100010101010000010101010000010001010101000101010101000100010101010001010101000100010001000001000000010000000000000101010101010100010100000100000001000000000001fd000101010101010101000000000101000001000000000101000100010001010101000000010101000101010101000100010001010101000000010000000001000000000100000101000000000001010001010000000101010000010001010001010000010100000001000000000101010001000001000001010000000100010100000000000001010000010100010100000001010000010100010000000100010100000100000001000100010000010101000101010100000000000000010100000001000000000100000001000000000001010001000100010101010101000000000001000101010001000001010001000100010100010001000001000000000001fd0001010000000100010101000001000001000100010000010000010101000101000000010100010000010001000000000100000101010000000101010101010101000000000101000101000000010001010001010000010100000000000001010100010001000100000001000100000100000000010100000101010001010101010100000001010000010101010000010101010000000101010001000101000100010101000001000100000101010000010100000101010100000101000000000001000001010001010101010101000001010100000001010100000100010101010001010000010001010000000000010001000101010100000001000001010001010401000101", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000100000100010101010001010101000100010000010001010001010100010100000101000000010101000001000001000100010100010000010001000000010001000001010000010101000100010000010100000101000001010100010100010100010100000101010100000000010100010101010001010000000000000000010001010001000101010100000101010101010001010100000100010000010001010100000100000100000101000100010000010100000001000100010000000101000000000001010001010101010101010001000101010100010000000001010101000101000001000001010101000000010001000000000101010001010101fd0001000000010100000001000000000000000100000100010100000101010101010101010000010000000000010000000100000101000000010101000000000000000100010001000000000100000100000101010000000101000000010100010001000001010000010001000101010001010100010000010100000101010100000101000001000000000101010100010101010100010000000001000100000000010000000001010100010000010101000001000001000000000100010101000000000100000100000001010101000100010100000001010001000101000000010100010000010000010001000100010101010100000001010001010100010000010401010000", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000100000100010101010001010101000100010000010001010001010100010100000101000000010101000001000001000100010100010000010001000000010001000001010000010101000100010000010100000101000001010100010100010100010100000101010100000000010100010101010001010000000000000000010001010001000101010100000101010101010001010100000100010000010001010100000100000100000101000100010000010100000001000100010000000101000000000001010001010101010101010001000101010100010000000001010101000101000001000001010101000000010001000000000101010001010101fd0001010001010101010000000101010101010001010001010000000000010100000000000001010101010000000100010100000001000100000000000100000100000000000101000001000000010101010001010000010101010000000101010101000101010100000001010000010001000101010000000101010101010101010101000101000000000101000101010001010101010101000101000100000101000001010100000001010001010100010101000001000001010000010000010101000101010101000001010100000101000101010001000101010100000100000100000100000000000000000101000100000000000100000100000001000001000401010001", + "04fd000100010100010100000100010101000101010101010101000000000001010000000000010101000100000000010000000000000001000101010100000000010001010000010101000000010100010001000000000001000000010000000100000000000101010000000100010001010100000100000100000000010101010001010101010001000000000100000000010100000100000000010000010000010101000100000100010000000000000001010100000100010101000101010000010101000100000001010001000101000101000100000000010100010000010001010001010100010100000000010000000001000100010000000000000000010100fd000101010100010100000001000001000101000000010001000000010001010000000100010000000101010100000101010101000000000000000001000100000001010000010100000101000000000000000000010101000100000000010000010000000101000000010101010001000001000000000001010001000101010001000000000001000001000100010101010101000001000101000100000101000100000100010001010100010101000100010101000001000100000100000100010001010000000101010000010100000101000100000100000000010000000101010000010101010100000101010000000001010101000101000000010000010001fd000101010100010000010001010101010101000000010001010001000100010100010000000100010000000001010000010100010001010000010100000101000001010000010101000001000001000000000100010000010101010100010000010001000100000001010101010000010101010100010100010001000100010000010001000001000100010100010100000101000000000000000100000000010000000001000000010000000100000101000101000101000001000001010000010000000101010100010000010101010101000100000101010100000000010001000100010100010100000001000001000000010100000000000100010000010101fd0001010000000001000001010000010000000000010100010000010101000001010101010000010001010000010101000000010100010001010001010101000000000100000001010001010000000000010001010101000100010101000001010101000100000100000000000101010000010100010101000000010000010000010000000000000000010100000000010001000000010001010100010000010001010000000100000001010100000001010101000100010101010001010100010101000000010101010101010001000001010100000001010001010100010000000000000100010001010000010000000000000101000100010000000100000000000401010100" ] diff --git a/src/test/data/merkle_roots.json b/src/test/data/merkle_roots.json index 93f31f125..d34ba6b16 100644 --- a/src/test/data/merkle_roots.json +++ b/src/test/data/merkle_roots.json @@ -1,18 +1,18 @@ [ - "26ee6e3f8c28892382264d72789c9c65a8577549fe35d3d6df86e0f07cc80057", - "0e54a14ab674813f2a558b18df630ae095f2cb775d0bc37677073acb1f8f3443", - "d06e16c2e6ee0b28d8f07c76a17976fea549ce2dd1debae260dc3215d265fddb", - "52dc4b76365472537ff15cb18a71be54c91d207f5d62fb89bd74af9010ac0e01", - "8dd27a2340e34015cd9b00a2ddc011dcdab03d38a49497490d631f71ce9c495e", - "0cb8ae3ff2483ea7124237b62d0ac4388477b41e83d3811c6e0dd6fec0b365e6", - "a67c1f145456880502a3d020d538fecf0515bd285edd6e3fcae26eb53c1f56d3", - "7fb0adeb50e1084359414071486d89ead9c9a3700c64c9892f510f87af6ec27f", - "45cd6f71215eabb2c25206471e9293bed2bc924ce5bbc16a8f728ec1e310886f", - "01d1f338c2abee217962120611dafe0a0e9de76c18de77cbb1e3a6d3261e887c", - "2700b09aa19ce460d509fc3bccfbc80f8381d156a4a52a7f3d4e8b852b5c10ea", - "ac96cc858674f67d6c6119f933080cd69c10950409722468d2ac7b81e2cc2bba", - "f4930affd93232b6051fe3a5f744a357201bff4363312d1115762a595261f030", - "50b48f5226a69a62206f365ac5347c723b43faf9691c04b872225d5c08876eed", - "a867397884b157b1db4dd03dc2fd6c40c4650e70b61441d4325e0b18d5280fb6", - "52c8456d3538eed3b73778c596c1993ac6d6c337ae5e338391ce6cae58296dec" + "95bf71d8e803b8601c14b5949d0f92690181154ef9d82eb3e24852266823317a", + "73f18d3f9cd11010aa01d4f444039e566f14ef282109df9649b2eb75e7a53ed1", + "dcde8a273c9672bee1a894d7f7f4abb81078f52b498e095f2a87d0aec5addf25", + "4677d481ec6d1e97969afbc530958d1cbb4f1c047af6fdad4687cd10830e02bd", + "74cd9d82de30c4222a06d420b75522ae1273729c1d8419446adf1184df61dc69", + "2ff57f5468c6afdad30ec0fb6c2cb67289f12584e2c20c4e0065f66748697d77", + "27e4ce010670801911c5765a003b15f75cde31d7378bd36540f593c8a44b3011", + "62231ef2ec8c4da461072871ab7bc9de10253fcb40e164ddbad05b47e0b7fb69", + "733a4ce688fdf07efb9e9f5a4b2dafff87cfe198fbe1dff71e028ef4cdee1f1b", + "df39ed31924facdd69a93db07311d45fceac7a4987c091648044f37e6ecbb0d2", + "87795c069bdb55281c666b9cb872d13174334ce135c12823541e9536489a9107", + "438c80f532903b283230446514e400c329b29483db4fe9e279fdfc79e8f4347d", + "08afb2813eda17e94aba1ab28ec191d4af99283cd4f1c5a04c0c2bc221bc3119", + "a8b3ab3284f3288f7caa21bd2b69789a159ab4188b0908825b34723305c1228c", + "db9b289e620de7dca2ae8fdac96808752e32e7a2c6d97ce0755dcebaa03123ab", + "0bf622cb9f901b7532433ea2e7c1b7632f5935899b62dcf897a71551997dc8cc" ] diff --git a/src/test/data/merkle_serialization.json b/src/test/data/merkle_serialization.json index 9bb8ffee5..21f79388b 100644 --- a/src/test/data/merkle_serialization.json +++ b/src/test/data/merkle_serialization.json @@ -1,18 +1,18 @@ [ - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443" -] \ No newline at end of file + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c94300", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f38618", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f38618", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "01c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000301e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806", + "01c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e0184c834e7cb38d6f08d82f5cf4839b8920185174b11c7af771fd38dd02b206a200301e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806" +] diff --git a/src/test/data/merkle_witness_serialization.json b/src/test/data/merkle_witness_serialization.json index 327d833e9..779d4a468 100644 --- a/src/test/data/merkle_witness_serialization.json +++ b/src/test/data/merkle_witness_serialization.json @@ -1,138 +1,138 @@ [ - "0000000155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300", - "0000000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300010155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30000", - "0000000555b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300000455b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300038695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30001018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d0355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e301018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d02dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3020001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d5564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30002018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c0255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e35564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e302018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944300", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430355b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030000015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443028695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27ddc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e303018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba944301dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430255b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e38695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e3030001dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba9443018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d00", - "0155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e30003018695873d63ec0bceeadb5bf4ccc6723ac803c1826fc7cfb34fc76180305ae27d01dc33ca90e860ab6770d82ba98f20eae6d5e2ca9a63f63f69b40e3cf72e121d6c015564d9772145d2e53b02de2d8e22b10a820614e0d88ebdd48ddc71f0b9ba94430155b852781b9995a44c939b64e441ae2724b96f99c8f4fb9a141cfc9842c4b0e300" -] \ No newline at end of file + "0000000162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00", + "0000000262fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c94300", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c94300", + "0000000262fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430101836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430101836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c94300000101836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0000", + "0000000362fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000268eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430001a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae400", + "0000000362fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000268eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430001a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430000", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae40101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430000", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f38618000101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430000", + "0000000362fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000268eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430001a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae0101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae40101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f38618000101ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc00", + "0000000362fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae01018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000101aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af2", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000268eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae01018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000101aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af2", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430001a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae01018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000101aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af2", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000101aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af2", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180001018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000101aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af2", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc01018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10000", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0001018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10000", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd00", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047400", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047400", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d00", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f00010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b96530000", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f00010170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81700", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047401018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047401018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0001018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf81701018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0000", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060001018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0000", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047401018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad1047401018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d01018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0001018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a41", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80602d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e755000", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e755000", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba300", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f000101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80602d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a09120000", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a09120000", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a09120000", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806000101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a09120000", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f000101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9020001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80602d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e900", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e900", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e900", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806000101be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e900", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e900", + "0000000462fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000368eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430002a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180292498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861801112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0268c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad104740101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f000101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000201e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80602d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000101e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a7", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e75500101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000101e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a7", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000101e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a7", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806000101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000101e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a7", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e90101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e0000", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806000101c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e0000", + "0000000562fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba68eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba00000468eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c943a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "0162fdad9bfbf17c38ea626a9c9b8af8a748e6b4367c8494caf0ca592999e8b6ba0168eb35bc5e1ddb80a761718e63a1ecf4d4977ae22cc19fa732b85515b2a4c9430003a6637c3308b7b8e6eabc3c9c3bd672b568d73c8de4cf14ca2a004ff20c86c7ae112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0001019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f386180392498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae4112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "01836045484077cf6390184ea7cd48b460e2d0f22b2293b69633bb152314a692fb0192498a8295ea36d593eaee7cb8b55be3a3e37b8185d3807693184054cd574ae401019f5b2b1e4bf7e7318d0a1f417ca6bca36077025b3d11e074b94cd55ce9f3861802112e79af601aaa3c0a48e6c37930ccad4b5a3340a373a14d7b79697e5ee730dd458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430002000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0368c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "01ff7c360374a6508ae0904c782127ff5dce90918f3ee81cf92ef1b69afb8bf4430168c4d0f69d1f18b756c2ee875c14f1c6cd38682e715ded14bf7e3c1c5610e9fc02000146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f02050a753bb419723abb7f22486c2a7182e390f47927435bc2c2f7fda93ad10474458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b1000201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f0250c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "018b16cd3ec44875e4856e30344c0b4a68a6f929a68be5117b225b80926301e7b10150c0b43061c39191c3ec529734328b7f9cafeb6fd162cc49a4495442d9499a2d0201aed51ae31f597f976bac0f62cd5e563203ead4b5202d6459c5d45466dd737af20146c2fe50e8c66a8b402bdf071f52c7f509f7a04597f31886b2823e288a936d9f01458cab4492ce89c6b50161e0583c2115e7900db964a53b49e152828d6a3991af00", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965300030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80603d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e7550305205dbbecab7b01ec2538467c2fe41f7845eb45487bcf2f7d7bd52207f644100", + "0170ffdd5fa0f3aea18bd4700f1ac2e2e03cf5d4b7b857e8dd93b862a8319b965301d81ef64a0063573d80cd32222d8d04debbe807345ad7af2e9edf0f44bdfaf817030000016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80602a1e12cd7bb8d53016cbf0729cfc1bead8759a9e97a7eb50a416a27ced07e7550305205dbbecab7b01ec2538467c2fe41f7845eb45487bcf2f7d7bd52207f644100", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b000301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060204e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba3305205dbbecab7b01ec2538467c2fe41f7845eb45487bcf2f7d7bd52207f644100", + "018b92a4ec694271fe1b16cc0ea8a433bf19e78eb5ca733cc137f38e5ecb05789b0104e963ab731e4aaaaaf931c3c039ea8c9d7904163936e19a8929434da9adeba30301fe190d5e3beaf1084c1b1cb6621d262c0cd8cd16454ef0188441abf05d356a4100016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a80601305205dbbecab7b01ec2538467c2fe41f7845eb45487bcf2f7d7bd52207f644100", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a091200030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806021880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e92f7a96ecc725694533a999db6786f6016bcfdca5c9353151837faf43d93c50ef00", + "01be3f6c181f162824191ecf1f78cae3ffb0ddfda671bb93277ce6ebc9201a0912011880967fc8226380a849c63532bba67990f7d0a10e9c90b848f58d634957c6e9030001ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a806012f7a96ecc725694533a999db6786f6016bcfdca5c9353151837faf43d93c50ef00", + "01c465bb2893cba233351094f259396301c23d73a6cf6f92bc63428a43f0dd8f8e000301e97f16ad143359999c90a7d2a3e7daa94ad980842226d9323d3f4f0ab62460a701ec4b1458a3cf805199803a1231e906ba095f969a5775ca4ac73348473e70f625016cbbfc183a1017859c6a088838ae487be84321274a039773a35b434b7610a8060184c834e7cb38d6f08d82f5cf4839b8920185174b11c7af771fd38dd02b206a2000" +] From 226a6b32484af32a2da65828c1267e75361771c0 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 2 Nov 2016 12:03:41 -0600 Subject: [PATCH 042/281] Initialize after profiling messages are suppressed. --- src/init.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 3e1a22373..0906f0140 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -984,13 +984,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) threadGroup.create_thread(&ThreadShowMetricsScreen); } - // Initialize Zcash circuit parameters - ZC_LoadParams(); // These must be disabled for now, they are buggy and we probably don't // want any of libsnark's profiling in production anyway. libsnark::inhibit_profiling_info = true; libsnark::inhibit_profiling_counters = true; + // Initialize Zcash circuit parameters + ZC_LoadParams(); + /* Start the RPC server already. It will be started in "warmup" mode * and not really process calls already (but it will signify connections * that the server is there and will be ready later). Warmup mode will From 78df9f0211391d957a16d76497cf0c950d53d36d Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 2 Nov 2016 12:40:23 -0600 Subject: [PATCH 043/281] Process verification keys to perform online verification. --- src/zcash/JoinSplit.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 702c3bac6..8f9eddad2 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -26,6 +26,7 @@ namespace libzcash { CCriticalSection cs_ParamsIO; CCriticalSection cs_InitializeParams; +CCriticalSection cs_LoadKeys; template void saveToFile(std::string path, T& obj) { @@ -71,6 +72,7 @@ public: boost::optional> pk; boost::optional> vk; + boost::optional> vk_precomp; boost::optional pkPath; JoinSplitCircuit() {} @@ -87,6 +89,8 @@ public: } void loadProvingKey() { + LOCK(cs_LoadKeys); + if (!pk) { if (!pkPath) { throw std::runtime_error("proving key path unknown"); @@ -103,7 +107,14 @@ public: } } void loadVerifyingKey(std::string path) { + LOCK(cs_LoadKeys); + loadFromFile(path, vk); + + processVerifyingKey(); + } + void processVerifyingKey() { + vk_precomp = r1cs_ppzksnark_verifier_process_vk(*vk); } void saveVerifyingKey(std::string path) { if (vk) { @@ -128,11 +139,14 @@ public: } void generate() { + LOCK(cs_LoadKeys); + const r1cs_constraint_system constraint_system = generate_r1cs(); r1cs_ppzksnark_keypair keypair = r1cs_ppzksnark_generator(constraint_system); pk = keypair.pk; vk = keypair.vk; + processVerifyingKey(); } bool verify( @@ -146,7 +160,7 @@ public: uint64_t vpub_new, const uint256& rt ) { - if (!vk) { + if (!vk || !vk_precomp) { throw std::runtime_error("JoinSplit verifying key not loaded"); } @@ -165,7 +179,7 @@ public: vpub_new ); - return r1cs_ppzksnark_verifier_strong_IC(*vk, witness, r1cs_proof); + return r1cs_ppzksnark_online_verifier_strong_IC(*vk_precomp, witness, r1cs_proof); } catch (...) { return false; } From 40ef121e6aafc44ae1f1e1aafa56f6bf0b27f892 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 15 Nov 2016 14:03:37 +1300 Subject: [PATCH 044/281] Correctly set CNoteData::witnessHeight when decrementing witness caches Closes #1715 --- src/wallet/gtest/test_wallet.cpp | 103 +++++++++++++++++++++++++++++-- src/wallet/wallet.cpp | 12 ++-- src/wallet/wallet.h | 2 +- 3 files changed, 108 insertions(+), 9 deletions(-) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 474129c34..70ec7e4ce 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -50,8 +50,8 @@ public: ZCIncrementalMerkleTree tree) { CWallet::IncrementNoteWitnesses(pindex, pblock, tree); } - void DecrementNoteWitnesses() { - CWallet::DecrementNoteWitnesses(); + void DecrementNoteWitnesses(const CBlockIndex* pindex) { + CWallet::DecrementNoteWitnesses(pindex); } void WriteWitnessCache(MockWalletDB& walletdb) { CWallet::WriteWitnessCache(walletdb); @@ -675,7 +675,7 @@ TEST(wallet_tests, cached_witnesses_empty_chain) { EXPECT_TRUE((bool) witnesses[1]); // Until #1302 is implemented, this should triggger an assertion - EXPECT_DEATH(wallet.DecrementNoteWitnesses(), + EXPECT_DEATH(wallet.DecrementNoteWitnesses(&index), "Assertion `nWitnessCacheSize > 0' failed."); } @@ -748,7 +748,7 @@ TEST(wallet_tests, cached_witnesses_chain_tip) { // Decrementing should give us the previous anchor uint256 anchor3; - wallet.DecrementNoteWitnesses(); + wallet.DecrementNoteWitnesses(&index2); witnesses.clear(); wallet.GetNoteWitnesses(notes, witnesses, anchor3); EXPECT_FALSE((bool) witnesses[0]); @@ -773,6 +773,101 @@ TEST(wallet_tests, cached_witnesses_chain_tip) { } } +TEST(wallet_tests, CachedWitnessesDecrementFirst) { + TestWallet wallet; + uint256 anchor2; + CBlock block2; + CBlockIndex index2(block2); + ZCIncrementalMerkleTree tree; + + auto sk = libzcash::SpendingKey::random(); + wallet.AddSpendingKey(sk); + + { + // First transaction (case tested in _empty_chain) + auto wtx = GetValidReceive(sk, 10, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + // First block (case tested in _empty_chain) + CBlock block1; + block1.vtx.push_back(wtx); + CBlockIndex index1(block1); + index1.nHeight = 1; + wallet.IncrementNoteWitnesses(&index1, &block1, tree); + } + + { + // Second transaction (case tested in _chain_tip) + auto wtx = GetValidReceive(sk, 50, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + std::vector notes {jsoutpt}; + std::vector> witnesses; + + // Second block (case tested in _chain_tip) + block2.vtx.push_back(wtx); + index2.nHeight = 2; + wallet.IncrementNoteWitnesses(&index2, &block2, tree); + // Called to fetch anchor + wallet.GetNoteWitnesses(notes, witnesses, anchor2); + } + + { + // Third transaction - never mined + auto wtx = GetValidReceive(sk, 20, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + std::vector notes {jsoutpt}; + std::vector> witnesses; + uint256 anchor3; + + wallet.GetNoteWitnesses(notes, witnesses, anchor3); + EXPECT_FALSE((bool) witnesses[0]); + + // Decrementing (before the transaction has ever seen an increment) + // should give us the previous anchor + uint256 anchor4; + wallet.DecrementNoteWitnesses(&index2); + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor4); + EXPECT_FALSE((bool) witnesses[0]); + // Should not equal second anchor because none of these notes had witnesses + EXPECT_NE(anchor2, anchor4); + + // Re-incrementing with the same block should give the same result + uint256 anchor5; + wallet.IncrementNoteWitnesses(&index2, &block2, tree); + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor5); + EXPECT_FALSE((bool) witnesses[0]); + EXPECT_EQ(anchor3, anchor5); + } +} + TEST(wallet_tests, ClearNoteWitnessCache) { TestWallet wallet; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e549e5484..dba9d5890 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -373,7 +373,7 @@ void CWallet::ChainTip(const CBlockIndex *pindex, const CBlock *pblock, if (added) { IncrementNoteWitnesses(pindex, pblock, tree); } else { - DecrementNoteWitnesses(); + DecrementNoteWitnesses(pindex); } } @@ -648,7 +648,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, // Only increment witnesses that are behind the current height if (nd->witnessHeight < pindex->nHeight) { // Witnesses being incremented should always be either -1 - // (never incremented) or one below pindex + // (never incremented or decremented) or one below pindex assert((nd->witnessHeight == -1) || (nd->witnessHeight == pindex->nHeight - 1)); // Copy the witness for the previous block if we have one @@ -746,7 +746,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } -void CWallet::DecrementNoteWitnesses() +void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) { { LOCK(cs_wallet); @@ -755,10 +755,14 @@ void CWallet::DecrementNoteWitnesses() CNoteData* nd = &(item.second); // Check the validity of the cache assert(nWitnessCacheSize >= nd->witnesses.size()); + // Witnesses being decremented should always be either -1 + // (never incremented or decremented) or equal to pindex + assert((nd->witnessHeight == -1) || + (nd->witnessHeight == pindex->nHeight)); if (nd->witnesses.size() > 0) { nd->witnesses.pop_front(); } - nd->witnessHeight -= 1; + nd->witnessHeight = pindex->nHeight - 1; } } nWitnessCacheSize -= 1; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index dfcbc1af8..a76ccec4d 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -619,7 +619,7 @@ protected: void IncrementNoteWitnesses(const CBlockIndex* pindex, const CBlock* pblock, ZCIncrementalMerkleTree& tree); - void DecrementNoteWitnesses(); + void DecrementNoteWitnesses(const CBlockIndex* pindex); template void WriteWitnessCache(WalletDB& walletdb) { From 4a6a48479de07e0e70c20b07d026f652aef38e15 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 15 Nov 2016 14:05:05 +1300 Subject: [PATCH 045/281] Copy over CNoteData::witnessHeight when updating wallet tx --- src/wallet/gtest/test_wallet.cpp | 3 +++ src/wallet/wallet.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 70ec7e4ce..957dc4d2d 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -1027,6 +1027,7 @@ TEST(wallet_tests, UpdatedNoteData) { // Pretend we mined the tx by adding a fake witness ZCIncrementalMerkleTree tree; wtx.mapNoteData[jsoutpt].witnesses.push_front(tree.witness()); + wtx.mapNoteData[jsoutpt].witnessHeight = 100; // Now pretend we added the key for the second note, and // the tx was "added" to the wallet again to update it. @@ -1039,11 +1040,13 @@ TEST(wallet_tests, UpdatedNoteData) { // The txs should initially be different EXPECT_NE(wtx.mapNoteData, wtx2.mapNoteData); EXPECT_EQ(1, wtx.mapNoteData[jsoutpt].witnesses.size()); + EXPECT_EQ(100, wtx.mapNoteData[jsoutpt].witnessHeight); // After updating, they should be the same EXPECT_TRUE(wallet.UpdatedNoteData(wtx2, wtx)); EXPECT_EQ(wtx.mapNoteData, wtx2.mapNoteData); EXPECT_EQ(1, wtx.mapNoteData[jsoutpt].witnesses.size()); + EXPECT_EQ(100, wtx.mapNoteData[jsoutpt].witnessHeight); // TODO: The new note should get witnessed (but maybe not here) (#1350) } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index dba9d5890..6f7372ade 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1106,6 +1106,7 @@ bool CWallet::UpdatedNoteData(const CWalletTx& wtxIn, CWalletTx& wtx) tmp.at(nd.first).witnesses.assign( nd.second.witnesses.cbegin(), nd.second.witnesses.cend()); } + tmp.at(nd.first).witnessHeight = nd.second.witnessHeight; } // Now copy over the updated note data wtx.mapNoteData = tmp; From ccfd8aae1dc94203f4bad3038a4d7054ed6eba08 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 15 Nov 2016 16:42:22 +1300 Subject: [PATCH 046/281] Add code comments about CNoteData::witnessHeight --- src/wallet/wallet.cpp | 2 ++ src/wallet/wallet.h | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6f7372ade..fe61d0e26 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -762,6 +762,8 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) if (nd->witnesses.size() > 0) { nd->witnesses.pop_front(); } + // pindex is the block being removed, so the new witness cache + // height is one below it. nd->witnessHeight = pindex->nHeight - 1; } } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index a76ccec4d..85f960eb1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -221,7 +221,15 @@ public: */ std::list witnesses; - /** Block height corresponding to the most current witness. */ + /** + * Block height corresponding to the most current witness. + * + * When we first create a CNoteData in CWallet::FindMyNotes, this is set to + * -1 as a placeholder. The next time CWallet::ChainTip is called, we can + * determine what height the witness cache for this note is valid for (even + * if no witnesses were cached), and so can set the correct value in + * CWallet::IncrementNoteWitnesses and CWallet::DecrementNoteWitnesses. + */ int witnessHeight; CNoteData() : address(), nullifier(), witnessHeight {-1} { } @@ -616,9 +624,15 @@ public: void ClearNoteWitnessCache(); protected: + /** + * pindex is the new tip being connected. + */ void IncrementNoteWitnesses(const CBlockIndex* pindex, const CBlock* pblock, ZCIncrementalMerkleTree& tree); + /** + * pindex is the old tip being disconnected. + */ void DecrementNoteWitnesses(const CBlockIndex* pindex); template From a4ef3aa9b5ff479b6264529decdbc14dc27a0b11 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 15 Nov 2016 17:53:41 +1300 Subject: [PATCH 047/281] Clear witnessHeight and nWitnessCacheSize in ClearNoteWitnessCache --- src/wallet/gtest/test_wallet.cpp | 7 +++++++ src/wallet/wallet.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 957dc4d2d..d30944954 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -875,6 +875,7 @@ TEST(wallet_tests, ClearNoteWitnessCache) { wallet.AddSpendingKey(sk); auto wtx = GetValidReceive(sk, 10, true); + auto hash = wtx.GetHash(); auto note = GetNote(sk, wtx, 0, 0); auto nullifier = note.nullifier(sk); @@ -888,6 +889,8 @@ TEST(wallet_tests, ClearNoteWitnessCache) { // Pretend we mined the tx by adding a fake witness ZCIncrementalMerkleTree tree; wtx.mapNoteData[jsoutpt].witnesses.push_front(tree.witness()); + wtx.mapNoteData[jsoutpt].witnessHeight = 1; + wallet.nWitnessCacheSize = 1; wallet.AddToWallet(wtx, true, NULL); @@ -899,6 +902,8 @@ TEST(wallet_tests, ClearNoteWitnessCache) { wallet.GetNoteWitnesses(notes, witnesses, anchor2); EXPECT_TRUE((bool) witnesses[0]); EXPECT_FALSE((bool) witnesses[1]); + EXPECT_EQ(1, wallet.mapWallet[hash].mapNoteData[jsoutpt].witnessHeight); + EXPECT_EQ(1, wallet.nWitnessCacheSize); // After clearing, we should not have a witness for either note wallet.ClearNoteWitnessCache(); @@ -906,6 +911,8 @@ TEST(wallet_tests, ClearNoteWitnessCache) { wallet.GetNoteWitnesses(notes, witnesses, anchor2); EXPECT_FALSE((bool) witnesses[0]); EXPECT_FALSE((bool) witnesses[1]); + EXPECT_EQ(-1, wallet.mapWallet[hash].mapNoteData[jsoutpt].witnessHeight); + EXPECT_EQ(0, wallet.nWitnessCacheSize); } TEST(wallet_tests, WriteWitnessCache) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fe61d0e26..51ed76f3a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -630,8 +630,10 @@ void CWallet::ClearNoteWitnessCache() for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { item.second.witnesses.clear(); + item.second.witnessHeight = -1; } } + nWitnessCacheSize = 0; } void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, From f4404d7b5bed29972d7977ef60f305842a740c8a Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 11 Nov 2016 14:39:28 -0800 Subject: [PATCH 048/281] Closes #1680, temporary fix for rpc deadlock inherited from upstream. --- qa/rpc-tests/httpbasics.py | 25 ++++++++++--------------- src/init.cpp | 5 ++++- src/rpcserver.cpp | 6 ++++++ 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py index 64ba49df6..21c7b1f8b 100755 --- a/qa/rpc-tests/httpbasics.py +++ b/qa/rpc-tests/httpbasics.py @@ -38,13 +38,9 @@ class HTTPBasicsTest (BitcoinTestFramework): conn.request('POST', '/', '{"method": "getbestblockhash"}', headers) out1 = conn.getresponse().read(); assert_equal('"error":null' in out1, True) - assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open! - - #send 2nd request without closing connection - conn.request('POST', '/', '{"method": "getchaintips"}', headers) - out2 = conn.getresponse().read(); - assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message - assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open! + + # TODO #1856: Re-enable support for persistent connections. + assert_equal(conn.sock!=None, False) conn.close() #same should be if we add keep-alive because this should be the std. behaviour @@ -55,13 +51,9 @@ class HTTPBasicsTest (BitcoinTestFramework): conn.request('POST', '/', '{"method": "getbestblockhash"}', headers) out1 = conn.getresponse().read(); assert_equal('"error":null' in out1, True) - assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open! - - #send 2nd request without closing connection - conn.request('POST', '/', '{"method": "getchaintips"}', headers) - out2 = conn.getresponse().read(); - assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message - assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open! + + # TODO #1856: Re-enable support for persistent connections. + assert_equal(conn.sock!=None, False) conn.close() #now do the same with "Connection: close" @@ -96,7 +88,10 @@ class HTTPBasicsTest (BitcoinTestFramework): conn.request('POST', '/', '{"method": "getbestblockhash"}', headers) out1 = conn.getresponse().read(); assert_equal('"error":null' in out1, True) - assert_equal(conn.sock!=None, True) #connection must be closed because bitcoind should use keep-alive by default + + # TODO #1856: Re-enable support for persistent connections. + assert_equal(conn.sock!=None, False) + conn.close() if __name__ == '__main__': HTTPBasicsTest ().main () diff --git a/src/init.cpp b/src/init.cpp index 3e1a22373..5163db5de 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -425,7 +425,10 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), 8232, 18232)); strUsage += HelpMessageOpt("-rpcallowip=", _("Allow JSON-RPC connections from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcthreads=", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), 4)); - strUsage += HelpMessageOpt("-rpckeepalive", strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 1)); + + // TODO #1856: Re-enable support for persistent connections. + // Disabled to avoid rpc deadlock #1680, until we backport upstream changes which replace boost::asio with libevent, or another solution is implemented. + //strUsage += HelpMessageOpt("-rpckeepalive", strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 1)); // Disabled until we can lock notes and also tune performance of libsnark which by default uses multiple threads //strUsage += HelpMessageOpt("-rpcasyncthreads=", strprintf(_("Set the number of threads to service Async RPC calls (default: %d)"), 1)); diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index b990f2040..0418d7519 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -1025,9 +1025,15 @@ void ServiceConnection(AcceptedConnection *conn) // Read HTTP message headers and body ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto, MAX_SIZE); + // TODO #1856: Re-enable support for persistent connections. + // We have disabled support for HTTP Keep-Alive until resolution of #1680, upstream rpc deadlock. + // Close connection immediately. + fRun = false; + /* // HTTP Keep-Alive is false; close connection immediately if ((mapHeaders["connection"] == "close") || (!GetBoolArg("-rpckeepalive", true))) fRun = false; + */ // Process via JSON-RPC API if (strURI == "/") { From ba0625f25d5071628ae713af1f22e1e8405467e3 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 13 Nov 2016 20:38:24 -0800 Subject: [PATCH 049/281] Set default minrelaytxfee to 1000 zatoshis to match upstream. A txout will be considered dust when it has a value <546 zatoshis. Helps to address #1719. --- src/main.cpp | 2 +- src/main.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c432bcd63..612f1ed83 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,7 @@ uint64_t nPruneTarget = 0; bool fAlerts = DEFAULT_ALERTS; /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */ -CFeeRate minRelayTxFee = CFeeRate(5000); +CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); CTxMemPool mempool(::minRelayTxFee); diff --git a/src/main.h b/src/main.h index aec92435c..64b844db0 100644 --- a/src/main.h +++ b/src/main.h @@ -60,6 +60,8 @@ static const int ALERT_PRIORITY_SAFE_MODE = 4000; static const unsigned int MAX_P2SH_SIGOPS = 15; /** The maximum number of sigops we're willing to relay/mine in a single tx */ static const unsigned int MAX_STANDARD_TX_SIGOPS = MAX_BLOCK_SIGOPS/5; +/** Default for -minrelaytxfee, minimum relay fee for transactions */ +static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000; /** Default for -maxorphantx, maximum number of orphan transactions kept in memory */ static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100; /** The maximum size of a blk?????.dat file (since 0.8) */ From 3e2e8b5b423d9e82fad6a82d4d33cfc523657491 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 15 Nov 2016 12:17:19 -0700 Subject: [PATCH 050/281] Add test that `last` and `element` will throw exception when the tree is blank. --- src/gtest/test_merkletree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gtest/test_merkletree.cpp b/src/gtest/test_merkletree.cpp index 0ac417276..efe5587e5 100644 --- a/src/gtest/test_merkletree.cpp +++ b/src/gtest/test_merkletree.cpp @@ -76,6 +76,9 @@ void test_tree( // empty tree. ASSERT_TRUE(tree.root() == Tree::empty_root()); + // The tree doesn't have a 'last' element added since it's blank. + ASSERT_THROW(tree.last(), std::runtime_error); + // We need to witness at every single point in the tree, so // that the consistency of the tree and the merkle paths can // be checked. @@ -107,6 +110,7 @@ void test_tree( if (first) { ASSERT_THROW(wit.path(), std::runtime_error); + ASSERT_THROW(wit.element(), std::runtime_error); } else { auto path = wit.path(); From 9ddb6ad028ec5c89a3b00eb2c291243b914162d5 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 14 Nov 2016 11:48:55 -0800 Subject: [PATCH 051/281] Mempool will accept tx with joinsplits and the default z_sendmany fee. Issue #1851 shows that a zaddr->taddr can be rejected from mempools due to not meeting fee requirements given the size of the transaction. Fee calculation for joinsplit txs has not yet been agreed upon, so during this interim period, this patch ensures joinsplit txs using the default fee are not rejected due to an insufficient fee. --- qa/rpc-tests/wallet_protectcoinbase.py | 34 +++++++++++++++++++++++++- src/main.cpp | 18 +++++++++----- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index e05ccb529..b71a1e6f0 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -150,6 +150,37 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): errorString = e.error['message'] assert_equal("Insufficient funds, coinbase funds can only be spent after they have been sent to a zaddr" in errorString, True) + # Verify that mempools accept tx with joinsplits which have at least the default z_sendmany fee. + # If this test passes, it confirms that issue #1851 has been resolved, where sending from + # a zaddr to 1385 taddr recipients fails because the default fee was considered too low + # given the tx size, resulting in mempool rejection. + errorString = '' + recipients = [] + num_t_recipients = 2500 + amount_per_recipient = Decimal('0.00000546') # dust threshold + # Note that regtest chainparams does not require standard tx, so setting the amount to be + # less than the dust threshold, e.g. 0.00000001 will not result in mempool rejection. + for i in xrange(0,num_t_recipients): + newtaddr = self.nodes[2].getnewaddress() + recipients.append({"address":newtaddr, "amount":amount_per_recipient}) + myopid = self.nodes[0].z_sendmany(myzaddr, recipients) + try: + self.wait_and_assert_operationid_status(myopid) + except JSONRPCException as e: + print("JSONRPC error: "+e.error['message']) + assert(False) + except Exception as e: + print("Unexpected exception caught during testing: "+str(sys.exc_info()[0])) + assert(False) + + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + + # check balance + node2balance = amount_per_recipient * num_t_recipients + assert_equal(self.nodes[2].getbalance(), node2balance) + # Send will succeed because the balance of non-coinbase utxos is 10.0 try: self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 9) @@ -161,7 +192,8 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): self.sync_all() # check balance - assert_equal(self.nodes[2].getbalance(), 9) + node2balance = node2balance + 9 + assert_equal(self.nodes[2].getbalance(), node2balance) # Check that chained joinsplits in a single tx are created successfully. recipients = [] diff --git a/src/main.cpp b/src/main.cpp index 612f1ed83..9c3d6e678 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #include "util.h" #include "utilmoneystr.h" #include "validationinterface.h" +#include "wallet/asyncrpcoperation_sendmany.h" #include @@ -1170,12 +1171,17 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), mempool.HasNoInputsOf(tx)); unsigned int nSize = entry.GetTxSize(); - // Don't accept it if it can't get into a block - CAmount txMinFee = GetMinRelayFee(tx, nSize, true); - if (fLimitFree && nFees < txMinFee) - return state.DoS(0, error("AcceptToMemoryPool: not enough fees %s, %d < %d", - hash.ToString(), nFees, txMinFee), - REJECT_INSUFFICIENTFEE, "insufficient fee"); + // Accept a tx if it contains joinsplits and has at least the default fee specified by z_sendmany. + if (tx.vjoinsplit.size() > 0 && nFees >= ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE) { + // In future we will we have more accurate and dynamic computation of fees for tx with joinsplits. + } else { + // Don't accept it if it can't get into a block + CAmount txMinFee = GetMinRelayFee(tx, nSize, true); + if (fLimitFree && nFees < txMinFee) + return state.DoS(0, error("AcceptToMemoryPool: not enough fees %s, %d < %d", + hash.ToString(), nFees, txMinFee), + REJECT_INSUFFICIENTFEE, "insufficient fee"); + } // Require that free transactions have sufficient priority to be mined in the next block. if (GetBoolArg("-relaypriority", false) && nFees < ::minRelayTxFee.GetFee(nSize) && !AllowFree(view.GetPriority(tx, chainActive.Height() + 1))) { From b82084fe444b78e4cb324d9841e5358be4b9ace1 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Tue, 15 Nov 2016 11:49:32 -0800 Subject: [PATCH 052/281] Change format of z_sendmany error code documentation. --- doc/payment-api.md | 75 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/doc/payment-api.md b/doc/payment-api.md index 16939f993..7435acf81 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -99,13 +99,70 @@ z_getoperationresult
| [operationids] | Return OperationStatus JSON objects z_getoperationstatus
| [operationids] | Return OperationStatus JSON objects for all operations the node is currently aware of.

Operationids is an optional array to filter which operations you want to receive status objects for.

Output is a list of operation status objects.
[
{“operationid”: “opid-12ee…”,
“status”: “queued”},
{“operationid”: “opd-098a…”, “status”: ”executing”},
{“operationid”: “opid-9876”, “status”: ”failed”}
]

When the operation succeeds, the status object will also include the result.

{“operationid”: “opid-0e0e”,
“status”:”success”,
“execution_time”:”25”,
“result”: {“txid”:”af3887654…”,...}
} z_listoperationids
| [state] | Return a list of operationids for all operations which the node is currently aware of.

State is an optional string parameter to filter the operations you want listed by their state. Acceptable parameter values are ‘queued’, ‘executing’, ‘success’, ‘failed’, ‘cancelled’.

[“opid-0e0e…”, “opid-1af4…”, … ] -### Asynchronous RPC call Error Codes +## Asynchronous RPC call Error Codes -Command | Code | Messages - --- | --- | --- -z_sendmany
| -8 | RPC_INVALID_PARAMETER, (Invalid, missing or duplicate parameter)

- "Minconf cannot be negative"
- "From address parameter missing"
- "No recipients"
- "Memo must be in hexadecimal format"
- "Memo size of __ is too big, maximum allowed is __ "
- "From address does not belong to this node, zaddr spending key not found."
- "Invalid parameter, expected object"
- "Invalid parameter, unknown key: __"
- "expected valid size"
- "expected object"
- "expected hex txid"
- "vout must be positive"
- "duplicated address"
- "amounts array is empty"
- "unknown key"
- "unknown address format"
- "size of memo"
- "amount must be positive"
- "too many zaddr outputs"
- "expected memo data in hexadecimal format"
- "size of memo is larger than maximum allowed __ "
- "Minimum number of confirmations cannot be less than 0" -z_sendmany
| -5 | RPC_INVALID_ADDRESS_OR_KEY, (Invalid address or key)

-"Invalid from address, no spending key found for zaddr"
- "Invalid output address, not a valid taddr."
- "Invalid from address, should be a taddr or zaddr."
- "From address does not belong to this node, zaddr spending key not found." -z_sendmany
| -6 | RPC_WALLET_INSUFFICIENT_FUNDS, (Not enough funds in wallet or account)

- "Insufficient funds, no UTXOs found for taddr from address."
- "Could not find any non-coinbase UTXOs to spend. Coinbase UTXOs can only be sent to a single zaddr recipient."
- "Could not find any non-coinbase UTXOs to spend."
- "Insufficient funds, no unspent notes found for zaddr from address."
- "Insufficient transparent funds, have __, need __ plus fee __"
- "Insufficient protected funds, have __, need __ plus fee __" -z_sendmany
| -4 | RPC_WALLET_ERROR, (unspecified problem with wallet)

- "Could not find previous JoinSplit anchor"
- "Error decrypting output note of previous JoinSplit: __"
- "Could not find witness for note commitment"
- "Witness for note commitment is null"
- "Witness for spendable note does not have same anchor as change input"
- "Not enough funds to pay miners fee"
- "Missing hex data for raw transaction"
- "Missing hex data for signed transaction"
- "Send raw transaction did not return an error or a txid." -z_sendmany
| -16 | RPC_WALLET_ENCRYPTION_FAILED, (Failed to encrypt the wallet)

- "Failed to sign transaction" -z_sendmany
| -12 | RPC_WALLET_KEYPOOL_RAN_OUT, (Keypool ran out, call keypoolrefill first)

- "Could not generate a taddr to use as a change address" +Zcash error codes are defined in https://github.com/zcash/zcash/blob/master/src/rpcprotocol.h + +### z_sendmany error codes + +RPC_INVALID_PARAMETER (-8) | _Invalid, missing or duplicate parameter_ +---------------------------| ------------------------------------------------- +"Minconf cannot be negative" | Cannot accept negative minimum confirmation number. +"Minimum number of confirmations cannot be less than 0" | Cannot accept negative minimum confirmation number. +"From address parameter missing" | Missing an address to send funds from. +"No recipients" | Missing recipient addresses. +"Memo must be in hexadecimal format" | Encrypted memo field data must be in hexadecimal format. +"Memo size of __ is too big, maximum allowed is __ " | Encrypted memo field data exceeds maximum size of 512 bytes. +"From address does not belong to this node, zaddr spending key not found." | Sender address spending key not found. +"Invalid parameter, expected object" | Expected object. +"Invalid parameter, unknown key: __" | Unknown key. +"Invalid parameter, expected valid size" | Invalid size. +"Invalid parameter, expected hex txid" | Invalid txid. +"Invalid parameter, vout must be positive" | Invalid vout. +"Invalid parameter, duplicated address" | Address is duplicated. +"Invalid parameter, amounts array is empty" | Amounts array is empty. +"Invalid parameter, unknown key" | Key not found. +"Invalid parameter, unknown address format" | Unknown address format. +"Invalid parameter, size of memo" | Invalid memo field size. +"Invalid parameter, amount must be positive" | Invalid or negative amount. +"Invalid parameter, too many zaddr outputs" | z_address outputs exceed maximum allowed. +"Invalid parameter, expected memo data in hexadecimal format" | Encrypted memo field is not in hexadecimal format. +"Invalid parameter, size of memo is larger than maximum allowed __ " | Encrypted memo field data exceeds maximum size of 512 bytes. + + +RPC_INVALID_ADDRESS_OR_KEY (-5) | _Invalid address or key_ +--------------------------------| --------------------------- +"Invalid from address, no spending key found for zaddr" | z_address spending key not found. +"Invalid output address, not a valid taddr." | Transparent output address is invalid. +"Invalid from address, should be a taddr or zaddr." | Sender address is invalid. +"From address does not belong to this node, zaddr spending key not found." | Sender address spending key not found. + + +RPC_WALLET_INSUFFICIENT_FUNDS (-6) | _Not enough funds in wallet or account_ +-----------------------------------| ------------------------------------------ +"Insufficient funds, no UTXOs found for taddr from address." | Insufficient funds for sending address. +"Could not find any non-coinbase UTXOs to spend. Coinbase UTXOs can only be sent to a single zaddr recipient." | Must send Coinbase UTXO to a single z_address. +"Could not find any non-coinbase UTXOs to spend." | No available non-coinbase UTXOs. +"Insufficient funds, no unspent notes found for zaddr from address." | Insufficient funds for sending address. +"Insufficient transparent funds, have __, need __ plus fee __" | Insufficient funds from transparent address. +"Insufficient protected funds, have __, need __ plus fee __" | Insufficient funds from shielded address. + +RPC_WALLET_ERROR (-4) | _Unspecified problem with wallet_ +----------------------| ------------------------------------- +"Could not find previous JoinSplit anchor" | Try restarting node with `-reindex`. +"Error decrypting output note of previous JoinSplit: __" | +"Could not find witness for note commitment" | Try restarting node with `-reindex`. +"Witness for note commitment is null" | Missing witness for note commitement. +"Witness for spendable note does not have same anchor as change input" | Invalid anchor for spendable note witness. +"Not enough funds to pay miners fee" | Retry with sufficient funds. +"Missing hex data for raw transaction" | Raw transaction data is null. +"Missing hex data for signed transaction" | Hex value for signed transaction is null. +"Send raw transaction did not return an error or a txid." | + +RPC_WALLET_ENCRYPTION_FAILED (-16) | _Failed to encrypt the wallet_ +-------------------------------------------------------------------------| ------------------------------------- +"Failed to sign transaction" | Transaction was not signed, sign transaction and retry. + +RPC_WALLET_KEYPOOL_RAN_OUT (-12) | _Keypool ran out, call keypoolrefill first_ +-------------------------------------------------------------------------| ----------------------------------------------- +"Could not generate a taddr to use as a change address" | Call keypoolrefill and retry. From de38bfbbed5d4732ffac03f1c4457d9699aeefbb Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 7 Nov 2016 10:29:28 -0800 Subject: [PATCH 053/281] Track the correct change witness across chained joinsplits --- src/wallet/asyncrpcoperation_sendmany.cpp | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index f0facdf6e..79b6d9c5d 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -500,15 +500,23 @@ bool AsyncRPCOperation_sendmany::main_impl() { throw JSONRPCError(RPC_WALLET_ERROR, "Could not find previous JoinSplit anchor"); } + assert(changeOutputIndex != -1); + boost::optional changeWitness; + int n = 0; for (const uint256& commitment : prevJoinSplit.commitments) { tree.append(commitment); - previousCommitments.push_back(commitment); + previousCommitments.push_back(commitment); + if (!changeWitness && changeOutputIndex == n++) { + changeWitness = tree.witness(); + } else if (changeWitness) { + changeWitness.get().append(commitment); + } } - ZCIncrementalWitness changeWitness = tree.witness(); - jsAnchor = changeWitness.root(); - uint256 changeCommitment = prevJoinSplit.commitments[changeOutputIndex]; - intermediates.insert(std::make_pair(tree.root(), tree)); - witnesses.push_back(changeWitness); + if (changeWitness) { + witnesses.push_back(changeWitness); + } + jsAnchor = tree.root(); + intermediates.insert(std::make_pair(tree.root(), tree)); // chained js are interstitial (found in between block boundaries) // Decrypt the change note's ciphertext to retrieve some data we need ZCNoteDecryption decryptor(spendingkey_.viewing_key()); @@ -891,9 +899,7 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( outputMap, info.vpub_old, info.vpub_new, - !this->testmode, - // Temporary fix for #1779 is to disable shuffling of inputs and outputs. - GenIdentity); + !this->testmode); if (!(jsdesc.Verify(*pzcashParams, joinSplitPubKey_))) { throw std::runtime_error("error verifying joinsplit"); From 0afd3687c84389d12acfe3146c4635759ab8579c Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 15 Nov 2016 16:55:25 -0800 Subject: [PATCH 054/281] Closes #1854. z_sendmany selects more utxos to avoid dust change output. --- qa/rpc-tests/wallet_protectcoinbase.py | 9 ++++++++ src/wallet/asyncrpcoperation_sendmany.cpp | 27 ++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index b71a1e6f0..d072c8ce6 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -127,6 +127,15 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): assert_equal(Decimal(resp["private"]), Decimal('9.9998')) assert_equal(Decimal(resp["total"]), Decimal('39.9998')) + # z_sendmany will return an error if there is transparent change output considered dust. + # UTXO selection in z_sendmany sorts in ascending order, so smallest utxos are consumed first. + # At this point in time, unspent notes all have a value of 10.0 and standard z_sendmany fee is 0.0001. + recipients = [] + amount = Decimal('10.0') - Decimal('0.00010000') - Decimal('0.00000001') # this leaves change at 1 zatoshi less than dust threshold + recipients.append({"address":self.nodes[0].getnewaddress(), "amount":amount }) + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid, "failed", "Insufficient transparent funds, have 10.00, need 0.00000545 more to avoid creating invalid change output 0.00000001 (dust threshold is 0.00000546)") + # Send will fail because send amount is too big, even when including coinbase utxos errorString = "" try: diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 79b6d9c5d..9e27b971a 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -215,6 +215,14 @@ bool AsyncRPCOperation_sendmany::main_impl() { CAmount selectedUTXOAmount = 0; bool selectedUTXOCoinbase = false; if (isfromtaddr_) { + // Get dust threshold + CKey secret; + secret.MakeNewKey(true); + CScript scriptPubKey = GetScriptForDestination(secret.GetPubKey().GetID()); + CTxOut out(CAmount(1), scriptPubKey); + CAmount dustThreshold = out.GetDustThreshold(minRelayTxFee); + CAmount dustChange = -1; + std::vector selectedTInputs; for (SendManyInputUTXO & t : t_inputs_) { bool b = std::get<3>(t); @@ -224,9 +232,21 @@ bool AsyncRPCOperation_sendmany::main_impl() { selectedUTXOAmount += std::get<2>(t); selectedTInputs.push_back(t); if (selectedUTXOAmount >= targetAmount) { - break; + // Select another utxo if there is change less than the dust threshold. + dustChange = selectedUTXOAmount - targetAmount; + if (dustChange == 0 || dustChange >= dustThreshold) { + break; + } } } + + // If there is transparent change, is it valid or is it dust? + if (dustChange < dustThreshold && dustChange != 0) { + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, + strprintf("Insufficient transparent funds, have %s, need %s more to avoid creating invalid change output %s (dust threshold is %s)", + FormatMoney(t_inputs_total), FormatMoney(dustThreshold - dustChange), FormatMoney(dustChange), FormatMoney(dustThreshold))); + } + t_inputs_ = selectedTInputs; t_inputs_total = selectedUTXOAmount; @@ -772,6 +792,11 @@ bool AsyncRPCOperation_sendmany::find_utxos(bool fAcceptCoinbase=false) { t_inputs_.push_back(utxo); } + // sort in ascending order, so smaller utxos appear first + std::sort(t_inputs_.begin(), t_inputs_.end(), [](SendManyInputUTXO i, SendManyInputUTXO j) -> bool { + return ( std::get<2>(i) < std::get<2>(j)); + }); + return t_inputs_.size() > 0; } From 000499ae643ab76deca86d33d7619999f3ea198b Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 25 Oct 2016 13:11:41 -0700 Subject: [PATCH 055/281] Add getlocalsolps and getnetworksolps RPC calls, show them in getmininginfo --- src/Makefile.gtest.include | 1 + src/gtest/test_metrics.cpp | 30 +++++++++++++++++++++ src/init.cpp | 3 +++ src/metrics.cpp | 32 +++++++++++++++++----- src/metrics.h | 3 +++ src/rpcmining.cpp | 55 ++++++++++++++++++++++++++++++++++---- src/rpcserver.cpp | 2 ++ src/rpcserver.h | 2 ++ 8 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 src/gtest/test_metrics.cpp diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 3941192b5..589293c9c 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -19,6 +19,7 @@ zcash_gtest_SOURCES = \ gtest/test_keystore.cpp \ gtest/test_noteencryption.cpp \ gtest/test_merkletree.cpp \ + gtest/test_metrics.cpp \ gtest/test_pow.cpp \ gtest/test_random.cpp \ gtest/test_rpc.cpp \ diff --git a/src/gtest/test_metrics.cpp b/src/gtest/test_metrics.cpp new file mode 100644 index 000000000..33c33d4d4 --- /dev/null +++ b/src/gtest/test_metrics.cpp @@ -0,0 +1,30 @@ +#include + +#include "metrics.h" +#include "utiltime.h" + + +TEST(Metrics, GetLocalSolPS) { + SetMockTime(100); + MarkStartTime(); + + // No time has passed + EXPECT_EQ(0, GetLocalSolPS()); + + // Increment time + SetMockTime(101); + EXPECT_EQ(0, GetLocalSolPS()); + + // Increment solutions + solutionTargetChecks.increment(); + EXPECT_EQ(1, GetLocalSolPS()); + + // Increment time + SetMockTime(102); + EXPECT_EQ(0.5, GetLocalSolPS()); + + // Increment solutions + solutionTargetChecks.increment(); + solutionTargetChecks.increment(); + EXPECT_EQ(1.5, GetLocalSolPS()); +} diff --git a/src/init.cpp b/src/init.cpp index 45ee72efb..cd4637f24 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -979,6 +979,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler); threadGroup.create_thread(boost::bind(&TraceThread, "scheduler", serviceLoop)); + // Count uptime + MarkStartTime(); + if ((chainparams.NetworkIDString() != "regtest") && GetBoolArg("-showmetrics", true) && !fPrintToConsole && !GetBoolArg("-daemon", false)) { diff --git a/src/metrics.cpp b/src/metrics.cpp index 4d97312e2..f3cd851f3 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -19,6 +19,7 @@ CCriticalSection cs_metrics; +boost::synchronized_value nNodeStartTime; AtomicCounter transactionsValidated; AtomicCounter ehSolverRuns; AtomicCounter solutionTargetChecks; @@ -39,6 +40,26 @@ void TrackMinedBlock(uint256 hash) trackedBlocks->push_back(hash); } +void MarkStartTime() +{ + *nNodeStartTime = GetTime(); +} + +int64_t GetUptime() +{ + return GetTime() - *nNodeStartTime; +} + +double GetLocalSolPS_INTERNAL(int64_t uptime) +{ + return uptime > 0 ? (double)solutionTargetChecks.get() / uptime : 0; +} + +double GetLocalSolPS() +{ + return GetLocalSolPS_INTERNAL(GetUptime()); +} + static bool metrics_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style) @@ -118,13 +139,13 @@ int printMiningStatus(bool mining) return lines; } -int printMetrics(size_t cols, int64_t nStart, bool mining) +int printMetrics(size_t cols, bool mining) { // Number of lines that are always displayed int lines = 3; // Calculate uptime - int64_t uptime = GetTime() - nStart; + int64_t uptime = GetUptime(); int days = uptime / (24 * 60 * 60); int hours = (uptime - (days * 24 * 60 * 60)) / (60 * 60); int minutes = (uptime - (((days * 24) + hours) * 60 * 60)) / 60; @@ -148,7 +169,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) std::cout << "- " << strprintf(_("You have validated %d transactions!"), transactionsValidated.get()) << std::endl; if (mining && loaded) { - double solps = uptime > 0 ? (double)solutionTargetChecks.get() / uptime : 0; + double solps = GetLocalSolPS_INTERNAL(uptime); std::string strSolps = strprintf("%.4f Sol/s", solps); std::cout << "- " << strprintf(_("You have contributed %s on average to the network solution rate."), strSolps) << std::endl; std::cout << "- " << strprintf(_("You have completed %d Equihash solver runs."), ehSolverRuns.get()) << std::endl; @@ -260,9 +281,6 @@ void ThreadShowMetricsScreen() std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl; std::cout << std::endl; - // Count uptime - int64_t nStart = GetTime(); - while (true) { // Number of lines that are always displayed int lines = 1; @@ -287,7 +305,7 @@ void ThreadShowMetricsScreen() lines += printNetworkStats(); } lines += printMiningStatus(mining); - lines += printMetrics(cols, nStart, mining); + lines += printMetrics(cols, mining); lines += printMessageBox(cols); lines += printInitMessage(); diff --git a/src/metrics.h b/src/metrics.h index 2c5e7bd2c..2851178b6 100644 --- a/src/metrics.h +++ b/src/metrics.h @@ -31,6 +31,9 @@ extern AtomicCounter solutionTargetChecks; void TrackMinedBlock(uint256 hash); +void MarkStartTime(); +double GetLocalSolPS(); + void ConnectMetricsScreen(); void ThreadShowMetricsScreen(); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index d6bd4dd3e..d58e70adc 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -74,19 +74,60 @@ int64_t GetNetworkHashPS(int lookup, int height) { return (int64_t)(workDiff.getdouble() / timeDiff); } -Value getnetworkhashps(const Array& params, bool fHelp) +Value getlocalsolps(const Array& params, bool fHelp) +{ + if (fHelp) + throw runtime_error( + "getlocalsolps\n" + "\nReturns the average local solutions per second since this node was started.\n" + "This is the same information shown on the metrics screen (if enabled).\n" + "\nResult:\n" + "xxx.xxxxx (numeric) Solutions per second average\n" + "\nExamples:\n" + + HelpExampleCli("getlocalsolps", "") + + HelpExampleRpc("getlocalsolps", "") + ); + + LOCK(cs_main); + return GetLocalSolPS(); +} + +Value getnetworksolps(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( - "getnetworkhashps ( blocks height )\n" - "\nReturns the estimated network hashes per second based on the last n blocks.\n" + "getnetworksolps ( blocks height )\n" + "\nReturns the estimated network solutions per second based on the last n blocks.\n" "Pass in [blocks] to override # of blocks, -1 specifies over difficulty averaging window.\n" "Pass in [height] to estimate the network speed at the time when a certain block was found.\n" "\nArguments:\n" "1. blocks (numeric, optional, default=120) The number of blocks, or -1 for blocks over difficulty averaging window.\n" "2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n" "\nResult:\n" - "x (numeric) Hashes per second estimated\n" + "x (numeric) Solutions per second estimated\n" + "\nExamples:\n" + + HelpExampleCli("getnetworksolps", "") + + HelpExampleRpc("getnetworksolps", "") + ); + + LOCK(cs_main); + return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120, params.size() > 1 ? params[1].get_int() : -1); +} + +Value getnetworkhashps(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "getnetworkhashps ( blocks height )\n" + "\nDEPRECATED - left for backwards-compatibility. Use getnetworksolps instead.\n" + "\nReturns the estimated network solutions per second based on the last n blocks.\n" + "Pass in [blocks] to override # of blocks, -1 specifies over difficulty averaging window.\n" + "Pass in [height] to estimate the network speed at the time when a certain block was found.\n" + "\nArguments:\n" + "1. blocks (numeric, optional, default=120) The number of blocks, or -1 for blocks over difficulty averaging window.\n" + "2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n" + "\nResult:\n" + "x (numeric) Solutions per second estimated\n" "\nExamples:\n" + HelpExampleCli("getnetworkhashps", "") + HelpExampleRpc("getnetworkhashps", "") @@ -275,6 +316,8 @@ Value getmininginfo(const Array& params, bool fHelp) " \"errors\": \"...\" (string) Current errors\n" " \"generate\": true|false (boolean) If the generation is on or off (see getgenerate or setgenerate calls)\n" " \"genproclimit\": n (numeric) The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)\n" + " \"localsolps\": xxx.xxxxx (numeric) The average local solution rate in Sol/s since this node was started\n" + " \"networksolps\": x (numeric) The estimated network solution rate in Sol/s\n" " \"pooledtx\": n (numeric) The size of the mem pool\n" " \"testnet\": true|false (boolean) If using testnet or not\n" " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" @@ -294,7 +337,9 @@ Value getmininginfo(const Array& params, bool fHelp) obj.push_back(Pair("difficulty", (double)GetNetworkDifficulty())); obj.push_back(Pair("errors", GetWarnings("statusbar"))); obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1))); - obj.push_back(Pair("networkhashps", getnetworkhashps(params, false))); + obj.push_back(Pair("localsolps" , getlocalsolps(params, false))); + obj.push_back(Pair("networksolps", getnetworksolps(params, false))); + obj.push_back(Pair("networkhashps", getnetworksolps(params, false))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC())); obj.push_back(Pair("chain", Params().NetworkIDString())); diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 0418d7519..e354e91a4 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -304,6 +304,8 @@ static const CRPCCommand vRPCCommands[] = /* Mining */ { "mining", "getblocktemplate", &getblocktemplate, true }, { "mining", "getmininginfo", &getmininginfo, true }, + { "mining", "getlocalsolps", &getlocalsolps, true }, + { "mining", "getnetworksolps", &getnetworksolps, true }, { "mining", "getnetworkhashps", &getnetworkhashps, true }, { "mining", "prioritisetransaction", &prioritisetransaction, true }, { "mining", "submitblock", &submitblock, true }, diff --git a/src/rpcserver.h b/src/rpcserver.h index b8eac08c4..fd53bf116 100644 --- a/src/rpcserver.h +++ b/src/rpcserver.h @@ -169,6 +169,8 @@ extern json_spirit::Value importwallet(const json_spirit::Array& params, bool fH extern json_spirit::Value getgenerate(const json_spirit::Array& params, bool fHelp); // in rpcmining.cpp extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value generate(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getlocalsolps(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getnetworksolps(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value prioritisetransaction(const json_spirit::Array& params, bool fHelp); From 3935f9dae64b42aafea01113a9a77b81bef15924 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Mon, 14 Nov 2016 19:32:12 -0800 Subject: [PATCH 056/281] Release-notes.py script to generate release notes and add contributors to authors.md --- doc/authors.md | 38 ++++++++ doc/release-notes/release-notes-0.11.2.z6.md | 9 +- doc/release-notes/release-notes-0.11.2.z9.md | 22 ++--- doc/release-notes/release-notes-1.0.2.md | 6 +- zcutil/release-notes.py | 99 ++++++++++++++++++++ 5 files changed, 154 insertions(+), 20 deletions(-) create mode 100644 doc/authors.md create mode 100644 zcutil/release-notes.py diff --git a/doc/authors.md b/doc/authors.md new file mode 100644 index 000000000..4f39de07d --- /dev/null +++ b/doc/authors.md @@ -0,0 +1,38 @@ +Zcash Contributors +================== + +Jack Grigg (264) +Simon Liu (191) +Sean Bowe (162) +Taylor Hornby (65) +Daira Hopwood (62) +Kevin Gallagher (38) +Jay Graber (28) +Nathan Wilcox (10) +Wladimir J. van der Laan (9) +Pieter Wuille (8) +Cory Fields (7) +ITH4Coinomia (4) +David Mercer (4) +4ZEC (4) +Patrick Strateman (3) +Paige Peterson (3) +MarcoFalke (3) +Alfie John (3) +aniemerg (2) +Robert C. Seacord (2) +Joe Turgeon (2) +Gregory Maxwell (2) +kazcw (1) +fanquake (1) +Tom Ritter (1) +S. Matthew English (1) +Philip Kaufmann (1) +Louis Nyffenegger (1) +Lars-Magnus Skog (1) +Gaurav Rana (1) +Ethan Heilman (1) +Chirag Davé (1) +Cameron Boehmer (1) +Bryan Stitt (1) +Alex (1) diff --git a/doc/release-notes/release-notes-0.11.2.z6.md b/doc/release-notes/release-notes-0.11.2.z6.md index 6d7aa0c57..5d6054509 100644 --- a/doc/release-notes/release-notes-0.11.2.z6.md +++ b/doc/release-notes/release-notes-0.11.2.z6.md @@ -1,19 +1,18 @@ -Jack Grigg: +Jack Grigg (4): Equihash: Only compare the first n/(k+1) bits when sorting. Randomise the nonce in the block header. Clear mempool before using it for benchmark test, fix parameter name. Fix memory leak in large tx benchmark. -Sean Bowe: +Sean Bowe (5): Increase block size to 2MB and update performance test. Make sigop limit `20000` just as in Bitcoin, ignoring our change to the blocksize limit. Remove the mainnet checkpoints. Fix performance test for block verification. Make `validatelargetx` test more accurate. -Taylor Hornby: +Taylor Hornby (1): Add example mock test of CheckTransaction. -aniemerg: +aniemerg (1): Suppress Libsnark Debugging Info. - diff --git a/doc/release-notes/release-notes-0.11.2.z9.md b/doc/release-notes/release-notes-0.11.2.z9.md index 071712967..3c45b9d9a 100644 --- a/doc/release-notes/release-notes-0.11.2.z9.md +++ b/doc/release-notes/release-notes-0.11.2.z9.md @@ -1,5 +1,4 @@ - -Sean Bowe: +Sean Bowe (6): Change memo field size and relocate `ciphertexts` field of JoinSplit description. Implement zkSNARK compression. Perform curve parameter initialization at start of gtest suite. @@ -7,7 +6,7 @@ Sean Bowe: Enable MONTGOMERY_OUTPUT everywhere. Update proving/verifying keys. -Jack Grigg: +Jack Grigg (11): Add support for spending keys to the basic key store. Merge AddSpendingKeyPaymentAddress into AddSpendingKey to simplify API. Add methods for byte array expansion and compression. @@ -20,7 +19,7 @@ Jack Grigg: Add separate lock for SpendingKey key store operations. Test conversion between solution indices and minimal representation. -Daira Hopwood: +Daira Hopwood (6): Move bigint arithmetic implementations to libsnark. Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH. Change some asserts in equihash.cpp to be static. @@ -28,30 +27,29 @@ Daira Hopwood: Increment version numbers for z9 release. Add these release notes for z9. -Taylor Hornby: +Taylor Hornby (5): Disable hardening when building for coverage reports. Upgrade libsodium for AVX2-detection bugfix. Fix inconsistent optimization flags; single source of truth. Add -fwrapv -fno-strict-aliasing; fix libzcash flags. Use libsodium's s < L check, instead checking that libsodium checks that. -Simon Liu: +Simon Liu (3): Fixes #1193 so that during verification benchmarking it does not unncessarily create thousands of CTransaction objects. Closes #701 by adding documentation about the Payment RPC interface. Add note about zkey and encrypted wallets. -Gaurav Rana: +Gaurav Rana (1): Update zcash-cli stop message. -Tom Ritter: +Tom Ritter (1): Clarify comment about nonce space for Note Encryption. -Robert C. Seacord: +Robert C. Seacord (1): Memory safety and correctness fixes found in NCC audit. -Patrick Strateman (merged by Taylor Hornby): +Patrick Strateman (1): Pull in some DoS mitigations from upstream. (#1258) -Wladimir J. van der Laan: +Wladimir J. van der Laan (1): net: correctly initialize nMinPingUsecTime. - diff --git a/doc/release-notes/release-notes-1.0.2.md b/doc/release-notes/release-notes-1.0.2.md index 2625cb909..1c594f32a 100644 --- a/doc/release-notes/release-notes-1.0.2.md +++ b/doc/release-notes/release-notes-1.0.2.md @@ -5,12 +5,12 @@ ITH4Coinomia (2): S. Matthew English (1): enforcing consistency 'tor' to 'Tor' -Sean Bowe (1): +Sean Bowe (2): Write R1CS output to file in GenerateParams. + 1.0.2 release. -Simon (4): +Simon Liu (4): Fixes #1762 segfault when miner is interrupted. Fixes #1779 so that sending to multiple zaddrs no longer fails. Add GenIdentity, an identity function for MappedShuffle. Add transaction size and zaddr output limit checks to z_sendmany. - diff --git a/zcutil/release-notes.py b/zcutil/release-notes.py new file mode 100644 index 000000000..aa524bacf --- /dev/null +++ b/zcutil/release-notes.py @@ -0,0 +1,99 @@ +import re, sys, os, os.path +import subprocess +import argparse +from itertools import islice +from operator import itemgetter + +author_aliases = { + 'Simon': 'Simon Liu', + 'bitcartel': 'Simon Liu', + 'EthanHeilman': 'Ethan Heilman', +} + +def apply_author_aliases(name): + if name in author_aliases: + return author_aliases[name] + else: + return name + +def parse_authors(line): + commit_search = re.search('(\d+)', line) + if commit_search: + commits = commit_search.group(1) + else: + commits = 0 + name = re.sub(' \(\d+\)|:|\n|\r\n$', '', line) + return name, commits + +def alias_authors_in_release_notes(line): + for key in author_aliases: + if re.match(key, line): + line = line.replace(key, author_aliases[key]) + break + return line + +## Returns dict of {'author': #_of_commits} from a release note +def authors_in_release_notes(filename): + note = os.path.join(doc_dir, 'release-notes', filename) + with open(note, 'r') as f: + authors = {} + line = f.readline() + first_name, commits = parse_authors(line) + authors[apply_author_aliases(first_name)] = commits + for line in f: + if line in ['\n', '\r\n']: + for author in islice(f, 1): + name, commits = parse_authors(author) + authors[apply_author_aliases(name)] = commits + return authors + +## Sums commits made by contributors in each Zcash release note in ./doc/release-notes and writes to authors.md +def document_authors(): + print "Writing contributors documented in release-notes directory to authors.md." + authors_file = os.path.join(doc_dir, 'authors.md') + with open(authors_file, 'w') as f: + f.write('Zcash Contributors\n==================\n\n') + total_contrib = {} + for notes in os.listdir(os.path.join(doc_dir, 'release-notes')): + authors = authors_in_release_notes(notes) + for author in authors: + commits = int(authors[author]) + if author in total_contrib: + total_contrib[author] += commits + else: + total_contrib[author] = commits + sorted_contrib = sorted(total_contrib.items(), key=itemgetter(1, 0), reverse=True) + for n, c in sorted_contrib: + if c != 0: + f.write("{0} ({1})\n".format(n, c)) + +## Writes release note to ./doc/release-notes based on git shortlog when current version number is specified +def generate_release_note(version, filename): + print "Automatically generating release notes for {0} from git shortlog. Should review {1} for accuracy.".format(version, filename) + prev_tag = subprocess.Popen(['git describe --abbrev=0 v{0}^'.format(version)], shell=True, stdout=subprocess.PIPE).communicate()[0].strip() + print "Previous release tag: ", prev_tag + notes = subprocess.Popen(['git shortlog --no-merges {0}..v{1}'.format(prev_tag, version)], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0] + lines = notes.split('\n') + lines = [alias_authors_in_release_notes(line) for line in lines] + release_note = os.path.join(doc_dir, 'release-notes', 'release-notes-{0}.md'.format(version)) + with open(release_note, 'w') as f: + f.writelines('\n'.join(lines)) + +def main(version, filename): + if version != None: + generate_release_note(version, filename) + document_authors() + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('--version') + args = parser.parse_args() + + root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + doc_dir = os.path.join(root_dir, 'doc') + version = None + filename = None + if args.version: + version = args.version + filename = 'release-notes-{0}.md'.format(version) + main(version, filename) From 27c2ccb880995fbe2cd7c66c306ab08f67d3cbf3 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 16 Nov 2016 21:16:29 -0800 Subject: [PATCH 057/281] Partial revert of bd87e8c: file release-notes-1.0.2.md to 343b0d6. --- doc/release-notes/release-notes-1.0.2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/release-notes/release-notes-1.0.2.md b/doc/release-notes/release-notes-1.0.2.md index 1c594f32a..2625cb909 100644 --- a/doc/release-notes/release-notes-1.0.2.md +++ b/doc/release-notes/release-notes-1.0.2.md @@ -5,12 +5,12 @@ ITH4Coinomia (2): S. Matthew English (1): enforcing consistency 'tor' to 'Tor' -Sean Bowe (2): +Sean Bowe (1): Write R1CS output to file in GenerateParams. - 1.0.2 release. -Simon Liu (4): +Simon (4): Fixes #1762 segfault when miner is interrupted. Fixes #1779 so that sending to multiple zaddrs no longer fails. Add GenIdentity, an identity function for MappedShuffle. Add transaction size and zaddr output limit checks to z_sendmany. + From 0fbab55b1b85224f6267b81d74c395acbf35e663 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 17 Nov 2016 19:09:45 +1300 Subject: [PATCH 058/281] Add benchmark for attempting decryption of notes --- qa/zcash/performance-measurements.sh | 11 ++++++++++- src/wallet/rpcwallet.cpp | 5 ++++- src/zcbenchmarks.cpp | 20 ++++++++++++++++++++ src/zcbenchmarks.h | 1 + 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/qa/zcash/performance-measurements.sh b/qa/zcash/performance-measurements.sh index 2e99ab2d6..84d3e4cf3 100755 --- a/qa/zcash/performance-measurements.sh +++ b/qa/zcash/performance-measurements.sh @@ -56,7 +56,7 @@ function zcashd_valgrind_stop { case "$1" in *) case "$2" in - verifyjoinsplit) + verifyjoinsplit|trydecryptnotes) zcashd_start RAWJOINSPLIT=$(zcash_rpc zcsamplejoinsplit) zcashd_stop @@ -88,6 +88,9 @@ case "$1" in validatelargetx) zcash_rpc zcbenchmark validatelargetx 5 ;; + trydecryptnotes) + zcash_rpc zcbenchmark trydecryptnotes 1000 "\"$RAWJOINSPLIT\"" + ;; *) zcashd_stop echo "Bad arguments." @@ -116,6 +119,9 @@ case "$1" in verifyequihash) zcash_rpc zcbenchmark verifyequihash 1 ;; + trydecryptnotes) + zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" + ;; *) zcashd_massif_stop echo "Bad arguments." @@ -145,6 +151,9 @@ case "$1" in verifyequihash) zcash_rpc zcbenchmark verifyequihash 1 ;; + trydecryptnotes) + zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" + ;; *) zcashd_valgrind_stop echo "Bad arguments." diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b10a08efe..d33c35781 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2454,7 +2454,8 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp) JSDescription samplejoinsplit; - if (benchmarktype == "verifyjoinsplit") { + if (benchmarktype == "verifyjoinsplit" || + benchmarktype == "trydecryptnotes") { CDataStream ss(ParseHexV(params[2].get_str(), "js"), SER_NETWORK, PROTOCOL_VERSION); ss >> samplejoinsplit; } @@ -2480,6 +2481,8 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp) sample_times.push_back(benchmark_verify_equihash()); } else if (benchmarktype == "validatelargetx") { sample_times.push_back(benchmark_large_tx()); + } else if (benchmarktype == "trydecryptnotes") { + sample_times.push_back(benchmark_try_decrypt_notes(samplejoinsplit)); } else { throw JSONRPCError(RPC_TYPE_ERROR, "Invalid benchmarktype"); } diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 1d60fdde7..6374141b8 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -223,3 +223,23 @@ double benchmark_large_tx() return timer_stop(tv_start); } +double benchmark_try_decrypt_notes(const JSDescription &joinsplit) +{ + const size_t NUM_ADDRS = 10; + + CWallet wallet; + for (int i = 0; i < NUM_ADDRS; i++) { + auto sk = libzcash::SpendingKey::random(); + wallet.AddSpendingKey(sk); + } + + CMutableTransaction mtx; + mtx.vjoinsplit.push_back(joinsplit); + CTransaction tx(mtx); + + struct timeval tv_start; + timer_start(tv_start); + auto nd = wallet.FindMyNotes(tx); + return timer_stop(tv_start); +} + diff --git a/src/zcbenchmarks.h b/src/zcbenchmarks.h index b81d4a707..9a99783ad 100644 --- a/src/zcbenchmarks.h +++ b/src/zcbenchmarks.h @@ -12,5 +12,6 @@ extern std::vector benchmark_solve_equihash_threaded(int nThreads); extern double benchmark_verify_joinsplit(const JSDescription &joinsplit); extern double benchmark_verify_equihash(); extern double benchmark_large_tx(); +extern double benchmark_try_decrypt_notes(const JSDescription &joinsplit); #endif From 0bb3d40f908bf277d5eaed27e424e9eee86c239c Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 17 Nov 2016 22:26:46 +1300 Subject: [PATCH 059/281] Add benchmark for incrementing note witnesses --- qa/zcash/performance-measurements.sh | 9 ++ src/Makefile.am | 2 + src/Makefile.gtest.include | 5 +- src/utiltest.cpp | 144 +++++++++++++++++++++++++++ src/utiltest.h | 18 ++++ src/wallet/gtest/test_wallet.cpp | 128 +----------------------- src/wallet/rpcwallet.cpp | 3 + src/zcbenchmarks.cpp | 43 ++++++++ src/zcbenchmarks.h | 1 + 9 files changed, 228 insertions(+), 125 deletions(-) create mode 100644 src/utiltest.cpp create mode 100644 src/utiltest.h diff --git a/qa/zcash/performance-measurements.sh b/qa/zcash/performance-measurements.sh index 84d3e4cf3..b65974078 100755 --- a/qa/zcash/performance-measurements.sh +++ b/qa/zcash/performance-measurements.sh @@ -91,6 +91,9 @@ case "$1" in trydecryptnotes) zcash_rpc zcbenchmark trydecryptnotes 1000 "\"$RAWJOINSPLIT\"" ;; + incnotewitnesses) + zcash_rpc zcbenchmark incnotewitnesses 100 "${@:3}" + ;; *) zcashd_stop echo "Bad arguments." @@ -122,6 +125,9 @@ case "$1" in trydecryptnotes) zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" ;; + incnotewitnesses) + zcash_rpc zcbenchmark incnotewitnesses 1 "${@:3}" + ;; *) zcashd_massif_stop echo "Bad arguments." @@ -154,6 +160,9 @@ case "$1" in trydecryptnotes) zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" ;; + incnotewitnesses) + zcash_rpc zcbenchmark incnotewitnesses 1 "${@:3}" + ;; *) zcashd_valgrind_stop echo "Bad arguments." diff --git a/src/Makefile.am b/src/Makefile.am index 8ded268cf..e37510ae4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -232,6 +232,8 @@ libbitcoin_server_a_SOURCES = \ # when wallet enabled libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES) libbitcoin_wallet_a_SOURCES = \ + utiltest.cpp \ + utiltest.h \ zcbenchmarks.cpp \ zcbenchmarks.h \ wallet/asyncrpcoperation_sendmany.cpp \ diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 3941192b5..728d0a7f3 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -27,8 +27,11 @@ zcash_gtest_SOURCES = \ gtest/test_txid.cpp \ gtest/test_libzcash_utils.cpp \ gtest/test_proofs.cpp \ - gtest/test_checkblock.cpp \ + gtest/test_checkblock.cpp +if ENABLE_WALLET +zcash_gtest_SOURCES += \ wallet/gtest/test_wallet.cpp +endif zcash_gtest_CPPFLAGS = -DMULTICORE -fopenmp -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DSTATIC diff --git a/src/utiltest.cpp b/src/utiltest.cpp new file mode 100644 index 000000000..3ebbcf128 --- /dev/null +++ b/src/utiltest.cpp @@ -0,0 +1,144 @@ +// Copyright (c) 2016 The Zcash developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "utiltest.h" + +CWalletTx GetValidReceive(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, CAmount value, + bool randomInputs) { + CMutableTransaction mtx; + mtx.nVersion = 2; // Enable JoinSplits + mtx.vin.resize(2); + if (randomInputs) { + mtx.vin[0].prevout.hash = GetRandHash(); + mtx.vin[1].prevout.hash = GetRandHash(); + } else { + mtx.vin[0].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000001"); + mtx.vin[1].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000002"); + } + mtx.vin[0].prevout.n = 0; + mtx.vin[1].prevout.n = 0; + + // Generate an ephemeral keypair. + uint256 joinSplitPubKey; + unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES]; + crypto_sign_keypair(joinSplitPubKey.begin(), joinSplitPrivKey); + mtx.joinSplitPubKey = joinSplitPubKey; + + boost::array inputs = { + libzcash::JSInput(), // dummy input + libzcash::JSInput() // dummy input + }; + + boost::array outputs = { + libzcash::JSOutput(sk.address(), value), + libzcash::JSOutput(sk.address(), value) + }; + + boost::array output_notes; + + // Prepare JoinSplits + uint256 rt; + JSDescription jsdesc {params, mtx.joinSplitPubKey, rt, + inputs, outputs, 2*value, 0, false}; + mtx.vjoinsplit.push_back(jsdesc); + + // Empty output script. + CScript scriptCode; + CTransaction signTx(mtx); + uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL); + + // Add the signature + assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, + dataToBeSigned.begin(), 32, + joinSplitPrivKey + ) == 0); + + CTransaction tx {mtx}; + CWalletTx wtx {NULL, tx}; + return wtx; +} + +libzcash::Note GetNote(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, + const CTransaction& tx, size_t js, size_t n) { + ZCNoteDecryption decryptor {sk.viewing_key()}; + auto hSig = tx.vjoinsplit[js].h_sig(params, tx.joinSplitPubKey); + auto note_pt = libzcash::NotePlaintext::decrypt( + decryptor, + tx.vjoinsplit[js].ciphertexts[n], + tx.vjoinsplit[js].ephemeralKey, + hSig, + (unsigned char) n); + return note_pt.note(sk.address()); +} + +CWalletTx GetValidSpend(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, + const libzcash::Note& note, CAmount value) { + CMutableTransaction mtx; + mtx.vout.resize(2); + mtx.vout[0].nValue = value; + mtx.vout[1].nValue = 0; + + // Generate an ephemeral keypair. + uint256 joinSplitPubKey; + unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES]; + crypto_sign_keypair(joinSplitPubKey.begin(), joinSplitPrivKey); + mtx.joinSplitPubKey = joinSplitPubKey; + + // Fake tree for the unused witness + ZCIncrementalMerkleTree tree; + + libzcash::JSOutput dummyout; + libzcash::JSInput dummyin; + + { + if (note.value > value) { + libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); + libzcash::PaymentAddress dummyaddr = dummykey.address(); + dummyout = libzcash::JSOutput(dummyaddr, note.value - value); + } else if (note.value < value) { + libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); + libzcash::PaymentAddress dummyaddr = dummykey.address(); + libzcash::Note dummynote(dummyaddr.a_pk, (value - note.value), uint256(), uint256()); + tree.append(dummynote.cm()); + dummyin = libzcash::JSInput(tree.witness(), dummynote, dummykey); + } + } + + tree.append(note.cm()); + + boost::array inputs = { + libzcash::JSInput(tree.witness(), note, sk), + dummyin + }; + + boost::array outputs = { + dummyout, // dummy output + libzcash::JSOutput() // dummy output + }; + + boost::array output_notes; + + // Prepare JoinSplits + uint256 rt = tree.root(); + JSDescription jsdesc {params, mtx.joinSplitPubKey, rt, + inputs, outputs, 0, value, false}; + mtx.vjoinsplit.push_back(jsdesc); + + // Empty output script. + CScript scriptCode; + CTransaction signTx(mtx); + uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL); + + // Add the signature + assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, + dataToBeSigned.begin(), 32, + joinSplitPrivKey + ) == 0); + CTransaction tx {mtx}; + CWalletTx wtx {NULL, tx}; + return wtx; +} diff --git a/src/utiltest.h b/src/utiltest.h new file mode 100644 index 000000000..8cfa60d06 --- /dev/null +++ b/src/utiltest.h @@ -0,0 +1,18 @@ +// Copyright (c) 2016 The Zcash developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "wallet/wallet.h" +#include "zcash/JoinSplit.hpp" +#include "zcash/Note.hpp" +#include "zcash/NoteEncryption.hpp" + +CWalletTx GetValidReceive(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, CAmount value, + bool randomInputs); +libzcash::Note GetNote(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, + const CTransaction& tx, size_t js, size_t n); +CWalletTx GetValidSpend(ZCJoinSplit& params, + const libzcash::SpendingKey& sk, + const libzcash::Note& note, CAmount value); diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index d30944954..9fdec6bd3 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -6,6 +6,7 @@ #include "chainparams.h" #include "main.h" #include "random.h" +#include "utiltest.h" #include "wallet/wallet.h" #include "zcash/JoinSplit.hpp" #include "zcash/Note.hpp" @@ -65,138 +66,17 @@ public: }; CWalletTx GetValidReceive(const libzcash::SpendingKey& sk, CAmount value, bool randomInputs) { - CMutableTransaction mtx; - mtx.nVersion = 2; // Enable JoinSplits - mtx.vin.resize(2); - if (randomInputs) { - mtx.vin[0].prevout.hash = GetRandHash(); - mtx.vin[1].prevout.hash = GetRandHash(); - } else { - mtx.vin[0].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000001"); - mtx.vin[1].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000002"); - } - mtx.vin[0].prevout.n = 0; - mtx.vin[1].prevout.n = 0; - - // Generate an ephemeral keypair. - uint256 joinSplitPubKey; - unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES]; - crypto_sign_keypair(joinSplitPubKey.begin(), joinSplitPrivKey); - mtx.joinSplitPubKey = joinSplitPubKey; - - boost::array inputs = { - libzcash::JSInput(), // dummy input - libzcash::JSInput() // dummy input - }; - - boost::array outputs = { - libzcash::JSOutput(sk.address(), value), - libzcash::JSOutput(sk.address(), value) - }; - - boost::array output_notes; - - // Prepare JoinSplits - uint256 rt; - JSDescription jsdesc {*params, mtx.joinSplitPubKey, rt, - inputs, outputs, 2*value, 0, false}; - mtx.vjoinsplit.push_back(jsdesc); - - // Empty output script. - CScript scriptCode; - CTransaction signTx(mtx); - uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL); - - // Add the signature - assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, - dataToBeSigned.begin(), 32, - joinSplitPrivKey - ) == 0); - - CTransaction tx {mtx}; - CWalletTx wtx {NULL, tx}; - return wtx; + return GetValidReceive(*params, sk, value, randomInputs); } libzcash::Note GetNote(const libzcash::SpendingKey& sk, const CTransaction& tx, size_t js, size_t n) { - ZCNoteDecryption decryptor {sk.viewing_key()}; - auto hSig = tx.vjoinsplit[js].h_sig(*params, tx.joinSplitPubKey); - auto note_pt = libzcash::NotePlaintext::decrypt( - decryptor, - tx.vjoinsplit[js].ciphertexts[n], - tx.vjoinsplit[js].ephemeralKey, - hSig, - (unsigned char) n); - return note_pt.note(sk.address()); + return GetNote(*params, sk, tx, js, n); } CWalletTx GetValidSpend(const libzcash::SpendingKey& sk, const libzcash::Note& note, CAmount value) { - CMutableTransaction mtx; - mtx.vout.resize(2); - mtx.vout[0].nValue = value; - mtx.vout[1].nValue = 0; - - // Generate an ephemeral keypair. - uint256 joinSplitPubKey; - unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES]; - crypto_sign_keypair(joinSplitPubKey.begin(), joinSplitPrivKey); - mtx.joinSplitPubKey = joinSplitPubKey; - - // Fake tree for the unused witness - ZCIncrementalMerkleTree tree; - - libzcash::JSOutput dummyout; - libzcash::JSInput dummyin; - - { - if (note.value > value) { - libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); - libzcash::PaymentAddress dummyaddr = dummykey.address(); - dummyout = libzcash::JSOutput(dummyaddr, note.value - value); - } else if (note.value < value) { - libzcash::SpendingKey dummykey = libzcash::SpendingKey::random(); - libzcash::PaymentAddress dummyaddr = dummykey.address(); - libzcash::Note dummynote(dummyaddr.a_pk, (value - note.value), uint256(), uint256()); - tree.append(dummynote.cm()); - dummyin = libzcash::JSInput(tree.witness(), dummynote, dummykey); - } - } - - tree.append(note.cm()); - - boost::array inputs = { - libzcash::JSInput(tree.witness(), note, sk), - dummyin - }; - - boost::array outputs = { - dummyout, // dummy output - libzcash::JSOutput() // dummy output - }; - - boost::array output_notes; - - // Prepare JoinSplits - uint256 rt = tree.root(); - JSDescription jsdesc {*params, mtx.joinSplitPubKey, rt, - inputs, outputs, 0, value, false}; - mtx.vjoinsplit.push_back(jsdesc); - - // Empty output script. - CScript scriptCode; - CTransaction signTx(mtx); - uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL); - - // Add the signature - assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, - dataToBeSigned.begin(), 32, - joinSplitPrivKey - ) == 0); - CTransaction tx {mtx}; - CWalletTx wtx {NULL, tx}; - return wtx; + return GetValidSpend(*params, sk, note, value); } TEST(wallet_tests, setup_datadir_location_run_as_first_test) { diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d33c35781..6c1ce2d11 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2483,6 +2483,9 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp) sample_times.push_back(benchmark_large_tx()); } else if (benchmarktype == "trydecryptnotes") { sample_times.push_back(benchmark_try_decrypt_notes(samplejoinsplit)); + } else if (benchmarktype == "incnotewitnesses") { + int nTxs = params[2].get_int(); + sample_times.push_back(benchmark_increment_note_witnesses(nTxs)); } else { throw JSONRPCError(RPC_TYPE_ERROR, "Invalid benchmarktype"); } diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 6374141b8..61afb535d 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -17,6 +17,7 @@ #include "script/sign.h" #include "sodium.h" #include "streams.h" +#include "utiltest.h" #include "wallet/wallet.h" #include "zcbenchmarks.h" @@ -243,3 +244,45 @@ double benchmark_try_decrypt_notes(const JSDescription &joinsplit) return timer_stop(tv_start); } +double benchmark_increment_note_witnesses(size_t nTxs) +{ + CWallet wallet; + ZCIncrementalMerkleTree tree; + + auto sk = libzcash::SpendingKey::random(); + wallet.AddSpendingKey(sk); + + // First block + CBlock block1; + for (int i = 0; i < nTxs; i++) { + auto wtx = GetValidReceive(*pzcashParams, sk, 10, true); + auto note = GetNote(*pzcashParams, sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + block1.vtx.push_back(wtx); + } + CBlockIndex index1(block1); + index1.nHeight = 1; + + // Increment to get transactions witnessed + wallet.ChainTip(&index1, &block1, tree, true); + + // Second block + CBlock block2; + block2.hashPrevBlock = block1.GetHash(); + CBlockIndex index2(block2); + index2.nHeight = 2; + + struct timeval tv_start; + timer_start(tv_start); + wallet.ChainTip(&index2, &block2, tree, true); + return timer_stop(tv_start); +} + diff --git a/src/zcbenchmarks.h b/src/zcbenchmarks.h index 9a99783ad..a1575e500 100644 --- a/src/zcbenchmarks.h +++ b/src/zcbenchmarks.h @@ -13,5 +13,6 @@ extern double benchmark_verify_joinsplit(const JSDescription &joinsplit); extern double benchmark_verify_equihash(); extern double benchmark_large_tx(); extern double benchmark_try_decrypt_notes(const JSDescription &joinsplit); +extern double benchmark_increment_note_witnesses(size_t nTxs); #endif From f398a94766f121900afe94642c2b7917e0d35181 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 16 Nov 2016 14:18:24 -0700 Subject: [PATCH 060/281] Anchors and nullifiers should always be inherited from the parent cache. --- src/coins.cpp | 25 ++---- src/test/coins_tests.cpp | 168 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+), 17 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index d60269962..c861bb81e 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -303,16 +303,12 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, CAnchorsMap::iterator parent_it = cacheAnchors.find(child_it->first); if (parent_it == cacheAnchors.end()) { - if (child_it->second.entered) { - // Parent doesn't have an entry, but child has a new commitment root. + CAnchorsCacheEntry& entry = cacheAnchors[child_it->first]; + entry.entered = child_it->second.entered; + entry.tree = child_it->second.tree; + entry.flags = CAnchorsCacheEntry::DIRTY; - CAnchorsCacheEntry& entry = cacheAnchors[child_it->first]; - entry.entered = true; - entry.tree = child_it->second.tree; - entry.flags = CAnchorsCacheEntry::DIRTY; - - cachedCoinsUsage += memusage::DynamicUsage(entry.tree); - } + cachedCoinsUsage += memusage::DynamicUsage(entry.tree); } else { if (parent_it->second.entered != child_it->second.entered) { // The parent may have removed the entry. @@ -332,14 +328,9 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, CNullifiersMap::iterator parent_it = cacheNullifiers.find(child_it->first); if (parent_it == cacheNullifiers.end()) { - if (child_it->second.entered) { - // Parent doesn't have an entry, but child has a SPENT nullifier. - // Move the spent nullifier up. - - CNullifiersCacheEntry& entry = cacheNullifiers[child_it->first]; - entry.entered = true; - entry.flags = CNullifiersCacheEntry::DIRTY; - } + CNullifiersCacheEntry& entry = cacheNullifiers[child_it->first]; + entry.entered = child_it->second.entered; + entry.flags = CNullifiersCacheEntry::DIRTY; } else { if (parent_it->second.entered != child_it->second.entered) { parent_it->second.entered = child_it->second.entered; diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index 8f626d9ab..b638bccfc 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -166,6 +166,174 @@ uint256 appendRandomCommitment(ZCIncrementalMerkleTree &tree) BOOST_FIXTURE_TEST_SUITE(coins_tests, BasicTestingSetup) +BOOST_AUTO_TEST_CASE(nullifier_regression_test) +{ + // Correct behavior: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert a nullifier into the base. + uint256 nf = GetRandHash(); + cache1.SetNullifier(nf, true); + cache1.Flush(); // Flush to base. + + // Remove the nullifier from cache + cache1.SetNullifier(nf, false); + + // The nullifier now should be `false`. + BOOST_CHECK(!cache1.GetNullifier(nf)); + } + + // Also correct behavior: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert a nullifier into the base. + uint256 nf = GetRandHash(); + cache1.SetNullifier(nf, true); + cache1.Flush(); // Flush to base. + + // Remove the nullifier from cache + cache1.SetNullifier(nf, false); + cache1.Flush(); // Flush to base. + + // The nullifier now should be `false`. + BOOST_CHECK(!cache1.GetNullifier(nf)); + } + + // Works because we bring it from the parent cache: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert a nullifier into the base. + uint256 nf = GetRandHash(); + cache1.SetNullifier(nf, true); + cache1.Flush(); // Empties cache. + + // Create cache on top. + { + // Remove the nullifier. + CCoinsViewCacheTest cache2(&cache1); + BOOST_CHECK(cache2.GetNullifier(nf)); + cache2.SetNullifier(nf, false); + cache2.Flush(); // Empties cache, flushes to cache1. + } + + // The nullifier now should be `false`. + BOOST_CHECK(!cache1.GetNullifier(nf)); + } + + // Was broken: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert a nullifier into the base. + uint256 nf = GetRandHash(); + cache1.SetNullifier(nf, true); + cache1.Flush(); // Empties cache. + + // Create cache on top. + { + // Remove the nullifier. + CCoinsViewCacheTest cache2(&cache1); + cache2.SetNullifier(nf, false); + cache2.Flush(); // Empties cache, flushes to cache1. + } + + // The nullifier now should be `false`. + BOOST_CHECK(!cache1.GetNullifier(nf)); + } +} + +BOOST_AUTO_TEST_CASE(anchor_regression_test) +{ + // Correct behavior: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert anchor into base. + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + cache1.PushAnchor(tree); + cache1.Flush(); + + cache1.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + BOOST_CHECK(cache1.GetBestAnchor() == ZCIncrementalMerkleTree::empty_root()); + BOOST_CHECK(!cache1.GetAnchorAt(tree.root(), tree)); + } + + // Also correct behavior: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert anchor into base. + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + cache1.PushAnchor(tree); + cache1.Flush(); + + cache1.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + cache1.Flush(); + BOOST_CHECK(cache1.GetBestAnchor() == ZCIncrementalMerkleTree::empty_root()); + BOOST_CHECK(!cache1.GetAnchorAt(tree.root(), tree)); + } + + // Works because we bring the anchor in from parent cache. + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert anchor into base. + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + cache1.PushAnchor(tree); + cache1.Flush(); + + { + // Pop anchor. + CCoinsViewCacheTest cache2(&cache1); + BOOST_CHECK(cache2.GetAnchorAt(tree.root(), tree)); + cache2.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + cache2.Flush(); + } + + BOOST_CHECK(cache1.GetBestAnchor() == ZCIncrementalMerkleTree::empty_root()); + BOOST_CHECK(!cache1.GetAnchorAt(tree.root(), tree)); + } + + // Was broken: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Insert anchor into base. + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + cache1.PushAnchor(tree); + cache1.Flush(); + + { + // Pop anchor. + CCoinsViewCacheTest cache2(&cache1); + cache2.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + cache2.Flush(); + } + + BOOST_CHECK(cache1.GetBestAnchor() == ZCIncrementalMerkleTree::empty_root()); + BOOST_CHECK(!cache1.GetAnchorAt(tree.root(), tree)); + } +} + BOOST_AUTO_TEST_CASE(nullifiers_test) { CCoinsViewTest base; From 13e9a639b79855db70b5408eb66f266d4c9e68a5 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 17 Nov 2016 14:33:51 -0800 Subject: [PATCH 061/281] Fix threading issue when initializing public params. --- src/zcash/JoinSplit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index ccc6a6e23..dad15316e 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -5,6 +5,7 @@ #include "zcash/util.h" #include +#include #include #include @@ -24,8 +25,9 @@ namespace libzcash { #include "zcash/circuit/gadget.tcc" +std::once_flag init_public_params_once_flag; + CCriticalSection cs_ParamsIO; -CCriticalSection cs_InitializeParams; CCriticalSection cs_LoadKeys; template @@ -79,9 +81,7 @@ public: ~JoinSplitCircuit() {} static void initialize() { - LOCK(cs_InitializeParams); - - ppzksnark_ppT::init_public_params(); + std::call_once (init_public_params_once_flag, ppzksnark_ppT::init_public_params); } void setProvingKeyPath(std::string path) { From 26fb4db53bc437617752ac1818efd34eec466485 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 17 Nov 2016 15:59:37 -0800 Subject: [PATCH 062/281] 1.0.3 Release --- .gitignore | 1 + README.md | 2 +- configure.ac | 2 +- contrib/DEBIAN/changelog | 6 ++++ contrib/DEBIAN/control | 2 +- contrib/DEBIAN/manpages/zcash-cli.1 | 4 +-- contrib/DEBIAN/manpages/zcashd.1 | 4 +-- contrib/gitian-descriptors/gitian-linux.yml | 2 +- doc/authors.md | 9 +++--- doc/release-notes/release-notes-1.0.3.md | 35 +++++++++++++++++++++ src/clientversion.h | 2 +- 11 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 doc/release-notes/release-notes-1.0.3.md diff --git a/.gitignore b/.gitignore index 370866819..17922996d 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ src/qt/test/moc*.cpp *.a *.pb.cc *.pb.h +.vscode *.log *.trs diff --git a/README.md b/README.md index 87f0be58a..0cc7608b9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Zcash 1.0.2 +Zcash 1.0.3 =========== What is Zcash? diff --git a/configure.ac b/configure.ac index 5eecca536..3a6ce2754 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_REVISION, 2) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) diff --git a/contrib/DEBIAN/changelog b/contrib/DEBIAN/changelog index 42a8d6e32..3b3305c93 100644 --- a/contrib/DEBIAN/changelog +++ b/contrib/DEBIAN/changelog @@ -1,3 +1,9 @@ +zcash (1.0.3) jessie; urgency=medium + + * 1.0.3 release. + + -- Zcash Company Wed, 17 Nov 2016 15:56:00 -0700 + zcash (1.0.2) jessie; urgency=medium * 1.0.2 release. diff --git a/contrib/DEBIAN/control b/contrib/DEBIAN/control index 18d2944eb..4046e372b 100644 --- a/contrib/DEBIAN/control +++ b/contrib/DEBIAN/control @@ -10,7 +10,7 @@ Build-Depends: autoconf, automake, bsdmainutils, build-essential Vcs-Git: https://github.com/zcash/zcash.git Vcs-Browser: https://github.com/zcash/zcash Package: zcash -Version: 1.0.2 +Version: 1.0.3 Architecture: amd64 Depends: libgomp1 Description: An implementation of the "Zerocash" protocol. diff --git a/contrib/DEBIAN/manpages/zcash-cli.1 b/contrib/DEBIAN/manpages/zcash-cli.1 index a277d96ff..01e778a80 100644 --- a/contrib/DEBIAN/manpages/zcash-cli.1 +++ b/contrib/DEBIAN/manpages/zcash-cli.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASH-CLI "1" "November 2016" "Zcash RPC client version v1.0.2" "User Commands" +.TH ZCASH-CLI "1" "November 2016" "Zcash RPC client version v1.0.3" "User Commands" .SH NAME zcash-cli \- RPC client for the Zcash daemon .SH DESCRIPTION -Zcash RPC client version v1.0.2 +Zcash RPC client version v1.0.3 .SS "Usage:" .TP zcash\-cli [options] [params] diff --git a/contrib/DEBIAN/manpages/zcashd.1 b/contrib/DEBIAN/manpages/zcashd.1 index 0578fb83e..9a0362630 100644 --- a/contrib/DEBIAN/manpages/zcashd.1 +++ b/contrib/DEBIAN/manpages/zcashd.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASHD "1" "November 2016" "Zcash Daemon version v1.0.2" "User Commands" +.TH ZCASHD "1" "November 2016" "Zcash Daemon version v1.0.3" "User Commands" .SH NAME zcashd \- Network daemon for interacting with the Zcash blockchain .SH DESCRIPTION -Zcash Daemon version v1.0.2 +Zcash Daemon version v1.0.3 .SS "Usage:" .TP zcashd [options] diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index c1ad20f89..6b83346a7 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "zcash-1.0.2" +name: "zcash-1.0.3" enable_cache: true distro: "debian" suites: diff --git a/doc/authors.md b/doc/authors.md index 4f39de07d..c13e6a499 100644 --- a/doc/authors.md +++ b/doc/authors.md @@ -1,13 +1,13 @@ Zcash Contributors ================== -Jack Grigg (264) -Simon Liu (191) -Sean Bowe (162) +Jack Grigg (269) +Simon Liu (199) +Sean Bowe (168) Taylor Hornby (65) Daira Hopwood (62) Kevin Gallagher (38) -Jay Graber (28) +Jay Graber (32) Nathan Wilcox (10) Wladimir J. van der Laan (9) Pieter Wuille (8) @@ -25,6 +25,7 @@ Joe Turgeon (2) Gregory Maxwell (2) kazcw (1) fanquake (1) +ayleph (1) Tom Ritter (1) S. Matthew English (1) Philip Kaufmann (1) diff --git a/doc/release-notes/release-notes-1.0.3.md b/doc/release-notes/release-notes-1.0.3.md new file mode 100644 index 000000000..ae4e25b25 --- /dev/null +++ b/doc/release-notes/release-notes-1.0.3.md @@ -0,0 +1,35 @@ +Jack Grigg (5): + Add --disable-tests flag to zcutils/build.sh + Correctly set CNoteData::witnessHeight when decrementing witness caches + Copy over CNoteData::witnessHeight when updating wallet tx + Add code comments about CNoteData::witnessHeight + Clear witnessHeight and nWitnessCacheSize in ClearNoteWitnessCache + +Jay Graber (4): + Document z_sendmany error code messages in payment-api.md + s/Bitcoin/Zcash in JSONRPCError + Change format of z_sendmany error code documentation. + Release-notes.py script to generate release notes and add contributors to authors.md + +Sean Bowe (7): + Regression test for constraint system violation. + Improve accuracy of constraint system violation diagnostics. + Add tests for witness `element` and tree `last` methods. Strengthen testing by inserting a different commitment into the tree at each step. + Initialize after profiling messages are suppressed. + Process verification keys to perform online verification. + Add test that `last` and `element` will throw exception when the tree is blank. + Anchors and nullifiers should always be inherited from the parent cache. + +Simon (8): + Closes #1833. Format currency amounts in z_sendmany error message. + Closes #1680, temporary fix for rpc deadlock inherited from upstream. + Set default minrelaytxfee to 1000 zatoshis to match upstream. + Mempool will accept tx with joinsplits and the default z_sendmany fee. + Track the correct change witness across chained joinsplits + Closes #1854. z_sendmany selects more utxos to avoid dust change output. + Partial revert of bd87e8c: file release-notes-1.0.2.md to 343b0d6. + Fix threading issue when initializing public params. + +ayleph (1): + Correct spelling error in z_sendmany error output + diff --git a/src/clientversion.h b/src/clientversion.h index 8b37e94d8..41de19837 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -16,7 +16,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 -#define CLIENT_VERSION_REVISION 2 +#define CLIENT_VERSION_REVISION 3 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build From 3c02477360fb01876cfd1505cde46b2d8938dc5a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 18 Nov 2016 16:17:09 +1300 Subject: [PATCH 063/281] Add -metricsui flag to toggle between persistent screen and rolling metrics Defaults to true if stdout is a TTY, else false. --- src/metrics.cpp | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 4d97312e2..c20ce47d5 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -248,17 +248,22 @@ void ThreadShowMetricsScreen() // Make this thread recognisable as the metrics screen thread RenameThread("zcash-metrics-screen"); - // Clear screen - std::cout << "\e[2J"; + // Determine whether we should render a persistent UI or rolling metrics + bool isScreen = GetBoolArg("-metricsui", isatty(STDOUT_FILENO)); - // Print art - std::cout << METRICS_ART << std::endl; - std::cout << std::endl; + if (isScreen) { + // Clear screen + std::cout << "\e[2J"; - // Thank you text - std::cout << _("Thank you for running a Zcash node!") << std::endl; - std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl; - std::cout << std::endl; + // Print art + std::cout << METRICS_ART << std::endl; + std::cout << std::endl; + + // Thank you text + std::cout << _("Thank you for running a Zcash node!") << std::endl; + std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl; + std::cout << std::endl; + } // Count uptime int64_t nStart = GetTime(); @@ -277,8 +282,10 @@ void ThreadShowMetricsScreen() } } - // Erase below current position - std::cout << "\e[J"; + if (isScreen) { + // Erase below current position + std::cout << "\e[J"; + } // Miner status bool mining = GetBoolArg("-gen", false); @@ -291,13 +298,20 @@ void ThreadShowMetricsScreen() lines += printMessageBox(cols); lines += printInitMessage(); - // Explain how to exit - std::cout << "[" << _("Press Ctrl+C to exit") << "] [" << _("Set 'showmetrics=0' to hide") << "]" << std::endl;; + if (isScreen) { + // Explain how to exit + std::cout << "[" << _("Press Ctrl+C to exit") << "] [" << _("Set 'showmetrics=0' to hide") << "]" << std::endl; + } else { + // Print delineator + std::cout << "----------------" << std::endl; + } boost::this_thread::interruption_point(); MilliSleep(1000); - // Return to the top of the updating section - std::cout << "\e[" << lines << "A"; + if (isScreen) { + // Return to the top of the updating section + std::cout << "\e[" << lines << "A"; + } } } From 83ccbf6b89671803eb2d805b1f86eed387fe4018 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 18 Nov 2016 16:32:21 +1300 Subject: [PATCH 064/281] Add -metricsrefreshtime option --- src/metrics.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index c20ce47d5..285f1f653 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -249,7 +249,9 @@ void ThreadShowMetricsScreen() RenameThread("zcash-metrics-screen"); // Determine whether we should render a persistent UI or rolling metrics - bool isScreen = GetBoolArg("-metricsui", isatty(STDOUT_FILENO)); + bool isTTY = isatty(STDOUT_FILENO); + bool isScreen = GetBoolArg("-metricsui", isTTY); + int64_t nRefresh = GetArg("-metricsrefreshtime", isTTY ? 1 : 600); if (isScreen) { // Clear screen @@ -274,7 +276,7 @@ void ThreadShowMetricsScreen() int cols = 80; // Get current window size - if (isatty(STDOUT_FILENO)) { + if (isTTY) { struct winsize w; w.ws_col = 0; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1 && w.ws_col != 0) { @@ -306,8 +308,11 @@ void ThreadShowMetricsScreen() std::cout << "----------------" << std::endl; } - boost::this_thread::interruption_point(); - MilliSleep(1000); + int64_t nWaitEnd = GetTime() + nRefresh; + while (GetTime() < nWaitEnd) { + boost::this_thread::interruption_point(); + MilliSleep(200); + } if (isScreen) { // Return to the top of the updating section From 57724029da57cdc637dd3e3d1fd16e3f3f640e26 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 18 Nov 2016 16:37:10 +1300 Subject: [PATCH 065/281] Only show metrics by default if stdout is a TTY --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 45ee72efb..44765b235 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -980,7 +980,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) threadGroup.create_thread(boost::bind(&TraceThread, "scheduler", serviceLoop)); if ((chainparams.NetworkIDString() != "regtest") && - GetBoolArg("-showmetrics", true) && + GetBoolArg("-showmetrics", isatty(STDOUT_FILENO)) && !fPrintToConsole && !GetBoolArg("-daemon", false)) { // Start the persistent metrics interface ConnectMetricsScreen(); From 0076a80a8a2bf1e72c3353a18e3b1d1ce0433efb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 18 Nov 2016 16:49:37 +1300 Subject: [PATCH 066/281] Document metrics screen options --- src/init.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 44765b235..b0649920c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -439,9 +439,9 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpcsslprivatekeyfile=", strprintf(_("Server private key (default: %s)"), "server.pem")); strUsage += HelpMessageOpt("-rpcsslciphers=", strprintf(_("Acceptable ciphers (default: %s)"), "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH")); + strUsage += HelpMessageGroup(_("UI Options:")); if (mode == HMM_BITCOIN_QT) { - strUsage += HelpMessageGroup(_("UI Options:")); if (showDebug) { strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", "Allow self signed root certificates (default: 0)"); } @@ -450,6 +450,10 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-min", _("Start minimized")); strUsage += HelpMessageOpt("-rootcertificates=", _("Set SSL root certificates for payment request (default: -system-)")); strUsage += HelpMessageOpt("-splash", _("Show splash screen on startup (default: 1)")); + } else { + strUsage += HelpMessageOpt("-showmetrics", _("Show metrics on stdout (default: 1 if running in a console, 0 otherwise)")); + strUsage += HelpMessageOpt("-metricsui", _("Set to 1 for a persistent metrics screen, 0 for sequential metrics output (default: 1 if running in a console, 0 otherwise)")); + strUsage += HelpMessageOpt("-metricsrefreshtime", strprintf(_("Number of seconds between metrics refreshes (default: %u if running in a console, %u otherwise)"), 1, 600)); } return strUsage; From 4e3ac9b015beb96ebc2f40f2d0a6912434b51997 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 18 Nov 2016 10:26:20 -0800 Subject: [PATCH 067/281] Fix stale comment referencing upstream block interval --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 9c3d6e678..36b265758 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1483,7 +1483,7 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip) } // We define a condition where we should warn the user about as a fork of at least 7 blocks - // with a tip within 72 blocks (+/- 12 hours if no one mines it) of ours + // with a tip within 72 blocks (+/- 3 hours if no one mines it) of ours // We use 7 blocks rather arbitrarily as it represents just under 10% of sustained network // hash rate operating on the fork. // or a chain that is entirely longer than ours and invalid (note that this should be detected by both) From 2f1238bc51957cd69ee55f3a41e19176597a8ea9 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 16 Nov 2016 16:17:46 -0800 Subject: [PATCH 068/281] Add checkpoint at block height 15000 --- src/chainparams.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b6bd2dfa0..d6070d7fe 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -127,11 +127,13 @@ public: checkpointData = (Checkpoints::CCheckpointData) { boost::assign::map_list_of (0, consensus.hashGenesisBlock) - (2500, uint256S("0x00000006dc968f600be11a86cbfbf7feb61c7577f45caced2e82b6d261d19744")), - 1477973071, // * UNIX timestamp of last checkpoint block - 22063, // * total number of transactions between genesis and last checkpoint - // (the tx=... number in the SetBestChain debug.log lines) - 5083 // * estimated number of transactions per day after checkpoint + (2500, uint256S("0x00000006dc968f600be11a86cbfbf7feb61c7577f45caced2e82b6d261d19744")) + (15000, uint256S("0x00000000b6bc56656812a5b8dcad69d6ad4446dec23b5ec456c18641fb5381ba")), + 1479851027, // * UNIX timestamp of last checkpoint block + 110415, // * total number of transactions between genesis and last checkpoint + // (the tx=... number in the SetBestChain debug.log lines) + 4240 // * estimated number of transactions per day after checkpoint + // total number of tx / (checkpoint block height / (24 * 24)) }; // Founders reward script expects a vector of 2-of-3 multisig addresses From 1d2db2765efe77006d67c5ca71a4c0122b9e4af8 Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:14:35 -0600 Subject: [PATCH 069/281] Make command line option to show all debugging consistent with similar options Most people expect a value of 1 to enable all for command line arguments. However to do this for the -debug option you must type "-debug=". This has been changed to allow "-debug=1" as well as "-debug=" to enable all debug logging --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.cpp b/src/util.cpp index 74a714b40..b667acc5e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -217,6 +217,7 @@ bool LogAcceptCategory(const char* category) // if not debugging everything and not debugging specific category, LogPrint does nothing. if (setCategories.count(string("")) == 0 && + setCategories.count(string("1")) == 0 && setCategories.count(string(category)) == 0) return false; } From 73280baaf04a163f4ed160c7827ded789e4b2edd Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:29:59 -0600 Subject: [PATCH 070/281] Update documentation to match the #4219 change --- doc/developer-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 9cac27467..cf836dfbd 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -102,7 +102,7 @@ CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need. If the code is behaving strangely, take a look in the debug.log file in the data directory; error and debugging messages are written there. -The -debug=... command-line option controls debugging; running with just -debug will turn +The -debug=... command-line option controls debugging; running with just -debug or -debug=1 will turn on all categories (and give you a very large debug.log file). The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt From ae31e4563f895140045d143da1b96040dc2d5f85 Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:35:11 -0600 Subject: [PATCH 071/281] Update help message to match the #4219 change --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 45ee72efb..dcb317b7d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -380,7 +380,7 @@ std::string HelpMessage(HelpMessageMode mode) if (mode == HMM_BITCOIN_QT) debugCategories += ", qt"; strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + - _("If is not supplied, output all debugging information.") + _(" can be:") + " " + debugCategories + "."); + _("If is not supplied or if = 1, output all debugging information.") + _(" can be:") + " " + debugCategories + "."); #ifdef ENABLE_WALLET strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0)); strUsage += HelpMessageOpt("-genproclimit=", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1)); From 18f656d2afeac6319aedb2362c4f01807c936ad8 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 29 Nov 2016 18:11:25 +1300 Subject: [PATCH 072/281] Clarify that metrics options are only useful without -daemon and -printtoconsole --- src/init.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index b0649920c..8f8fdfec6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -439,9 +439,9 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpcsslprivatekeyfile=", strprintf(_("Server private key (default: %s)"), "server.pem")); strUsage += HelpMessageOpt("-rpcsslciphers=", strprintf(_("Acceptable ciphers (default: %s)"), "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH")); - strUsage += HelpMessageGroup(_("UI Options:")); if (mode == HMM_BITCOIN_QT) { + strUsage += HelpMessageGroup(_("UI Options:")); if (showDebug) { strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", "Allow self signed root certificates (default: 0)"); } @@ -450,7 +450,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-min", _("Start minimized")); strUsage += HelpMessageOpt("-rootcertificates=", _("Set SSL root certificates for payment request (default: -system-)")); strUsage += HelpMessageOpt("-splash", _("Show splash screen on startup (default: 1)")); - } else { + } else if (mode == HMM_BITCOIND) { + strUsage += HelpMessageGroup(_("Metrics Options (only if -daemon and -printtoconsole are not set):")); strUsage += HelpMessageOpt("-showmetrics", _("Show metrics on stdout (default: 1 if running in a console, 0 otherwise)")); strUsage += HelpMessageOpt("-metricsui", _("Set to 1 for a persistent metrics screen, 0 for sequential metrics output (default: 1 if running in a console, 0 otherwise)")); strUsage += HelpMessageOpt("-metricsrefreshtime", strprintf(_("Number of seconds between metrics refreshes (default: %u if running in a console, %u otherwise)"), 1, 600)); From e2752e1ecabc32f075a5735defa0a7057986d237 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 29 Nov 2016 18:17:28 +1300 Subject: [PATCH 073/281] Increase length of metrics divider --- src/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 285f1f653..796dbda13 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -305,7 +305,7 @@ void ThreadShowMetricsScreen() std::cout << "[" << _("Press Ctrl+C to exit") << "] [" << _("Set 'showmetrics=0' to hide") << "]" << std::endl; } else { // Print delineator - std::cout << "----------------" << std::endl; + std::cout << "----------------------------------------" << std::endl; } int64_t nWaitEnd = GetTime() + nRefresh; From 520ced1405eaa31e88a75bd5f3d4034e65bbde2f Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 23 Nov 2016 11:39:01 -0800 Subject: [PATCH 074/281] Closes #1857. Fixes bug where tx spending only notes had priority of 0. --- qa/rpc-tests/wallet_protectcoinbase.py | 13 +++++++++++- src/coins.cpp | 28 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index d072c8ce6..73357b624 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -23,6 +23,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): self.is_network_split=False self.sync_all() + # Returns txid if operation was a success or None def wait_and_assert_operationid_status(self, myopid, in_status='success', in_errormsg=None): print('waiting for async operation {}'.format(myopid)) opids = [] @@ -30,6 +31,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): timeout = 120 status = None errormsg = None + txid = None for x in xrange(1, timeout): results = self.nodes[0].z_getoperationresult(opids) if len(results)==0: @@ -38,6 +40,8 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): status = results[0]["status"] if status == "failed": errormsg = results[0]['error']['message'] + elif status == "success": + txid = results[0]['result']['txid'] break print('...returned status: {}'.format(status)) assert_equal(in_status, status) @@ -45,6 +49,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): assert(in_errormsg is not None) assert_equal(in_errormsg in errormsg, True) print('...returned error: {}'.format(errormsg)) + return txid def run_test (self): print "Mining blocks..." @@ -116,8 +121,14 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): recipients = [] recipients.append({"address":mytaddr, "amount":Decimal('10.0')}) myopid = self.nodes[0].z_sendmany(myzaddr, recipients) - self.wait_and_assert_operationid_status(myopid) + mytxid = self.wait_and_assert_operationid_status(myopid) + assert(mytxid is not None) self.sync_all() + + # check that priority of the tx sending from a zaddr is not 0 + mempool = self.nodes[0].getrawmempool(True) + assert(Decimal(mempool[mytxid]['startingpriority']) >= Decimal('1000000000000')) + self.nodes[1].generate(1) self.sync_all() diff --git a/src/coins.cpp b/src/coins.cpp index c861bb81e..37b4ac10a 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -6,6 +6,7 @@ #include "memusage.h" #include "random.h" +#include "version.h" #include @@ -433,6 +434,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const { if (tx.IsCoinBase()) return 0.0; + CAmount nTotalIn = 0; double dResult = 0.0; BOOST_FOREACH(const CTxIn& txin, tx.vin) { @@ -441,8 +443,34 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const if (!coins->IsAvailable(txin.prevout.n)) continue; if (coins->nHeight < nHeight) { dResult += coins->vout[txin.prevout.n].nValue * (nHeight-coins->nHeight); + nTotalIn += coins->vout[txin.prevout.n].nValue; } } + + // If a transaction contains a joinsplit, we boost the priority of the transaction. + // Joinsplits do not reveal any information about the value or age of a note, so we + // cannot apply the priority algorithm used for transparent utxos. Instead, we pick a + // very large number and multiply it by the transaction's fee per 1000 bytes of data. + // One trillion, 1000000000000, is equivalent to 1 ZEC utxo * 10000 blocks (~17 days). + if (tx.vjoinsplit.size() > 0) { + unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + nTotalIn += tx.GetJoinSplitValueIn(); + CAmount fee = nTotalIn - tx.GetValueOut(); + CFeeRate feeRate(fee, nTxSize); + CAmount feePerK = feeRate.GetFeePerK(); + + if (feePerK == 0) { + feePerK = 1; + } + + dResult += 1000000000000 * double(feePerK); + // We cast feePerK from int64_t to double because if feePerK is a large number, say + // close to MAX_MONEY, the multiplication operation will result in an integer overflow. + // The variable dResult should never overflow since a 64-bit double in C++ is typically + // a double-precision floating-point number as specified by IEE 754, with a maximum + // value DBL_MAX of 1.79769e+308. + } + return tx.ComputePriority(dResult); } From e2a6161f4a31902e44521d3153d54e86ef4ce609 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 29 Nov 2016 10:01:20 -0800 Subject: [PATCH 075/281] Closes #1901. Increase default settings for the max block size when mining and the amount of space available for priority transactions. --- src/main.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index 64b844db0..66808a57a 100644 --- a/src/main.h +++ b/src/main.h @@ -48,10 +48,10 @@ class CValidationState; struct CNodeStateStats; /** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/ -static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000; +static const unsigned int DEFAULT_BLOCK_MAX_SIZE = MAX_BLOCK_SIZE; static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0; /** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/ -static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000; +static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = DEFAULT_BLOCK_MAX_SIZE / 2; /** Default for accepting alerts from the P2P network. */ static const bool DEFAULT_ALERTS = true; /** Minimum alert priority for enabling safe mode. */ @@ -93,6 +93,10 @@ static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60; /** Maximum length of reject messages. */ static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111; +// Sanity check the magic numbers when we change them +BOOST_STATIC_ASSERT(DEFAULT_BLOCK_MAX_SIZE <= MAX_BLOCK_SIZE); +BOOST_STATIC_ASSERT(DEFAULT_BLOCK_PRIORITY_SIZE <= DEFAULT_BLOCK_MAX_SIZE); + #define equihash_parameters_acceptable(N, K) \ ((CBlockHeader::HEADER_SIZE + equihash_solution_size(N, K))*MAX_HEADERS_RESULTS < \ MAX_PROTOCOL_MESSAGE_LENGTH-1000) From 03f83b9b0d95e07524649b65ed3b37e75a13ac76 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 30 Nov 2016 14:04:37 +1300 Subject: [PATCH 076/281] Write witness caches when writing the best block For steady-state operation, this reduces the average time between wallet disk writes from once per block to once per hour. On -rescan, witness caches are only written out at the end along with the best block, increasing speed while ensuring that on-disk state is kept consistent. Witness caches are now never recreated during a -reindex, on the assumption that the blocks themselves are not changing (the chain is just being reconstructed), and so the witnesses will remain valid. Part of #1749. --- src/init.cpp | 8 +++---- src/primitives/block.h | 4 ++++ src/wallet/gtest/test_wallet.cpp | 40 ++++++++++++++++++++++++-------- src/wallet/wallet.cpp | 17 +++++++------- src/wallet/wallet.h | 17 +++++++++----- 5 files changed, 56 insertions(+), 30 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index dcb317b7d..ee0b27613 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -537,11 +537,6 @@ void ThreadImport(std::vector vImportFiles) RenameThread("zcash-loadblk"); // -reindex if (fReindex) { -#ifdef ENABLE_WALLET - if (pwalletMain) { - pwalletMain->ClearNoteWitnessCache(); - } -#endif CImportingNow imp; int nFile = 0; while (true) { @@ -1379,7 +1374,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) CBlockIndex *pindexRescan = chainActive.Tip(); if (GetBoolArg("-rescan", false)) + { + pwalletMain->ClearNoteWitnessCache(); pindexRescan = chainActive.Genesis(); + } else { CWalletDB walletdb(strWalletFile); diff --git a/src/primitives/block.h b/src/primitives/block.h index 6180fb2ae..6b3f13a86 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -200,6 +200,10 @@ struct CBlockLocator { return vHave.empty(); } + + friend bool operator==(const CBlockLocator& a, const CBlockLocator& b) { + return (a.vHave == b.vHave); + } }; #endif // BITCOIN_PRIMITIVES_BLOCK_H diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index d30944954..0530bdb53 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -5,6 +5,7 @@ #include "base58.h" #include "chainparams.h" #include "main.h" +#include "primitives/block.h" #include "random.h" #include "wallet/wallet.h" #include "zcash/JoinSplit.hpp" @@ -29,9 +30,11 @@ public: MOCK_METHOD2(WriteTx, bool(uint256 hash, const CWalletTx& wtx)); MOCK_METHOD1(WriteWitnessCacheSize, bool(int64_t nWitnessCacheSize)); + MOCK_METHOD1(WriteBestBlock, bool(const CBlockLocator& loc)); }; -template void CWallet::WriteWitnessCache(MockWalletDB& walletdb); +template void CWallet::SetBestChainINTERNAL( + MockWalletDB& walletdb, const CBlockLocator& loc); class TestWallet : public CWallet { public: @@ -53,8 +56,8 @@ public: void DecrementNoteWitnesses(const CBlockIndex* pindex) { CWallet::DecrementNoteWitnesses(pindex); } - void WriteWitnessCache(MockWalletDB& walletdb) { - CWallet::WriteWitnessCache(walletdb); + void SetBestChain(MockWalletDB& walletdb, const CBlockLocator& loc) { + CWallet::SetBestChainINTERNAL(walletdb, loc); } bool UpdatedNoteData(const CWalletTx& wtxIn, CWalletTx& wtx) { return CWallet::UpdatedNoteData(wtxIn, wtx); @@ -918,6 +921,7 @@ TEST(wallet_tests, ClearNoteWitnessCache) { TEST(wallet_tests, WriteWitnessCache) { TestWallet wallet; MockWalletDB walletdb; + CBlockLocator loc; auto sk = libzcash::SpendingKey::random(); wallet.AddSpendingKey(sk); @@ -928,7 +932,7 @@ TEST(wallet_tests, WriteWitnessCache) { // TxnBegin fails EXPECT_CALL(walletdb, TxnBegin()) .WillOnce(Return(false)); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); EXPECT_CALL(walletdb, TxnBegin()) .WillRepeatedly(Return(true)); @@ -937,14 +941,14 @@ TEST(wallet_tests, WriteWitnessCache) { .WillOnce(Return(false)); EXPECT_CALL(walletdb, TxnAbort()) .Times(1); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); // WriteTx throws EXPECT_CALL(walletdb, WriteTx(wtx.GetHash(), wtx)) .WillOnce(ThrowLogicError()); EXPECT_CALL(walletdb, TxnAbort()) .Times(1); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); EXPECT_CALL(walletdb, WriteTx(wtx.GetHash(), wtx)) .WillRepeatedly(Return(true)); @@ -953,26 +957,42 @@ TEST(wallet_tests, WriteWitnessCache) { .WillOnce(Return(false)); EXPECT_CALL(walletdb, TxnAbort()) .Times(1); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); // WriteWitnessCacheSize throws EXPECT_CALL(walletdb, WriteWitnessCacheSize(0)) .WillOnce(ThrowLogicError()); EXPECT_CALL(walletdb, TxnAbort()) .Times(1); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); EXPECT_CALL(walletdb, WriteWitnessCacheSize(0)) .WillRepeatedly(Return(true)); + // WriteBestBlock fails + EXPECT_CALL(walletdb, WriteBestBlock(loc)) + .WillOnce(Return(false)); + EXPECT_CALL(walletdb, TxnAbort()) + .Times(1); + wallet.SetBestChain(walletdb, loc); + + // WriteBestBlock throws + EXPECT_CALL(walletdb, WriteBestBlock(loc)) + .WillOnce(ThrowLogicError()); + EXPECT_CALL(walletdb, TxnAbort()) + .Times(1); + wallet.SetBestChain(walletdb, loc); + EXPECT_CALL(walletdb, WriteBestBlock(loc)) + .WillRepeatedly(Return(true)); + // TxCommit fails EXPECT_CALL(walletdb, TxnCommit()) .WillOnce(Return(false)); - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); EXPECT_CALL(walletdb, TxnCommit()) .WillRepeatedly(Return(true)); // Everything succeeds - wallet.WriteWitnessCache(walletdb); + wallet.SetBestChain(walletdb, loc); } TEST(wallet_tests, UpdateNullifierNoteMap) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 51ed76f3a..c9dac701d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -380,7 +380,7 @@ void CWallet::ChainTip(const CBlockIndex *pindex, const CBlock *pblock, void CWallet::SetBestChain(const CBlockLocator& loc) { CWalletDB walletdb(strWalletFile); - walletdb.WriteBestBlock(loc); + SetBestChainINTERNAL(walletdb, loc); } bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) @@ -741,10 +741,9 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } - if (fFileBacked) { - CWalletDB walletdb(strWalletFile); - WriteWitnessCache(walletdb); - } + // For performance reasons, we write out the witness cache in + // CWallet::SetBestChain() (which also ensures that overall consistency + // of the wallet.dat is maintained). } } @@ -779,10 +778,10 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } // TODO: If nWitnessCache is zero, we need to regenerate the caches (#1302) assert(nWitnessCacheSize > 0); - if (fFileBacked) { - CWalletDB walletdb(strWalletFile); - WriteWitnessCache(walletdb); - } + + // For performance reasons, we write out the witness cache in + // CWallet::SetBestChain() (which also ensures that overall consistency + // of the wallet.dat is maintained). } } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 85f960eb1..cc0197f14 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -636,35 +636,40 @@ protected: void DecrementNoteWitnesses(const CBlockIndex* pindex); template - void WriteWitnessCache(WalletDB& walletdb) { + void SetBestChainINTERNAL(WalletDB& walletdb, const CBlockLocator& loc) { if (!walletdb.TxnBegin()) { // This needs to be done atomically, so don't do it at all - LogPrintf("WriteWitnessCache(): Couldn't start atomic write\n"); + LogPrintf("SetBestChain(): Couldn't start atomic write\n"); return; } try { for (std::pair& wtxItem : mapWallet) { if (!walletdb.WriteTx(wtxItem.first, wtxItem.second)) { - LogPrintf("WriteWitnessCache(): Failed to write CWalletTx, aborting atomic write\n"); + LogPrintf("SetBestChain(): Failed to write CWalletTx, aborting atomic write\n"); walletdb.TxnAbort(); return; } } if (!walletdb.WriteWitnessCacheSize(nWitnessCacheSize)) { - LogPrintf("WriteWitnessCache(): Failed to write nWitnessCacheSize, aborting atomic write\n"); + LogPrintf("SetBestChain(): Failed to write nWitnessCacheSize, aborting atomic write\n"); + walletdb.TxnAbort(); + return; + } + if (!walletdb.WriteBestBlock(loc)) { + LogPrintf("SetBestChain(): Failed to write best block, aborting atomic write\n"); walletdb.TxnAbort(); return; } } catch (const std::exception &exc) { // Unexpected failure - LogPrintf("WriteWitnessCache(): Unexpected error during atomic write:\n"); + LogPrintf("SetBestChain(): Unexpected error during atomic write:\n"); LogPrintf("%s\n", exc.what()); walletdb.TxnAbort(); return; } if (!walletdb.TxnCommit()) { // Couldn't commit all to db, but in-memory state is fine - LogPrintf("WriteWitnessCache(): Couldn't commit atomic write\n"); + LogPrintf("SetBestChain(): Couldn't commit atomic write\n"); return; } } From b8e72ced23a3ec7c7e3676b8ba95852a3afa6098 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 11 Nov 2016 01:10:53 -0500 Subject: [PATCH 077/281] Add porter dev overrides for CC, CXX, MAKE, BUILD, HOST --- zcutil/build.sh | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/zcutil/build.sh b/zcutil/build.sh index c10be652f..c4823ed61 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -1,7 +1,30 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu -o pipefail +# Allow user overrides to $MAKE. Typical usage for users who need it: +# MAKE=gmake ./zcutil/build.sh -j$(nproc) +if [[ -z "${MAKE-}" ]]; then + MAKE=make +fi + +# Allow overrides to $BUILD and $HOST for porters. Most users will not need it. +# BUILD=i686-pc-linux-gnu ./zcutil/build.sh +if [[ -z "${BUILD-}" ]]; then + BUILD=x86_64-unknown-linux-gnu +fi +if [[ -z "${HOST-}" ]]; then + HOST=x86_64-unknown-linux-gnu +fi + +# Allow override to $CC and $CXX for porters. Most users will not need it. +if [[ -z "${CC-}" ]]; then + CC=gcc +fi +if [[ -z "${CXX-}" ]]; then + CXX=g++ +fi + if [ "x$*" = 'x--help' ] then cat < Date: Thu, 1 Dec 2016 01:12:59 +1300 Subject: [PATCH 078/281] Apply miniupnpc patches to enable compilation on Solaris 11 These can be removed after the next MiniUPnP release. Closes #1835. --- depends/packages/miniupnpc.mk | 5 ++- .../miniupnpc/fix-solaris-compilation.patch | 42 +++++++++++++++++++ .../miniupnpc/strlen-before-memcmp.patch | 23 ++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 depends/patches/miniupnpc/fix-solaris-compilation.patch create mode 100644 depends/patches/miniupnpc/strlen-before-memcmp.patch diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 90870ca11..f775d7462 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -3,6 +3,7 @@ $(package)_version=2.0 $(package)_download_path=http://miniupnp.free.fr/files $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=d434ceb8986efbe199c5ca53f90ed53eab290b1e6d0530b717eb6fa49d61f93b +$(package)_patches=fix-solaris-compilation.patch strlen-before-memcmp.patch define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" @@ -14,7 +15,9 @@ endef define $(package)_preprocess_cmds mkdir dll && \ sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \ - sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw + sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw && \ + patch -p2 < $($(package)_patch_dir)/fix-solaris-compilation.patch && \ + patch -p2 < $($(package)_patch_dir)/strlen-before-memcmp.patch endef define $(package)_build_cmds diff --git a/depends/patches/miniupnpc/fix-solaris-compilation.patch b/depends/patches/miniupnpc/fix-solaris-compilation.patch new file mode 100644 index 000000000..30eb3b106 --- /dev/null +++ b/depends/patches/miniupnpc/fix-solaris-compilation.patch @@ -0,0 +1,42 @@ +From 71ce1d6dfa5424f8fe8633e23494c7638ea2c79e Mon Sep 17 00:00:00 2001 +From: Thomas Bernard +Date: Thu, 10 Nov 2016 21:55:33 +0100 +Subject: [PATCH] fix for Solaris 11 compilation + +see #216 +--- + miniupnpc/Makefile | 2 ++ + miniupnpc/minissdpc.c | 3 +++ + 2 files changed, 5 insertions(+) + +diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile +index 5c23000..72cdc0f 100644 +--- a/miniupnpc/Makefile ++++ b/miniupnpc/Makefile +@@ -43,10 +43,12 @@ CFLAGS += -D_NETBSD_SOURCE + endif + ifneq ($(OS), FreeBSD) + ifneq ($(OS), Darwin) ++ifneq ($(OS), SunOS) + #CFLAGS += -D_POSIX_C_SOURCE=200112L + CFLAGS += -D_XOPEN_SOURCE=600 + endif + endif ++endif + #CFLAGS += -ansi + # -DNO_GETADDRINFO + INSTALL = install +diff --git a/miniupnpc/minissdpc.c b/miniupnpc/minissdpc.c +index f200f07..263160e 100644 +--- a/miniupnpc/minissdpc.c ++++ b/miniupnpc/minissdpc.c +@@ -73,6 +73,9 @@ struct sockaddr_un { + + #if !defined(HAS_IP_MREQN) && !defined(_WIN32) + #include ++#if defined(__sun) ++#include ++#endif + #endif + + #if defined(HAS_IP_MREQN) && defined(NEED_STRUCT_IP_MREQN) diff --git a/depends/patches/miniupnpc/strlen-before-memcmp.patch b/depends/patches/miniupnpc/strlen-before-memcmp.patch new file mode 100644 index 000000000..8e1f2005e --- /dev/null +++ b/depends/patches/miniupnpc/strlen-before-memcmp.patch @@ -0,0 +1,23 @@ +From ec1c49bb0cd5e448e6f0adee7de3a831c4869bdd Mon Sep 17 00:00:00 2001 +From: Thomas Bernard +Date: Fri, 11 Nov 2016 17:24:39 +0100 +Subject: [PATCH] check strlen before memcmp + +1st try to fix #220 +--- + miniupnpc/portlistingparse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/miniupnpc/portlistingparse.c b/miniupnpc/portlistingparse.c +index 0e09278..1bed763 100644 +--- a/miniupnpc/portlistingparse.c ++++ b/miniupnpc/portlistingparse.c +@@ -55,7 +55,7 @@ startelt(void * d, const char * name, int l) + pdata->curelt = PortMappingEltNone; + for(i = 0; elements[i].str; i++) + { +- if(memcmp(name, elements[i].str, l) == 0) ++ if(strlen(elements[i].str) == l && memcmp(name, elements[i].str, l) == 0) + { + pdata->curelt = elements[i].code; + break; From af53da0225a7f14e6412ed2bb25c139fb44141ed Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 30 Nov 2016 14:18:29 -0800 Subject: [PATCH 079/281] Closes #1903. Add fee parameter to z_sendmany. --- doc/payment-api.md | 2 +- qa/rpc-tests/wallet_protectcoinbase.py | 31 +++++++++++++++++++++-- src/rpcclient.cpp | 1 + src/test/rpc_wallet_tests.cpp | 23 ++++++++++++++++- src/wallet/asyncrpcoperation_sendmany.cpp | 11 +++++--- src/wallet/asyncrpcoperation_sendmany.h | 5 ++-- src/wallet/rpcwallet.cpp | 21 ++++++++++++--- 7 files changed, 81 insertions(+), 13 deletions(-) diff --git a/doc/payment-api.md b/doc/payment-api.md index 7435acf81..ccbb5725c 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -71,7 +71,7 @@ z_importwallet | filename | _Requires an unlocked wallet or an unencrypted walle Command | Parameters | Description --- | --- | --- z_listreceivedbyaddress
| zaddr [minconf=1] | Return a list of amounts received by a zaddr belonging to the node’s wallet.

Optionally set the minimum number of confirmations which a received amount must have in order to be included in the result. Use 0 to count unconfirmed transactions.

Output:
[{
“txid”: “4a0f…”,
“amount”: 0.54,
“memo”:”F0FF…”,}, {...}, {...}
] -z_sendmany
| fromaddress amounts [minconf=1] | _This is an Asynchronous RPC call_

Send funds from an address to multiple outputs. The address can be either a taddr or a zaddr.

Amounts is a list containing key/value pairs corresponding to the addresses and amount to pay. Each output address can be in taddr or zaddr format.

When sending to a zaddr, you also have the option of attaching a memo in hexadecimal format.

**NOTE:**When sending coinbase funds to a zaddr, the node's wallet does not allow any change. Put another way, spending a partial amount of a coinbase utxo is not allowed. This is not a consensus rule but a local wallet rule due to the current implementation of z_sendmany. In future, this rule may be removed.

Example of Outputs parameter:
[{“address”:”t123…”, “amount”:0.005},
,{“address”:”z010…”,”amount”:0.03, “memo”:”f508af…”}]

Optionally set the minimum number of confirmations which a private or transparent transaction must have in order to be used as an input.

The transaction fee will be determined by the node’s wallet. Any transparent change will be sent to a new transparent address. Any private change will be sent back to the zaddr being used as the source of funds.

Returns an operationid. You use the operationid value with z_getoperationstatus and z_getoperationresult to obtain the result of sending funds, which if successful, will be a txid. +z_sendmany
| fromaddress amounts [minconf=1] [fee=0.0001] | _This is an Asynchronous RPC call_

Send funds from an address to multiple outputs. The address can be either a taddr or a zaddr.

Amounts is a list containing key/value pairs corresponding to the addresses and amount to pay. Each output address can be in taddr or zaddr format.

When sending to a zaddr, you also have the option of attaching a memo in hexadecimal format.

**NOTE:**When sending coinbase funds to a zaddr, the node's wallet does not allow any change. Put another way, spending a partial amount of a coinbase utxo is not allowed. This is not a consensus rule but a local wallet rule due to the current implementation of z_sendmany. In future, this rule may be removed.

Example of Outputs parameter:
[{“address”:”t123…”, “amount”:0.005},
,{“address”:”z010…”,”amount”:0.03, “memo”:”f508af…”}]

Optionally set the minimum number of confirmations which a private or transparent transaction must have in order to be used as an input.

Optionally set a transaction fee, which by default is 0.0001 ZEC.

Any transparent change will be sent to a new transparent address. Any private change will be sent back to the zaddr being used as the source of funds.

Returns an operationid. You use the operationid value with z_getoperationstatus and z_getoperationresult to obtain the result of sending funds, which if successful, will be a txid. ### Operations diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index d072c8ce6..4073a7181 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -190,6 +190,27 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): node2balance = amount_per_recipient * num_t_recipients assert_equal(self.nodes[2].getbalance(), node2balance) + # Send will fail because fee is negative + try: + self.nodes[0].z_sendmany(myzaddr, recipients, 1, -1) + except JSONRPCException,e: + errorString = e.error['message'] + assert_equal("Invalid amount" in errorString, True) + + # Send will fail because fee is larger than MAX_MONEY + try: + self.nodes[0].z_sendmany(myzaddr, recipients, 1, Decimal('21000000.00000001')) + except JSONRPCException,e: + errorString = e.error['message'] + assert_equal("Invalid amount" in errorString, True) + + # Send will fail because fee is larger than sum of outputs + try: + self.nodes[0].z_sendmany(myzaddr, recipients, 1, (amount_per_recipient * num_t_recipients) + Decimal('0.00000001')) + except JSONRPCException,e: + errorString = e.error['message'] + assert_equal("is greater than the sum of outputs" in errorString, True) + # Send will succeed because the balance of non-coinbase utxos is 10.0 try: self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 9) @@ -208,10 +229,14 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): recipients = [] num_recipients = 3 amount_per_recipient = Decimal('0.002') + minconf = 1 + send_amount = num_recipients * amount_per_recipient + custom_fee = Decimal('0.00012345') + zbalance = self.nodes[0].z_getbalance(myzaddr) for i in xrange(0,num_recipients): newzaddr = self.nodes[2].z_getnewaddress() recipients.append({"address":newzaddr, "amount":amount_per_recipient}) - myopid = self.nodes[0].z_sendmany(myzaddr, recipients) + myopid = self.nodes[0].z_sendmany(myzaddr, recipients, minconf, custom_fee) self.wait_and_assert_operationid_status(myopid) self.sync_all() self.nodes[1].generate(1) @@ -219,7 +244,9 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): # check balances resp = self.nodes[2].z_gettotalbalance() - assert_equal(Decimal(resp["private"]), num_recipients * amount_per_recipient) + assert_equal(Decimal(resp["private"]), send_amount) + resp = self.nodes[0].z_getbalance(myzaddr) + assert_equal(Decimal(resp), zbalance - custom_fee - send_amount) if __name__ == '__main__': WalletProtectCoinbaseTest().main() diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index 2841a3793..b482a8eb9 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -103,6 +103,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "z_gettotalbalance", 0}, { "z_sendmany", 1}, { "z_sendmany", 2}, + { "z_sendmany", 3}, { "z_getoperationstatus", 0}, { "z_getoperationresult", 0}, { "z_importkey", 1 } diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index 2eaeb7e61..8471ebebc 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -820,7 +820,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_parameters) BOOST_CHECK_THROW(CallRPC("z_sendmany"), runtime_error); BOOST_CHECK_THROW(CallRPC("z_sendmany toofewargs"), runtime_error); - BOOST_CHECK_THROW(CallRPC("z_sendmany too many args here"), runtime_error); + BOOST_CHECK_THROW(CallRPC("z_sendmany just too many args here"), runtime_error); // bad from address BOOST_CHECK_THROW(CallRPC("z_sendmany " @@ -841,6 +841,27 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_parameters) " {\"address\":\"tmQP9L3s31cLsghVYf2Jb5MhKj1jRBPoeQn\", \"amount\":12.0} ]" ), runtime_error); + // invalid fee amount, cannot be negative + BOOST_CHECK_THROW(CallRPC("z_sendmany " + "tmRr6yJonqGK23UVhrKuyvTpF8qxQQjKigJ " + "[{\"address\":\"tmQP9L3s31cLsghVYf2Jb5MhKj1jRBPoeQn\", \"amount\":50.0}] " + "1 -0.0001" + ), runtime_error); + + // invalid fee amount, bigger than MAX_MONEY + BOOST_CHECK_THROW(CallRPC("z_sendmany " + "tmRr6yJonqGK23UVhrKuyvTpF8qxQQjKigJ " + "[{\"address\":\"tmQP9L3s31cLsghVYf2Jb5MhKj1jRBPoeQn\", \"amount\":50.0}] " + "1 21000001" + ), runtime_error); + + // fee amount is bigger than sum of outputs + BOOST_CHECK_THROW(CallRPC("z_sendmany " + "tmRr6yJonqGK23UVhrKuyvTpF8qxQQjKigJ " + "[{\"address\":\"tmQP9L3s31cLsghVYf2Jb5MhKj1jRBPoeQn\", \"amount\":50.0}] " + "1 50.00000001" + ), runtime_error); + // memo bigger than allowed length of ZC_MEMO_SIZE std::vector v (2 * (ZC_MEMO_SIZE+1)); // x2 for hexadecimal string format std::fill(v.begin(),v.end(), 'A'); diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 9e27b971a..c416a146c 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -50,9 +50,12 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany( std::string fromAddress, std::vector tOutputs, std::vector zOutputs, - int minDepth) : - fromaddress_(fromAddress), t_outputs_(tOutputs), z_outputs_(zOutputs), mindepth_(minDepth) + int minDepth, + CAmount fee) : + fromaddress_(fromAddress), t_outputs_(tOutputs), z_outputs_(zOutputs), mindepth_(minDepth), fee_(fee) { + assert(fee_ > 0); + if (minDepth < 0) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Minconf cannot be negative"); } @@ -147,8 +150,8 @@ bool AsyncRPCOperation_sendmany::main_impl() { bool isSingleZaddrOutput = (t_outputs_.size()==0 && z_outputs_.size()==1); bool isMultipleZaddrOutput = (t_outputs_.size()==0 && z_outputs_.size()>=1); bool isPureTaddrOnlyTx = (isfromtaddr_ && z_outputs_.size() == 0); - CAmount minersFee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE; - + CAmount minersFee = fee_; + // When spending coinbase utxos, you can only specify a single zaddr as the change must go somewhere // and if there are multiple zaddrs, we don't know where to send it. if (isfromtaddr_) { diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index df9c3d8d2..1f8659658 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -16,7 +16,7 @@ #include -// TODO: Compute fee based on a heuristic, e.g. (num tx output * dust threshold) + joinsplit bytes * ? +// Default transaction fee if caller does not specify one. #define ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE 10000 using namespace libzcash; @@ -43,7 +43,7 @@ struct AsyncJoinSplitInfo class AsyncRPCOperation_sendmany : public AsyncRPCOperation { public: - AsyncRPCOperation_sendmany(std::string fromAddress, std::vector tOutputs, std::vector zOutputs, int minDepth); + AsyncRPCOperation_sendmany(std::string fromAddress, std::vector tOutputs, std::vector zOutputs, int minDepth, CAmount fee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE); virtual ~AsyncRPCOperation_sendmany(); // We don't want to be copied or moved around @@ -59,6 +59,7 @@ public: private: friend class TEST_FRIEND_AsyncRPCOperation_sendmany; // class for unit testing + CAmount fee_; int mindepth_; std::string fromaddress_; bool isfromtaddr_; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b10a08efe..3cc75daa5 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3182,9 +3182,9 @@ Value z_sendmany(const Array& params, bool fHelp) if (!EnsureWalletIsAvailable(fHelp)) return Value::null; - if (fHelp || params.size() < 2 || params.size() > 3) + if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( - "z_sendmany \"fromaddress\" [{\"address\":... ,\"amount\":...},...] ( minconf )\n" + "z_sendmany \"fromaddress\" [{\"address\":... ,\"amount\":...},...] ( minconf ) ( fee )\n" "\nSend multiple times. Amounts are double-precision floating point numbers." "\nChange from a taddr flows to a new taddr address, while change from zaddr returns to itself." "\nWhen sending coinbase UTXOs to a zaddr, change is not allowed. The entire value of the UTXO(s) must be consumed." @@ -3199,6 +3199,8 @@ Value z_sendmany(const Array& params, bool fHelp) " \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n" " }, ... ]\n" "3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n" + "4. fee (numeric, optional, default=" + + strprintf("%s", FormatMoney(ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE)) + ") The fee amount to attach to this transaction.\n" "\nResult:\n" "\"operationid\" (string) An operationid to pass to z_getoperationstatus to get the result of the operation.\n" ); @@ -3239,6 +3241,7 @@ Value z_sendmany(const Array& params, bool fHelp) // Recipients std::vector taddrRecipients; std::vector zaddrRecipients; + CAmount nTotalOut = 0; BOOST_FOREACH(Value& output, outputs) { @@ -3294,6 +3297,8 @@ Value z_sendmany(const Array& params, bool fHelp) } else { taddrRecipients.push_back( SendManyRecipient(address, nAmount, memo) ); } + + nTotalOut += nAmount; } // Check the number of zaddr outputs does not exceed the limit. @@ -3329,9 +3334,19 @@ Value z_sendmany(const Array& params, bool fHelp) throw JSONRPCError(RPC_INVALID_PARAMETER, "Minimum number of confirmations cannot be less than 0"); } + // Fee in Zatoshis, not currency format) + CAmount nFee = ASYNC_RPC_OPERATION_DEFAULT_MINERS_FEE; + if (params.size() > 3) { + nFee = AmountFromValue( params[3] ); + // Check that the user specified fee is sane. + if (nFee > nTotalOut) { + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Fee %s is greater than the sum of outputs %s", FormatMoney(nFee), FormatMoney(nTotalOut))); + } + } + // Create operation and add to global queue std::shared_ptr q = getAsyncRPCQueue(); - std::shared_ptr operation( new AsyncRPCOperation_sendmany(fromaddress, taddrRecipients, zaddrRecipients, nMinDepth) ); + std::shared_ptr operation( new AsyncRPCOperation_sendmany(fromaddress, taddrRecipients, zaddrRecipients, nMinDepth, nFee) ); q->addOperation(operation); AsyncRPCOperationId operationId = operation->getId(); return operationId; From bebec253138d43ea66760b538667a712d260d8db Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 1 Dec 2016 12:29:18 +1300 Subject: [PATCH 080/281] Add an upstream miniupnpc patch revision --- depends/packages/miniupnpc.mk | 5 +++-- .../miniupnpc/patch-strlen-patch.patch | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 depends/patches/miniupnpc/patch-strlen-patch.patch diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index f775d7462..0d8efbc3f 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -3,7 +3,7 @@ $(package)_version=2.0 $(package)_download_path=http://miniupnp.free.fr/files $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=d434ceb8986efbe199c5ca53f90ed53eab290b1e6d0530b717eb6fa49d61f93b -$(package)_patches=fix-solaris-compilation.patch strlen-before-memcmp.patch +$(package)_patches=fix-solaris-compilation.patch strlen-before-memcmp.patch patch-strlen-patch.patch define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" @@ -17,7 +17,8 @@ define $(package)_preprocess_cmds sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \ sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw && \ patch -p2 < $($(package)_patch_dir)/fix-solaris-compilation.patch && \ - patch -p2 < $($(package)_patch_dir)/strlen-before-memcmp.patch + patch -p2 < $($(package)_patch_dir)/strlen-before-memcmp.patch && \ + patch -p2 < $($(package)_patch_dir)/patch-strlen-patch.patch endef define $(package)_build_cmds diff --git a/depends/patches/miniupnpc/patch-strlen-patch.patch b/depends/patches/miniupnpc/patch-strlen-patch.patch new file mode 100644 index 000000000..df7140234 --- /dev/null +++ b/depends/patches/miniupnpc/patch-strlen-patch.patch @@ -0,0 +1,22 @@ +From 0aa7c46227acd8ddb135c577674ad454bf2fba86 Mon Sep 17 00:00:00 2001 +From: Thomas Bernard +Date: Fri, 11 Nov 2016 17:53:21 +0100 +Subject: [PATCH] remove unsigned/signed comparison + +--- + miniupnpc/portlistingparse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/miniupnpc/portlistingparse.c b/miniupnpc/portlistingparse.c +index 1bed763..07f3f87 100644 +--- a/miniupnpc/portlistingparse.c ++++ b/miniupnpc/portlistingparse.c +@@ -55,7 +55,7 @@ startelt(void * d, const char * name, int l) + pdata->curelt = PortMappingEltNone; + for(i = 0; elements[i].str; i++) + { +- if(strlen(elements[i].str) == l && memcmp(name, elements[i].str, l) == 0) ++ if(strlen(elements[i].str) == (size_t)l && memcmp(name, elements[i].str, l) == 0) + { + pdata->curelt = elements[i].code; + break; From ba6fc72bcda0214bc4f6894dd999f254ee6e1478 Mon Sep 17 00:00:00 2001 From: Scott Date: Fri, 28 Oct 2016 13:14:13 -0400 Subject: [PATCH 081/281] Metrics - Don't exclaim unless > 1 "You have validated 0 transactions!" sounds a little less enthusiastic that intended. Also, only says "1 transaction". --- src/metrics.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index a5480838e..875260dd9 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -94,6 +94,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) int hours = (uptime - (days * 24 * 60 * 60)) / (60 * 60); int minutes = (uptime - (((days * 24) + hours) * 60 * 60)) / 60; int seconds = uptime - (((((days * 24) + hours) * 60) + minutes) * 60); + int validatedCount = 0; // Display uptime std::string duration; @@ -110,7 +111,14 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) std::cout << strDuration << std::endl; lines += (strDuration.size() / cols); - std::cout << "- " << strprintf(_("You have validated %d transactions!"), transactionsValidated.get()) << std::endl; + validatedCount = transactionsValidated.get(); + if (validatedCount > 1) { + std::cout << "- " << strprintf(_("You have validated %d transactions!"), validatedCount) << std::endl; + } else if (validatedCount == 1) { + std::cout << "- " << strprintf(_("You have validated %d transaction."), validatedCount) << std::endl; + } else { + std::cout << "- " << strprintf(_("You have validated %d transactions."), validatedCount) << std::endl; + } if (mining) { double solps = uptime > 0 ? (double)solutionTargetChecks.get() / uptime : 0; From 1c8d5c406143f76a3053db6acacc3b6cc7fed5b3 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 1 Dec 2016 15:34:57 +1300 Subject: [PATCH 082/281] Address review comments, tweak strings --- src/metrics.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 875260dd9..fe9795920 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -94,7 +94,6 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) int hours = (uptime - (days * 24 * 60 * 60)) / (60 * 60); int minutes = (uptime - (((days * 24) + hours) * 60 * 60)) / 60; int seconds = uptime - (((((days * 24) + hours) * 60) + minutes) * 60); - int validatedCount = 0; // Display uptime std::string duration; @@ -111,13 +110,13 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) std::cout << strDuration << std::endl; lines += (strDuration.size() / cols); - validatedCount = transactionsValidated.get(); + int validatedCount = transactionsValidated.get(); if (validatedCount > 1) { std::cout << "- " << strprintf(_("You have validated %d transactions!"), validatedCount) << std::endl; } else if (validatedCount == 1) { - std::cout << "- " << strprintf(_("You have validated %d transaction."), validatedCount) << std::endl; + std::cout << "- " << _("You have validated a transaction!") << std::endl; } else { - std::cout << "- " << strprintf(_("You have validated %d transactions."), validatedCount) << std::endl; + std::cout << "- " << _("You have validated no transactions.") << std::endl; } if (mining) { From c794f6d33be9ad948e623e871cab49b16ac54319 Mon Sep 17 00:00:00 2001 From: Christian von Roques Date: Sun, 26 Jun 2016 16:20:12 -0400 Subject: [PATCH 083/281] bash-completion: Adapt for 0.12 and 0.13 * separate completion for bitcoind and bitcoin-cli * remove RPC support from bitcoind completion * add completion for bitcoin-tx and bitcoin-qt * rely on autoloading of completions --- contrib/bitcoin-cli.bash-completion | 154 ++++++++++++++++++++++++++++ contrib/bitcoin-tx.bash-completion | 57 ++++++++++ contrib/bitcoind.bash-completion | 111 ++------------------ 3 files changed, 222 insertions(+), 100 deletions(-) create mode 100644 contrib/bitcoin-cli.bash-completion create mode 100644 contrib/bitcoin-tx.bash-completion diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/bitcoin-cli.bash-completion new file mode 100644 index 000000000..732981fe7 --- /dev/null +++ b/contrib/bitcoin-cli.bash-completion @@ -0,0 +1,154 @@ +# bash programmable completion for bitcoin-cli(1) +# Copyright (c) 2012-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +# call $bitcoin-cli for RPC +_bitcoin_rpc() { + # determine already specified args necessary for RPC + local rpcargs=() + for i in ${COMP_LINE}; do + case "$i" in + -conf=*|-datadir=*|-regtest|-rpc*|-testnet) + rpcargs=( "${rpcargs[@]}" "$i" ) + ;; + esac + done + $bitcoin_cli "${rpcargs[@]}" "$@" +} + +# Add wallet accounts to COMPREPLY +_bitcoin_accounts() { + local accounts + accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }') + COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) +} + +_bitcoin_cli() { + local cur prev words=() cword + local bitcoin_cli + + # save and use original argument to invoke bitcoin-cli for -help, help and RPC + # as bitcoin-cli might not be in $PATH + bitcoin_cli="$1" + + COMPREPLY=() + _get_comp_words_by_ref -n = cur prev words cword + + if ((cword > 5)); then + case ${words[cword-5]} in + sendtoaddress) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + esac + fi + + if ((cword > 4)); then + case ${words[cword-4]} in + importaddress|listtransactions|setban) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + signrawtransaction) + COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) + return 0 + ;; + esac + fi + + if ((cword > 3)); then + case ${words[cword-3]} in + addmultisigaddress) + _bitcoin_accounts + return 0 + ;; + getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + esac + fi + + if ((cword > 2)); then + case ${words[cword-2]} in + addnode) + COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) + return 0 + ;; + setban) + COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) + return 0 + ;; + fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + move|setaccount) + _bitcoin_accounts + return 0 + ;; + esac + fi + + case "$prev" in + backupwallet|dumpwallet|importwallet) + _filedir + return 0 + ;; + getaddednodeinfo|getrawmempool|lockunspent|setgenerate) + COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) + return 0 + ;; + getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) + _bitcoin_accounts + return 0 + ;; + esac + + case "$cur" in + -conf=*) + cur="${cur#*=}" + _filedir + return 0 + ;; + -datadir=*) + cur="${cur#*=}" + _filedir -d + return 0 + ;; + -*=*) # prevent nonsense completions + return 0 + ;; + *) + local helpopts commands + + # only parse -help if senseful + if [[ -z "$cur" || "$cur" =~ ^- ]]; then + helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + fi + + # only parse help if senseful + if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then + commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + fi + + COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) + + # Prevent space if an argument is desired + if [[ $COMPREPLY == *= ]]; then + compopt -o nospace + fi + return 0 + ;; + esac +} && +complete -F _bitcoin_cli bitcoin-cli + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff --git a/contrib/bitcoin-tx.bash-completion b/contrib/bitcoin-tx.bash-completion new file mode 100644 index 000000000..a83d2979e --- /dev/null +++ b/contrib/bitcoin-tx.bash-completion @@ -0,0 +1,57 @@ +# bash programmable completion for bitcoin-tx(1) +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +_bitcoin_tx() { + local cur prev words=() cword + local bitcoin_tx + + # save and use original argument to invoke bitcoin-tx for -help + # it might not be in $PATH + bitcoin_tx="$1" + + COMPREPLY=() + _get_comp_words_by_ref -n =: cur prev words cword + + case "$cur" in + load=*:*) + cur="${cur#load=*:}" + _filedir + return 0 + ;; + *=*) # prevent attempts to complete other arguments + return 0 + ;; + esac + + if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then + # only options (or an uncompletable hex-string) allowed + # parse bitcoin-tx -help for options + local helpopts + helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d ) + COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) + else + # only commands are allowed + # parse -help for commands + local helpcmds + helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) + COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) + fi + + # Prevent space if an argument is desired + if [[ $COMPREPLY == *= ]]; then + compopt -o nospace + fi + + return 0 +} && +complete -F _bitcoin_tx bitcoin-tx + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff --git a/contrib/bitcoind.bash-completion b/contrib/bitcoind.bash-completion index 3cc959c0a..17f2606cd 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/bitcoind.bash-completion @@ -1,102 +1,21 @@ -# bash programmable completion for bitcoind(1) and bitcoin-cli(1) -# Copyright (c) 2012,2014 Christian von Roques +# bash programmable completion for bitcoind(1) and bitcoin-qt(1) +# Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -have bitcoind && { - -# call $bitcoind for RPC -_bitcoin_rpc() { - # determine already specified args necessary for RPC - local rpcargs=() - for i in ${COMP_LINE}; do - case "$i" in - -conf=*|-proxy*|-rpc*) - rpcargs=( "${rpcargs[@]}" "$i" ) - ;; - esac - done - $bitcoind "${rpcargs[@]}" "$@" -} - -# Add bitcoin accounts to COMPREPLY -_bitcoin_accounts() { - local accounts - accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}') - COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) -} - _bitcoind() { local cur prev words=() cword local bitcoind - # save and use original argument to invoke bitcoind - # bitcoind might not be in $PATH + # save and use original argument to invoke bitcoind for -help + # it might not be in $PATH bitcoind="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword - if ((cword > 4)); then - case ${words[cword-4]} in - listtransactions) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - signrawtransaction) - COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) - return 0 - ;; - esac - fi - - if ((cword > 3)); then - case ${words[cword-3]} in - addmultisigaddress) - _bitcoin_accounts - return 0 - ;; - getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - esac - fi - - if ((cword > 2)); then - case ${words[cword-2]} in - addnode) - COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) - return 0 - ;; - getblock|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - move|setaccount) - _bitcoin_accounts - return 0 - ;; - esac - fi - - case "$prev" in - backupwallet|dumpwallet|importwallet) - _filedir - return 0 - ;; - getmempool|lockunspent|setgenerate) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _bitcoin_accounts - return 0 - ;; - esac - case "$cur" in - -conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*) + -conf=*|-pid=*|-loadblock=*|-rootcertificates=*|-rpccookiefile=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*) cur="${cur#*=}" _filedir return 0 @@ -110,20 +29,14 @@ _bitcoind() { return 0 ;; *) - local helpopts commands - # only parse --help if senseful + # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + local helpopts + helpopts=$($bitcoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi - # only parse help if senseful - if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') - fi - - COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) - # Prevent space if an argument is desired if [[ $COMPREPLY == *= ]]; then compopt -o nospace @@ -131,10 +44,8 @@ _bitcoind() { return 0 ;; esac -} - -complete -F _bitcoind bitcoind bitcoin-cli -} +} && +complete -F _bitcoind bitcoind bitcoin-qt # Local variables: # mode: shell-script From 58966e96c5d1b6111561fb3f79630617c6314ed2 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Dec 2016 17:09:44 +1300 Subject: [PATCH 084/281] Change function names to not clash with Bitcoin, apply to correct binaries --- contrib/bitcoin-cli.bash-completion | 18 +++++++++--------- contrib/bitcoin-tx.bash-completion | 2 +- contrib/bitcoind.bash-completion | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/bitcoin-cli.bash-completion index 732981fe7..29723769e 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/contrib/bitcoin-cli.bash-completion @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. # call $bitcoin-cli for RPC -_bitcoin_rpc() { +_zcash_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -18,13 +18,13 @@ _bitcoin_rpc() { } # Add wallet accounts to COMPREPLY -_bitcoin_accounts() { +_zcash_accounts() { local accounts - accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }') + accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_bitcoin_cli() { +_zcash_cli() { local cur prev words=() cword local bitcoin_cli @@ -60,7 +60,7 @@ _bitcoin_cli() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _bitcoin_accounts + _zcash_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) @@ -85,7 +85,7 @@ _bitcoin_cli() { return 0 ;; move|setaccount) - _bitcoin_accounts + _zcash_accounts return 0 ;; esac @@ -101,7 +101,7 @@ _bitcoin_cli() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _bitcoin_accounts + _zcash_accounts return 0 ;; esac @@ -130,7 +130,7 @@ _bitcoin_cli() { # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -143,7 +143,7 @@ _bitcoin_cli() { ;; esac } && -complete -F _bitcoin_cli bitcoin-cli +complete -F _zcash_cli zcash-cli # Local variables: # mode: shell-script diff --git a/contrib/bitcoin-tx.bash-completion b/contrib/bitcoin-tx.bash-completion index a83d2979e..0206eba74 100644 --- a/contrib/bitcoin-tx.bash-completion +++ b/contrib/bitcoin-tx.bash-completion @@ -46,7 +46,7 @@ _bitcoin_tx() { return 0 } && -complete -F _bitcoin_tx bitcoin-tx +complete -F _bitcoin_tx zcash-tx # Local variables: # mode: shell-script diff --git a/contrib/bitcoind.bash-completion b/contrib/bitcoind.bash-completion index 17f2606cd..378738877 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/bitcoind.bash-completion @@ -3,7 +3,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_bitcoind() { +_zcashd() { local cur prev words=() cword local bitcoind @@ -45,7 +45,7 @@ _bitcoind() { ;; esac } && -complete -F _bitcoind bitcoind bitcoin-qt +complete -F _zcashd zcashd # Local variables: # mode: shell-script From ca483b406453f363083252fb3e3c677d1f7dbc26 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Dec 2016 17:12:38 +1300 Subject: [PATCH 085/281] Add bash completion files to Debian package --- zcutil/build-debian-package.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 5691f2372..8d063399e 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -23,10 +23,11 @@ if [ -d $BUILD_DIR ]; then rm -R $BUILD_DIR fi +DEB_CMP=$BUILD_DIR/etc/bash_completion.d DEB_BIN=$BUILD_DIR/usr/bin DEB_DOC=$BUILD_DIR/usr/share/doc/$PACKAGE_NAME DEB_MAN=$BUILD_DIR/usr/share/man/man1 -mkdir -p $BUILD_DIR/DEBIAN $DEB_BIN $DEB_DOC $DEB_MAN +mkdir -p $BUILD_DIR/DEBIAN $DEB_CMP $DEB_BIN $DEB_DOC $DEB_MAN chmod 0755 -R $BUILD_DIR/* # Copy control file @@ -48,6 +49,9 @@ cp -r $SRC_DEB/examples $DEB_DOC # Copy manpages cp $SRC_DEB/manpages/zcashd.1 $DEB_MAN cp $SRC_DEB/manpages/zcash-cli.1 $DEB_MAN +# Copy bash completion files +cp $SRC_PATH/contrib/bitcoind.bash-completion $DEB_CMP/zcashd +cp $SRC_PATH/contrib/bitcoin-cli.bash-completion $DEB_CMP/zcash-cli # Gzip files gzip --best -n $DEB_DOC/changelog gzip --best -n $DEB_DOC/changelog.Debian From a01daac728f2796e5aa0fa1804d7e4c0f1344b7b Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Dec 2016 17:26:57 +1300 Subject: [PATCH 086/281] Always bash-complete the default account --- contrib/bitcoin-cli.bash-completion | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/bitcoin-cli.bash-completion index 29723769e..028513a92 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/contrib/bitcoin-cli.bash-completion @@ -20,7 +20,9 @@ _zcash_rpc() { # Add wallet accounts to COMPREPLY _zcash_accounts() { local accounts - accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') + # Accounts are deprecated in Zcash + #accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') + accounts="\\\"\\\"" COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } From 73546e1b81d8c36fdcb93209b774cc6a7c0070d3 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Dec 2016 17:41:37 +1300 Subject: [PATCH 087/281] Add Zcash RPC commands to CLI argument completion --- contrib/bitcoin-cli.bash-completion | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/bitcoin-cli.bash-completion index 028513a92..f2a44d232 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/contrib/bitcoin-cli.bash-completion @@ -82,7 +82,7 @@ _zcash_cli() { COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) return 0 ;; - fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) + fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction|z_importkey) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -94,7 +94,7 @@ _zcash_cli() { fi case "$prev" in - backupwallet|dumpwallet|importwallet) + backupwallet|dumpwallet|importwallet|z_exportwallet|z_importwallet) _filedir return 0 ;; From 2d931e905b717336f76bdce101ec58c99b937264 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 3 Dec 2016 00:22:42 -0800 Subject: [PATCH 088/281] Fixes #1823. Witness anchors for input notes no longer cross block boundaries. --- qa/pull-tester/rpc-tests.sh | 1 + qa/rpc-tests/wallet_treestate.py | 128 ++++++++++++++++++++++ src/wallet/asyncrpcoperation_sendmany.cpp | 36 ++++-- src/wallet/asyncrpcoperation_sendmany.h | 11 +- 4 files changed, 168 insertions(+), 8 deletions(-) create mode 100755 qa/rpc-tests/wallet_treestate.py diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 13ddc461f..821a637cd 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -11,6 +11,7 @@ export BITCOIND=${REAL_BITCOIND} #Run the tests testScripts=( + 'wallet_treestate.py' 'wallet_protectcoinbase.py' 'wallet.py' 'wallet_nullifiers.py' diff --git a/qa/rpc-tests/wallet_treestate.py b/qa/rpc-tests/wallet_treestate.py new file mode 100755 index 000000000..ae55368f0 --- /dev/null +++ b/qa/rpc-tests/wallet_treestate.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python2 +# Copyright (c) 2016 The Zcash developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * +from time import * + +import sys + +class WalletTreeStateTest (BitcoinTestFramework): + + def setup_chain(self): + print("Initializing test directory "+self.options.tmpdir) + initialize_chain_clean(self.options.tmpdir, 4) + + # Start nodes with -regtestprotectcoinbase to set fCoinbaseMustBeProtected to true. + def setup_network(self, split=False): + self.nodes = start_nodes(3, self.options.tmpdir, extra_args=[['-regtestprotectcoinbase','-debug=zrpc']] * 3 ) + connect_nodes_bi(self.nodes,0,1) + connect_nodes_bi(self.nodes,1,2) + connect_nodes_bi(self.nodes,0,2) + self.is_network_split=False + self.sync_all() + + def wait_and_assert_operationid_status(self, myopid, in_status='success', in_errormsg=None): + print('waiting for async operation {}'.format(myopid)) + opids = [] + opids.append(myopid) + timeout = 300 + status = None + errormsg = None + for x in xrange(1, timeout): + results = self.nodes[0].z_getoperationresult(opids) + if len(results)==0: + sleep(1) + else: + status = results[0]["status"] + if status == "failed": + errormsg = results[0]['error']['message'] + break + print('...returned status: {}'.format(status)) + print('...error msg: {}'.format(errormsg)) + assert_equal(in_status, status) + if errormsg is not None: + assert(in_errormsg is not None) + assert_equal(in_errormsg in errormsg, True) + print('...returned error: {}'.format(errormsg)) + + def run_test (self): + print "Mining blocks..." + + self.nodes[0].generate(100) + self.sync_all() + self.nodes[1].generate(101) + self.sync_all() + + mytaddr = self.nodes[0].getnewaddress() # where coins were mined + myzaddr = self.nodes[0].z_getnewaddress() + + # Spend coinbase utxos to create three notes of 9.99990000 each + recipients = [] + recipients.append({"address":myzaddr, "amount":Decimal('10.0') - Decimal('0.0001')}) + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid) + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid) + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid) + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + + # Check balance + resp = self.nodes[0].z_getbalance(myzaddr) + assert_equal(Decimal(resp), Decimal('9.9999') * 3 ) + + # We want to test a real-world situation where during the time spent creating a transaction + # with joinsplits, other transactions containing joinsplits have been mined into new blocks, + # which result in the treestate changing whilst creating the transaction. + + # Tx 1 will change the treestate while Tx 2 containing chained joinsplits is still being generated + recipients = [] + recipients.append({"address":self.nodes[2].z_getnewaddress(), "amount":Decimal('10.0') - Decimal('0.0001')}) + myopid = self.nodes[0].z_sendmany(mytaddr, recipients) + self.wait_and_assert_operationid_status(myopid) + + # Tx 2 will consume all three notes, which must take at least two joinsplits. This is regardless of + # the z_sendmany implementation because there are only two inputs per joinsplit. + recipients = [] + recipients.append({"address":self.nodes[2].z_getnewaddress(), "amount":Decimal('18')}) + recipients.append({"address":self.nodes[2].z_getnewaddress(), "amount":Decimal('11.9997') - Decimal('0.0001')}) + myopid = self.nodes[0].z_sendmany(myzaddr, recipients) + + # Wait for Tx 2 to begin executing... + for x in xrange(1, 60): + results = self.nodes[0].z_getoperationstatus([myopid]) + status = results[0]["status"] + if status == "executing": + break + sleep(1) + + # Now mine Tx 1 which will change global treestate before Tx 2's second joinsplit begins processing + self.sync_all() + self.nodes[1].generate(1) + self.sync_all() + + # Wait for Tx 2 to be created + self.wait_and_assert_operationid_status(myopid) + + # Note that a bug existed in v1.0.0-1.0.3 where Tx 2 creation would fail with an error: + # "Witness for spendable note does not have same anchor as change input" + + # Check balance + resp = self.nodes[0].z_getbalance(myzaddr) + assert_equal(Decimal(resp), Decimal('0.0')) + + +if __name__ == '__main__': + WalletTreeStateTest().main() diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 9e27b971a..ad3a415de 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -320,7 +320,22 @@ bool AsyncRPCOperation_sendmany::main_impl() { zOutputsDeque.push_back(o); } - + // When spending notes, take a snapshot of note witnesses and anchors as the treestate will + // change upon arrival of new blocks which contain joinsplit transactions. This is likely + // to happen as creating a chained joinsplit transaction can take longer than the block interval. + if (z_inputs_.size() > 0) { + LOCK2(cs_main, pwalletMain->cs_wallet); + for (auto t : z_inputs_) { + JSOutPoint jso = std::get<0>(t); + std::vector vOutPoints = { jso }; + uint256 inputAnchor; + std::vector> vInputWitnesses; + pwalletMain->GetNoteWitnesses(vOutPoints, vInputWitnesses, inputAnchor); + jsopWitnessAnchorMap[ jso.ToString() ] = WitnessAnchorData{ vInputWitnesses, inputAnchor }; + } + } + + /** * SCENARIO #2 * @@ -570,7 +585,9 @@ bool AsyncRPCOperation_sendmany::main_impl() { // std::vector vInputNotes; std::vector vOutPoints; + std::vector> vInputWitnesses; uint256 inputAnchor; + WitnessAnchorData wad; int numInputsNeeded = (jsChange>0) ? 1 : 0; while (numInputsNeeded++ < ZC_NUM_JS_INPUTS && zInputsDeque.size() > 0) { SendManyInputJSOP t = zInputsDeque.front(); @@ -579,6 +596,16 @@ bool AsyncRPCOperation_sendmany::main_impl() { CAmount noteFunds = std::get<2>(t); zInputsDeque.pop_front(); + wad = jsopWitnessAnchorMap[ jso.ToString() ]; + for (auto & w : wad.witnesses) { + vInputWitnesses.push_back(w); + } + if (inputAnchor.IsNull()) { + inputAnchor = wad.anchor; + } else if (inputAnchor != wad.anchor) { + throw JSONRPCError(RPC_WALLET_ERROR, "Selected input notes do not share the same anchor"); + } + vOutPoints.push_back(jso); vInputNotes.push_back(note); @@ -595,12 +622,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { // Add history of previous commitments to witness if (vInputNotes.size() > 0) { - std::vector> vInputWitnesses; - { - LOCK(cs_main); - pwalletMain->GetNoteWitnesses(vOutPoints, vInputWitnesses, inputAnchor); - } - + if (vInputWitnesses.size()==0) { throw JSONRPCError(RPC_WALLET_ERROR, "Could not find witness for note commitment"); } diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index df9c3d8d2..1c0cbbbfe 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -14,6 +14,7 @@ #include "json/json_spirit_value.h" #include "wallet.h" +#include #include // TODO: Compute fee based on a heuristic, e.g. (num tx output * dust threshold) + joinsplit bytes * ? @@ -41,6 +42,12 @@ struct AsyncJoinSplitInfo CAmount vpub_new = 0; }; +// A struct to help us track the witnesses and anchor for a given JSOutPoint +struct WitnessAnchorData { + std::vector> witnesses; + uint256 anchor; +}; + class AsyncRPCOperation_sendmany : public AsyncRPCOperation { public: AsyncRPCOperation_sendmany(std::string fromAddress, std::vector tOutputs, std::vector zOutputs, int minDepth); @@ -70,7 +77,9 @@ private: uint256 joinSplitPubKey_; unsigned char joinSplitPrivKey_[crypto_sign_SECRETKEYBYTES]; - + // The key is the result string from calling JSOutPoint::ToString() + std::unordered_map jsopWitnessAnchorMap; + std::vector t_outputs_; std::vector z_outputs_; std::vector t_inputs_; From 5bf2ae888b046b8172f31281cc26f4069f5133f0 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 4 Dec 2016 13:35:31 +0100 Subject: [PATCH 089/281] Reduce image size --- Dockerfile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37efb1c0e..0850c7d6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,6 @@ -FROM ubuntu:16.04 +FROM kolobus/komodod:ubuntu MAINTAINER Mihail Fedorov -# All the stuff -# And clean out packages, keep space minimal -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ - unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ - protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - ADD ./ /komodo ENV HOME /komodo WORKDIR /komodo @@ -28,4 +18,3 @@ RUN ln -sf /komodo/src/komodod /usr/bin/komodod && \ ln -sf /komodo/zcutil/docker-komodo-cli.sh /usr/bin/komodo-cli CMD ["entrypoint"] - From c2b24ccdb70d164588a13a9c1cbf3f91a0d69c40 Mon Sep 17 00:00:00 2001 From: Bitcoin Error Log Date: Sun, 4 Dec 2016 12:02:39 -0500 Subject: [PATCH 090/281] Edit for grammar: "block chain" At this point, I believe it is universally accepted that "blockchain" is one word, and should not be separated into two. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cc7608b9..346a037ab 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ in our [Protocol Specification](https://github.com/zcash/zips/raw/master/protoco This software is the Zcash client. It downloads and stores the entire history of Zcash transactions; depending on the speed of your computer and network connection, the synchronization process could take a day or more once the -block chain has reached a significant size. +blockchain has reached a significant size. Security Warnings ----------------- From 0bcadd8a52e5683ed9a9b15693e8ae5cc9a3c1b9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Dec 2016 10:02:20 -0300 Subject: [PATCH 091/281] disable 100000 --- src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index fe832ac0f..8e8223c1f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -550,7 +550,6 @@ CBlockTreeDB *pblocktree = NULL; // Komodo globals -#define KOMODO_TESTNET_EXPIRATION 100000 #define KOMODO_PAX #define KOMODO_ZCASH #include "komodo.h" @@ -2155,8 +2154,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin } bool fScriptChecks = (!fCheckpointsEnabled || pindex->nHeight >= Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints())); - if ( KOMODO_TESTNET_EXPIRATION != 0 && pindex->nHeight > KOMODO_TESTNET_EXPIRATION ) // "testnet" - return(false); + //if ( KOMODO_TESTNET_EXPIRATION != 0 && pindex->nHeight > KOMODO_TESTNET_EXPIRATION ) // "testnet" + // return(false); // Do not allow blocks that contain transactions which 'overwrite' older transactions, // unless those are already completely spent. BOOST_FOREACH(const CTransaction& tx, block.vtx) { From da49ef71b3ebee75d2225e908707fad766b6d45a Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 5 Dec 2016 19:26:22 +0300 Subject: [PATCH 092/281] docker updated --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0850c7d6c..71136b3af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM kolobus/komodod:ubuntu -MAINTAINER Mihail Fedorov +FROM kolobus/ubuntu:komodo +MAINTAINER Mihail Fedorov ADD ./ /komodo ENV HOME /komodo @@ -9,7 +9,7 @@ WORKDIR /komodo RUN cd /komodo && \ ./autogen.sh && \ ./configure --with-incompatible-bdb --with-gui || true && \ - ./zcutil/build.sh -j4 + ./zcutil/build.sh -j$(nproc) # Unknown stuff goes here From f3c491902763f814527403be6707298e008c1503 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 5 Dec 2016 10:46:12 -0800 Subject: [PATCH 093/281] Increase timeout as laptops on battery power have cpu throttling. --- qa/rpc-tests/wallet_protectcoinbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index d072c8ce6..06e845bfb 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -27,7 +27,7 @@ class WalletProtectCoinbaseTest (BitcoinTestFramework): print('waiting for async operation {}'.format(myopid)) opids = [] opids.append(myopid) - timeout = 120 + timeout = 300 status = None errormsg = None for x in xrange(1, timeout): From f8b5c1642c3261a22a2ce489182a3c7a759de423 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Dec 2016 20:51:58 +0200 Subject: [PATCH 094/281] test --- src/komodo_utils.h | 4 ++-- src/main.cpp | 5 ++--- src/util.cpp | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 15562669d..3e53b79c9 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1317,9 +1317,9 @@ void komodo_configfile(char *symbol,uint16_t port) sprintf(buf,"%s.conf",symbol); BITCOIND_PORT = port; #ifdef WIN32 - sprintf(fname,"%s\\%s",GetDataDir(false).string().c_str(),buf); + sprintf(fname,"%s\\assets\\%s",GetDataDir(false).string().c_str(),buf); #else - sprintf(fname,"%s/%s",GetDataDir(false).string().c_str(),buf); + sprintf(fname,"%s/assets/%s",GetDataDir(false).string().c_str(),buf); #endif if ( (fp= fopen(fname,"rb")) == 0 ) { diff --git a/src/main.cpp b/src/main.cpp index fe832ac0f..8e8223c1f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -550,7 +550,6 @@ CBlockTreeDB *pblocktree = NULL; // Komodo globals -#define KOMODO_TESTNET_EXPIRATION 100000 #define KOMODO_PAX #define KOMODO_ZCASH #include "komodo.h" @@ -2155,8 +2154,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin } bool fScriptChecks = (!fCheckpointsEnabled || pindex->nHeight >= Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints())); - if ( KOMODO_TESTNET_EXPIRATION != 0 && pindex->nHeight > KOMODO_TESTNET_EXPIRATION ) // "testnet" - return(false); + //if ( KOMODO_TESTNET_EXPIRATION != 0 && pindex->nHeight > KOMODO_TESTNET_EXPIRATION ) // "testnet" + // return(false); // Do not allow blocks that contain transactions which 'overwrite' older transactions, // unless those are already completely spent. BOOST_FOREACH(const CTransaction& tx, block.vtx) { diff --git a/src/util.cpp b/src/util.cpp index 4dfe13919..aec973cb6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -526,7 +526,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific) path /= BaseParams().DataDir(); fs::create_directories(path); - + std::string assetpath = path + "/assets"; + boost::filesystem::create_directory(assetpath); return path; } From c1428363799ce275b810060e84fc7ac9cb5765ad Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Dec 2016 20:58:45 +0200 Subject: [PATCH 095/281] test --- src/komodo_utils.h | 4 ++-- src/util.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 3e53b79c9..15562669d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1317,9 +1317,9 @@ void komodo_configfile(char *symbol,uint16_t port) sprintf(buf,"%s.conf",symbol); BITCOIND_PORT = port; #ifdef WIN32 - sprintf(fname,"%s\\assets\\%s",GetDataDir(false).string().c_str(),buf); + sprintf(fname,"%s\\%s",GetDataDir(false).string().c_str(),buf); #else - sprintf(fname,"%s/assets/%s",GetDataDir(false).string().c_str(),buf); + sprintf(fname,"%s/%s",GetDataDir(false).string().c_str(),buf); #endif if ( (fp= fopen(fname,"rb")) == 0 ) { diff --git a/src/util.cpp b/src/util.cpp index aec973cb6..86821ef0a 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -526,8 +526,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific) path /= BaseParams().DataDir(); fs::create_directories(path); - std::string assetpath = path + "/assets"; - boost::filesystem::create_directory(assetpath); + //std::string assetpath = path + "/assets"; + //boost::filesystem::create_directory(assetpath); return path; } From bc59f53722471067b6954c2fe7cdf820ae066d9c Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 24 Nov 2016 00:03:12 -0700 Subject: [PATCH 096/281] Isolate verification to a `ProofVerifier` context object that allows verification behavior to be tuned by the caller. --- src/gtest/test_joinsplit.cpp | 5 ++++ src/main.cpp | 3 ++- src/primitives/transaction.cpp | 2 ++ src/primitives/transaction.h | 6 ++++- src/test/transaction_tests.cpp | 8 +++--- src/wallet/asyncrpcoperation_sendmany.cpp | 7 +++-- src/wallet/rpcwallet.cpp | 5 +++- src/zcash/JoinSplit.cpp | 19 +++++++------ src/zcash/JoinSplit.hpp | 1 + src/zcash/Proof.cpp | 33 +++++++++++++++++++++++ src/zcash/Proof.hpp | 30 +++++++++++++++++++++ src/zcbenchmarks.cpp | 6 +++-- 12 files changed, 105 insertions(+), 20 deletions(-) diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp index 18f293f1d..17ac7ecb2 100644 --- a/src/gtest/test_joinsplit.cpp +++ b/src/gtest/test_joinsplit.cpp @@ -15,6 +15,9 @@ using namespace libzcash; void test_full_api(ZCJoinSplit* js) { + // Create verification context. + auto verifier = libzcash::ProofVerifier::Strict(); + // The recipient's information. SpendingKey recipient_key = SpendingKey::random(); PaymentAddress recipient_addr = recipient_key.address(); @@ -69,6 +72,7 @@ void test_full_api(ZCJoinSplit* js) // Verify the transaction: ASSERT_TRUE(js->verify( proof, + verifier, pubKeyHash, randomSeed, macs, @@ -143,6 +147,7 @@ void test_full_api(ZCJoinSplit* js) // Verify the transaction: ASSERT_TRUE(js->verify( proof, + verifier, pubKeyHash, randomSeed, macs, diff --git a/src/main.cpp b/src/main.cpp index 36b265758..491714f95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -844,8 +844,9 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state) return false; } else { // Ensure that zk-SNARKs verify + auto verifier = libzcash::ProofVerifier::Strict(); BOOST_FOREACH(const JSDescription &joinsplit, tx.vjoinsplit) { - if (!joinsplit.Verify(*pzcashParams, tx.joinSplitPubKey)) { + if (!joinsplit.Verify(*pzcashParams, verifier, tx.joinSplitPubKey)) { return state.DoS(100, error("CheckTransaction(): joinsplit does not verify"), REJECT_INVALID, "bad-txns-joinsplit-verification-failed"); } diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index d1e969360..f6236a2f8 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -70,10 +70,12 @@ JSDescription JSDescription::Randomized( bool JSDescription::Verify( ZCJoinSplit& params, + libzcash::ProofVerifier& verifier, const uint256& pubKeyHash ) const { return params.verify( proof, + verifier, pubKeyHash, randomSeed, macs, diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 1b144dc45..829588371 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -95,7 +95,11 @@ public: ); // Verifies that the JoinSplit proof is correct. - bool Verify(ZCJoinSplit& params, const uint256& pubKeyHash) const; + bool Verify( + ZCJoinSplit& params, + libzcash::ProofVerifier& verifier, + const uint256& pubKeyHash + ) const; // Returns the calculated h_sig uint256 h_sig(ZCJoinSplit& params, const uint256& pubKeyHash) const; diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 672a20d8a..86d59e809 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -341,9 +341,11 @@ BOOST_AUTO_TEST_CASE(test_basic_joinsplit_verification) libzcash::JSOutput(addr, 50) }; + auto verifier = libzcash::ProofVerifier::Strict(); + { JSDescription jsdesc(*p, pubKeyHash, rt, inputs, outputs, 0, 0); - BOOST_CHECK(jsdesc.Verify(*p, pubKeyHash)); + BOOST_CHECK(jsdesc.Verify(*p, verifier, pubKeyHash)); CDataStream ss(SER_DISK, CLIENT_VERSION); ss << jsdesc; @@ -352,7 +354,7 @@ BOOST_AUTO_TEST_CASE(test_basic_joinsplit_verification) ss >> jsdesc_deserialized; BOOST_CHECK(jsdesc_deserialized == jsdesc); - BOOST_CHECK(jsdesc_deserialized.Verify(*p, pubKeyHash)); + BOOST_CHECK(jsdesc_deserialized.Verify(*p, verifier, pubKeyHash)); } { @@ -365,7 +367,7 @@ BOOST_AUTO_TEST_CASE(test_basic_joinsplit_verification) // Ensure that it won't verify if the root is changed. auto test = JSDescription(*p, pubKeyHash, rt, inputs, outputs, 0, 0); test.anchor = GetRandHash(); - BOOST_CHECK(!test.Verify(*p, pubKeyHash)); + BOOST_CHECK(!test.Verify(*p, verifier, pubKeyHash)); } } diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 9e27b971a..f01ac45f7 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -926,8 +926,11 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit( info.vpub_new, !this->testmode); - if (!(jsdesc.Verify(*pzcashParams, joinSplitPubKey_))) { - throw std::runtime_error("error verifying joinsplit"); + { + auto verifier = libzcash::ProofVerifier::Strict(); + if (!(jsdesc.Verify(*pzcashParams, verifier, joinSplitPubKey_))) { + throw std::runtime_error("error verifying joinsplit"); + } } mtx.vjoinsplit.push_back(jsdesc); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b10a08efe..6c26df449 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2707,7 +2707,10 @@ Value zc_raw_joinsplit(const json_spirit::Array& params, bool fHelp) vpub_old, vpub_new); - assert(jsdesc.Verify(*pzcashParams, joinSplitPubKey)); + { + auto verifier = libzcash::ProofVerifier::Strict(); + assert(jsdesc.Verify(*pzcashParams, verifier, joinSplitPubKey)); + } mtx.vjoinsplit.push_back(jsdesc); diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index dad15316e..590700cd9 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -5,7 +5,6 @@ #include "zcash/util.h" #include -#include #include #include @@ -25,8 +24,6 @@ namespace libzcash { #include "zcash/circuit/gadget.tcc" -std::once_flag init_public_params_once_flag; - CCriticalSection cs_ParamsIO; CCriticalSection cs_LoadKeys; @@ -80,10 +77,6 @@ public: JoinSplitCircuit() {} ~JoinSplitCircuit() {} - static void initialize() { - std::call_once (init_public_params_once_flag, ppzksnark_ppT::init_public_params); - } - void setProvingKeyPath(std::string path) { pkPath = path; } @@ -151,6 +144,7 @@ public: bool verify( const ZCProof& proof, + ProofVerifier& verifier, const uint256& pubKeyHash, const uint256& randomSeed, const boost::array& macs, @@ -179,7 +173,12 @@ public: vpub_new ); - return r1cs_ppzksnark_online_verifier_strong_IC(*vk_precomp, witness, r1cs_proof); + return verifier.check( + *vk, + *vk_precomp, + witness, + r1cs_proof + ); } catch (...) { return false; } @@ -358,7 +357,7 @@ public: template JoinSplit* JoinSplit::Generate() { - JoinSplitCircuit::initialize(); + initialize_curve_params(); auto js = new JoinSplitCircuit(); js->generate(); @@ -368,7 +367,7 @@ JoinSplit* JoinSplit::Generate() template JoinSplit* JoinSplit::Unopened() { - JoinSplitCircuit::initialize(); + initialize_curve_params(); return new JoinSplitCircuit(); } diff --git a/src/zcash/JoinSplit.hpp b/src/zcash/JoinSplit.hpp index 8f17a4c46..a8c08d21b 100644 --- a/src/zcash/JoinSplit.hpp +++ b/src/zcash/JoinSplit.hpp @@ -83,6 +83,7 @@ public: virtual bool verify( const ZCProof& proof, + ProofVerifier& verifier, const uint256& pubKeyHash, const uint256& randomSeed, const boost::array& hmacs, diff --git a/src/zcash/Proof.cpp b/src/zcash/Proof.cpp index ab7c64483..d45a1d48a 100644 --- a/src/zcash/Proof.cpp +++ b/src/zcash/Proof.cpp @@ -1,6 +1,7 @@ #include "Proof.hpp" #include +#include #include "crypto/common.h" #include "libsnark/common/default_types/r1cs_ppzksnark_pp.hpp" @@ -211,4 +212,36 @@ ZCProof ZCProof::random_invalid() return p; } +std::once_flag init_public_params_once_flag; + +void initialize_curve_params() +{ + std::call_once (init_public_params_once_flag, curve_pp::init_public_params); +} + +ProofVerifier ProofVerifier::Strict() { + initialize_curve_params(); + return ProofVerifier(true); +} + +ProofVerifier ProofVerifier::Dummy() { + initialize_curve_params(); + return ProofVerifier(false); +} + +template<> +bool ProofVerifier::check( + const r1cs_ppzksnark_verification_key& vk, + const r1cs_ppzksnark_processed_verification_key& pvk, + const r1cs_primary_input& primary_input, + const r1cs_ppzksnark_proof& proof +) +{ + if (perform_verification) { + return r1cs_ppzksnark_online_verifier_strong_IC(pvk, primary_input, proof); + } else { + return true; + } +} + } diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index b4fdf93b6..c6ec45ee8 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -235,6 +235,36 @@ public: } }; +void initialize_curve_params(); + +class ProofVerifier { +private: + bool perform_verification; + + ProofVerifier(bool perform_verification) : perform_verification(perform_verification) { } + +public: + // Creates a verification context that strictly verifies + // all proofs using libsnark's API. + static ProofVerifier Strict(); + + // Creates a dummy verification context that performs + // no verification, used when avoiding duplicate effort + // such as during reindexing. + static ProofVerifier Dummy(); + + template + bool check( + const VerificationKey& vk, + const ProcessedVerificationKey& pvk, + const PrimaryInput& pi, + const Proof& p + ); +}; } diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 1d60fdde7..dac7bf764 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -89,7 +89,8 @@ double benchmark_create_joinsplit() 0); double ret = timer_stop(tv_start); - assert(jsdesc.Verify(*pzcashParams, pubKeyHash)); + auto verifier = libzcash::ProofVerifier::Strict(); + assert(jsdesc.Verify(*pzcashParams, verifier, pubKeyHash)); return ret; } @@ -98,7 +99,8 @@ double benchmark_verify_joinsplit(const JSDescription &joinsplit) struct timeval tv_start; timer_start(tv_start); uint256 pubKeyHash; - joinsplit.Verify(*pzcashParams, pubKeyHash); + auto verifier = libzcash::ProofVerifier::Strict(); + joinsplit.Verify(*pzcashParams, verifier, pubKeyHash); return timer_stop(tv_start); } From 08de001a255db16a81bff85cdeaaeaee56bc075f Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 5 Dec 2016 13:41:50 -0700 Subject: [PATCH 097/281] Regression test. --- src/test/coins_tests.cpp | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index b638bccfc..ea7e81851 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -249,6 +249,81 @@ BOOST_AUTO_TEST_CASE(nullifier_regression_test) } } +BOOST_AUTO_TEST_CASE(anchor_pop_regression_test) +{ + // Correct behavior: + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Create dummy anchor/commitment + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + + // Add the anchor + cache1.PushAnchor(tree); + cache1.Flush(); + + // Remove the anchor + cache1.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + cache1.Flush(); + + // Add the anchor back + cache1.PushAnchor(tree); + cache1.Flush(); + + // The base contains the anchor, of course! + { + ZCIncrementalMerkleTree checktree; + BOOST_CHECK(cache1.GetAnchorAt(tree.root(), checktree)); + BOOST_CHECK(checktree.root() == tree.root()); + } + } + + // Previously incorrect behavior + { + CCoinsViewTest base; + CCoinsViewCacheTest cache1(&base); + + // Create dummy anchor/commitment + ZCIncrementalMerkleTree tree; + uint256 cm = GetRandHash(); + tree.append(cm); + + // Add the anchor and flush to disk + cache1.PushAnchor(tree); + cache1.Flush(); + + // Remove the anchor, but don't flush yet! + cache1.PopAnchor(ZCIncrementalMerkleTree::empty_root()); + + { + CCoinsViewCacheTest cache2(&cache1); // Build cache on top + cache2.PushAnchor(tree); // Put the same anchor back! + cache2.Flush(); // Flush to cache1 + } + + // cache2's flush kinda worked, i.e. cache1 thinks the + // tree is there, but it didn't bring down the correct + // treestate... + { + ZCIncrementalMerkleTree checktree; + BOOST_CHECK(cache1.GetAnchorAt(tree.root(), checktree)); + BOOST_CHECK(checktree.root() == tree.root()); // Oh, shucks. + } + + // Flushing cache won't help either, just makes the inconsistency + // permanent. + cache1.Flush(); + { + ZCIncrementalMerkleTree checktree; + BOOST_CHECK(cache1.GetAnchorAt(tree.root(), checktree)); + BOOST_CHECK(checktree.root() == tree.root()); // Oh, shucks. + } + } +} + BOOST_AUTO_TEST_CASE(anchor_regression_test) { // Correct behavior: From ebd9aa11b108071795c53a8abaf5fe8043dcc6db Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Mon, 5 Dec 2016 13:42:30 -0700 Subject: [PATCH 098/281] Ensure cache contains valid entry when anchor is popped. --- src/coins.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index c861bb81e..65c25f131 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -176,11 +176,20 @@ void CCoinsViewCache::PopAnchor(const uint256 &newrt) { // case restoring the "old" anchor during a reorg must // have no effect. if (currentRoot != newrt) { - CAnchorsMap::iterator ret = cacheAnchors.insert(std::make_pair(currentRoot, CAnchorsCacheEntry())).first; + // Bring the current best anchor into our local cache + // so that its tree exists in memory. + { + ZCIncrementalMerkleTree tree; + assert(GetAnchorAt(currentRoot, tree)); + } - ret->second.entered = false; - ret->second.flags = CAnchorsCacheEntry::DIRTY; + // Mark the anchor as unentered, removing it from view + cacheAnchors[currentRoot].entered = false; + // Mark the cache entry as dirty so it's propagated + cacheAnchors[currentRoot].flags = CAnchorsCacheEntry::DIRTY; + + // Mark the new root as the best anchor hashAnchor = newrt; } } From 53dc6a41ebcafd846de2a7bf7cdb658e7f9c1615 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Tue, 6 Dec 2016 18:42:31 -0700 Subject: [PATCH 099/281] Ensure ProofVerifier cannot be accidentally copied. --- src/zcash/Proof.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index c6ec45ee8..1f245e5e8 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -244,6 +244,12 @@ private: ProofVerifier(bool perform_verification) : perform_verification(perform_verification) { } public: + // ProofVerifier should never be copied + ProofVerifier(const ProofVerifier&) = delete; + ProofVerifier& operator=(const ProofVerifier&) = delete; + ProofVerifier(ProofVerifier&&); + ProofVerifier& operator=(ProofVerifier&&); + // Creates a verification context that strictly verifies // all proofs using libsnark's API. static ProofVerifier Strict(); From d85758f5cc144382cf0e268450a72a07d4f26778 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 7 Dec 2016 19:30:30 +1300 Subject: [PATCH 100/281] Document behaviour of CWallet::SetBestChain --- src/wallet/wallet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index cc0197f14..3d721fc40 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -959,6 +959,7 @@ public: CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const; CAmount GetChange(const CTransaction& tx) const; void ChainTip(const CBlockIndex *pindex, const CBlock *pblock, ZCIncrementalMerkleTree tree, bool added); + /** Saves witness caches and best block locator to disk. */ void SetBestChain(const CBlockLocator& loc); DBErrors LoadWallet(bool& fFirstRunRet); From ef3e97f1fd8382f2ee51f8d0ef2e4d1efe8e05d0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 11:36:20 +0200 Subject: [PATCH 101/281] test --- src/komodo_gateway.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0fb8a74d7..0b7b2b6ae 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -690,8 +690,10 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax->didstats = 1; pax->type = opretbuf[0]; pax->validated = komodoshis; - } - } + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("set validated W.%d %.8f\n",kmdheight,dstr(value)); + } else printf("cant paxfind W\n"); + } else printf("withdraw paxcmp error %.8f vs %.8f\n",dstr(komodoshis),dstr(checktoshis)); } else if ( tokomodo != 0 && opretbuf[0] == 'A' ) { From 431afba819e92ec1f9106c2a8de57d7135a1a86d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 11:40:38 +0200 Subject: [PATCH 102/281] test --- src/komodo_gateway.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0b7b2b6ae..27e463b8a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -668,7 +668,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; - //printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s)\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr); + if ( strcmp(ASSETCHAINS_SYMBOL,"RUB") == 0 ) + printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s)\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr); didstats = 0; if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) { @@ -693,7 +694,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("set validated W.%d %.8f\n",kmdheight,dstr(value)); } else printf("cant paxfind W\n"); - } else printf("withdraw paxcmp error %.8f vs %.8f\n",dstr(komodoshis),dstr(checktoshis)); + } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); } else if ( tokomodo != 0 && opretbuf[0] == 'A' ) { From a3608c899a04d0a7a08108a886612232b614ff84 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 11:45:47 +0200 Subject: [PATCH 103/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 27e463b8a..4f2f09009 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -659,7 +659,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(source,ASSETCHAINS_SYMBOL) == 0 ) printf("source.%s opreturn[I] matches %s\n",source,(char *)&opretbuf[opretlen-4]); } - else if ( opretbuf[0] == 'W' && opretlen >= 38 ) + else if ( opretbuf[0] == 'W' )//&& opretlen >= 38 ) { tokomodo = 1; iguana_rwnum(0,&opretbuf[34],sizeof(kmdheight),&kmdheight); @@ -668,8 +668,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; - if ( strcmp(ASSETCHAINS_SYMBOL,"RUB") == 0 ) - printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s)\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr); + if ( strcmp(base,"RUB") == 0 ) + printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) { From 4718923df5dad047a69c22c7f24843ce341bb536 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:00:35 +0200 Subject: [PATCH 104/281] test --- src/komodo_gateway.h | 5 +++-- src/miner.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 4f2f09009..323fd29e4 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -669,7 +669,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; if ( strcmp(base,"RUB") == 0 ) - printf("%s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); + printf("RUB WITHDRAW %s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) { @@ -682,7 +682,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); } - //printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); + if ( strcmp(base,"RUB") == 0 ) + printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,komodoshis,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) diff --git a/src/miner.cpp b/src/miner.cpp index 1c7b477b0..7d60d1374 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -131,7 +131,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) { //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } - else if ( deposits != 0 ) + else if ( deposits != 0 || (int32_t)mempool.GetTotalTxSize() > 0 ) { fprintf(stderr,"start CreateNewBlock %s initdone.%d deposit %.8f mempool.%d RT.%u KOMODO_ON_DEMAND.%d\n",ASSETCHAINS_SYMBOL,KOMODO_INITDONE,(double)komodo_paxtotal()/COIN,(int32_t)mempool.GetTotalTxSize(),isrealtime,KOMODO_ON_DEMAND); break; From d34d6ce4c26a29fafd112c37a9a6107ad991fecd Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:05:26 +0200 Subject: [PATCH 105/281] test --- src/komodo_gateway.h | 6 +++++- src/komodo_pax.h | 3 ++- src/miner.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 323fd29e4..9a683125e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -688,8 +688,12 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 komodo_gateway_deposit(coinaddr,komodoshis,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) { - if ( didstats != 0 ) + if ( didstats != 0 && pax->didstats == 0 ) + { + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p withdrawn %s += %.8f kmdht.%d ht.%d\n",basesp,base,dstr(value),kmdheight,height); pax->didstats = 1; + } pax->type = opretbuf[0]; pax->validated = komodoshis; if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index 1f7e23a03..d7c759248 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -527,7 +527,8 @@ uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pu if ( fiatoshis < 0 ) shortflag = 1, fiatoshis = -fiatoshis; komodoshis = komodo_paxprice(seedp,height,base,(char *)"KMD",(uint64_t)fiatoshis); - //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f seed.%llx\n",height,base,(double)fiatoshis/COIN,(double)komodoshis/COIN,(long long)*seedp); + if ( strcmp(base,"RUB") == 0 ) + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f seed.%llx\n",height,base,(double)fiatoshis/COIN,(double)komodoshis/COIN,(long long)*seedp); if ( bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr) == 20 ) { PAX_pubkey(1,pubkey33,&addrtype,rmd160,base,&shortflag,tokomodo != 0 ? &komodoshis : &fiatoshis); diff --git a/src/miner.cpp b/src/miner.cpp index 7d60d1374..43d04e639 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -121,7 +121,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience - if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight > ASSETCHAINS_MINHEIGHT ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); while ( KOMODO_ON_DEMAND == 0 ) From b75c9445c78daa27bc37482a1570711ea90d4b96 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:11:11 +0200 Subject: [PATCH 106/281] test --- src/komodo_gateway.h | 2 -- src/komodo_pax.h | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9a683125e..9578fce8e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -656,8 +656,6 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 } } else printf("opreturn none issued?\n"); } - if ( strcmp(source,ASSETCHAINS_SYMBOL) == 0 ) - printf("source.%s opreturn[I] matches %s\n",source,(char *)&opretbuf[opretlen-4]); } else if ( opretbuf[0] == 'W' )//&& opretlen >= 38 ) { diff --git a/src/komodo_pax.h b/src/komodo_pax.h index d7c759248..f131881a0 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -473,7 +473,6 @@ uint64_t komodo_paxprice(uint64_t *seedp,int32_t height,char *base,char *rel,uin } kmdbtc = komodo_paxcorrelation(kmdbtcs,numvotes,*seedp) * 539; btcusd = komodo_paxcorrelation(btcusds,numvotes,*seedp) * 539; - //printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); for (i=nonz=0; i> 1) ) + { + printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); + printf("komodo_paxprice nonz.%d of numvotes.%d\n",nonz,numvotes); return(0); + } return(komodo_paxcorrelation(votes,numvotes,*seedp) * basevolume / 100000); } From 5dd7d1d193eb4962084d7d68a6ed9e08702bbcbd Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:18:23 +0200 Subject: [PATCH 107/281] test --- src/komodo_pax.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index f131881a0..c5af0fe47 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -481,7 +481,7 @@ uint64_t komodo_paxprice(uint64_t *seedp,int32_t height,char *base,char *rel,uin } if ( nonz <= (numvotes >> 1) ) { - printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); + printf("NUM_PVALS.%d kmdbtc %llu btcusd %llu ",NUM_PRICES,(long long)kmdbtc,(long long)btcusd); printf("komodo_paxprice nonz.%d of numvotes.%d\n",nonz,numvotes); return(0); } From 16b911e0bf7ea2d0399c11321822b643c255cb10 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:27:39 +0200 Subject: [PATCH 108/281] test --- src/komodo.h | 7 +++++-- src/komodo_gateway.h | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 2d978d443..2c5cee2fc 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -200,8 +200,11 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); if ( (fp= fopen(fname,"rb+")) != 0 ) { - while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) - ; + if ( ASSETCHAINS_SYMBOL[0] == 0 ) + { + while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) + ; + } else fseek(fp,0,SEEK_END); } else fp = fopen(fname,"wb+"); printf("fname.(%s) fpos.%ld\n",fname,ftell(fp)); KOMODO_INITDONE = (uint32_t)time(NULL); diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9578fce8e..186177f62 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -792,7 +792,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 void komodo_passport_iteration() { - static long lastpos[34]; static char userpass[33][1024]; + static long lastpos[34]; static char didinit,userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; while ( KOMODO_INITDONE == 0 ) { @@ -803,7 +803,7 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -847,6 +847,17 @@ void komodo_passport_iteration() } else { + if ( baseid < 32 && didinit == 0 ) + { + komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); + if ( (fp= fopen(fname,"rb+")) != 0 ) + { + while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) + ; + fclose(fp); + } + didinit = 1; + } komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"wb")) != 0 ) { From 2510135c3d0cf681ababf688e0abe906bed24d8c Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:35:12 +0200 Subject: [PATCH 109/281] test --- src/komodo_gateway.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 186177f62..47b91f1eb 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -673,29 +673,24 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { if ( value != 0 && ((pax= komodo_paxfind(txid,vout,'W')) == 0 || pax->didstats == 0) ) { - if ( (basesp= komodo_stateptrget(base)) != 0 ) - { - basesp->withdrawn += value; - didstats = 1; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); - } if ( strcmp(base,"RUB") == 0 ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,komodoshis,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) { - if ( didstats != 0 && pax->didstats == 0 ) + if ( pax->didstats == 0 ) { - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p withdrawn %s += %.8f kmdht.%d ht.%d\n",basesp,base,dstr(value),kmdheight,height); - pax->didstats = 1; + if ( (basesp= komodo_stateptrget(base)) != 0 ) + { + basesp->withdrawn += value; + pax->didstats = 1; + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); + } } pax->type = opretbuf[0]; pax->validated = komodoshis; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("set validated W.%d %.8f\n",kmdheight,dstr(value)); } else printf("cant paxfind W\n"); } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); } @@ -803,7 +798,7 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; From 0126d891aad3b1e45c89fc01bc4f682b2b52ffdb Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:46:33 +0200 Subject: [PATCH 110/281] Revert "test" This reverts commit 2510135c3d0cf681ababf688e0abe906bed24d8c. --- src/komodo_gateway.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 47b91f1eb..186177f62 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -673,24 +673,29 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { if ( value != 0 && ((pax= komodo_paxfind(txid,vout,'W')) == 0 || pax->didstats == 0) ) { + if ( (basesp= komodo_stateptrget(base)) != 0 ) + { + basesp->withdrawn += value; + didstats = 1; + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); + } if ( strcmp(base,"RUB") == 0 ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,komodoshis,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) { - if ( pax->didstats == 0 ) + if ( didstats != 0 && pax->didstats == 0 ) { - if ( (basesp= komodo_stateptrget(base)) != 0 ) - { - basesp->withdrawn += value; - pax->didstats = 1; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); - } + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p withdrawn %s += %.8f kmdht.%d ht.%d\n",basesp,base,dstr(value),kmdheight,height); + pax->didstats = 1; } pax->type = opretbuf[0]; pax->validated = komodoshis; + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("set validated W.%d %.8f\n",kmdheight,dstr(value)); } else printf("cant paxfind W\n"); } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); } @@ -798,7 +803,7 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; From 368c61bccffa7bc307bd4cd92084161d90c0c623 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:46:39 +0200 Subject: [PATCH 111/281] Revert "test" This reverts commit 16b911e0bf7ea2d0399c11321822b643c255cb10. --- src/komodo.h | 7 ++----- src/komodo_gateway.h | 15 ++------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 2c5cee2fc..2d978d443 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -200,11 +200,8 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); if ( (fp= fopen(fname,"rb+")) != 0 ) { - if ( ASSETCHAINS_SYMBOL[0] == 0 ) - { - while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) - ; - } else fseek(fp,0,SEEK_END); + while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) + ; } else fp = fopen(fname,"wb+"); printf("fname.(%s) fpos.%ld\n",fname,ftell(fp)); KOMODO_INITDONE = (uint32_t)time(NULL); diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 186177f62..9578fce8e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -792,7 +792,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 void komodo_passport_iteration() { - static long lastpos[34]; static char didinit,userpass[33][1024]; + static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; while ( KOMODO_INITDONE == 0 ) { @@ -803,7 +803,7 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -847,17 +847,6 @@ void komodo_passport_iteration() } else { - if ( baseid < 32 && didinit == 0 ) - { - komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); - if ( (fp= fopen(fname,"rb+")) != 0 ) - { - while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) - ; - fclose(fp); - } - didinit = 1; - } komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"wb")) != 0 ) { From ba01ff1f0e4296f2ccfed49fb05bdf9aa7e8ae82 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 12:46:58 +0200 Subject: [PATCH 112/281] Revert "test" This reverts commit 5dd7d1d193eb4962084d7d68a6ed9e08702bbcbd. --- src/komodo_pax.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index c5af0fe47..f131881a0 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -481,7 +481,7 @@ uint64_t komodo_paxprice(uint64_t *seedp,int32_t height,char *base,char *rel,uin } if ( nonz <= (numvotes >> 1) ) { - printf("NUM_PVALS.%d kmdbtc %llu btcusd %llu ",NUM_PRICES,(long long)kmdbtc,(long long)btcusd); + printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); printf("komodo_paxprice nonz.%d of numvotes.%d\n",nonz,numvotes); return(0); } From 4c000337a26632fc3a13440f87741d27c1885c7a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 13:00:46 +0200 Subject: [PATCH 113/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0fb8a74d7..fc6876d85 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -485,7 +485,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading - if ( height > 100000 ) //&& opcode == 'X' ) + if ( height > 110000 ) //&& opcode == 'X' ) { printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); return(-1); From 115e6a5c869ce0d645c45c72d6a4bd80ab0d5315 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 15:55:48 +0200 Subject: [PATCH 114/281] test --- src/komodo_gateway.h | 35 +++++++++++++++-------------------- src/komodo_structs.h | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9578fce8e..dc1d17007 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -251,9 +251,9 @@ uint64_t komodo_paxtotal() str = pax->symbol; else str = pax->source; basesp = komodo_stateptrget(str); - if ( basesp != 0 && pax->didstats == 0 && pax->type == 'I' ) + if ( basesp != 0 && pax->didstats == 0 ) { - if ( (pax2= komodo_paxfind(pax->txid,pax->vout,'D')) != 0 ) + if ( pax->type == 'I' && (pax2= komodo_paxfind(pax->txid,pax->vout,pax->type == 'I' ? 'D' : 'W')) != 0 ) { if ( pax2->fiatoshis != 0 ) { @@ -267,12 +267,17 @@ uint64_t komodo_paxtotal() pax->marked = pax->height; } } + else if ( pax->type == 'W' ) + { + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f\n",str,pax->height,pax->otherheight,dstr(pax->value)); + } } } } komodo_stateptr(symbol,dest); HASH_ITER(hh,PAX,pax,tmp) { + pax->ready = 0; //printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); if ( strcmp(symbol,pax->symbol) == 0 ) { @@ -292,10 +297,11 @@ uint64_t komodo_paxtotal() //printf(" v%d %.8f k.%d ht.%d\n",pax->vout,dstr(pax->komodoshis),pax->height,pax->otherheight); if ( seed != 0 ) { - if ( checktoshis >= pax->komodoshis ) + if ( checktoshis == pax->komodoshis ) { total += pax->komodoshis; pax->validated = pax->komodoshis; + pax->ready = 1; } else pax->marked = pax->height; } } @@ -485,7 +491,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading - if ( height > 100000 ) //&& opcode == 'X' ) + if ( height > 110000 ) //&& opcode == 'X' ) { printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); return(-1); @@ -683,20 +689,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,"RUB") == 0 ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } - komodo_gateway_deposit(coinaddr,komodoshis,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); + komodo_gateway_deposit(coinaddr,0,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) - { - if ( didstats != 0 && pax->didstats == 0 ) - { - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p withdrawn %s += %.8f kmdht.%d ht.%d\n",basesp,base,dstr(value),kmdheight,height); - pax->didstats = 1; - } - pax->type = opretbuf[0]; - pax->validated = komodoshis; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("set validated W.%d %.8f\n",kmdheight,dstr(value)); - } else printf("cant paxfind W\n"); + pax->type = opretbuf[0]; } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); } else if ( tokomodo != 0 && opretbuf[0] == 'A' ) @@ -718,9 +713,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 seed = 0; checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)srcvalues[i]); /*printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)srcvalues[i]/COIN,(double)values[i]/COIN,(double)checktoshis/COIN); - for (j=0; j<32; j++) - printf("%02x",((uint8_t *)&txids[i])[j]); - printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ + for (j=0; j<32; j++) + printf("%02x",((uint8_t *)&txids[i])[j]); + printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); diff --git a/src/komodo_structs.h b/src/komodo_structs.h index b62a76d3c..f1fc81918 100644 --- a/src/komodo_structs.h +++ b/src/komodo_structs.h @@ -57,7 +57,7 @@ struct pax_transaction UT_hash_handle hh; uint256 txid; uint64_t komodoshis,fiatoshis,validated; - int32_t marked,height,otherheight,approved,didstats; + int32_t marked,height,otherheight,approved,didstats,ready; uint16_t vout; char symbol[16],source[16],coinaddr[64]; uint8_t rmd160[20],type,buf[35]; }; From 72e51f5130e87883910f024f118697144869d098 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 15:58:07 +0200 Subject: [PATCH 115/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index dc1d17007..f56e996e5 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -269,7 +269,7 @@ uint64_t komodo_paxtotal() } else if ( pax->type == 'W' ) { - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f\n",str,pax->height,pax->otherheight,dstr(pax->value)); + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f\n",str,pax->height,pax->otherheight,dstr(pax->fiatoshis)); } } } From a6a335124ec8c6276aa257651b3a986f3dd7d2dd Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Dec 2016 15:59:02 +0200 Subject: [PATCH 116/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f56e996e5..22289a39c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -638,7 +638,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { pax->type = opretbuf[0]; strcpy(pax->source,(char *)&opretbuf[opretlen-4]); - if ( (pax2= komodo_paxfind(txids[i],vouts[i],'D')) != 0 ) + if ( (pax2= komodo_paxfind(txids[i],vouts[i],'D')) != 0 && pax2->fiatoshis != 0 && pax2->komodoshis != 0 ) { // realtime path? pax->fiatoshis = pax2->fiatoshis; From 84e8c5f921ab564d2549d2bf1739052d1a164638 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 7 Dec 2016 12:05:29 -0800 Subject: [PATCH 117/281] WitnessAnchorData only needs to store one witness per JSOutPoint. --- src/wallet/asyncrpcoperation_sendmany.cpp | 9 +++------ src/wallet/asyncrpcoperation_sendmany.h | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index ad3a415de..50d63c89f 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -331,7 +331,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { uint256 inputAnchor; std::vector> vInputWitnesses; pwalletMain->GetNoteWitnesses(vOutPoints, vInputWitnesses, inputAnchor); - jsopWitnessAnchorMap[ jso.ToString() ] = WitnessAnchorData{ vInputWitnesses, inputAnchor }; + jsopWitnessAnchorMap[ jso.ToString() ] = WitnessAnchorData{ vInputWitnesses[0], inputAnchor }; } } @@ -587,7 +587,6 @@ bool AsyncRPCOperation_sendmany::main_impl() { std::vector vOutPoints; std::vector> vInputWitnesses; uint256 inputAnchor; - WitnessAnchorData wad; int numInputsNeeded = (jsChange>0) ? 1 : 0; while (numInputsNeeded++ < ZC_NUM_JS_INPUTS && zInputsDeque.size() > 0) { SendManyInputJSOP t = zInputsDeque.front(); @@ -596,10 +595,8 @@ bool AsyncRPCOperation_sendmany::main_impl() { CAmount noteFunds = std::get<2>(t); zInputsDeque.pop_front(); - wad = jsopWitnessAnchorMap[ jso.ToString() ]; - for (auto & w : wad.witnesses) { - vInputWitnesses.push_back(w); - } + WitnessAnchorData wad = jsopWitnessAnchorMap[ jso.ToString() ]; + vInputWitnesses.push_back(wad.witness); if (inputAnchor.IsNull()) { inputAnchor = wad.anchor; } else if (inputAnchor != wad.anchor) { diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index 1c0cbbbfe..b9ff4f20f 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -42,9 +42,9 @@ struct AsyncJoinSplitInfo CAmount vpub_new = 0; }; -// A struct to help us track the witnesses and anchor for a given JSOutPoint +// A struct to help us track the witness and anchor for a given JSOutPoint struct WitnessAnchorData { - std::vector> witnesses; + boost::optional witness; uint256 anchor; }; From 6e458bf3a07999cec9f70c56f4312fadd2f36d3a Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Dec 2016 18:42:41 +0200 Subject: [PATCH 118/281] test --- src/komodo_gateway.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 22289a39c..9079ef3b4 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -253,7 +253,7 @@ uint64_t komodo_paxtotal() basesp = komodo_stateptrget(str); if ( basesp != 0 && pax->didstats == 0 ) { - if ( pax->type == 'I' && (pax2= komodo_paxfind(pax->txid,pax->vout,pax->type == 'I' ? 'D' : 'W')) != 0 ) + if ( pax->type == 'I' && (pax2= komodo_paxfind(pax->txid,pax->vout,'D')) != 0 ) { if ( pax2->fiatoshis != 0 ) { @@ -269,7 +269,8 @@ uint64_t komodo_paxtotal() } else if ( pax->type == 'W' ) { - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f\n",str,pax->height,pax->otherheight,dstr(pax->fiatoshis)); + if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f\n",str,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis)); } } } @@ -295,7 +296,7 @@ uint64_t komodo_paxtotal() checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",pax->height,pax->symbol,(double)pax->fiatoshis/COIN,(double)pax->komodoshis/COIN,(double)checktoshis/COIN); //printf(" v%d %.8f k.%d ht.%d\n",pax->vout,dstr(pax->komodoshis),pax->height,pax->otherheight); - if ( seed != 0 ) + if ( seed != 0 && checktoshis != 0 ) { if ( checktoshis == pax->komodoshis ) { From b8d7170d1c327447f17f7523537e93f2302be018 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Dec 2016 18:47:19 +0200 Subject: [PATCH 119/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9079ef3b4..f6f9168ce 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -599,7 +599,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax2->fiatoshis = pax->fiatoshis; pax2->komodoshis = pax->komodoshis; pax->marked = pax2->marked = pax->height; - pax->otherheight = height; + pax2->otherheight = pax->otherheight = height; if ( pax2->didstats == 0 ) { if ( (basesp= komodo_stateptrget(base)) != 0 ) From da02b3be0ce57a7a1c34b5efb76150787a5a050f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Dec 2016 18:50:21 +0200 Subject: [PATCH 120/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f6f9168ce..ebbceeeee 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -599,7 +599,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax2->fiatoshis = pax->fiatoshis; pax2->komodoshis = pax->komodoshis; pax->marked = pax2->marked = pax->height; - pax2->otherheight = pax->otherheight = height; + pax2->height = pax->height = height; if ( pax2->didstats == 0 ) { if ( (basesp= komodo_stateptrget(base)) != 0 ) From 329e4359f386eebf9bec80281a2096fedf7880bf Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Dec 2016 18:57:48 +0200 Subject: [PATCH 121/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ebbceeeee..a9d7534f3 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -269,7 +269,7 @@ uint64_t komodo_paxtotal() } else if ( pax->type == 'W' ) { - if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) + //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f\n",str,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis)); } } From daeecf95513e459147380d332297fcdd85be2163 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Dec 2016 19:03:39 +0200 Subject: [PATCH 122/281] test --- src/komodo_gateway.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a9d7534f3..15c68bebd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -692,7 +692,12 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 } komodo_gateway_deposit(coinaddr,0,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) - pax->type = opretbuf[0]; + { + pax->type = opretbuf[0]; + strcpy(pax->symbol,base); + pax->height = kmdheight; + pax->otherheight = height; + } } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); } else if ( tokomodo != 0 && opretbuf[0] == 'A' ) From eb82238dd0140c8052ffd05ac9afc26296b15570 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 8 Dec 2016 12:32:39 -0700 Subject: [PATCH 123/281] Rename Dummy to Disabled. --- src/zcash/Proof.cpp | 2 +- src/zcash/Proof.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zcash/Proof.cpp b/src/zcash/Proof.cpp index d45a1d48a..8a0ff2167 100644 --- a/src/zcash/Proof.cpp +++ b/src/zcash/Proof.cpp @@ -224,7 +224,7 @@ ProofVerifier ProofVerifier::Strict() { return ProofVerifier(true); } -ProofVerifier ProofVerifier::Dummy() { +ProofVerifier ProofVerifier::Disabled() { initialize_curve_params(); return ProofVerifier(false); } diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index 1f245e5e8..3b6b5e568 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -254,10 +254,10 @@ public: // all proofs using libsnark's API. static ProofVerifier Strict(); - // Creates a dummy verification context that performs - // no verification, used when avoiding duplicate effort + // Creates a verification context that performs no + // verification, used when avoiding duplicate effort // such as during reindexing. - static ProofVerifier Dummy(); + static ProofVerifier Disabled(); template Date: Thu, 8 Dec 2016 12:47:41 -0700 Subject: [PATCH 124/281] Add more tests for ProofVerifier. --- src/gtest/test_proofs.cpp | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/gtest/test_proofs.cpp b/src/gtest/test_proofs.cpp index dd7755677..bef777295 100644 --- a/src/gtest/test_proofs.cpp +++ b/src/gtest/test_proofs.cpp @@ -336,6 +336,29 @@ TEST(proofs, zksnark_serializes_properly) auto example = libsnark::generate_r1cs_example_with_field_input(250, 4); example.constraint_system.swap_AB_if_beneficial(); auto kp = libsnark::r1cs_ppzksnark_generator(example.constraint_system); + auto vkprecomp = libsnark::r1cs_ppzksnark_verifier_process_vk(kp.vk); + + for (size_t i = 0; i < 20; i++) { + auto badproof = ZCProof::random_invalid(); + auto proof = badproof.to_libsnark_proof>(); + + auto verifierEnabled = ProofVerifier::Strict(); + auto verifierDisabled = ProofVerifier::Disabled(); + // This verifier should catch the bad proof + ASSERT_TRUE(verifierEnabled.check( + kp.vk, + vkprecomp, + example.primary_input, + proof + )); + // This verifier won't! + ASSERT_TRUE(verifierDisabled.check( + kp.vk, + vkprecomp, + example.primary_input, + proof + )); + } for (size_t i = 0; i < 20; i++) { auto proof = libsnark::r1cs_ppzksnark_prover( @@ -345,6 +368,23 @@ TEST(proofs, zksnark_serializes_properly) example.constraint_system ); + { + auto verifierEnabled = ProofVerifier::Strict(); + auto verifierDisabled = ProofVerifier::Disabled(); + ASSERT_TRUE(verifierEnabled.check( + kp.vk, + vkprecomp, + example.primary_input, + proof + )); + ASSERT_TRUE(verifierDisabled.check( + kp.vk, + vkprecomp, + example.primary_input, + proof + )); + } + ASSERT_TRUE(libsnark::r1cs_ppzksnark_verifier_strong_IC( kp.vk, example.primary_input, From a513ea90d426ef449a0a8fd16aee22dfeeb21b97 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 7 Dec 2016 17:36:48 +1300 Subject: [PATCH 125/281] Fix indentation --- src/utiltest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utiltest.cpp b/src/utiltest.cpp index 3ebbcf128..5cebc1a5d 100644 --- a/src/utiltest.cpp +++ b/src/utiltest.cpp @@ -51,9 +51,9 @@ CWalletTx GetValidReceive(ZCJoinSplit& params, // Add the signature assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, - dataToBeSigned.begin(), 32, - joinSplitPrivKey - ) == 0); + dataToBeSigned.begin(), 32, + joinSplitPrivKey + ) == 0); CTransaction tx {mtx}; CWalletTx wtx {NULL, tx}; @@ -135,9 +135,9 @@ CWalletTx GetValidSpend(ZCJoinSplit& params, // Add the signature assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL, - dataToBeSigned.begin(), 32, - joinSplitPrivKey - ) == 0); + dataToBeSigned.begin(), 32, + joinSplitPrivKey + ) == 0); CTransaction tx {mtx}; CWalletTx wtx {NULL, tx}; return wtx; From 88b7f3c28bb6ca4f21b4d51f5ec23184b14b9373 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 9 Dec 2016 16:55:01 +1300 Subject: [PATCH 126/281] Generate JS for trydecryptnotes, make number of addresses a variable --- qa/zcash/performance-measurements.sh | 8 ++++---- src/wallet/rpcwallet.cpp | 6 +++--- src/zcbenchmarks.cpp | 11 ++++------- src/zcbenchmarks.h | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/qa/zcash/performance-measurements.sh b/qa/zcash/performance-measurements.sh index b65974078..851adef09 100755 --- a/qa/zcash/performance-measurements.sh +++ b/qa/zcash/performance-measurements.sh @@ -56,7 +56,7 @@ function zcashd_valgrind_stop { case "$1" in *) case "$2" in - verifyjoinsplit|trydecryptnotes) + verifyjoinsplit) zcashd_start RAWJOINSPLIT=$(zcash_rpc zcsamplejoinsplit) zcashd_stop @@ -89,7 +89,7 @@ case "$1" in zcash_rpc zcbenchmark validatelargetx 5 ;; trydecryptnotes) - zcash_rpc zcbenchmark trydecryptnotes 1000 "\"$RAWJOINSPLIT\"" + zcash_rpc zcbenchmark trydecryptnotes 1000 "${@:3}" ;; incnotewitnesses) zcash_rpc zcbenchmark incnotewitnesses 100 "${@:3}" @@ -123,7 +123,7 @@ case "$1" in zcash_rpc zcbenchmark verifyequihash 1 ;; trydecryptnotes) - zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" + zcash_rpc zcbenchmark trydecryptnotes 1 "${@:3}" ;; incnotewitnesses) zcash_rpc zcbenchmark incnotewitnesses 1 "${@:3}" @@ -158,7 +158,7 @@ case "$1" in zcash_rpc zcbenchmark verifyequihash 1 ;; trydecryptnotes) - zcash_rpc zcbenchmark trydecryptnotes 1 "\"$RAWJOINSPLIT\"" + zcash_rpc zcbenchmark trydecryptnotes 1 "${@:3}" ;; incnotewitnesses) zcash_rpc zcbenchmark incnotewitnesses 1 "${@:3}" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6c1ce2d11..abd8a362e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2454,8 +2454,7 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp) JSDescription samplejoinsplit; - if (benchmarktype == "verifyjoinsplit" || - benchmarktype == "trydecryptnotes") { + if (benchmarktype == "verifyjoinsplit") { CDataStream ss(ParseHexV(params[2].get_str(), "js"), SER_NETWORK, PROTOCOL_VERSION); ss >> samplejoinsplit; } @@ -2482,7 +2481,8 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp) } else if (benchmarktype == "validatelargetx") { sample_times.push_back(benchmark_large_tx()); } else if (benchmarktype == "trydecryptnotes") { - sample_times.push_back(benchmark_try_decrypt_notes(samplejoinsplit)); + int nAddrs = params[2].get_int(); + sample_times.push_back(benchmark_try_decrypt_notes(nAddrs)); } else if (benchmarktype == "incnotewitnesses") { int nTxs = params[2].get_int(); sample_times.push_back(benchmark_increment_note_witnesses(nTxs)); diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 61afb535d..8f324850b 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -224,19 +224,16 @@ double benchmark_large_tx() return timer_stop(tv_start); } -double benchmark_try_decrypt_notes(const JSDescription &joinsplit) +double benchmark_try_decrypt_notes(size_t nAddrs) { - const size_t NUM_ADDRS = 10; - CWallet wallet; - for (int i = 0; i < NUM_ADDRS; i++) { + for (int i = 0; i < nAddrs; i++) { auto sk = libzcash::SpendingKey::random(); wallet.AddSpendingKey(sk); } - CMutableTransaction mtx; - mtx.vjoinsplit.push_back(joinsplit); - CTransaction tx(mtx); + auto sk = libzcash::SpendingKey::random(); + auto tx = GetValidReceive(*pzcashParams, sk, 10, true); struct timeval tv_start; timer_start(tv_start); diff --git a/src/zcbenchmarks.h b/src/zcbenchmarks.h index a1575e500..318921002 100644 --- a/src/zcbenchmarks.h +++ b/src/zcbenchmarks.h @@ -12,7 +12,7 @@ extern std::vector benchmark_solve_equihash_threaded(int nThreads); extern double benchmark_verify_joinsplit(const JSDescription &joinsplit); extern double benchmark_verify_equihash(); extern double benchmark_large_tx(); -extern double benchmark_try_decrypt_notes(const JSDescription &joinsplit); +extern double benchmark_try_decrypt_notes(size_t nAddrs); extern double benchmark_increment_note_witnesses(size_t nTxs); #endif From 9755eb8292ee51148f4ebbbc7bfcfdb67bac5248 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 9 Dec 2016 16:55:55 +1300 Subject: [PATCH 127/281] Add JS to second block to ensure witnesses are incremented --- src/zcbenchmarks.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index 8f324850b..decc33f35 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -274,6 +274,20 @@ double benchmark_increment_note_witnesses(size_t nTxs) // Second block CBlock block2; block2.hashPrevBlock = block1.GetHash(); + { + auto wtx = GetValidReceive(*pzcashParams, sk, 10, true); + auto note = GetNote(*pzcashParams, sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + block2.vtx.push_back(wtx); + } CBlockIndex index2(block2); index2.nHeight = 2; From 37cce214a40af7b0ecee532708882c596f1589da Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 8 Dec 2016 23:14:23 -0700 Subject: [PATCH 128/281] ASSERT_TRUE -> ASSERT_FALSE --- src/gtest/test_proofs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtest/test_proofs.cpp b/src/gtest/test_proofs.cpp index bef777295..c6ffbf144 100644 --- a/src/gtest/test_proofs.cpp +++ b/src/gtest/test_proofs.cpp @@ -345,7 +345,7 @@ TEST(proofs, zksnark_serializes_properly) auto verifierEnabled = ProofVerifier::Strict(); auto verifierDisabled = ProofVerifier::Disabled(); // This verifier should catch the bad proof - ASSERT_TRUE(verifierEnabled.check( + ASSERT_FALSE(verifierEnabled.check( kp.vk, vkprecomp, example.primary_input, From a39d7b21d79ab006fe4d5e78430b88037da8d4d9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 12:17:58 +0200 Subject: [PATCH 129/281] test --- src/komodo_gateway.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 15c68bebd..1ea779461 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -676,7 +676,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,"RUB") == 0 ) printf("RUB WITHDRAW %s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; - if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) + //if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) { if ( value != 0 && ((pax= komodo_paxfind(txid,vout,'W')) == 0 || pax->didstats == 0) ) { @@ -698,7 +698,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax->height = kmdheight; pax->otherheight = height; } - } else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); + } // else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); + // need to allocate pax } else if ( tokomodo != 0 && opretbuf[0] == 'A' ) { From 1e22f865633e48a105a2fe959eefe61fafc8d116 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 12:20:56 +0200 Subject: [PATCH 130/281] test --- src/komodo_gateway.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 1ea779461..1aac68f76 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -697,6 +697,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 strcpy(pax->symbol,base); pax->height = kmdheight; pax->otherheight = height; + pax->komodoshis = komodoshis; } } // else printf("withdraw %s paxcmp ht.%d %d error value %.8f -> %.8f vs %.8f\n",base,kmdheight,height,dstr(value),dstr(komodoshis),dstr(checktoshis)); // need to allocate pax From 250195b07f9e451d9c40654397a54f198fbaaf7e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 12:33:57 +0200 Subject: [PATCH 131/281] tes --- src/komodo_gateway.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 1aac68f76..6a7b8f8e6 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -270,7 +270,10 @@ uint64_t komodo_paxtotal() else if ( pax->type == 'W' ) { //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f\n",str,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis)); + bitcoin_address(coinaddr,addrtype,rmd160,20); + checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); + + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshs)); } } } From aacc96f83e1cd1373aebfaf48a92375d6125702e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 12:35:25 +0200 Subject: [PATCH 132/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6a7b8f8e6..0b89ad0d8 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -273,7 +273,7 @@ uint64_t komodo_paxtotal() bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshs)); + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } From 431af13e5f0d1050ea49faaa42639c1bc920c05d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 12:37:12 +0200 Subject: [PATCH 133/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0b89ad0d8..84e31b746 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -270,7 +270,7 @@ uint64_t komodo_paxtotal() else if ( pax->type == 'W' ) { //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - bitcoin_address(coinaddr,addrtype,rmd160,20); + //bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); From c1e46db8aba268779ae19a358671a118435e1b48 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Wed, 7 Dec 2016 10:56:09 -0800 Subject: [PATCH 134/281] Gather release notes from previous release to HEAD Also update release-process.md to replace git shortlog command with release-notes.py script. --- doc/release-process.md | 5 ++--- zcutil/release-notes.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index aded05e0f..93b97adaf 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -59,10 +59,9 @@ In `configure.ac` and `clientversion.h`: ### B2. Write release notes -git shortlog helps a lot, for example: +Run the release-notes.py script to generate release notes and update authors.md file. For example: - $ git shortlog --no-merges v${ZCASH_RELEASE_PREV}..HEAD \ - > ./doc/release-notes/release-notes-${ZCASH_RELEASE}.md + $ python zcutil/release-notes.py --version $ZCASH_RELEASE Update the Debian package changelog: diff --git a/zcutil/release-notes.py b/zcutil/release-notes.py index aa524bacf..f56e8c22d 100644 --- a/zcutil/release-notes.py +++ b/zcutil/release-notes.py @@ -70,9 +70,9 @@ def document_authors(): ## Writes release note to ./doc/release-notes based on git shortlog when current version number is specified def generate_release_note(version, filename): print "Automatically generating release notes for {0} from git shortlog. Should review {1} for accuracy.".format(version, filename) - prev_tag = subprocess.Popen(['git describe --abbrev=0 v{0}^'.format(version)], shell=True, stdout=subprocess.PIPE).communicate()[0].strip() - print "Previous release tag: ", prev_tag - notes = subprocess.Popen(['git shortlog --no-merges {0}..v{1}'.format(prev_tag, version)], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0] + latest_tag = subprocess.Popen(['git describe --abbrev=0'], shell=True, stdout=subprocess.PIPE).communicate()[0].strip() + print "Previous release tag: ", latest_tag + notes = subprocess.Popen(['git shortlog --no-merges {0}..HEAD'.format(latest_tag)], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0] lines = notes.split('\n') lines = [alias_authors_in_release_notes(line) for line in lines] release_note = os.path.join(doc_dir, 'release-notes', 'release-notes-{0}.md'.format(version)) From b8176b070c68095fbea48c19c5e75d851f934d2e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 13:23:01 +0200 Subject: [PATCH 135/281] test --- src/komodo_gateway.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 84e31b746..33a6c45af 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -272,8 +272,9 @@ uint64_t komodo_paxtotal() //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) //bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); - - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + if ( checktoshis != pax->komodoshis ) + pax->marked = pax->height; + else printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } From eeee6d5d6c1edb0eb2559d9d5f914dc580d7ef9d Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 10 Dec 2016 00:51:32 +1300 Subject: [PATCH 136/281] Add a reindex test that fails because of a bug in decrementing witness caches Ref: https://github.com/zcash/zcash/pull/1904#issuecomment-265992988 --- src/wallet/gtest/test_wallet.cpp | 115 +++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 0530bdb53..eaee37f48 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -871,6 +871,121 @@ TEST(wallet_tests, CachedWitnessesDecrementFirst) { } } +TEST(wallet_tests, CachedWitnessesCleanIndex) { + TestWallet wallet; + CBlock block1; + CBlock block2; + CBlock block3; + CBlockIndex index1(block1); + CBlockIndex index2(block2); + CBlockIndex index3(block3); + ZCIncrementalMerkleTree tree; + + auto sk = libzcash::SpendingKey::random(); + wallet.AddSpendingKey(sk); + + { + // First transaction (case tested in _empty_chain) + auto wtx = GetValidReceive(sk, 10, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + // First block (case tested in _empty_chain) + block1.vtx.push_back(wtx); + index1.nHeight = 1; + wallet.IncrementNoteWitnesses(&index1, &block1, tree); + } + + { + // Second transaction (case tested in _chain_tip) + auto wtx = GetValidReceive(sk, 50, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + // Second block (case tested in _chain_tip) + block2.vtx.push_back(wtx); + index2.nHeight = 2; + wallet.IncrementNoteWitnesses(&index2, &block2, tree); + } + + { + // Third transaction + auto wtx = GetValidReceive(sk, 20, true); + auto note = GetNote(sk, wtx, 0, 1); + auto nullifier = note.nullifier(sk); + + mapNoteData_t noteData; + JSOutPoint jsoutpt {wtx.GetHash(), 0, 1}; + CNoteData nd {sk.address(), nullifier}; + noteData[jsoutpt] = nd; + wtx.SetNoteData(noteData); + wallet.AddToWallet(wtx, true, NULL); + + std::vector notes {jsoutpt}; + std::vector> witnesses; + uint256 anchor3; + + // Third block + block3.vtx.push_back(wtx); + index3.nHeight = 3; + wallet.IncrementNoteWitnesses(&index3, &block3, tree); + wallet.GetNoteWitnesses(notes, witnesses, anchor3); + + // Now pretend we are reindexing: the chain is cleared, and each block is + // used to increment witnesses again. + wallet.IncrementNoteWitnesses(&index1, &block1, tree); + uint256 anchor3a; + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor3a); + EXPECT_TRUE((bool) witnesses[0]); + // Should equal third anchor because witness cache unaffected + EXPECT_EQ(anchor3, anchor3a); + + wallet.IncrementNoteWitnesses(&index2, &block2, tree); + uint256 anchor3b; + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor3b); + EXPECT_TRUE((bool) witnesses[0]); + EXPECT_EQ(anchor3, anchor3b); + + // Pretend a reorg happened that was recorded in the block files + wallet.DecrementNoteWitnesses(&index2); + uint256 anchor3c; + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor3c); + EXPECT_TRUE((bool) witnesses[0]); + EXPECT_EQ(anchor3, anchor3c); + + wallet.IncrementNoteWitnesses(&index2, &block2, tree); + uint256 anchor3d; + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor3d); + EXPECT_TRUE((bool) witnesses[0]); + EXPECT_EQ(anchor3, anchor3d); + + wallet.IncrementNoteWitnesses(&index3, &block3, tree); + uint256 anchor3e; + witnesses.clear(); + wallet.GetNoteWitnesses(notes, witnesses, anchor3e); + EXPECT_TRUE((bool) witnesses[0]); + EXPECT_EQ(anchor3, anchor3e); + } +} + TEST(wallet_tests, ClearNoteWitnessCache) { TestWallet wallet; From 9d2cc3a78445c5256bc0d6c20884edc5cffc742f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 10 Dec 2016 00:56:32 +1300 Subject: [PATCH 137/281] Make the test pass by fixing the bug! --- src/wallet/wallet.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c9dac701d..b424b8def 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -756,16 +756,19 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) CNoteData* nd = &(item.second); // Check the validity of the cache assert(nWitnessCacheSize >= nd->witnesses.size()); - // Witnesses being decremented should always be either -1 - // (never incremented or decremented) or equal to pindex - assert((nd->witnessHeight == -1) || - (nd->witnessHeight == pindex->nHeight)); - if (nd->witnesses.size() > 0) { - nd->witnesses.pop_front(); + // Only increment witnesses that are not above the current height + if (nd->witnessHeight <= pindex->nHeight) { + // Witnesses being decremented should always be either -1 + // (never incremented or decremented) or equal to pindex + assert((nd->witnessHeight == -1) || + (nd->witnessHeight == pindex->nHeight)); + if (nd->witnesses.size() > 0) { + nd->witnesses.pop_front(); + } + // pindex is the block being removed, so the new witness cache + // height is one below it. + nd->witnessHeight = pindex->nHeight - 1; } - // pindex is the block being removed, so the new witness cache - // height is one below it. - nd->witnessHeight = pindex->nHeight - 1; } } nWitnessCacheSize -= 1; From 1bc5fdf882ea5acd9bfdd8a1ecac198db05158cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 14:02:03 +0200 Subject: [PATCH 138/281] test --- src/komodo_gateway.h | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 33a6c45af..b6e93778e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -271,10 +271,16 @@ uint64_t komodo_paxtotal() { //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) //bitcoin_address(coinaddr,addrtype,rmd160,20); - checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); - if ( checktoshis != pax->komodoshis ) - pax->marked = pax->height; - else printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + if ( (checktoshis= komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis)) != 0 ) + { + if ( checktoshis != pax->komodoshis ) + pax->marked = pax->height; + else if ( pax->validated == 0 ) + { + pax->validated = pax->komodoshis; + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + } + } } } } @@ -289,7 +295,13 @@ uint64_t komodo_paxtotal() if ( pax->marked == 0 ) { if ( komodo_is_issuer() != 0 ) - total += pax->fiatoshis; + { + if ( pax->validated != 0 ) // but what to do with 'W' 'A' and 'X' variants? + { + total += pax->fiatoshis; + pax->ready = 1; + } + } else if ( pax->approved != 0 ) { if ( pax->validated != 0 ) @@ -326,7 +338,7 @@ int32_t komodo_pending_withdraws(char *opretstr) HASH_ITER(hh,PAX,pax,tmp) { //printf("pax %s marked.%u approved.%u\n",pax->symbol,pax->marked,pax->approved); - if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 ) + if ( pax->type == 'W' && pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { // add 'A' opreturn entry if ( len == 0 ) @@ -460,7 +472,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { for (i=1; itype = opcode; if ( opcode == 'I' && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) @@ -472,7 +484,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { if ( pax->marked != 0 && height >= 80820 ) { - printf("%c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); + printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); errs++; } else matched++; } @@ -481,7 +493,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above for (j=0; j<32; j++) printf("%02x",((uint8_t *)&txids[i-1])[j]); printf(" cant paxfind %c txid\n",opcode); - printf("%c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); + printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); } } else From 65d74516bb119e353895c83ae8caf04b402cfe1f Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 14:59:04 +0200 Subject: [PATCH 139/281] test --- src/komodo_gateway.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b6e93778e..268a98a12 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -482,11 +482,19 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above } if ( ((opcode == 'I' && (pax->fiatoshis == 0 || pax->fiatoshis == block.vtx[0].vout[i].nValue)) || (opcode == 'X' && (pax->komodoshis == 0 || pax->komodoshis == block.vtx[0].vout[i].nValue))) ) { - if ( pax->marked != 0 && height >= 80820 ) + if ( pax->marked != 0 ) { - printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); - errs++; - } else matched++; + if ( pax->marked != height && height >= 80820 ) + { + printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); + errs++; + } else matched++; + } + else + { + matched++; + pax->marked = height; + } } else { From 02c36c15f4ea08b0801a261f9c2b9f4f54aa43a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 15:04:42 +0200 Subject: [PATCH 140/281] test --- src/komodo_gateway.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 268a98a12..d482a64cd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -305,7 +305,10 @@ uint64_t komodo_paxtotal() else if ( pax->approved != 0 ) { if ( pax->validated != 0 ) + { total += pax->komodoshis; + pax->ready = 1; + } else { seed = 0; @@ -338,7 +341,7 @@ int32_t komodo_pending_withdraws(char *opretstr) HASH_ITER(hh,PAX,pax,tmp) { //printf("pax %s marked.%u approved.%u\n",pax->symbol,pax->marked,pax->approved); - if ( pax->type == 'W' && pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) + if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { // add 'A' opreturn entry if ( len == 0 ) @@ -384,7 +387,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to printf("miner: skip %s %.8f when avail %.8f\n",symbol,dstr(pax->fiatoshis),dstr(available)); continue; } - if ( pax->marked != 0 ) + if ( pax->marked != 0 || (pax->type != 'D' && pax->type != 'A') || pax->ready == 0 ) continue; if ( strcmp(pax->symbol,symbol) != 0 || pax->validated == 0 ) { @@ -482,19 +485,11 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above } if ( ((opcode == 'I' && (pax->fiatoshis == 0 || pax->fiatoshis == block.vtx[0].vout[i].nValue)) || (opcode == 'X' && (pax->komodoshis == 0 || pax->komodoshis == block.vtx[0].vout[i].nValue))) ) { - if ( pax->marked != 0 ) + if ( pax->marked != 0 && height >= 80820 ) { - if ( pax->marked != height && height >= 80820 ) - { - printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); - errs++; - } else matched++; - } - else - { - matched++; - pax->marked = height; - } + printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); + errs++; + } else matched++; } else { From 8ae929129ad70cd87d2fc27dadb4fd40af8d862b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 15:08:10 +0200 Subject: [PATCH 141/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d482a64cd..493b3b4da 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -394,7 +394,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to //printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); continue; } - if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) + //if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) printf("pax.%s marked.%d %.8f -> %.8f\n",ASSETCHAINS_SYMBOL,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); txNew->vout.resize(numvouts+1); txNew->vout[numvouts].nValue = (opcode == 'I') ? pax->fiatoshis : pax->komodoshis; From 0449e3f0a5965c2a1275f5d01837738e9033dee7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 15:11:56 +0200 Subject: [PATCH 142/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 493b3b4da..3902384d2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -296,7 +296,7 @@ uint64_t komodo_paxtotal() { if ( komodo_is_issuer() != 0 ) { - if ( pax->validated != 0 ) // but what to do with 'W' 'A' and 'X' variants? + if ( pax->validated != 0 && pax->type == 'D' ) { total += pax->fiatoshis; pax->ready = 1; From 9b570fb1f25842f4e2bb1260666395d1acb8d8bb Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 16:05:21 +0200 Subject: [PATCH 143/281] test --- src/komodo_gateway.h | 2 +- src/komodo_interest.h | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3902384d2..794ea3727 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -511,7 +511,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading - if ( height > 110000 ) //&& opcode == 'X' ) + if ( height > 150000 ) { printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); return(-1); diff --git a/src/komodo_interest.h b/src/komodo_interest.h index bc9df3e3a..36b5e2f09 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -18,12 +18,20 @@ uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest) { static uint64_t *interests; static int32_t maxheight; - uint64_t total; int32_t ind,incr = 100000; + uint64_t total; int32_t ind,incr = 1000000; if ( height >= maxheight ) { - interests = (uint64_t *)realloc(interests,(maxheight + incr) * sizeof(*interests) * 2); - memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2); - maxheight += incr; + if ( interests == 0 ) + { + interests = (uint64_t *)calloc(incr,sizeof(*interests) * 2); // fix before block 1 million + maxheight += incr; + } + else + { + interests = (uint64_t *)realloc(interests,(maxheight + incr) * sizeof(*interests) * 2); + memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2); + maxheight += incr; + } } ind = (height << 1); if ( paidinterest < 0 ) // request From fa0d10cc5cd79a60117c543a87d6d3b0c8001575 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 16:06:50 +0200 Subject: [PATCH 144/281] test --- src/komodo_interest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_interest.h b/src/komodo_interest.h index 36b5e2f09..def35d78c 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -18,13 +18,13 @@ uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest) { static uint64_t *interests; static int32_t maxheight; - uint64_t total; int32_t ind,incr = 1000000; + uint64_t total; int32_t ind,incr = 100000; if ( height >= maxheight ) { if ( interests == 0 ) { - interests = (uint64_t *)calloc(incr,sizeof(*interests) * 2); // fix before block 1 million - maxheight += incr; + maxheight = height + incr; + interests = (uint64_t *)calloc(maxheight,sizeof(*interests) * 2); } else { From 206c579d09bea2d2b46525adc224cd3a3b89327d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 16:43:18 +0200 Subject: [PATCH 145/281] test --- src/pow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index ac2544cb2..ff871d97f 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -113,7 +113,7 @@ extern int32_t KOMODO_CHOSEN_ONE; bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params) { extern int32_t KOMODO_REWIND; - bool fNegative,fOverflow; int32_t i,nonz=0,special,special2,notaryid=-1,flag = 0; + bool fNegative,fOverflow; int32_t i,nonz=0,special=0,special2=0,notaryid=-1,flag = 0; arith_uint256 bnTarget; bnTarget.SetCompact(nBits, &fNegative, &fOverflow); @@ -153,7 +153,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - if ( height <= KOMODO_REWIND ) + if ( KOMODO_REWIND == 0 || height <= KOMODO_REWIND ) return error("CheckProofOfWork(): hash doesn't match nBits"); } return true; From a62cf5ce2d196231b692ff5647a0f54b200b8df1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 16:50:04 +0200 Subject: [PATCH 146/281] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index ff871d97f..6c91bb5bf 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -153,7 +153,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - if ( KOMODO_REWIND == 0 || height <= KOMODO_REWIND ) + if ( (KOMODO_REWIND == 0 && height > 106000) || height <= KOMODO_REWIND ) return error("CheckProofOfWork(): hash doesn't match nBits"); } return true; From a7f87026bb2b666f926747f942229574b7d326eb Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 17:10:12 +0200 Subject: [PATCH 147/281] mining fix, interests alloc fix, paxwithdraw mining --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 6c91bb5bf..d597123bc 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -153,7 +153,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - if ( (KOMODO_REWIND == 0 && height > 106000) || height <= KOMODO_REWIND ) + if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND ) return error("CheckProofOfWork(): hash doesn't match nBits"); } return true; From d2baf46fc2f15ac0ad2c0a6e7dedbb55583b634d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Dec 2016 17:11:44 +0200 Subject: [PATCH 148/281] Revert "test" This reverts commit 4c000337a26632fc3a13440f87741d27c1885c7a. --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index fc6876d85..0fb8a74d7 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -485,7 +485,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading - if ( height > 110000 ) //&& opcode == 'X' ) + if ( height > 100000 ) //&& opcode == 'X' ) { printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); return(-1); From 72da1eea470f8f7b1bb463694cca397575010b65 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 10 Dec 2016 22:15:46 +0200 Subject: [PATCH 149/281] test --- src/komodo_pax.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index f131881a0..dbeab48cf 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -444,7 +444,7 @@ uint64_t _komodo_paxprice(uint64_t *kmdbtcp,uint64_t *btcusdp,int32_t height,cha else return(0); } } - } else printf("paxprice invalid base.%s %d, rel.%s %d\n",base,baseid,rel,relid); + } //else printf("paxprice invalid base.%s %d, rel.%s %d\n",base,baseid,rel,relid); return(0); } From ff67b2413ef96ce7fc1589173eaed1d29a4528cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 11 Dec 2016 09:38:08 +0200 Subject: [PATCH 150/281] test --- src/pow.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index d597123bc..b96d29b9c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -146,15 +146,17 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - int32_t i; - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&hash)[i]); - printf(" hash vs "); - for (i=31; i>=0; i--) - printf("%02x",((uint8_t *)&bnTarget)[i]); - printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND ) + { + int32_t i; + for (i=31; i>=0; i--) + printf("%02x",((uint8_t *)&hash)[i]); + printf(" hash vs "); + for (i=31; i>=0; i--) + printf("%02x",((uint8_t *)&bnTarget)[i]); + printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); return error("CheckProofOfWork(): hash doesn't match nBits"); + } } return true; } From 6b1a6da1f30a9db6b22dd388bc5ac07caf7bc095 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 11 Dec 2016 10:01:23 +0200 Subject: [PATCH 151/281] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 43d04e639..cd60b4c4f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -99,7 +99,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, } #define ASSETCHAINS_MINHEIGHT 100 -#define ROUNDROBIN_DELAY 58 +#define ROUNDROBIN_DELAY 57 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE; extern char ASSETCHAINS_SYMBOL[16]; extern std::string NOTARY_PUBKEY; From 716fb3822936c78ee9733f1a9d3d280c13d2f3cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 09:15:20 +0200 Subject: [PATCH 152/281] suppress gateway for non-fiat --- src/komodo_gateway.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 794ea3727..140505d6d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -362,6 +362,8 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to struct pax_transaction *pax,*tmp; char symbol[16],dest[16]; uint8_t *script,opcode,opret[16384],data[16384]; int32_t i,baseid,ht,len=0,opretlen=0,numvouts=1; struct komodo_state *sp; uint64_t available,deposited,issued,withdrawn,approved,redeemed,mask; sp = komodo_stateptr(symbol,dest); strcpy(symbol,base); + if ( komodo_baseid(base) < 0 ) + return(0); PENDING_KOMODO_TX = 0; if ( tokomodo == 0 ) { @@ -468,6 +470,15 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { strcpy(symbol,ASSETCHAINS_SYMBOL); opcode = 'I'; + if ( komodo_baseid(symbol) < 0 ) + { + if ( block.vtx[0].vout.size() != 1 ) + { + printf("%s has more than one coinbase?\n",symbol); + return(-1); + } + return(0); + } } if ( script[offset] == opcode && opretlen < block.vtx[0].vout[n-1].scriptPubKey.size() ) { @@ -551,6 +562,10 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { uint8_t rmd160[20],rmd160s[64*20],addrtype,shortflag,pubkey33[33]; int32_t didstats,i,j,n,len,tokomodo,kmdheight,otherheights[64],kmdheights[64]; int8_t baseids[64]; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; uint64_t convtoshis,seed; int64_t fiatoshis,komodoshis,checktoshis,values[64],srcvalues[64]; struct pax_transaction *pax,*pax2; struct komodo_state *basesp; double diff; const char *typestr = "unknown"; + if ( ASSETCHAINS_SYMBOL[0] == 0 ) + return("komodo"); + else if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) + return("assetchain"); memset(baseids,0xff,sizeof(baseids)); memset(values,0,sizeof(values)); memset(srcvalues,0,sizeof(srcvalues)); @@ -825,6 +840,11 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 + if ( refid == 0 ) + { + KOMODO_PASSPORT_INITDONE = 1; + return; + } //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { From d63fdb34cc2caa5ebfd578e8f63cfb746bea6ae6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 09:23:45 +0200 Subject: [PATCH 153/281] test --- src/miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index cd60b4c4f..38c3fc22d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -109,6 +109,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33) int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33]); int32_t komodo_pax_opreturn(uint8_t *opret,int32_t maxsize); uint64_t komodo_paxtotal(); +int32_t komodo_baseid(char *origbase); int32_t komodo_is_issuer(); int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *symbol,int32_t tokomodo); int32_t komodo_isrealtime(int32_t *kmdheightp); @@ -127,7 +128,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) while ( KOMODO_ON_DEMAND == 0 ) { deposits = komodo_paxtotal(); - if ( KOMODO_INITDONE == 0 || (isrealtime= komodo_isrealtime(&kmdheight)) == 0 ) + if ( KOMODO_INITDONE == 0 || komodo_baseid(ASSETCHAINS_SYMBOL) < 0 || (isrealtime= komodo_isrealtime(&kmdheight)) == 0 ) { //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } From c5b295d857d38a4ba091b3b950164f0bbf461f2a Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 09:28:23 +0200 Subject: [PATCH 154/281] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 38c3fc22d..d75e80fe9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -128,7 +128,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) while ( KOMODO_ON_DEMAND == 0 ) { deposits = komodo_paxtotal(); - if ( KOMODO_INITDONE == 0 || komodo_baseid(ASSETCHAINS_SYMBOL) < 0 || (isrealtime= komodo_isrealtime(&kmdheight)) == 0 ) + if ( KOMODO_INITDONE == 0 || (komodo_baseid(ASSETCHAINS_SYMBOL) >= 0 && (isrealtime= komodo_isrealtime(&kmdheight)) == 0) ) { //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } From 132aea8c6007bd719f1bdbc17c12a0c970969e97 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 10:37:59 +0200 Subject: [PATCH 155/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 140505d6d..76f66d9c8 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -353,7 +353,7 @@ int32_t komodo_pending_withdraws(char *opretstr) if ( len > 0 ) init_hexbytes_noT(opretstr,opretbuf,len); else opretstr[0] = 0; - fprintf(stderr,"komodo_pending_withdraws len.%d PAXTOTAL %.8f\n",len,dstr(komodo_paxtotal())); + //fprintf(stderr,"komodo_pending_withdraws len.%d PAXTOTAL %.8f\n",len,dstr(komodo_paxtotal())); return(len); } From a65789c8f1d1342f813d4663be64f93cba87965d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 12:51:30 +0200 Subject: [PATCH 156/281] test --- src/Makefile.qttest.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 3e57a8926..d46ef959b 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -3,9 +3,9 @@ TESTS += qt/test/test_bitcoin-qt TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp -if ENABLE_WALLET +#if ENABLE_WALLET TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp -endif +#endif TEST_QT_H = \ qt/test/uritests.h \ From 8962d0405be20d5e6d87e210cb0fcb086f11d512 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 12:53:54 +0200 Subject: [PATCH 157/281] test --- src/Makefile.am | 8 ++++---- src/Makefile.qttest.include | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 77a1bb782..2e056f103 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -518,10 +518,10 @@ endif @test -f $(PROTOC) $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $( Date: Mon, 12 Dec 2016 12:59:20 +0200 Subject: [PATCH 158/281] test --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 17b9d67ea..ce2ef30de 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -987,7 +987,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) MarkStartTime(); if ((chainparams.NetworkIDString() != "regtest") && - GetBoolArg("-showmetrics", isatty(STDOUT_FILENO)) && + GetBoolArg("-showmetrics", 0) && !fPrintToConsole && !GetBoolArg("-daemon", false)) { // Start the persistent metrics interface ConnectMetricsScreen(); From 65b18d2f71e52baa6e7955ef2cdbd35c9b4b6616 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:07:50 +0200 Subject: [PATCH 159/281] test --- src/komodo_gateway.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 76f66d9c8..88bfd21d0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -831,6 +831,8 @@ void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; + printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); + while ( KOMODO_INITDONE == 0 ) { fprintf(stderr,"PASSPORT iteration waiting for KOMODO_INITDONE\n"); @@ -845,7 +847,7 @@ void komodo_passport_iteration() KOMODO_PASSPORT_INITDONE = 1; return; } - //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -913,5 +915,6 @@ void komodo_passport_iteration() komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; + printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); } From 00a74ca1dcd2069b97cf4fded1eaac70423adf55 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:13:05 +0200 Subject: [PATCH 160/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 88bfd21d0..ff9b7b1b0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -831,7 +831,7 @@ void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; - printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); + //printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); while ( KOMODO_INITDONE == 0 ) { @@ -842,12 +842,12 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - if ( refid == 0 ) + //if ( refid == 0 ) { KOMODO_PASSPORT_INITDONE = 1; return; } - printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -915,6 +915,6 @@ void komodo_passport_iteration() komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; - printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); } From 003034253d7e518f81ca0f02319ebc771ff9f25c Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:17:24 +0200 Subject: [PATCH 161/281] test --- src/komodo_gateway.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ff9b7b1b0..3f1f5b11a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -269,7 +269,6 @@ uint64_t komodo_paxtotal() } else if ( pax->type == 'W' ) { - //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) //bitcoin_address(coinaddr,addrtype,rmd160,20); if ( (checktoshis= komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis)) != 0 ) { @@ -278,7 +277,8 @@ uint64_t komodo_paxtotal() else if ( pax->validated == 0 ) { pax->validated = pax->komodoshis; - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) + printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } @@ -842,7 +842,7 @@ void komodo_passport_iteration() if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - //if ( refid == 0 ) + if ( refid == 0 ) { KOMODO_PASSPORT_INITDONE = 1; return; @@ -889,7 +889,7 @@ void komodo_passport_iteration() fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); } - else + else if ( 0 ) { komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"wb")) != 0 ) @@ -912,7 +912,7 @@ void komodo_passport_iteration() if ( sp != 0 && isrealtime == 0 ) refsp->RTbufs[0][2] = 0; } - komodo_paxtotal(); + //komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; //printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); From 8be198635eccd5bf17dd1f7ef52cfa4246fc0cbb Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:22:20 +0200 Subject: [PATCH 162/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3f1f5b11a..8cf0516b0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -889,7 +889,7 @@ void komodo_passport_iteration() fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); } - else if ( 0 ) + else { komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"wb")) != 0 ) From 6238a204a665af18b6aa6321a5f0f8587d254221 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:25:14 +0200 Subject: [PATCH 163/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8cf0516b0..884e2204a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -889,7 +889,7 @@ void komodo_passport_iteration() fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); } - else + else { komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"wb")) != 0 ) @@ -912,7 +912,7 @@ void komodo_passport_iteration() if ( sp != 0 && isrealtime == 0 ) refsp->RTbufs[0][2] = 0; } - //komodo_paxtotal(); + komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; //printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); From 5ccb222a7e003133ee2a493239e4f71e5ed5231b Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:29:33 +0200 Subject: [PATCH 164/281] test --- src/komodo_gateway.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 884e2204a..2c322385d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -247,6 +247,8 @@ uint64_t komodo_paxtotal() { HASH_ITER(hh,PAX,pax,tmp) { + if ( pax->marked != 0 ) + continue; if ( pax->type == 'A' || pax->type == 'D' || pax->type == 'X' ) str = pax->symbol; else str = pax->source; @@ -289,6 +291,8 @@ uint64_t komodo_paxtotal() HASH_ITER(hh,PAX,pax,tmp) { pax->ready = 0; + if ( pax->marked != 0 ) + continue; //printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); if ( strcmp(symbol,pax->symbol) == 0 ) { From f002aa71e7b71fabc08c503091bbb77eac532a8a Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 13:33:24 +0200 Subject: [PATCH 165/281] test --- src/bitcoind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 590d91463..6153289df 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -41,7 +41,7 @@ void WaitForShutdown(boost::thread_group* threadGroup) // Tell the main threads to shutdown. while (!fShutdown) { - MilliSleep(10000); + MilliSleep(22000); komodo_passport_iteration(); fShutdown = ShutdownRequested(); } From 5ba0ce9d70b55725bc826b8a77c45438e0e50cc0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 23:25:24 +0200 Subject: [PATCH 166/281] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 455e327ba..9c2949763 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -125,7 +125,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); - while ( KOMODO_ON_DEMAND == 0 ) + while ( KOMODO_ON_DEMAND == 0 && deposits == 0 && (int32_t)mempool.GetTotalTxSize() == 0 ) { deposits = komodo_paxtotal(); if ( KOMODO_INITDONE == 0 || (komodo_baseid(ASSETCHAINS_SYMBOL) >= 0 && (isrealtime= komodo_isrealtime(&kmdheight)) == 0) ) From 3da07d2e1debcdebee9f57c0663183aa5b6b5d53 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 23:31:30 +0200 Subject: [PATCH 167/281] test --- src/miner.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/miner.cpp b/src/miner.cpp index 9c2949763..94e89325a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -125,6 +125,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if ( ASSETCHAINS_SYMBOL[0] != 0 && chainActive.Tip()->nHeight >= ASSETCHAINS_MINHEIGHT ) { isrealtime = komodo_isrealtime(&kmdheight); + deposits = komodo_paxtotal(); while ( KOMODO_ON_DEMAND == 0 && deposits == 0 && (int32_t)mempool.GetTotalTxSize() == 0 ) { deposits = komodo_paxtotal(); From b307682fa31c01f630319180fce5d365c654973f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Dec 2016 23:59:49 +0200 Subject: [PATCH 168/281] test --- src/komodo_gateway.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 2c322385d..be916620c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -845,11 +845,14 @@ void komodo_passport_iteration() refsp = komodo_stateptr(symbol,dest); if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33; - else refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 - if ( refid == 0 ) + else { - KOMODO_PASSPORT_INITDONE = 1; - return; + refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0 + if ( refid == 0 ) + { + KOMODO_PASSPORT_INITDONE = 1; + return; + } } //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) From 80fd363110e4137fa096c8f170e56618119cf4cf Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 00:03:00 +0200 Subject: [PATCH 169/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index be916620c..ee9101339 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -835,7 +835,7 @@ void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; - //printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); + printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); while ( KOMODO_INITDONE == 0 ) { @@ -854,7 +854,7 @@ void komodo_passport_iteration() return; } } - //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -922,6 +922,6 @@ void komodo_passport_iteration() komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; - //printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); } From 2a15e8eac9d72b7de9dd5c1ed9cb72aa4390a106 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 00:08:09 +0200 Subject: [PATCH 170/281] test --- src/komodo_gateway.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ee9101339..6758b9a1d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -344,7 +344,7 @@ int32_t komodo_pending_withdraws(char *opretstr) return(0); HASH_ITER(hh,PAX,pax,tmp) { - //printf("pax %s marked.%u approved.%u\n",pax->symbol,pax->marked,pax->approved); + printf("pax %s marked.%u approved.%u\n",pax->symbol,pax->marked,pax->approved); if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { // add 'A' opreturn entry @@ -835,8 +835,7 @@ void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; - printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); - + //printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); while ( KOMODO_INITDONE == 0 ) { fprintf(stderr,"PASSPORT iteration waiting for KOMODO_INITDONE\n"); @@ -854,7 +853,7 @@ void komodo_passport_iteration() return; } } - printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -922,6 +921,6 @@ void komodo_passport_iteration() komodo_paxtotal(); refsp->RTmask = RTmask; KOMODO_PASSPORT_INITDONE = 1; - printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("done PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); } From 3dcce5b419c548997fd6d00e4c9411835794589b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 08:38:19 +0200 Subject: [PATCH 171/281] test --- src/komodo_gateway.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6758b9a1d..e3ea07685 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -577,6 +577,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 memset(kmdheights,0,sizeof(kmdheights)); memset(otherheights,0,sizeof(otherheights)); tokomodo = (komodo_is_issuer() == 0); + printf("OPRETURN[%c]\n",opretbuf[0]); if ( opretbuf[0] == 'D' ) { tokomodo = 0; From d62eb4b0cbfa5bdb69384290b37091ace04886e4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 08:50:56 +0200 Subject: [PATCH 172/281] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index b96d29b9c..d066baa60 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -146,7 +146,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND ) + if ( height > 108000 ) { int32_t i; for (i=31; i>=0; i--) From 4640c1a1412c8a84a284dbcccbb0bbfaa2166d36 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 08:52:20 +0200 Subject: [PATCH 173/281] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index d066baa60..9fadc91c0 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -146,7 +146,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( height > 108000 ) + if ( height > 110000 ) { int32_t i; for (i=31; i>=0; i--) From 8c0ffb407f4a4d5e8160bb5b4ed8bf5a8b861f39 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:07:31 +0200 Subject: [PATCH 174/281] test --- src/pow.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 9fadc91c0..922a0a9bc 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -130,15 +130,24 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in if ( nonz == 0 ) return(true); // will come back via different path with pubkey set special2 = komodo_is_special(height,pubkey33); - if ( notaryid >= 0 && ((height >= 64000 && height <= 90065) || (height % KOMODO_ELECTION_GAP) > 64) ) + /*if ( notaryid >= 0 && ((height >= 64000 && height <= 90065) || (height % KOMODO_ELECTION_GAP) > 64) ) { - //if ( special2 == -2 ) - // printf("height.%d special2.%d special.%d\n",height,special2,special); if ( (height >= 64000 && height <= 90065) || (height % KOMODO_ELECTION_GAP) == 0 || (height < 80000 && (special != 0 || special2 > 0)) || (height >= 80000 && special2 > 0) ) { bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); flag = 1; } + }*/ + if ( notaryid >= 0 ) + { + if ( height < 80000 && (special != 0 || special2 > 0) ) + flag = 1; + else if ( height >= 80000 && height < 108000 && special2 > 0 ) + flag = 1; + else if ( height >= 108000 && special2 > 0 ) + flag = ((height % KOMODO_ELECTION_GAP) > 64 || (height % KOMODO_ELECTION_GAP) == 0); + if ( flag != 0 ) + bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); } } if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) @@ -146,7 +155,6 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in // Check proof of work matches claimed amount if ( UintToArith256(hash) > bnTarget ) { - if ( height > 110000 ) { int32_t i; for (i=31; i>=0; i--) @@ -155,7 +163,8 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - return error("CheckProofOfWork(): hash doesn't match nBits"); + if ( height < 90000 || height > 110000 ) + return error("CheckProofOfWork(): hash doesn't match nBits"); } } return true; From 3339aa3418cc6c6d7a26bd5c6afe7f409adddbae Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:20:16 +0200 Subject: [PATCH 175/281] test --- src/komodo_gateway.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e3ea07685..30aafd289 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -566,9 +566,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { uint8_t rmd160[20],rmd160s[64*20],addrtype,shortflag,pubkey33[33]; int32_t didstats,i,j,n,len,tokomodo,kmdheight,otherheights[64],kmdheights[64]; int8_t baseids[64]; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; uint64_t convtoshis,seed; int64_t fiatoshis,komodoshis,checktoshis,values[64],srcvalues[64]; struct pax_transaction *pax,*pax2; struct komodo_state *basesp; double diff; const char *typestr = "unknown"; - if ( ASSETCHAINS_SYMBOL[0] == 0 ) - return("komodo"); - else if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) + if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) return("assetchain"); memset(baseids,0xff,sizeof(baseids)); memset(values,0,sizeof(values)); @@ -577,7 +575,6 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 memset(kmdheights,0,sizeof(kmdheights)); memset(otherheights,0,sizeof(otherheights)); tokomodo = (komodo_is_issuer() == 0); - printf("OPRETURN[%c]\n",opretbuf[0]); if ( opretbuf[0] == 'D' ) { tokomodo = 0; From 33171f51f4e1a8346fdbf2eff3ad6bbf7492035d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:26:25 +0200 Subject: [PATCH 176/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 30aafd289..1e7fddb9e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -866,13 +866,13 @@ void komodo_passport_iteration() fseek(fp,0,SEEK_END); if ( ftell(fp) > lastpos[baseid] ) { - if ( 0 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) + if ( 1 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("passport refid.%d %s fname.(%s) base.%s\n",refid,symbol,fname,base); fseek(fp,lastpos[baseid],SEEK_SET); while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) ; lastpos[baseid] = ftell(fp); - if ( 0 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) + if ( 1 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("from.(%s) lastpos[%s] %ld\n",ASSETCHAINS_SYMBOL,CURRENCIES[baseid],lastpos[baseid]); } //else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); fclose(fp); From 0f1e05aac0d3e4e2f3f96bd47466dd9581d70a64 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:29:29 +0200 Subject: [PATCH 177/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 1e7fddb9e..b94618afc 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -851,7 +851,7 @@ void komodo_passport_iteration() return; } } - //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; From 14e3fb45f40a4fa7c5d6c226ab3efccf1cbe3c4c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:33:38 +0200 Subject: [PATCH 178/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b94618afc..b1cb52f0c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -876,7 +876,7 @@ void komodo_passport_iteration() printf("from.(%s) lastpos[%s] %ld\n",ASSETCHAINS_SYMBOL,CURRENCIES[baseid],lastpos[baseid]); } //else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); fclose(fp); - } + } else printf("error.(%s) %p\n",fname,sp); komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); if ( (fp= fopen(fname,"rb")) != 0 ) { From 2b630e75817b6faa1c072e4be2668c6a92d2688b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:37:11 +0200 Subject: [PATCH 179/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b1cb52f0c..8a7da1aed 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -874,7 +874,7 @@ void komodo_passport_iteration() lastpos[baseid] = ftell(fp); if ( 1 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("from.(%s) lastpos[%s] %ld\n",ASSETCHAINS_SYMBOL,CURRENCIES[baseid],lastpos[baseid]); - } //else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); + } else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); fclose(fp); } else printf("error.(%s) %p\n",fname,sp); komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); From 894c570b0b35705e72fb77f155822b17ae108849 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:43:27 +0200 Subject: [PATCH 180/281] test --- src/komodo.h | 2 +- src/komodo_gateway.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 2d978d443..16511ede7 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -153,7 +153,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char { if ( fread(opret,1,olen,fp) != olen ) errs++; - if ( 0 && matched != 0 ) + //if ( 0 && matched != 0 ) { int32_t i; for (i=0; i lastpos[baseid] ) { - if ( 1 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) + if ( 0 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("passport refid.%d %s fname.(%s) base.%s\n",refid,symbol,fname,base); fseek(fp,lastpos[baseid],SEEK_SET); while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) ; lastpos[baseid] = ftell(fp); - if ( 1 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) + if ( 0 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("from.(%s) lastpos[%s] %ld\n",ASSETCHAINS_SYMBOL,CURRENCIES[baseid],lastpos[baseid]); } else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); fclose(fp); From b27b2877b125bd0ba06053bdba0e194b750b3127 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:47:18 +0200 Subject: [PATCH 181/281] test --- src/komodo.h | 2 +- src/komodo_gateway.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 16511ede7..2d978d443 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -153,7 +153,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char { if ( fread(opret,1,olen,fp) != olen ) errs++; - //if ( 0 && matched != 0 ) + if ( 0 && matched != 0 ) { int32_t i; for (i=0; i Date: Tue, 13 Dec 2016 09:55:03 +0200 Subject: [PATCH 182/281] test --- src/komodo_gateway.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a927533e3..871e376ff 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -344,9 +344,9 @@ int32_t komodo_pending_withdraws(char *opretstr) return(0); HASH_ITER(hh,PAX,pax,tmp) { - printf("pax %s marked.%u approved.%u\n",pax->symbol,pax->marked,pax->approved); - if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) + if ( pax->type == 'W' && pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { + printf("pax %s marked.%u approved.%u validated.%u\n",pax->symbol,pax->marked,pax->approved,pax->validated); // add 'A' opreturn entry if ( len == 0 ) opretbuf[len++] = 'A'; @@ -400,7 +400,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to //printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); continue; } - //if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) + if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) printf("pax.%s marked.%d %.8f -> %.8f\n",ASSETCHAINS_SYMBOL,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); txNew->vout.resize(numvouts+1); txNew->vout[numvouts].nValue = (opcode == 'I') ? pax->fiatoshis : pax->komodoshis; @@ -854,7 +854,7 @@ void komodo_passport_iteration() return; } } - printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); + //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { sp = 0; @@ -877,7 +877,7 @@ void komodo_passport_iteration() lastpos[baseid] = ftell(fp); if ( 0 && lastpos[baseid] == 0 && strcmp(symbol,"KMD") == 0 ) printf("from.(%s) lastpos[%s] %ld\n",ASSETCHAINS_SYMBOL,CURRENCIES[baseid],lastpos[baseid]); - } else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); + } //else fprintf(stderr,"%s.%ld ",CURRENCIES[baseid],ftell(fp)); fclose(fp); } else printf("error.(%s) %p\n",fname,sp); komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"realtime"); From 34ae5f7e87cb6947204dc693992a6ec3a9948d5c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 09:56:30 +0200 Subject: [PATCH 183/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 871e376ff..d69fed1f4 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -346,7 +346,7 @@ int32_t komodo_pending_withdraws(char *opretstr) { if ( pax->type == 'W' && pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { - printf("pax %s marked.%u approved.%u validated.%u\n",pax->symbol,pax->marked,pax->approved,pax->validated); + printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); // add 'A' opreturn entry if ( len == 0 ) opretbuf[len++] = 'A'; From f1e6a93738a23b27a96045f33f41a15058d06c49 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 10:01:41 +0200 Subject: [PATCH 184/281] test --- src/komodo_gateway.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d69fed1f4..a329c9609 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -344,14 +344,17 @@ int32_t komodo_pending_withdraws(char *opretstr) return(0); HASH_ITER(hh,PAX,pax,tmp) { - if ( pax->type == 'W' && pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) + if ( pax->type == 'W' ) { printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); - // add 'A' opreturn entry - if ( len == 0 ) - opretbuf[len++] = 'A'; - len += komodo_rwapproval(1,&opretbuf[len],pax); - //printf("%s.(marked.%u approved.%d) %p\n",pax->source,pax->marked,pax->approved,pax); + if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) + { + // add 'A' opreturn entry + if ( len == 0 ) + opretbuf[len++] = 'A'; + len += komodo_rwapproval(1,&opretbuf[len],pax); + //printf("%s.(marked.%u approved.%d) %p\n",pax->source,pax->marked,pax->approved,pax); + } } } if ( len > 0 ) From 1ac3f9efae07a97601c80cb5d67448af372766bf Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 10:07:31 +0200 Subject: [PATCH 185/281] test --- src/komodo_gateway.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a329c9609..bc3817077 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -736,7 +736,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txid,vout,'W')) != 0 ) { pax->type = opretbuf[0]; - strcpy(pax->symbol,base); + strcpy(pax->source,base); + strcpy(pax->symbol,"KMD"); pax->height = kmdheight; pax->otherheight = height; pax->komodoshis = komodoshis; From ec7c10be58ff287250fa046ad4c41728f5ea3c1e Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 10:12:02 +0200 Subject: [PATCH 186/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index bc3817077..992cf1cf0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -346,7 +346,7 @@ int32_t komodo_pending_withdraws(char *opretstr) { if ( pax->type == 'W' ) { - printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); + //printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { // add 'A' opreturn entry From 22b09834bb4bb96cdf486dd5cf9579878cdb4f07 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 11:38:04 +0200 Subject: [PATCH 187/281] test --- src/komodo_gateway.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 992cf1cf0..3c0db2518 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -868,7 +868,8 @@ void komodo_passport_iteration() { komodo_statefname(fname,baseid<32?base:(char *)"",(char *)"komodostate"); komodo_nameset(symbol,dest,base); - if ( (fp= fopen(fname,"rb")) != 0 && (sp= komodo_stateptrget(symbol)) != 0 ) + sp = komodo_stateptrget(symbol); + if ( (fp= fopen(fname,"rb")) != 0 && sp != 0 ) { fseek(fp,0,SEEK_END); if ( ftell(fp) > lastpos[baseid] ) From e40060c24309c8ffa1043d55b54627706f05ab73 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 11:43:17 +0200 Subject: [PATCH 188/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3c0db2518..3c50527c5 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -843,7 +843,7 @@ void komodo_passport_iteration() //printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL); while ( KOMODO_INITDONE == 0 ) { - fprintf(stderr,"PASSPORT iteration waiting for KOMODO_INITDONE\n"); + fprintf(stderr,"[%s] PASSPORT iteration waiting for KOMODO_INITDONE\n",ASSETCHAINS_SYMBOL); sleep(3); } refsp = komodo_stateptr(symbol,dest); From 15373725e70ed053da1ff21afb53a37d7cb28e1b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 12:09:52 +0200 Subject: [PATCH 189/281] test --- src/chainparams.cpp | 7 ++++--- src/komodo.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index c3f9bf0a4..688bc15c6 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -121,9 +121,10 @@ public: { boost::assign::map_list_of (0, consensus.hashGenesisBlock) - (2500, uint256S("0x00000006dc968f600be11a86cbfbf7feb61c7577f45caced2e82b6d261d19744")) - (15000, uint256S("0x00000000b6bc56656812a5b8dcad69d6ad4446dec23b5ec456c18641fb5381ba")), - 1479851027, // * UNIX timestamp of last checkpoint block + (2500, uint256S("0x0e6a3d5a46eba97c4e7618d66a39f115729e1176433c98481124c2bf733aa54e")) + (15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")), + (100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")), + 1481120910, // * UNIX timestamp of last checkpoint block 110415, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 4240 // * estimated number of transactions per day after checkpoint diff --git a/src/komodo.h b/src/komodo.h index 2d978d443..b6aaa4c2d 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -194,7 +194,10 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar static FILE *fp; static int32_t errs; struct komodo_state *sp; char fname[512],symbol[16],dest[16]; int32_t ht,func; uint8_t num,pubkeys[64][33]; if ( (sp= komodo_stateptr(symbol,dest)) == 0 ) + { + KOMODO_INITDONE = (uint32_t)time(NULL); return; + } if ( fp == 0 ) { komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); From fd5bb9fb53963f0ad75f3359b310c8db00e4acb1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 12:11:29 +0200 Subject: [PATCH 190/281] test --- src/chainparams.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 688bc15c6..875042500 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -121,9 +121,9 @@ public: { boost::assign::map_list_of (0, consensus.hashGenesisBlock) - (2500, uint256S("0x0e6a3d5a46eba97c4e7618d66a39f115729e1176433c98481124c2bf733aa54e")) - (15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")), - (100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")), + //(2500, uint256S("0x0e6a3d5a46eba97c4e7618d66a39f115729e1176433c98481124c2bf733aa54e")) + //(15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")), + //(100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")), 1481120910, // * UNIX timestamp of last checkpoint block 110415, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) From a6fa1054472cdde76a8ec6dac62f36b44660dcea Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 12:15:33 +0200 Subject: [PATCH 191/281] test --- src/chainparams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 875042500..41e54d752 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -120,7 +120,7 @@ public: checkpointData = (Checkpoints::CCheckpointData) { boost::assign::map_list_of - (0, consensus.hashGenesisBlock) + (0, consensus.hashGenesisBlock), //(2500, uint256S("0x0e6a3d5a46eba97c4e7618d66a39f115729e1176433c98481124c2bf733aa54e")) //(15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")), //(100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")), From 673fddf0d73a13533848f1341cc2a8ab6b0ecbf5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 13:02:37 +0200 Subject: [PATCH 192/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 3c50527c5..9d174a065 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -353,7 +353,7 @@ int32_t komodo_pending_withdraws(char *opretstr) if ( len == 0 ) opretbuf[len++] = 'A'; len += komodo_rwapproval(1,&opretbuf[len],pax); - //printf("%s.(marked.%u approved.%d) %p\n",pax->source,pax->marked,pax->approved,pax); + printf("%s.(marked.%u approved.%d) %.8f\n",pax->source,pax->marked,pax->approved,dstr(pax->komodoshis)); } } } From 716aa1d5ed3b3a7c98fe2f335c2609b85d1e118a Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 13:07:08 +0200 Subject: [PATCH 193/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9d174a065..afb529600 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -353,8 +353,8 @@ int32_t komodo_pending_withdraws(char *opretstr) if ( len == 0 ) opretbuf[len++] = 'A'; len += komodo_rwapproval(1,&opretbuf[len],pax); - printf("%s.(marked.%u approved.%d) %.8f\n",pax->source,pax->marked,pax->approved,dstr(pax->komodoshis)); } + printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } if ( len > 0 ) From 772c13de095ba8470f9082dac120de3ae1e9fd58 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 13:14:18 +0200 Subject: [PATCH 194/281] test --- src/komodo_gateway.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index afb529600..00b4956a0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -275,7 +275,10 @@ uint64_t komodo_paxtotal() if ( (checktoshis= komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis)) != 0 ) { if ( checktoshis != pax->komodoshis ) + { pax->marked = pax->height; + printf("WITHDRAW mark <- %d %.8f != %.8f\n",pax->height,dstr(checktoshis),dstr(pax->komodoshis)); + } else if ( pax->validated == 0 ) { pax->validated = pax->komodoshis; From 865bd97214a4ae23e4d4fe5c3de6ed51eb5891ae Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 13:19:41 +0200 Subject: [PATCH 195/281] test --- src/komodo_gateway.h | 52 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 00b4956a0..408fe42d2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -238,6 +238,30 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t return(n); } +int32_t komodo_paxcmp(char *symbol,int32_t kmdheight,uint64_t value,uint64_t checkvalue,uint64_t seed) +{ + int32_t ratio; + if ( seed == 0 && checkvalue != 0 ) + { + ratio = ((value << 6) / checkvalue); + if ( ratio >= 63 && ratio <= 65 ) + return(0); + else + { + if ( kmdheight >= 86150 ) + printf("ht.%d ignore mismatched %s value %lld vs checkvalue %lld -> ratio.%d\n",kmdheight,symbol,(long long)value,(long long)checkvalue,ratio); + return(-1); + } + } + else if ( checkvalue != 0 ) + { + ratio = ((value << 10) / checkvalue); + if ( ratio >= 1023 && ratio <= 1025 ) + return(0); + } + return(value != checkvalue); +} + uint64_t komodo_paxtotal() { struct pax_transaction *pax,*pax2,*tmp,*tmp2; char symbol[16],dest[16],*str; int32_t i,ht; int64_t checktoshis; uint64_t seed,total = 0; struct komodo_state *basesp; @@ -274,10 +298,10 @@ uint64_t komodo_paxtotal() //bitcoin_address(coinaddr,addrtype,rmd160,20); if ( (checktoshis= komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis)) != 0 ) { - if ( checktoshis != pax->komodoshis ) + if ( komodo_paxcmp(pax->source,pax->height,pax->komodoshis,checktoshis,seed) == 0 ) { pax->marked = pax->height; - printf("WITHDRAW mark <- %d %.8f != %.8f\n",pax->height,dstr(checktoshis),dstr(pax->komodoshis)); + printf("WITHDRAW.%s mark <- %d %.8f != %.8f\n",pax->source,pax->height,dstr(checktoshis),dstr(pax->komodoshis)); } else if ( pax->validated == 0 ) { @@ -544,30 +568,6 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above return(0); } -int32_t komodo_paxcmp(char *symbol,int32_t kmdheight,uint64_t value,uint64_t checkvalue,uint64_t seed) -{ - int32_t ratio; - if ( seed == 0 && checkvalue != 0 ) - { - ratio = ((value << 6) / checkvalue); - if ( ratio >= 63 && ratio <= 65 ) - return(0); - else - { - if ( kmdheight >= 86150 ) - printf("ht.%d ignore mismatched %s value %lld vs checkvalue %lld -> ratio.%d\n",kmdheight,symbol,(long long)value,(long long)checkvalue,ratio); - return(-1); - } - } - else if ( checkvalue != 0 ) - { - ratio = ((value << 10) / checkvalue); - if ( ratio >= 1023 && ratio <= 1025 ) - return(0); - } - return(value != checkvalue); -} - const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen,uint256 txid,uint16_t vout,char *source) { uint8_t rmd160[20],rmd160s[64*20],addrtype,shortflag,pubkey33[33]; int32_t didstats,i,j,n,len,tokomodo,kmdheight,otherheights[64],kmdheights[64]; int8_t baseids[64]; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; uint64_t convtoshis,seed; int64_t fiatoshis,komodoshis,checktoshis,values[64],srcvalues[64]; struct pax_transaction *pax,*pax2; struct komodo_state *basesp; double diff; From 60cd57df7f0ef45f952402a58414a4e9ebda2bd5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 13:22:59 +0200 Subject: [PATCH 196/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 408fe42d2..d4cf8979b 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -301,7 +301,7 @@ uint64_t komodo_paxtotal() if ( komodo_paxcmp(pax->source,pax->height,pax->komodoshis,checktoshis,seed) == 0 ) { pax->marked = pax->height; - printf("WITHDRAW.%s mark <- %d %.8f != %.8f\n",pax->source,pax->height,dstr(checktoshis),dstr(pax->komodoshis)); + //printf("WITHDRAW.%s mark <- %d %.8f != %.8f\n",pax->source,pax->height,dstr(checktoshis),dstr(pax->komodoshis)); } else if ( pax->validated == 0 ) { From fa1a55cd457181a0f1098dd1db4cf57365c4a929 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 13 Dec 2016 21:05:05 +0200 Subject: [PATCH 197/281] test --- src/komodo_gateway.h | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d4cf8979b..a8e85a833 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -364,11 +364,28 @@ uint64_t komodo_paxtotal() return(total); } -int32_t komodo_pending_withdraws(char *opretstr) +static int _paxorder(const void *a,const void *b) { - struct pax_transaction *pax,*tmp; uint8_t opretbuf[16384]; int32_t ht,len=0; uint64_t total = 0; +#define pax_a (*(struct pax_transaction **)a) +#define pax_b (*(struct pax_transaction **)b) + uint64_t aval,bval; + aval = pax_a->fiatoshi + pax_a->komodoshis + pax_a->height; + bval = pax_b->fiatoshi + pax_b->komodoshis + pax_b->height; + if ( bval > aval ) + return(-1); + else if ( bval < aval ) + return(1); + return(0); +#undef pax_a +#undef pax_b +} + +int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic order +{ + struct pax_transaction *pax,*tmp,*paxes[64]; uint8_t opretbuf[16384]; int32_t i,n,ht,len=0; uint64_t total = 0; if ( komodo_isrealtime(&ht) == 0 || ASSETCHAINS_SYMBOL[0] != 0 ) return(0); + n = 0; HASH_ITER(hh,PAX,pax,tmp) { if ( pax->type == 'W' ) @@ -376,17 +393,25 @@ int32_t komodo_pending_withdraws(char *opretstr) //printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { - // add 'A' opreturn entry - if ( len == 0 ) - opretbuf[len++] = 'A'; - len += komodo_rwapproval(1,&opretbuf[len],pax); + if ( n < sizeof(paxes)/sizeof(*paxes) ) + paxes[n++] = pax; } printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } - if ( len > 0 ) - init_hexbytes_noT(opretstr,opretbuf,len); - else opretstr[0] = 0; + opretstr[0] = 0; + if ( n > 0 ) + { + opretbuf[len++] = 'A'; + qsort(paxes,n,sizeof(*paxes),_paxorder); + for (i=0; i>3)*7 ) + len += komodo_rwapproval(1,&opretbuf[len],paxes[i]); + } + if ( len > 0 ) + init_hexbytes_noT(opretstr,opretbuf,len); + } //fprintf(stderr,"komodo_pending_withdraws len.%d PAXTOTAL %.8f\n",len,dstr(komodo_paxtotal())); return(len); } From d936b97fc9ff2deae5cf39988a7668cdc2206649 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 14 Dec 2016 08:08:30 +0200 Subject: [PATCH 198/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a8e85a833..498629647 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -369,8 +369,8 @@ static int _paxorder(const void *a,const void *b) #define pax_a (*(struct pax_transaction **)a) #define pax_b (*(struct pax_transaction **)b) uint64_t aval,bval; - aval = pax_a->fiatoshi + pax_a->komodoshis + pax_a->height; - bval = pax_b->fiatoshi + pax_b->komodoshis + pax_b->height; + aval = pax_a->fiatoshis + pax_a->komodoshis + pax_a->height; + bval = pax_b->fiatoshis + pax_b->komodoshis + pax_b->height; if ( bval > aval ) return(-1); else if ( bval < aval ) From 21d62dce1293f99b01090d4b0527de51d9e1e28d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:15:24 +0200 Subject: [PATCH 199/281] test --- src/pow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 922a0a9bc..262fadb56 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -163,7 +163,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); - if ( height < 90000 || height > 110000 ) + if ( height < 90000 || (height > 110000 && KOMODO_REWIND == 0) ) return error("CheckProofOfWork(): hash doesn't match nBits"); } } From fb6c7505823ad8af32df7ac8e50ba80183448f70 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:22:34 +0200 Subject: [PATCH 200/281] test --- src/miner.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 94e89325a..59ef7e549 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -618,8 +618,11 @@ void static BitcoinMiner(CWallet *pwallet) arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); if ( ASSETCHAINS_SYMBOL[0] == 0 && komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) { - hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); - fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1); + if ( (Mining_height % KOMODO_ELECTION_GAP) > 64 || (Mining_height % KOMODO_ELECTION_GAP) == 0 ) + { + hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); + fprintf(stderr,"I am the chosen one for %s ht.%d\n",ASSETCHAINS_SYMBOL,pindexPrev->nHeight+1); + } else Mining_start = 0; } else Mining_start = 0; while (true) { From 6cf285d6038ff1d3d33a394854e2c210e003ced8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:34:37 +0200 Subject: [PATCH 201/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 498629647..dd7f59d86 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -396,7 +396,7 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic if ( n < sizeof(paxes)/sizeof(*paxes) ) paxes[n++] = pax; } - printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); + //printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } opretstr[0] = 0; From c55d5f09260379aa498899d3101774b9bfd60869 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 00:37:17 +0200 Subject: [PATCH 202/281] test --- src/miner.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/miner.cpp b/src/miner.cpp index 59ef7e549..a5a150c20 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -99,6 +99,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, } #define ASSETCHAINS_MINHEIGHT 100 +#define KOMODO_ELECTION_GAP 2000 #define ROUNDROBIN_DELAY 57 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE; extern char ASSETCHAINS_SYMBOL[16]; From 6cd0105666fa2f5fd5a46986cb72b452a330700c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 10:28:07 +0200 Subject: [PATCH 203/281] dpowassets and -pax option --- src/assetchains | 46 --------------------------------------- src/dpowassets | 52 ++++++++++++++++++++++++++++++++++++++++++++ src/komodo_gateway.h | 19 ++++++++++++++++ src/komodo_globals.h | 2 +- src/komodo_utils.h | 3 +++ src/miner.cpp | 2 +- 6 files changed, 76 insertions(+), 48 deletions(-) create mode 100755 src/dpowassets diff --git a/src/assetchains b/src/assetchains index adb4b59d1..10129742e 100755 --- a/src/assetchains +++ b/src/assetchains @@ -48,49 +48,3 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=IDR -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=HRK -addnode=78.47.196.146 $1 & -curl --url "http://127.0.0.1:7776" --data "{\"timeout\":60000,\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"REVS\",\"pubkey\":\"$pubkey\"}" - -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SUPERNET\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DEX\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PANGEA\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JUMBLR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BET\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CRYPTO\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HODL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SHARK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BOTS\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGW\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" - -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GBP\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AUD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CAD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHF\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NZD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CNY\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RUB\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MXN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BRL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"INR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HKD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"TRY\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZAR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PLN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NOK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DKK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CZK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUF\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILS\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KRW\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MYR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PHP\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RON\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SGD\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"THB\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BGN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"IDR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HRK\",\"pubkey\":\"$pubkey\"}" - diff --git a/src/dpowassets b/src/dpowassets new file mode 100755 index 000000000..e0690e019 --- /dev/null +++ b/src/dpowassets @@ -0,0 +1,52 @@ +#!/bin/bash +set -x +source pubkey.txt +echo $pubkey + + +curl --url "http://127.0.0.1:7776" --data "{\"timeout\":60000,\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"REVS\",\"pubkey\":\"$pubkey\"}" + +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SUPERNET\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DEX\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PANGEA\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JUMBLR\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BET\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CRYPTO\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HODL\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SHARK\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BOTS\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGW\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" + +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GBP\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AUD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CAD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHF\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NZD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CNY\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RUB\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MXN\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BRL\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"INR\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HKD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"TRY\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZAR\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PLN\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NOK\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEK\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DKK\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CZK\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUF\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILS\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KRW\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MYR\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PHP\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RON\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SGD\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"THB\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BGN\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"IDR\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HRK\",\"pubkey\":\"$pubkey\"}" + diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index dd7f59d86..e2cc32350 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -90,6 +90,8 @@ struct pax_transaction *komodo_paxmark(int32_t height,uint256 txid,uint16_t vout void komodo_gateway_deposit(char *coinaddr,uint64_t value,char *symbol,uint64_t fiatoshis,uint8_t *rmd160,uint256 txid,uint16_t vout,uint8_t type,int32_t height,int32_t otherheight,char *source,int32_t approved) // assetchain context { struct pax_transaction *pax; uint8_t buf[35]; int32_t addflag = 0; struct komodo_state *sp; char str[16],dest[16],*s; + if ( KOMODO_PAX == 0 ) + return; sp = komodo_stateptr(str,dest); pthread_mutex_lock(&komodo_mutex); pax_keyset(buf,txid,vout,type); @@ -178,6 +180,8 @@ int32_t komodo_rwapproval(int32_t rwflag,uint8_t *opretbuf,struct pax_transactio int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t *values,int64_t *srcvalues,int32_t *kmdheights,int32_t *otherheights,int8_t *baseids,uint8_t *rmd160s,uint8_t *opretbuf,int32_t opretlen,int32_t iskomodo) { struct pax_transaction p,*pax; int32_t i,n=0,j,len=0,incr,height,otherheight; uint8_t type,rmd160[20]; uint64_t fiatoshis; char symbol[16]; + if ( KOMODO_PAX == 0 ) + return(0); incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 4)); for (i=0; i<4; i++) base[i] = opretbuf[opretlen-4+i]; @@ -265,6 +269,8 @@ int32_t komodo_paxcmp(char *symbol,int32_t kmdheight,uint64_t value,uint64_t che uint64_t komodo_paxtotal() { struct pax_transaction *pax,*pax2,*tmp,*tmp2; char symbol[16],dest[16],*str; int32_t i,ht; int64_t checktoshis; uint64_t seed,total = 0; struct komodo_state *basesp; + if ( KOMODO_PAX == 0 ) + return(0); if ( komodo_isrealtime(&ht) == 0 ) return(0); else @@ -383,6 +389,8 @@ static int _paxorder(const void *a,const void *b) int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic order { struct pax_transaction *pax,*tmp,*paxes[64]; uint8_t opretbuf[16384]; int32_t i,n,ht,len=0; uint64_t total = 0; + if ( KOMODO_PAX == 0 ) + return(0); if ( komodo_isrealtime(&ht) == 0 || ASSETCHAINS_SYMBOL[0] != 0 ) return(0); n = 0; @@ -419,6 +427,8 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t tokomodo) { struct pax_transaction *pax,*tmp; char symbol[16],dest[16]; uint8_t *script,opcode,opret[16384],data[16384]; int32_t i,baseid,ht,len=0,opretlen=0,numvouts=1; struct komodo_state *sp; uint64_t available,deposited,issued,withdrawn,approved,redeemed,mask; + if ( KOMODO_PAX == 0 ) + return(0); sp = komodo_stateptr(symbol,dest); strcpy(symbol,base); if ( ASSETCHAINS_SYMBOL[0] != 0 && komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) @@ -506,6 +516,8 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above block is valid pax pricing { int32_t i,j,n,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; + if ( KOMODO_PAX == 0 ) + return(0); memset(baseids,0xff,sizeof(baseids)); memset(values,0,sizeof(values)); memset(srcvalues,0,sizeof(srcvalues)); @@ -597,6 +609,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { uint8_t rmd160[20],rmd160s[64*20],addrtype,shortflag,pubkey33[33]; int32_t didstats,i,j,n,len,tokomodo,kmdheight,otherheights[64],kmdheights[64]; int8_t baseids[64]; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; uint64_t convtoshis,seed; int64_t fiatoshis,komodoshis,checktoshis,values[64],srcvalues[64]; struct pax_transaction *pax,*pax2; struct komodo_state *basesp; double diff; const char *typestr = "unknown"; + if ( KOMODO_PAX == 0 ) + return("nopax"); if ( ASSETCHAINS_SYMBOL[0] != 0 && komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) { //printf("komodo_opreturn skip %s\n",ASSETCHAINS_SYMBOL); @@ -886,6 +900,11 @@ void komodo_passport_iteration() return; } } + if ( KOMODO_PAX == 0 ) + { + KOMODO_PASSPORT_INITDONE = 1; + return; + } //printf("PASSPORT %s refid.%d\n",ASSETCHAINS_SYMBOL,refid); for (baseid=32; baseid>=0; baseid--) { diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 7c8b7126d..88e24cddc 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -36,7 +36,7 @@ struct komodo_state KOMODO_STATES[34]; int COINBASE_MATURITY = 100; -int32_t IS_KOMODO_NOTARY,KOMODO_REWIND,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE; +int32_t IS_KOMODO_NOTARY,KOMODO_REWIND,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX; std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES; uint8_t NOTARY_PUBKEY33[33]; diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 15562669d..cab3983fd 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1448,7 +1448,10 @@ void komodo_args() IS_KOMODO_NOTARY = GetBoolArg("-notary", false); NOTARY_PUBKEY = GetArg("-pubkey", ""); if ( strlen(NOTARY_PUBKEY.c_str()) == 66 ) + { USE_EXTERNAL_PUBKEY = 1; + KOMODO_PAX = 1; + } else KOMODO_PAX = GetArg("-pax",0); name = GetArg("-ac_name",""); if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 ) ; diff --git a/src/miner.cpp b/src/miner.cpp index a5a150c20..8b861c520 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -100,7 +100,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, #define ASSETCHAINS_MINHEIGHT 100 #define KOMODO_ELECTION_GAP 2000 -#define ROUNDROBIN_DELAY 57 +#define ROUNDROBIN_DELAY 56 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE; extern char ASSETCHAINS_SYMBOL[16]; extern std::string NOTARY_PUBKEY; From 05654b62c4da4aa9c4e1359d1640b1c0cb1bbf64 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 10:45:10 +0200 Subject: [PATCH 204/281] test --- src/komodo.h | 2 -- src/main.cpp | 1 - 2 files changed, 3 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index b6aaa4c2d..8e84a6e02 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -284,7 +284,6 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar errs++; //komodo_eventadd_utxo(sp,symbol,height,notaryid,txhash,voutmask,numvouts); } -//#ifdef KOMODO_PAX else if ( pvals != 0 && numpvals > 0 ) { int32_t i,nonz = 0; @@ -304,7 +303,6 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar } //printf("save pvals height.%d numpvals.%d\n",height,numpvals); } -//#endif else if ( height != 0 ) { //printf("ht.%d func N ht.%d errs.%d\n",height,NOTARIZED_HEIGHT,errs); diff --git a/src/main.cpp b/src/main.cpp index 338bed053..f24cfedbd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -551,7 +551,6 @@ CBlockTreeDB *pblocktree = NULL; // Komodo globals -#define KOMODO_PAX #define KOMODO_ZCASH #include "komodo.h" From ca3df017f001ff048670e4de888a9ae01ba3ded0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 12:27:05 +0200 Subject: [PATCH 205/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e2cc32350..745d16a0a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -311,7 +311,7 @@ uint64_t komodo_paxtotal() } else if ( pax->validated == 0 ) { - pax->validated = pax->komodoshis; + pax->validated = pax->checktoshis; if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } From 9767b7c496247d37ac981a27ee7ab3670dc52ac2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 12:29:52 +0200 Subject: [PATCH 206/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 745d16a0a..febf0f0bf 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -311,7 +311,7 @@ uint64_t komodo_paxtotal() } else if ( pax->validated == 0 ) { - pax->validated = pax->checktoshis; + pax->validated = checktoshis; if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } From db7becdc1ce4780804fd6bd97168fb63ae31694b Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 12:55:24 +0200 Subject: [PATCH 207/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index febf0f0bf..db1b388f2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -304,7 +304,7 @@ uint64_t komodo_paxtotal() //bitcoin_address(coinaddr,addrtype,rmd160,20); if ( (checktoshis= komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis)) != 0 ) { - if ( komodo_paxcmp(pax->source,pax->height,pax->komodoshis,checktoshis,seed) == 0 ) + if ( komodo_paxcmp(pax->source,pax->height,pax->komodoshis,checktoshis,seed) != 0 ) { pax->marked = pax->height; //printf("WITHDRAW.%s mark <- %d %.8f != %.8f\n",pax->source,pax->height,dstr(checktoshis),dstr(pax->komodoshis)); From d400310583792afed7d57082f368b8ccaf05fb30 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Dec 2016 13:01:38 +0200 Subject: [PATCH 208/281] test --- src/komodo_gateway.h | 4 ++-- src/komodo_pax.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index db1b388f2..9d54f8bb8 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -311,7 +311,7 @@ uint64_t komodo_paxtotal() } else if ( pax->validated == 0 ) { - pax->validated = checktoshis; + pax->validated = pax->komodoshis = checktoshis; if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } @@ -637,7 +637,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( kmdheight <= height ) { didstats = 0; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + if ( 0 && strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) { printf("(%s) (%s) kmdheight.%d vs height.%d check %.8f vs %.8f tokomodo.%d %d seed.%llx\n",ASSETCHAINS_SYMBOL,base,kmdheight,height,dstr(checktoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed); for (i=0; i<32; i++) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index dbeab48cf..69f31ae20 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -530,7 +530,7 @@ uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pu if ( fiatoshis < 0 ) shortflag = 1, fiatoshis = -fiatoshis; komodoshis = komodo_paxprice(seedp,height,base,(char *)"KMD",(uint64_t)fiatoshis); - if ( strcmp(base,"RUB") == 0 ) + if ( 0 && strcmp(base,"RUB") == 0 ) printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f seed.%llx\n",height,base,(double)fiatoshis/COIN,(double)komodoshis/COIN,(long long)*seedp); if ( bitcoin_addr2rmd160(&addrtype,rmd160,coinaddr) == 20 ) { From 76b6eacf41395ddd2badd5d5dc3352e603c59df2 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Fri, 16 Dec 2016 01:56:42 +0300 Subject: [PATCH 209/281] docker stuff updated --- zcutil/docker-entrypoint.sh | 9 ++------- zcutil/docker-komodo-cli.sh | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/zcutil/docker-entrypoint.sh b/zcutil/docker-entrypoint.sh index c7df89d70..aae6fc7e4 100755 --- a/zcutil/docker-entrypoint.sh +++ b/zcutil/docker-entrypoint.sh @@ -14,12 +14,6 @@ rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base6 txindex=1 bind=${listenip:-127.0.0.1} rpcbind=${listenip:-127.0.0.1} -addnode=5.9.102.210 -addnode=78.47.196.146 -addnode=178.63.69.164 -addnode=88.198.65.74 -addnode=5.9.122.241 -addnode=144.76.94.38 EOF cat $HOME/.komodo/komodo.conf @@ -27,9 +21,10 @@ fi echo "...Checking fetch-params" $HOME/zcutil/fetch-params.sh - echo "Initialization completed successfully" echo + +# ToDo: Needs some rework. I was sick if [ $# -gt 0 ]; then args=("$@") diff --git a/zcutil/docker-komodo-cli.sh b/zcutil/docker-komodo-cli.sh index 3b555725f..121587bdf 100755 --- a/zcutil/docker-komodo-cli.sh +++ b/zcutil/docker-komodo-cli.sh @@ -1,11 +1,6 @@ #!/bin/bash -if [ -z ${assetchain+x} ]; then - /komodo/src/komodo-cli $1 $2 $3 $4 +# ToDo: check for docker arg ac_name -else - - /komodo/src/komodo-cli -ac_name=$assetchain $1 $2 $3 $4 - -fi +/komodo/src/komodo-cli $1 $2 $3 $4 From bb40eb8b043a1e63c3dc3b1c2e4d0f6e67e771d4 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Fri, 16 Dec 2016 02:01:50 +0300 Subject: [PATCH 210/281] Docker stuff again --- Dockerfile | 17 +++-------------- zcutil/docker-entrypoint.sh | 9 ++------- zcutil/docker-komodo-cli.sh | 9 ++------- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37efb1c0e..71136b3af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,5 @@ -FROM ubuntu:16.04 -MAINTAINER Mihail Fedorov - -# All the stuff -# And clean out packages, keep space minimal -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ - unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ - protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +FROM kolobus/ubuntu:komodo +MAINTAINER Mihail Fedorov ADD ./ /komodo ENV HOME /komodo @@ -19,7 +9,7 @@ WORKDIR /komodo RUN cd /komodo && \ ./autogen.sh && \ ./configure --with-incompatible-bdb --with-gui || true && \ - ./zcutil/build.sh -j4 + ./zcutil/build.sh -j$(nproc) # Unknown stuff goes here @@ -28,4 +18,3 @@ RUN ln -sf /komodo/src/komodod /usr/bin/komodod && \ ln -sf /komodo/zcutil/docker-komodo-cli.sh /usr/bin/komodo-cli CMD ["entrypoint"] - diff --git a/zcutil/docker-entrypoint.sh b/zcutil/docker-entrypoint.sh index c7df89d70..aae6fc7e4 100755 --- a/zcutil/docker-entrypoint.sh +++ b/zcutil/docker-entrypoint.sh @@ -14,12 +14,6 @@ rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base6 txindex=1 bind=${listenip:-127.0.0.1} rpcbind=${listenip:-127.0.0.1} -addnode=5.9.102.210 -addnode=78.47.196.146 -addnode=178.63.69.164 -addnode=88.198.65.74 -addnode=5.9.122.241 -addnode=144.76.94.38 EOF cat $HOME/.komodo/komodo.conf @@ -27,9 +21,10 @@ fi echo "...Checking fetch-params" $HOME/zcutil/fetch-params.sh - echo "Initialization completed successfully" echo + +# ToDo: Needs some rework. I was sick if [ $# -gt 0 ]; then args=("$@") diff --git a/zcutil/docker-komodo-cli.sh b/zcutil/docker-komodo-cli.sh index 3b555725f..121587bdf 100755 --- a/zcutil/docker-komodo-cli.sh +++ b/zcutil/docker-komodo-cli.sh @@ -1,11 +1,6 @@ #!/bin/bash -if [ -z ${assetchain+x} ]; then - /komodo/src/komodo-cli $1 $2 $3 $4 +# ToDo: check for docker arg ac_name -else - - /komodo/src/komodo-cli -ac_name=$assetchain $1 $2 $3 $4 - -fi +/komodo/src/komodo-cli $1 $2 $3 $4 From 7d2c861cbc0cbc589238b3e40234d831cfd4e08a Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Dec 2016 13:21:48 +0200 Subject: [PATCH 211/281] test --- src/miner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 8b861c520..d0d6c7495 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -132,7 +132,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) deposits = komodo_paxtotal(); if ( KOMODO_INITDONE == 0 || (komodo_baseid(ASSETCHAINS_SYMBOL) >= 0 && (isrealtime= komodo_isrealtime(&kmdheight)) == 0) ) { - //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); + fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } else if ( deposits != 0 || (int32_t)mempool.GetTotalTxSize() > 0 ) { @@ -478,7 +478,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) script[34] = OP_CHECKSIG; //scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } - if ( 0 && ASSETCHAINS_SYMBOL[0] == 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) { for (i=0; i<65; i++) fprintf(stderr,"%d ",komodo_minerid(chainActive.Tip()->nHeight-i)); @@ -629,7 +629,7 @@ void static BitcoinMiner(CWallet *pwallet) { if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) { - //fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); + fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); sleep(10); break; } From d5dfbb184e37c7cce3bf7713cae43e79c6394182 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Dec 2016 13:36:57 +0200 Subject: [PATCH 212/281] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index d0d6c7495..142757f62 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -424,7 +424,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false)) { fprintf(stderr,"testblockvalidity failed\n"); - //throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed"); + throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed"); } } @@ -627,7 +627,7 @@ void static BitcoinMiner(CWallet *pwallet) } else Mining_start = 0; while (true) { - if ( ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) + if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 && pblock->vtx[0].vout.size() == 1 && Mining_height > ASSETCHAINS_MINHEIGHT ) { fprintf(stderr,"skip generating %s on-demand block, no tx avail\n",ASSETCHAINS_SYMBOL); sleep(10); From bbaa688c6238e361783a236ecbd1d91e6bef2ae7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Dec 2016 14:24:16 +0200 Subject: [PATCH 213/281] test --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 142757f62..2f58e7733 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -132,7 +132,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) deposits = komodo_paxtotal(); if ( KOMODO_INITDONE == 0 || (komodo_baseid(ASSETCHAINS_SYMBOL) >= 0 && (isrealtime= komodo_isrealtime(&kmdheight)) == 0) ) { - fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); + //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } else if ( deposits != 0 || (int32_t)mempool.GetTotalTxSize() > 0 ) { @@ -478,7 +478,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) script[34] = OP_CHECKSIG; //scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG; } - if ( ASSETCHAINS_SYMBOL[0] != 0 ) + if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) { for (i=0; i<65; i++) fprintf(stderr,"%d ",komodo_minerid(chainActive.Tip()->nHeight-i)); From 856fedeabc7c9569b16584f4c9614c3cd911aa06 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Dec 2016 14:53:28 +0200 Subject: [PATCH 214/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9d54f8bb8..60025545c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -586,7 +586,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above hash = block.GetHash(); for (j=0; j<32; j++) printf("%02x",((uint8_t *)&hash)[j]); - printf(" ht.%d blockhash X couldnt find vout.[%d]\n",height,i); + printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1,otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); } } if ( matched != num ) From 7ee875e80ff15da46b61a177735c6a7da297621e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 16 Dec 2016 14:54:13 +0200 Subject: [PATCH 215/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 60025545c..f3a03b2cb 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -586,7 +586,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above hash = block.GetHash(); for (j=0; j<32; j++) printf("%02x",((uint8_t *)&hash)[j]); - printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1,otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); + printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); } } if ( matched != num ) From ef81b571c0ad00f813153ae06c942c8044cc463e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 17 Dec 2016 18:01:29 +0200 Subject: [PATCH 216/281] test --- src/fundnotaries | 705 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 705 insertions(+) create mode 100755 src/fundnotaries diff --git a/src/fundnotaries b/src/fundnotaries new file mode 100755 index 000000000..cd6841966 --- /dev/null +++ b/src/fundnotaries @@ -0,0 +1,705 @@ +./komodo-cli -ac_name=REVS sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=REVS sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=SUPERNET sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=DEX sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=PANGEA sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=JUMBLR sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=BET sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=BET sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=BET sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=BET sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=BET sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=BET sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=CRYPTO sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=HODL sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=SHARK sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=BOTS sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RLQoAcs1RaqW1xfN2NJwoZWW5twexPhuGB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RXF3aHUaWDUY4fRRYmBNALoHWkgSQCiJ4f 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RL2SkPSCGMvcHqZ56ErfMxbQGdA4nk7MZp 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RNoz2DKPZ2ppMxgYx5tce9sjZBHefvPvNB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress R9XBrbj8iKkwy9M4erUqRaBinAiZSTXav3 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RBpp98VwHx7SFv7dNbw8NY65t14XFq9fVD 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RPjUmFNcWEW9Bu275kPxzRXyWDz6bfQpPD 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDY2CvzydimY2AtDqSjBAB1eCeogRE55DX 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RUreYvNjhZYc1vP8cND9Cztpni1pYsigXb 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RHv3wyVnnanG2kSQmLNmjwAQeYRRAptxUy 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RHbxwDa7JT1KJLHDKwb5n3gd8NREErqtQY 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RFDAZ1yCvKPmpqcgzg8r2qQJ8nPPgeoMrB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RHsZesZXMfkdrsSEper3JWUBKwk29JTFfT 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RFQNjTfcvSAmf8D83og1NrdHj1wH2fc5X4 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RPknkGAHMwUBvfKQfvw9FyatTZzicSiN4y 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RMqbQz4NPNbG15QBwy9EFvLn4NX5Fa7w5g 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RQipE6ycbVVb9vCkhqrK8PGZs2p5YmiBtg 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RJD5jRidYW9Cu8qxjg9HDCsx6J3A4wQ4LU 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RQMwcDYMVBx9f4QCFfFk31px8QZP4e8uhA 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RXzsovGBQ3W97xnVC6JnWxXsV4qb7p7iBi 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RLHr8gUm2MZ3EEgDU4EmK7bdn5ZsxLYmnt 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RFTsWSzgKRd5Xa7d287w9eRFeYefKBso6Z 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress REuQ7EoxKeMYk4EGptV6EwdfV9LZXuc44g 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RX1tP6ftwe96p6scgJn4dpgNdHDgyg9R87 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RERp696QtNTeWDfBy3x3QbRwPYN2NxwxfA 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress R9jhJCwgT78pyjnkNuxgH3CE8ekxgT8iwB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RSCQKVUhihKb13rb5VJwXsbSY6pdRPUZ6V 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDVqM6t5xZw9jbYXEw2CJgkiSbrHBHiKR3 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RSSNgf98kiMGUxs55DvhNnumyxVudd2KQQ 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RS3v2u6d4SJ1ujLz7CHNSFLSmxn6Tx6mJp 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RVKtRKozg8RKvEYCumMD43fCU6f212M5RD 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RCvsbvzCwA1AaxeoYVSL9Q3BdnybEWfXaH 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RXtADsErZLmsGhNyQdW2DekHMGZ23cLrav 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RYGrWs5b8CVFFpxGpjiBaMwfYV9X5UqFaB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RATaU3jjn4RwHK61YWoJ4eg7Eggk3puZW8 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RXbb9PkefXcsqq8wqiUZZUuq8e3p29mw1G 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RT2JyVts5tb1prC7KYykmznrqw7VXJo1HB 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress R9TGdzN25MgdRkYfsYfxZWzHCLVCyWFAei 0.010000 +./komodo-cli -ac_name=MGW sendtoaddress RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC 0.010000 + From 87a293668662bc37c461f7ea8db1a6e6463e4711 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 17 Dec 2016 18:10:41 +0200 Subject: [PATCH 217/281] test --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 2f58e7733..0fb829383 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -100,7 +100,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, #define ASSETCHAINS_MINHEIGHT 100 #define KOMODO_ELECTION_GAP 2000 -#define ROUNDROBIN_DELAY 56 +#define ROUNDROBIN_DELAY 55 extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE; extern char ASSETCHAINS_SYMBOL[16]; extern std::string NOTARY_PUBKEY; From 8fa95955ca25a234385f11b0d9005e9fb645f7a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:03:21 +0200 Subject: [PATCH 218/281] test --- src/komodo_gateway.h | 2 +- src/pow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f3a03b2cb..6f3185f8c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -453,7 +453,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT; #endif } - if ( pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) + if ( strcmp(symbol,"KMD") != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) { printf("miner: skip %s %.8f when avail %.8f\n",symbol,dstr(pax->fiatoshis),dstr(available)); continue; diff --git a/src/pow.cpp b/src/pow.cpp index 262fadb56..09a9db294 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -140,7 +140,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in }*/ if ( notaryid >= 0 ) { - if ( height < 80000 && (special != 0 || special2 > 0) ) + if ( height > 10000 && height < 80000 && (special != 0 || special2 > 0) ) flag = 1; else if ( height >= 80000 && height < 108000 && special2 > 0 ) flag = 1; From 7ad9ed4d993041083e49f53a3a8aacfdec556935 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:12:36 +0200 Subject: [PATCH 219/281] test --- src/komodo_gateway.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6f3185f8c..b5d0445ea 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -455,7 +455,8 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to } if ( strcmp(symbol,"KMD") != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) { - printf("miner: skip %s %.8f when avail %.8f\n",symbol,dstr(pax->fiatoshis),dstr(available)); + if ( strcmp(ASSETCHAINS_SYMBOL,symbol) == 0 ) + printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available)); continue; } if ( pax->marked != 0 || (pax->type != 'D' && pax->type != 'A') || pax->ready == 0 ) @@ -819,7 +820,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->approved += srcvalues[i]; didstats = 1; - if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p approved %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); } //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); @@ -830,7 +831,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->approved += srcvalues[i]; didstats = 1; - if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p approved %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); } } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); @@ -840,7 +841,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax->approved = kmdheights[i]; if ( didstats != 0 ) pax->didstats = 1; - if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf(" i.%d approved.%d <<<<<<<<<<<<< APPROVED %p\n",i,kmdheights[i],pax); } } From 40b070a13460409ccee5f63002341df674b095e0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:19:41 +0200 Subject: [PATCH 220/281] test --- src/komodo_gateway.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b5d0445ea..550cdea32 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -772,7 +772,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); } - if ( strcmp(base,"RUB") == 0 ) + if ( strcmp(base,"RUB") == 0 && pax->approved == 0 ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,0,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); @@ -814,8 +814,10 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); - komodo_paxmark(height,txids[i],vouts[i],'W',height); - komodo_paxmark(height,txids[i],vouts[i],'A',height); + if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) + pax2->approved = kmdheights[i]; + //komodo_paxmark(height,txids[i],vouts[i],'W',height); + //komodo_paxmark(height,txids[i],vouts[i],'A',height); if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { basesp->approved += srcvalues[i]; From c2c03b7a90f8048bb3b353cbd6009e6334f404b4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:25:15 +0200 Subject: [PATCH 221/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 550cdea32..b6ac5eb1d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -772,7 +772,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); } - if ( strcmp(base,"RUB") == 0 && pax->approved == 0 ) + if ( strcmp(base,"RUB") == 0 && (pax == 0 || pax->approved == 0) ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,0,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); From 38fa256ef66662800d302344adb2b89aaac264a3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:33:55 +0200 Subject: [PATCH 222/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b6ac5eb1d..854d5f427 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -326,11 +326,11 @@ uint64_t komodo_paxtotal() pax->ready = 0; if ( pax->marked != 0 ) continue; - //printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); if ( strcmp(symbol,pax->symbol) == 0 ) { if ( pax->marked == 0 ) { + printf("pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); if ( komodo_is_issuer() != 0 ) { if ( pax->validated != 0 && pax->type == 'D' ) From 36a4e92cdef0cbb31322aac76e74816da64aa3cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:42:53 +0200 Subject: [PATCH 223/281] test --- src/komodo_gateway.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 854d5f427..6ac68340c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -324,6 +324,8 @@ uint64_t komodo_paxtotal() HASH_ITER(hh,PAX,pax,tmp) { pax->ready = 0; + if ( pax->type == 'A' ) + printf("%p pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); if ( pax->marked != 0 ) continue; if ( strcmp(symbol,pax->symbol) == 0 ) @@ -814,6 +816,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); + if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) + printf("unexpected null pax for approve\n"); if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) pax2->approved = kmdheights[i]; //komodo_paxmark(height,txids[i],vouts[i],'W',height); @@ -823,7 +827,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->approved += srcvalues[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p approved %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); } //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); } @@ -834,7 +838,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->approved += srcvalues[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p approved %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); } } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) != 0 ) From 1eb7220f0e75d6ac3e221a7b2571c9ae3ceee5d1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:49:19 +0200 Subject: [PATCH 224/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6ac68340c..a35e9f15b 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -325,7 +325,7 @@ uint64_t komodo_paxtotal() { pax->ready = 0; if ( pax->type == 'A' ) - printf("%p pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); + printf("%p pax.%s <- %s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->symbol,pax->source,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); if ( pax->marked != 0 ) continue; if ( strcmp(symbol,pax->symbol) == 0 ) @@ -352,7 +352,7 @@ uint64_t komodo_paxtotal() { seed = 0; checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); - //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",pax->height,pax->symbol,(double)pax->fiatoshis/COIN,(double)pax->komodoshis/COIN,(double)checktoshis/COIN); + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",pax->height,pax->symbol,(double)pax->fiatoshis/COIN,(double)pax->komodoshis/COIN,(double)checktoshis/COIN); //printf(" v%d %.8f k.%d ht.%d\n",pax->vout,dstr(pax->komodoshis),pax->height,pax->otherheight); if ( seed != 0 && checktoshis != 0 ) { From 54ef0b1a6a9c46891e1d5d1d45881e162dd200e9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:55:21 +0200 Subject: [PATCH 225/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a35e9f15b..ef1da9f53 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -332,7 +332,6 @@ uint64_t komodo_paxtotal() { if ( pax->marked == 0 ) { - printf("pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); if ( komodo_is_issuer() != 0 ) { if ( pax->validated != 0 && pax->type == 'D' ) @@ -365,6 +364,7 @@ uint64_t komodo_paxtotal() } } } + printf("pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); } } } @@ -465,7 +465,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to continue; if ( strcmp(pax->symbol,symbol) != 0 || pax->validated == 0 ) { - //printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); + printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); continue; } if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) @@ -808,8 +808,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 didstats = 0; seed = 0; checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)srcvalues[i]); - /*printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)srcvalues[i]/COIN,(double)values[i]/COIN,(double)checktoshis/COIN); - for (j=0; j<32; j++) + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)srcvalues[i]/COIN,(double)values[i]/COIN,(double)checktoshis/COIN); + /*for (j=0; j<32; j++) printf("%02x",((uint8_t *)&txids[i])[j]); printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) From 23fac38d8417ba493416f30385832e4d357d62de Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 14:58:45 +0200 Subject: [PATCH 226/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ef1da9f53..5c806bc97 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -364,7 +364,7 @@ uint64_t komodo_paxtotal() } } } - printf("pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); + printf("%p (%c) pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->type,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); } } } @@ -807,8 +807,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 continue; didstats = 0; seed = 0; - checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)srcvalues[i]); - printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)srcvalues[i]/COIN,(double)values[i]/COIN,(double)checktoshis/COIN); + checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]); + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); /*for (j=0; j<32; j++) printf("%02x",((uint8_t *)&txids[i])[j]); printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ From 371a9c87e732f80d1531d3db9e659520139b0933 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:04:02 +0200 Subject: [PATCH 227/281] test --- src/komodo_gateway.h | 71 ++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 5c806bc97..6b6697a31 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -340,7 +340,7 @@ uint64_t komodo_paxtotal() pax->ready = 1; } } - else if ( pax->approved != 0 ) + else if ( pax->approved != 0 && pax->type == 'A' ) { if ( pax->validated != 0 ) { @@ -809,46 +809,51 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 seed = 0; checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]); printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); - /*for (j=0; j<32; j++) - printf("%02x",((uint8_t *)&txids[i])[j]); - printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ - if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) + if ( srcvalues[i] == checktoshis ) { - bitcoin_address(coinaddr,60,&rmd160s[i*20],20); - komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); + /*for (j=0; j<32; j++) + printf("%02x",((uint8_t *)&txids[i])[j]); + printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) - printf("unexpected null pax for approve\n"); - if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) - pax2->approved = kmdheights[i]; - //komodo_paxmark(height,txids[i],vouts[i],'W',height); - //komodo_paxmark(height,txids[i],vouts[i],'A',height); - if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->approved += srcvalues[i]; - didstats = 1; - //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + bitcoin_address(coinaddr,60,&rmd160s[i*20],20); + komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); + if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) + printf("unexpected null pax for approve\n"); + else pax->validated = checktoshis; + if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) + pax2->approved = kmdheights[i]; + //komodo_paxmark(height,txids[i],vouts[i],'W',height); + //komodo_paxmark(height,txids[i],vouts[i],'A',height); + if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + { + basesp->approved += srcvalues[i]; + didstats = 1; + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); + } + //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); } - //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); - } - else if ( pax->didstats == 0 && srcvalues[i] != 0 ) - { - if ( (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + else if ( pax->didstats == 0 && srcvalues[i] != 0 ) { - basesp->approved += srcvalues[i]; - didstats = 1; + if ( (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + { + basesp->approved += srcvalues[i]; + didstats = 1; + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); + } + } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); + if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) != 0 ) + { + pax->type = opretbuf[0]; + pax->approved = kmdheights[i]; + pax->validated = checktoshis; + if ( didstats != 0 ) + pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); - } - } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); - if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) != 0 ) - { - pax->type = opretbuf[0]; - pax->approved = kmdheights[i]; - if ( didstats != 0 ) - pax->didstats = 1; - //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf(" i.%d approved.%d <<<<<<<<<<<<< APPROVED %p\n",i,kmdheights[i],pax); + } } } } From cfa1fdda8f655b85740bb2a20df0b00adb610d0f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:08:20 +0200 Subject: [PATCH 228/281] test --- src/komodo_gateway.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6b6697a31..8daa48473 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -324,11 +324,11 @@ uint64_t komodo_paxtotal() HASH_ITER(hh,PAX,pax,tmp) { pax->ready = 0; - if ( pax->type == 'A' ) + if ( 0 && pax->type == 'A' ) printf("%p pax.%s <- %s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->symbol,pax->source,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); if ( pax->marked != 0 ) continue; - if ( strcmp(symbol,pax->symbol) == 0 ) + if ( strcmp(symbol,pax->symbol) == 0 || pax->type == 'A' ) { if ( pax->marked == 0 ) { @@ -364,7 +364,8 @@ uint64_t komodo_paxtotal() } } } - printf("%p (%c) pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->type,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); + if ( pax->ready != 0 ) + printf("%p (%c) pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->type,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); } } } From cefb14cd7b39a28bf95ec2793bfbe0b4f76fed43 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:12:57 +0200 Subject: [PATCH 229/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8daa48473..855a65393 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -445,7 +445,6 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to } else opcode = 'X'; HASH_ITER(hh,PAX,pax,tmp) { - //printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); if ( strcmp(symbol,"KMD") == 0 && pax->approved == 0 ) continue; //else if ( strcmp(symbol,"KMD") != 0 ) @@ -462,6 +461,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available)); continue; } + printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); if ( pax->marked != 0 || (pax->type != 'D' && pax->type != 'A') || pax->ready == 0 ) continue; if ( strcmp(pax->symbol,symbol) != 0 || pax->validated == 0 ) @@ -493,7 +493,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to { len += komodo_rwapproval(1,&data[len],pax); PENDING_KOMODO_TX += pax->komodoshis; - //printf(" vout.%u DEPOSIT %.8f <- pax.%s pending %.8f | ",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,dstr(PENDING_KOMODO_TX)); + printf(" vout.%u DEPOSIT %.8f <- pax.%s pending %.8f | ",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,dstr(PENDING_KOMODO_TX)); } if ( numvouts++ >= 64 ) break; From 890df436b5a9dbc70c8bed1407a126dd8786343e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:17:33 +0200 Subject: [PATCH 230/281] test --- src/komodo_gateway.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 855a65393..4e0fa7715 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -369,7 +369,7 @@ uint64_t komodo_paxtotal() } } } - //printf("paxtotal %.8f\n",dstr(total)); + printf("paxtotal %.8f\n",dstr(total)); return(total); } @@ -445,6 +445,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to } else opcode = 'X'; HASH_ITER(hh,PAX,pax,tmp) { + printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); if ( strcmp(symbol,"KMD") == 0 && pax->approved == 0 ) continue; //else if ( strcmp(symbol,"KMD") != 0 ) From 57f349cbefaa736e4d206d7ddd58dcba2f98d738 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:36:44 +0200 Subject: [PATCH 231/281] test --- src/komodo_gateway.h | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 4e0fa7715..a59277127 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -87,6 +87,13 @@ struct pax_transaction *komodo_paxmark(int32_t height,uint256 txid,uint16_t vout return(pax); } +void komodo_paxdelete(struct pax_transaction *pax) +{ + pthread_mutex_lock(&komodo_mutex); + HASH_DELETE(hh,PAX,pax); + pthread_mutex_unlock(&komodo_mutex); +} + void komodo_gateway_deposit(char *coinaddr,uint64_t value,char *symbol,uint64_t fiatoshis,uint8_t *rmd160,uint256 txid,uint16_t vout,uint8_t type,int32_t height,int32_t otherheight,char *source,int32_t approved) // assetchain context { struct pax_transaction *pax; uint8_t buf[35]; int32_t addflag = 0; struct komodo_state *sp; char str[16],dest[16],*s; @@ -442,10 +449,19 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to opcode = 'I'; if ( komodo_isrealtime(&ht) == 0 ) return(0); - } else opcode = 'X'; + } + else + { + opcode = 'X'; + printf("redeems check paxtotal\n"); + if ( komodo_paxtotal() == 0 ) + return(0); + } + printf("check PAX iterations\n"); HASH_ITER(hh,PAX,pax,tmp) { - printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); + if ( pax->type == 'A' ) + printf("%p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); if ( strcmp(symbol,"KMD") == 0 && pax->approved == 0 ) continue; //else if ( strcmp(symbol,"KMD") != 0 ) @@ -747,8 +763,11 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 } } } - komodo_paxmark(pax->height,txids[i],vouts[i],'D',height); } + if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'I',height)) != 0 ) + komodo_paxdelete(pax); + if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'D',height)) != 0 ) + komodo_paxdelete(pax); } } else printf("opreturn none issued?\n"); } @@ -762,7 +781,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; - if ( strcmp(base,"RUB") == 0 ) + if ( 0 && strcmp(base,"RUB") == 0 ) printf("RUB WITHDRAW %s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; //if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) @@ -776,7 +795,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); } - if ( strcmp(base,"RUB") == 0 && (pax == 0 || pax->approved == 0) ) + if ( 0 && strcmp(base,"RUB") == 0 && (pax == 0 || pax->approved == 0) ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); } komodo_gateway_deposit(coinaddr,0,(char *)"KMD",value,rmd160,txid,vout,'W',kmdheight,height,source,0); @@ -810,7 +829,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 didstats = 0; seed = 0; checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]); - printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); + //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { /*for (j=0; j<32; j++) @@ -882,10 +901,16 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->redeemed += srcvalues[i]; pax->didstats = 1; - if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); } } + if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) + komodo_paxdelete(pax); + if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'A',height)) != 0 ) + komodo_paxdelete(pax); + if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'X',height)) != 0 ) + komodo_paxdelete(pax); } } //else printf("komodo_issued_opreturn returned %d\n",n); } From a06196fe5516a0b648cdbe0439d2687e5b884579 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:44:57 +0200 Subject: [PATCH 232/281] test --- src/komodo_gateway.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a59277127..31244f7d5 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -460,10 +460,12 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to printf("check PAX iterations\n"); HASH_ITER(hh,PAX,pax,tmp) { - if ( pax->type == 'A' ) - printf("%p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); + printf("redeem? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); if ( strcmp(symbol,"KMD") == 0 && pax->approved == 0 ) + { + printf("reject 0\n"); continue; + } //else if ( strcmp(symbol,"KMD") != 0 ) { #ifdef KOMODO_ASSETCHAINS_WAITNOTARIZE @@ -476,14 +478,19 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to { if ( strcmp(ASSETCHAINS_SYMBOL,symbol) == 0 ) printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available)); + printf("reject 1\n"); continue; } printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); if ( pax->marked != 0 || (pax->type != 'D' && pax->type != 'A') || pax->ready == 0 ) + { + printf("reject 2\n"); continue; + } if ( strcmp(pax->symbol,symbol) != 0 || pax->validated == 0 ) { printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); + printf("reject 3\n"); continue; } if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) From 274dd7a5459c8d7af3beeb8a16e12b64a34e2163 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:52:04 +0200 Subject: [PATCH 233/281] test --- src/komodo_gateway.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 31244f7d5..8f5fa3dbd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -460,12 +460,9 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to printf("check PAX iterations\n"); HASH_ITER(hh,PAX,pax,tmp) { - printf("redeem? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); - if ( strcmp(symbol,"KMD") == 0 && pax->approved == 0 ) - { - printf("reject 0\n"); + if ( pax->ready == 0 ) continue; - } + printf("redeem? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); //else if ( strcmp(symbol,"KMD") != 0 ) { #ifdef KOMODO_ASSETCHAINS_WAITNOTARIZE @@ -474,23 +471,21 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT; #endif } - if ( strcmp(symbol,"KMD") != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) { if ( strcmp(ASSETCHAINS_SYMBOL,symbol) == 0 ) printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available)); - printf("reject 1\n"); continue; } - printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); + /*printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0); if ( pax->marked != 0 || (pax->type != 'D' && pax->type != 'A') || pax->ready == 0 ) { printf("reject 2\n"); continue; - } - if ( strcmp(pax->symbol,symbol) != 0 || pax->validated == 0 ) + }*/ + if ( ASSETCHAINS_SYMBOL[0] != 0 && (strcmp(pax->symbol,symbol) != 0 || pax->validated == 0) ) { printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); - printf("reject 3\n"); continue; } if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) From fc40c343d8b4ad8ad34906a464b08f20232a8aa7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 15:57:13 +0200 Subject: [PATCH 234/281] test --- src/komodo_gateway.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8f5fa3dbd..eeb6cac71 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -371,7 +371,7 @@ uint64_t komodo_paxtotal() } } } - if ( pax->ready != 0 ) + if ( 0 && pax->ready != 0 ) printf("%p (%c) pax.%s marked.%d %.8f -> %.8f validated.%d approved.%d\n",pax,pax->type,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->validated != 0,pax->approved != 0); } } @@ -453,22 +453,17 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to else { opcode = 'X'; - printf("redeems check paxtotal\n"); if ( komodo_paxtotal() == 0 ) return(0); } - printf("check PAX iterations\n"); HASH_ITER(hh,PAX,pax,tmp) { - if ( pax->ready == 0 ) - continue; - printf("redeem? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); - //else if ( strcmp(symbol,"KMD") != 0 ) { #ifdef KOMODO_ASSETCHAINS_WAITNOTARIZE struct komodo_state *kmdsp = komodo_stateptrget((char *)"KMD"); if ( kmdsp != 0 && kmdsp->NOTARIZED_HEIGHT >= pax->height ) // assumes same chain as notarize pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT; + else pax->validated = pax->ready = 0; #endif } if ( ASSETCHAINS_SYMBOL[0] != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) @@ -488,6 +483,9 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); continue; } + if ( pax->ready == 0 ) + continue; + printf("redeem.%d? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",tokomodo,pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) printf("pax.%s marked.%d %.8f -> %.8f\n",ASSETCHAINS_SYMBOL,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); txNew->vout.resize(numvouts+1); From 25d878f4a55b6794009edecd2231c9c22e0ff720 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:00:03 +0200 Subject: [PATCH 235/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index eeb6cac71..4501c81b9 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -466,7 +466,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to else pax->validated = pax->ready = 0; #endif } - if ( ASSETCHAINS_SYMBOL[0] != 0 && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis ) + if ( ASSETCHAINS_SYMBOL[0] != 0 && (pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis) ) { if ( strcmp(ASSETCHAINS_SYMBOL,symbol) == 0 ) printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available)); From 5481c677b1ecc1ecd481b15ad8b8f5c558879844 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:14:08 +0200 Subject: [PATCH 236/281] test --- src/komodo_gateway.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 4501c81b9..a249fc325 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -376,7 +376,7 @@ uint64_t komodo_paxtotal() } } } - printf("paxtotal %.8f\n",dstr(total)); + //printf("paxtotal %.8f\n",dstr(total)); return(total); } @@ -485,7 +485,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to } if ( pax->ready == 0 ) continue; - printf("redeem.%d? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",tokomodo,pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); + //printf("redeem.%d? (%c) %p pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d approved.%d\n",tokomodo,pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) printf("pax.%s marked.%d %.8f -> %.8f\n",ASSETCHAINS_SYMBOL,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); txNew->vout.resize(numvouts+1); @@ -838,7 +838,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); - komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); + komodo_gateway_deposit(coinaddr,srcvalues[i],CURRENCIES[baseids[i]],values[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) printf("unexpected null pax for approve\n"); else pax->validated = checktoshis; @@ -848,7 +848,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 //komodo_paxmark(height,txids[i],vouts[i],'A',height); if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->approved += srcvalues[i]; + basesp->approved += values[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); @@ -859,7 +859,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { if ( (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->approved += srcvalues[i]; + basesp->approved += values[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); @@ -873,7 +873,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( didstats != 0 ) pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf(" i.%d approved.%d <<<<<<<<<<<<< APPROVED %p\n",i,kmdheights[i],pax); + //printf(" i.%d approved.%d <<<<<<<<<<<<< APPROVED %p\n",i,kmdheights[i],pax); } } } @@ -897,9 +897,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txids[i],vouts[i],'X')) != 0 ) { pax->type = opretbuf[0]; - if ( baseids[i] >= 0 && srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + if ( baseids[i] >= 0 && values[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->redeemed += srcvalues[i]; + basesp->redeemed += values[i]; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); From 4d5d05740a2e1931c5b9f7f3cc2950db6cf56f0d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:19:14 +0200 Subject: [PATCH 237/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a249fc325..8cf4cc648 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -851,7 +851,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->approved += values[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis)); } //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); } @@ -862,7 +862,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->approved += values[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i]),dstr(checktoshis)); + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis)); } } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) != 0 ) @@ -902,7 +902,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->redeemed += values[i]; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); + printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(values[i])); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From 582c6afe841452a943a9461fe67704af994b8a7a Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:24:53 +0200 Subject: [PATCH 238/281] test --- src/komodo_gateway.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8cf4cc648..8baab5642 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -485,6 +485,18 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to } if ( pax->ready == 0 ) continue; + if ( pax->type == 'A' && ASSETCHAINS_SYMBOL[0] == 0 ) + { + if ( (basesp= komodo_stateptrget("KMD")) != 0 ) + { + if ( (baseid= komodo_baseid(pax->symbol)) < 0 || ((1LL << baseid) & sp->RTmask) == 0 ) + { + printf("not RT for (%s) %llx baseid.%d %llx\n",pax->symbol,(long long)sp->RTmask,baseid,(long long)(1LL< %.8f ready.%d validated.%d approved.%d\n",tokomodo,pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) printf("pax.%s marked.%d %.8f -> %.8f\n",ASSETCHAINS_SYMBOL,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); @@ -997,7 +1009,7 @@ void komodo_passport_iteration() if ( buf[0] != 0 && buf[0] == buf[1] ) { buf[2] = (uint32_t)time(NULL); - RTmask |= (1LL << baseid) | 1; + RTmask |= (1LL << baseid); memcpy(refsp->RTbufs[baseid+1],buf,sizeof(refsp->RTbufs[baseid+1])); if ( refid != 0 ) memcpy(refsp->RTbufs[0],buf,sizeof(refsp->RTbufs[0])); From 354a2dc7240450f3114101075147bae15993c97c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:26:20 +0200 Subject: [PATCH 239/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8baab5642..8fa3687ab 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -487,7 +487,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to continue; if ( pax->type == 'A' && ASSETCHAINS_SYMBOL[0] == 0 ) { - if ( (basesp= komodo_stateptrget("KMD")) != 0 ) + if ( (basesp= komodo_stateptrget((char *)"KMD")) != 0 ) { if ( (baseid= komodo_baseid(pax->symbol)) < 0 || ((1LL << baseid) & sp->RTmask) == 0 ) { From 76d59c1db26f6da9081c31bfa299ea8b4f512490 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 16:28:12 +0200 Subject: [PATCH 240/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8fa3687ab..e8c275dce 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -439,6 +439,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to struct pax_transaction *pax,*tmp; char symbol[16],dest[16]; uint8_t *script,opcode,opret[16384],data[16384]; int32_t i,baseid,ht,len=0,opretlen=0,numvouts=1; struct komodo_state *sp; uint64_t available,deposited,issued,withdrawn,approved,redeemed,mask; if ( KOMODO_PAX == 0 ) return(0); + struct komodo_state *kmdsp = komodo_stateptrget((char *)"KMD"); sp = komodo_stateptr(symbol,dest); strcpy(symbol,base); if ( ASSETCHAINS_SYMBOL[0] != 0 && komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) @@ -460,7 +461,6 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to { { #ifdef KOMODO_ASSETCHAINS_WAITNOTARIZE - struct komodo_state *kmdsp = komodo_stateptrget((char *)"KMD"); if ( kmdsp != 0 && kmdsp->NOTARIZED_HEIGHT >= pax->height ) // assumes same chain as notarize pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT; else pax->validated = pax->ready = 0; @@ -487,14 +487,14 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to continue; if ( pax->type == 'A' && ASSETCHAINS_SYMBOL[0] == 0 ) { - if ( (basesp= komodo_stateptrget((char *)"KMD")) != 0 ) + if ( kmdsp != 0 ) { if ( (baseid= komodo_baseid(pax->symbol)) < 0 || ((1LL << baseid) & sp->RTmask) == 0 ) { printf("not RT for (%s) %llx baseid.%d %llx\n",pax->symbol,(long long)sp->RTmask,baseid,(long long)(1LL< %.8f ready.%d validated.%d approved.%d\n",tokomodo,pax->type,pax,pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0,pax->approved!=0); From 456ea63994f2beea1053dda877ac1ed5f96606a3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 18:58:43 +0200 Subject: [PATCH 241/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e8c275dce..55496eedd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -414,7 +414,7 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic if ( n < sizeof(paxes)/sizeof(*paxes) ) paxes[n++] = pax; } - //printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); + printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } opretstr[0] = 0; From 6b3eb2c4379dc4ee1f9eacf54c765106f8297239 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:02:49 +0200 Subject: [PATCH 242/281] test --- src/komodo_gateway.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 55496eedd..b4c7067f5 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -398,7 +398,7 @@ static int _paxorder(const void *a,const void *b) int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic order { - struct pax_transaction *pax,*tmp,*paxes[64]; uint8_t opretbuf[16384]; int32_t i,n,ht,len=0; uint64_t total = 0; + struct pax_transaction *pax,*pax2,*tmp,*paxes[64]; uint8_t opretbuf[16384]; int32_t i,n,ht,len=0; uint64_t total = 0; if ( KOMODO_PAX == 0 ) return(0); if ( komodo_isrealtime(&ht) == 0 || ASSETCHAINS_SYMBOL[0] != 0 ) @@ -408,7 +408,14 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic { if ( pax->type == 'W' ) { - //printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); + if ( (pax2= komodo_paxfind(pax->txid,pax->vout,'A')) != 0 ) + { + if ( pax2->approved != 0 ) + pax->approved = pax2->approved; + } + else if ( (pax2= komodo_paxfind(pax->txid,pax->vout,'X')) != 0 ) + pax->approved = pax->heightl\; + //printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { if ( n < sizeof(paxes)/sizeof(*paxes) ) From 0b262b65ad6893eb3e919b738523a58cb55a1d9b Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:03:33 +0200 Subject: [PATCH 243/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b4c7067f5..ff70200c6 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -414,7 +414,7 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic pax->approved = pax2->approved; } else if ( (pax2= komodo_paxfind(pax->txid,pax->vout,'X')) != 0 ) - pax->approved = pax->heightl\; + pax->approved = pax->height; //printf("pax %s marked.%u approved.%u validated.%llu\n",pax->symbol,pax->marked,pax->approved,(long long)pax->validated); if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { From 7aadf9a95f9e04808bf40ceb71c3cd80ef81ea38 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:07:23 +0200 Subject: [PATCH 244/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ff70200c6..b9276a102 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -863,7 +863,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else pax->validated = checktoshis; if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) pax2->approved = kmdheights[i]; - //komodo_paxmark(height,txids[i],vouts[i],'W',height); + komodo_paxmark(height,txids[i],vouts[i],'W',height); //komodo_paxmark(height,txids[i],vouts[i],'A',height); if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { From 5b489b55b802a6569a6789bcf6e9f88a4b599a45 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:11:27 +0200 Subject: [PATCH 245/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b9276a102..7c314acef 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -811,8 +811,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->withdrawn += value; didstats = 1; - if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p withdrawn %s += %.8f\n",basesp,base,dstr(value)); + //if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + printf("########### %p withdrawn %s += %.8f check %.8f\n",basesp,base,dstr(value),dstr(checktoshis)); } if ( 0 && strcmp(base,"RUB") == 0 && (pax == 0 || pax->approved == 0) ) printf("notarize %s %.8f -> %.8f kmd.%d other.%d\n",ASSETCHAINS_SYMBOL,dstr(value),dstr(komodoshis),kmdheight,height); From 2405bc66fdfa0d5b32931ad12a29ef79d7b6d4ea Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:14:53 +0200 Subject: [PATCH 246/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 7c314acef..372ba5e94 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -319,8 +319,8 @@ uint64_t komodo_paxtotal() else if ( pax->validated == 0 ) { pax->validated = pax->komodoshis = checktoshis; - if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - printf("got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) + printf("%p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } @@ -800,7 +800,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; - if ( 0 && strcmp(base,"RUB") == 0 ) + if ( strcmp(base,"RUB") == 0 ) printf("RUB WITHDRAW %s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; //if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) @@ -811,7 +811,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->withdrawn += value; didstats = 1; - //if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) + if ( strcmp(base,ASSETCHAINS_SYMBOL) == 0 ) printf("########### %p withdrawn %s += %.8f check %.8f\n",basesp,base,dstr(value),dstr(checktoshis)); } if ( 0 && strcmp(base,"RUB") == 0 && (pax == 0 || pax->approved == 0) ) From ac4eb454e33e1e02e5d5aedf9d94057ac5ee4fd0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:18:34 +0200 Subject: [PATCH 247/281] test --- src/komodo_gateway.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 372ba5e94..381fa8d01 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -419,9 +419,13 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic if ( pax->marked == 0 && strcmp((char *)"KMD",pax->symbol) == 0 && pax->approved == 0 && pax->validated != 0 ) { if ( n < sizeof(paxes)/sizeof(*paxes) ) + { paxes[n++] = pax; + int32_t j; for (j=0; j<32; j++) + printf("%02x",((uint8_t *)&pax->txid)[j]); + printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); + } } - printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } opretstr[0] = 0; @@ -851,9 +855,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { - /*for (j=0; j<32; j++) + for (j=0; j<32; j++) printf("%02x",((uint8_t *)&txids[i])[j]); - printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/ + printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); @@ -870,7 +874,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->approved += values[i]; didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis)); + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f kht.%d %d\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis),kmdheights[i],otherheights[i]); } //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); } From ea9639b1d10b039c05f6a3edb8588a4515e75503 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:22:51 +0200 Subject: [PATCH 248/281] test --- src/komodo_gateway.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 381fa8d01..f127bb0ec 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -319,8 +319,10 @@ uint64_t komodo_paxtotal() else if ( pax->validated == 0 ) { pax->validated = pax->komodoshis = checktoshis; + int32_t j; for (j=0; j<32; j++) + printf("%02x",((uint8_t *)&pax->txid)[j]); //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - printf("%p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + printf(" %p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } From bbfaec41d97f319c73e5ffbe84f3e3e071e47529 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:25:02 +0200 Subject: [PATCH 249/281] test --- src/komodo_gateway.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f127bb0ec..991cd4c0f 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -89,6 +89,7 @@ struct pax_transaction *komodo_paxmark(int32_t height,uint256 txid,uint16_t vout void komodo_paxdelete(struct pax_transaction *pax) { + return; pthread_mutex_lock(&komodo_mutex); HASH_DELETE(hh,PAX,pax); pthread_mutex_unlock(&komodo_mutex); @@ -322,7 +323,7 @@ uint64_t komodo_paxtotal() int32_t j; for (j=0; j<32; j++) printf("%02x",((uint8_t *)&pax->txid)[j]); //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - printf(" %p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + printf(" v%d %p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->vout,pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } From 5720de88186ab373b6b08ce0a486ce051572416d Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 19:31:41 +0200 Subject: [PATCH 250/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 991cd4c0f..e42e67143 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -89,7 +89,7 @@ struct pax_transaction *komodo_paxmark(int32_t height,uint256 txid,uint16_t vout void komodo_paxdelete(struct pax_transaction *pax) { - return; + return; // breaks when out of order pthread_mutex_lock(&komodo_mutex); HASH_DELETE(hh,PAX,pax); pthread_mutex_unlock(&komodo_mutex); From 2fb657f6a5c30ded978636b88c1c1ee1c26ccc7b Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 22:26:46 +0200 Subject: [PATCH 251/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e42e67143..ec8e40255 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -426,7 +426,7 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic paxes[n++] = pax; int32_t j; for (j=0; j<32; j++) printf("%02x",((uint8_t *)&pax->txid)[j]); - printf("%s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); + printf(" %s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } } @@ -854,8 +854,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 continue; didstats = 0; seed = 0; - checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]); - //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); + checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)srcvalues[i]); + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { for (j=0; j<32; j++) From d515094d1fdbb994e6c4d24a043a9b58ca32e146 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 22:31:19 +0200 Subject: [PATCH 252/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ec8e40255..ddc1c9223 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -840,7 +840,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else if ( tokomodo != 0 && opretbuf[0] == 'A' ) { tokomodo = 1; - if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) + //if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) { for (i=0; i KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { From 8e7b40d93de3811385f026fc9e9e6104b57e28ff Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 22:42:05 +0200 Subject: [PATCH 253/281] test --- src/komodo_gateway.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ddc1c9223..32adba763 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -190,7 +190,7 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t struct pax_transaction p,*pax; int32_t i,n=0,j,len=0,incr,height,otherheight; uint8_t type,rmd160[20]; uint64_t fiatoshis; char symbol[16]; if ( KOMODO_PAX == 0 ) return(0); - incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 4)); + incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 2)); for (i=0; i<4; i++) base[i] = opretbuf[opretlen-4+i]; //for (i=0; i Date: Thu, 22 Dec 2016 22:46:23 +0200 Subject: [PATCH 254/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 32adba763..aab52a8c3 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -193,10 +193,10 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 2)); for (i=0; i<4; i++) base[i] = opretbuf[opretlen-4+i]; - //for (i=0; i Date: Thu, 22 Dec 2016 22:54:00 +0200 Subject: [PATCH 255/281] test --- src/komodo_gateway.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index aab52a8c3..5f96ff6f1 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -193,10 +193,10 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 2)); for (i=0; i<4; i++) base[i] = opretbuf[opretlen-4+i]; - for (i=0; i 0 ) { for (i=0; i KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { - for (j=0; j<32; j++) - printf("%02x",((uint8_t *)&txids[i])[j]); - printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) { bitcoin_address(coinaddr,60,&rmd160s[i*20],20); From 5cb9312f6c6dc8f5d1a64fb21ed387982ab7398f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 23:05:39 +0200 Subject: [PATCH 256/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 5f96ff6f1..baa07961f 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -190,9 +190,7 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t struct pax_transaction p,*pax; int32_t i,n=0,j,len=0,incr,height,otherheight; uint8_t type,rmd160[20]; uint64_t fiatoshis; char symbol[16]; if ( KOMODO_PAX == 0 ) return(0); - incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20 + 2)); - for (i=0; i<4; i++) - base[i] = opretbuf[opretlen-4+i]; + incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20)); //for (i=0; i Date: Thu, 22 Dec 2016 23:10:10 +0200 Subject: [PATCH 257/281] test --- src/komodo_gateway.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index baa07961f..040aa4ca9 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -215,7 +215,7 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t otherheights[n] = p.otherheight; memcpy(&rmd160s[n * 20],p.rmd160,20); baseids[n] = komodo_baseid(p.source); - if ( 1 ) + if ( 0 ) { char coinaddr[64]; bitcoin_address(coinaddr,60,&rmd160s[n * 20],20); @@ -320,10 +320,10 @@ uint64_t komodo_paxtotal() else if ( pax->validated == 0 ) { pax->validated = pax->komodoshis = checktoshis; - int32_t j; for (j=0; j<32; j++) - printf("%02x",((uint8_t *)&pax->txid)[j]); + //int32_t j; for (j=0; j<32; j++) + // printf("%02x",((uint8_t *)&pax->txid)[j]); //if ( strcmp(str,ASSETCHAINS_SYMBOL) == 0 ) - printf(" v%d %p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->vout,pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); + // printf(" v%d %p got WITHDRAW.%s kmd.%d ht.%d %.8f -> %.8f/%.8f\n",pax->vout,pax,pax->source,pax->height,pax->otherheight,dstr(pax->fiatoshis),dstr(pax->komodoshis),dstr(checktoshis)); } } } @@ -361,7 +361,7 @@ uint64_t komodo_paxtotal() { seed = 0; checktoshis = komodo_paxprice(&seed,pax->height,pax->source,(char *)"KMD",(uint64_t)pax->fiatoshis); - printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",pax->height,pax->symbol,(double)pax->fiatoshis/COIN,(double)pax->komodoshis/COIN,(double)checktoshis/COIN); + //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",pax->height,pax->symbol,(double)pax->fiatoshis/COIN,(double)pax->komodoshis/COIN,(double)checktoshis/COIN); //printf(" v%d %.8f k.%d ht.%d\n",pax->vout,dstr(pax->komodoshis),pax->height,pax->otherheight); if ( seed != 0 && checktoshis != 0 ) { @@ -840,7 +840,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else if ( tokomodo != 0 && opretbuf[0] == 'A' ) { tokomodo = 1; - //if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) + if ( 0 && ASSETCHAINS_SYMBOL[0] != 0 ) { for (i=0; i KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); + //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) From 8952ee9d114cd5982dd40b2fd77e770b4c09c3c5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 23:15:38 +0200 Subject: [PATCH 258/281] test --- src/komodo_gateway.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 040aa4ca9..1ca52ca55 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -855,7 +855,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 //printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]); if ( baseids[i] < 0 ) { - printf("baseids[%d] %d\n",i,baseids[i]); + //printf("baseids[%d] %d\n",i,baseids[i]); continue; } didstats = 0; @@ -926,12 +926,12 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txids[i],vouts[i],'X')) != 0 ) { pax->type = opretbuf[0]; - if ( baseids[i] >= 0 && values[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + if ( baseids[i] >= 0 && srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->redeemed += values[i]; + basesp->redeemed += srcvalues[i]; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(values[i])); + printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From 0ce26ccf55290ae4aec5a7965a878f99d9d9b252 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 23:25:14 +0200 Subject: [PATCH 259/281] test --- src/komodo_gateway.h | 4 ++-- src/komodo_pax.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 1ca52ca55..1ab9341bc 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -636,7 +636,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); } } - if ( matched != num ) + if ( height <= chainActive.Tip()->nHeight && matched != num ) { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading @@ -1011,7 +1011,7 @@ void komodo_passport_iteration() isrealtime = 1; RTmask |= (1LL << baseid); memcpy(refsp->RTbufs[baseid+1],buf,sizeof(refsp->RTbufs[baseid+1])); - } //else fprintf(stderr,"%s not RT\n",base); + } else fprintf(stderr,"%s not RT %u %u %d\n",base,buf[0],buf[1],(int32_t)(time(NULL)-buf[2])); } //else fprintf(stderr,"%s size error RT\n",base); fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); diff --git a/src/komodo_pax.h b/src/komodo_pax.h index 69f31ae20..53d4f0d2d 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -481,8 +481,8 @@ uint64_t komodo_paxprice(uint64_t *seedp,int32_t height,char *base,char *rel,uin } if ( nonz <= (numvotes >> 1) ) { - printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); - printf("komodo_paxprice nonz.%d of numvotes.%d\n",nonz,numvotes); + //printf("kmdbtc %llu btcusd %llu\n",(long long)kmdbtc,(long long)btcusd); + //printf("komodo_paxprice nonz.%d of numvotes.%d\n",nonz,numvotes); return(0); } return(komodo_paxcorrelation(votes,numvotes,*seedp) * basevolume / 100000); From 5fc94d71a81f5ffb6f29011a70dee4828ef27aac Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 23:33:05 +0200 Subject: [PATCH 260/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 1ab9341bc..cdd300797 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -494,7 +494,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to }*/ if ( ASSETCHAINS_SYMBOL[0] != 0 && (strcmp(pax->symbol,symbol) != 0 || pax->validated == 0) ) { - printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); + //printf("pax->symbol.%s != %s or null pax->validated %.8f\n",pax->symbol,symbol,dstr(pax->validated)); continue; } if ( pax->ready == 0 ) @@ -1006,7 +1006,7 @@ void komodo_passport_iteration() if ( fread(buf,1,sizeof(buf),fp) == sizeof(buf) ) { sp->CURRENT_HEIGHT = buf[0]; - if ( buf[0] != 0 && buf[0] == buf[1] && buf[2] > time(NULL)-60 ) + if ( buf[0] != 0 && buf[0] >= buf[1] && buf[2] > time(NULL)-60 ) { isrealtime = 1; RTmask |= (1LL << baseid); From 63cd89c4aebb29c6400795942c8b32e607137db0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Dec 2016 23:41:44 +0200 Subject: [PATCH 261/281] test --- src/bitcoind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 6153289df..290e1ff9a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -41,7 +41,7 @@ void WaitForShutdown(boost::thread_group* threadGroup) // Tell the main threads to shutdown. while (!fShutdown) { - MilliSleep(22000); + MilliSleep(16000); komodo_passport_iteration(); fShutdown = ShutdownRequested(); } From 2fbdcf4ebebdcfaae76df39754e4c6f9384791ba Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Dec 2016 08:30:14 +0200 Subject: [PATCH 262/281] fix pax price --- src/komodo_pax.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index 53d4f0d2d..4866e502d 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -429,6 +429,7 @@ uint64_t _komodo_paxprice(uint64_t *kmdbtcp,uint64_t *btcusdp,int32_t height,cha height -= 10; if ( (baseid= komodo_baseid(base)) >= 0 && (relid= komodo_baseid(rel)) >= 0 ) { + portable_mutex_lock(&komodo_mutex); for (i=NUM_PRICES-1; i>=0; i--) { ptr = &PVALS[36 * i]; @@ -439,11 +440,13 @@ uint64_t _komodo_paxprice(uint64_t *kmdbtcp,uint64_t *btcusdp,int32_t height,cha *kmdbtcp = ptr[MAX_CURRENCIES + 1] / 539; *btcusdp = ptr[MAX_CURRENCIES + 2] / 539; } + portable_mutex_unlock(&komodo_mutex); if ( kmdbtc != 0 && btcusd != 0 ) return(komodo_paxcalc(&ptr[1],baseid,relid,basevolume,kmdbtc,btcusd)); else return(0); } } + portable_mutex_unlock(&komodo_mutex); } //else printf("paxprice invalid base.%s %d, rel.%s %d\n",base,baseid,rel,relid); return(0); } From 2e5752167300a6aa1135ac14baead38bda6f5a87 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Dec 2016 08:40:35 +0200 Subject: [PATCH 263/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index cdd300797..d6be98160 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -424,9 +424,9 @@ int32_t komodo_pending_withdraws(char *opretstr) // todo: enforce deterministic if ( n < sizeof(paxes)/sizeof(*paxes) ) { paxes[n++] = pax; - int32_t j; for (j=0; j<32; j++) - printf("%02x",((uint8_t *)&pax->txid)[j]); - printf(" %s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); + //int32_t j; for (j=0; j<32; j++) + // printf("%02x",((uint8_t *)&pax->txid)[j]); + //printf(" %s.(kmdht.%d ht.%d marked.%u approved.%d validated %.8f) %.8f\n",pax->source,pax->height,pax->otherheight,pax->marked,pax->approved,dstr(pax->validated),dstr(pax->komodoshis)); } } } From 6755c2aa31dab632cc27619a70de6f20a55407f0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Dec 2016 08:44:26 +0200 Subject: [PATCH 264/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d6be98160..27af234cb 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -640,7 +640,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); // can easily happen depending on order of loading - if ( height > 150000 ) + if ( height > 200000 ) { printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num); return(-1); From ec1171ab6809d2cad1973b268dd15d7e027c791e Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Dec 2016 07:56:44 +0200 Subject: [PATCH 265/281] relax asset chain RT check --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 27af234cb..0c9d8d47c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1006,7 +1006,7 @@ void komodo_passport_iteration() if ( fread(buf,1,sizeof(buf),fp) == sizeof(buf) ) { sp->CURRENT_HEIGHT = buf[0]; - if ( buf[0] != 0 && buf[0] >= buf[1] && buf[2] > time(NULL)-60 ) + if ( buf[0] != 0 && buf[0] >= buf[1] && buf[2] > time(NULL)-600 ) { isrealtime = 1; RTmask |= (1LL << baseid); From 43d45898951c32d1a03501e700ad967ee0086a78 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Dec 2016 07:57:41 +0200 Subject: [PATCH 266/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0c9d8d47c..4ca6fb5ae 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1006,12 +1006,12 @@ void komodo_passport_iteration() if ( fread(buf,1,sizeof(buf),fp) == sizeof(buf) ) { sp->CURRENT_HEIGHT = buf[0]; - if ( buf[0] != 0 && buf[0] >= buf[1] && buf[2] > time(NULL)-600 ) + if ( buf[0] != 0 && buf[0] >= buf[1] && buf[2] > time(NULL)-300 ) { isrealtime = 1; RTmask |= (1LL << baseid); memcpy(refsp->RTbufs[baseid+1],buf,sizeof(refsp->RTbufs[baseid+1])); - } else fprintf(stderr,"%s not RT %u %u %d\n",base,buf[0],buf[1],(int32_t)(time(NULL)-buf[2])); + } else fprintf(stderr,"[%s]: %s not RT %u %u %d\n",ASSETCHAINS_SYMBOL,base,buf[0],buf[1],(int32_t)(time(NULL)-buf[2])); } //else fprintf(stderr,"%s size error RT\n",base); fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); From 35695eda74f69f1407063deb8dda8a5af14b615b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 14:52:08 +0200 Subject: [PATCH 267/281] test --- src/komodo_gateway.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 4ca6fb5ae..63a058d09 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -209,8 +209,16 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t { txids[n] = p.txid; vouts[n] = p.vout; - values[n] = (strcmp("KMD",base) == 0) ? p.komodoshis : p.fiatoshis; - srcvalues[n] = (strcmp("KMD",base) == 0) ? p.fiatoshis : p.komodoshis; + if ( iskomodo == 1 ) + { + values[n] = p.komodoshis; + srcvalues[n] = p.fiatoshis; + } + else + { + values[n] = p.fiatoshis; + srcvalues[n] = p.komodoshis; + } kmdheights[n] = p.height; otherheights[n] = p.otherheight; memcpy(&rmd160s[n * 20],p.rmd160,20); @@ -912,7 +920,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else if ( opretbuf[0] == 'X' ) { tokomodo = 1; - if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,1)) > 0 ) + if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,2)) > 0 ) { for (i=0; i Date: Fri, 30 Dec 2016 14:53:31 +0200 Subject: [PATCH 268/281] test --- src/komodo_gateway.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 63a058d09..48aff712e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -626,7 +626,13 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above { printf(">>>>>>>>>>> %c errs.%d i.%d match %.8f vs %.8f pax.%p\n",opcode,errs,i,dstr(opcode == 'I' ? pax->fiatoshis : pax->komodoshis),dstr(block.vtx[0].vout[i].nValue),pax); errs++; - } else matched++; + } + else + { + if ( opcode == 'X' ) + printf("check deposit validates %s %.8f -> %.8f\n",CURRENCIES[baseids[i]],dstr(srcvalues[i]),dstr(values[i])); + matched++; + } } else { From 387e3c58c0b631f8824c9e5b14cf6b71805069ad Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 14:57:24 +0200 Subject: [PATCH 269/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 48aff712e..6a5d2f98a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -209,7 +209,7 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t { txids[n] = p.txid; vouts[n] = p.vout; - if ( iskomodo == 1 ) + if ( iskomodo != 0 ) { values[n] = p.komodoshis; srcvalues[n] = p.fiatoshis; From c65d08684897ab67276a63b3c5acc4f7d3804d06 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:00:10 +0200 Subject: [PATCH 270/281] test --- src/komodo_gateway.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6a5d2f98a..c9d2a5eb1 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -209,16 +209,8 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t { txids[n] = p.txid; vouts[n] = p.vout; - if ( iskomodo != 0 ) - { - values[n] = p.komodoshis; - srcvalues[n] = p.fiatoshis; - } - else - { - values[n] = p.fiatoshis; - srcvalues[n] = p.komodoshis; - } + values[n] = (strcmp("KMD",base) == 0) ? p.komodoshis : p.fiatoshis; + srcvalues[n] = (strcmp("KMD",base) == 0) ? p.fiatoshis : p.komodoshis; kmdheights[n] = p.height; otherheights[n] = p.otherheight; memcpy(&rmd160s[n * 20],p.rmd160,20); @@ -926,7 +918,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else if ( opretbuf[0] == 'X' ) { tokomodo = 1; - if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,2)) > 0 ) + if ( (n= komodo_issued_opreturn(base,txids,vouts,values,srcvalues,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,1)) > 0 ) { for (i=0; i Date: Fri, 30 Dec 2016 15:05:12 +0200 Subject: [PATCH 271/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index c9d2a5eb1..f6b87b12d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -881,7 +881,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 pax2->approved = kmdheights[i]; komodo_paxmark(height,txids[i],vouts[i],'W',height); //komodo_paxmark(height,txids[i],vouts[i],'A',height); - if ( srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + if ( values[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { basesp->approved += values[i]; didstats = 1; @@ -937,7 +937,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->redeemed += srcvalues[i]; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p redeemed %s += %.8f\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i])); + printf("########### %p redeemed %s += %.8f kht.%d ht.%d\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),kmdheights[i],otherheights[i]); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From bd737014954ccd88e631bef5c59426d321f7588c Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:11:35 +0200 Subject: [PATCH 272/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f6b87b12d..95ba979df 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -937,7 +937,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->redeemed += srcvalues[i]; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("########### %p redeemed %s += %.8f kht.%d ht.%d\n",basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),kmdheights[i],otherheights[i]); + printf("ht.%d %.8f ########### %p redeemed %s += %.8f kht.%d ht.%d\n",height,dstr(value),basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),kmdheights[i],otherheights[i]); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From 2ee39faeaa01b7ab8eedf8af2035234aff24a40b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:18:43 +0200 Subject: [PATCH 273/281] test --- src/komodo_gateway.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 95ba979df..abea4a949 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -932,12 +932,15 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txids[i],vouts[i],'X')) != 0 ) { pax->type = opretbuf[0]; - if ( baseids[i] >= 0 && srcvalues[i] != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) + if ( height < 121842 ) + value = srcvalues[i]; + else value = values[i]; + if ( baseids[i] >= 0 && value != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) { - basesp->redeemed += srcvalues[i]; + basesp->redeemed += value; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("ht.%d %.8f ########### %p redeemed %s += %.8f kht.%d ht.%d\n",height,dstr(value),basesp,CURRENCIES[baseids[i]],dstr(srcvalues[i]),kmdheights[i],otherheights[i]); + printf("ht.%d %.8f ########### %p redeemed %s += %.8f kht.%d ht.%d\n",height,dstr(value),basesp,CURRENCIES[baseids[i]],dstr(value),kmdheights[i],otherheights[i]); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From 6276f75559ef96f66137bc42fef858d752de6353 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:21:47 +0200 Subject: [PATCH 274/281] test --- src/komodo_gateway.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index abea4a949..015f2689c 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -867,7 +867,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 didstats = 0; seed = 0; checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]); - //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); + printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) @@ -932,7 +932,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( (pax= komodo_paxfind(txids[i],vouts[i],'X')) != 0 ) { pax->type = opretbuf[0]; - if ( height < 121842 ) + if ( height < 121842 ) // fields got switched around due to legacy issues and approves value = srcvalues[i]; else value = values[i]; if ( baseids[i] >= 0 && value != 0 && (basesp= komodo_stateptrget(CURRENCIES[baseids[i]])) != 0 ) From 2b9a57d7373e322fa1a8efa54bc599903d53b342 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:25:00 +0200 Subject: [PATCH 275/281] test --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 015f2689c..c3d096dc2 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -856,9 +856,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { for (i=0; i Date: Fri, 30 Dec 2016 15:29:17 +0200 Subject: [PATCH 276/281] test --- src/komodo_gateway.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index c3d096dc2..d3dd38c33 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -862,7 +862,13 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 if ( baseids[i] < 0 ) { //printf("baseids[%d] %d\n",i,baseids[i]); - continue; + if ( (pax= komodo_paxfind(txids[i],vouts[i],'W')) != 0 ) + { + baseids[i] = komodo_baseid(pax->symbol); + printf("override neg1 with (%s)\n",pax->symbol); + } + if ( baseids[i] < 0 ) + continue; } didstats = 0; seed = 0; From afdb28f33e0b9a014e7aa02f02bccdd166447f5e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:34:29 +0200 Subject: [PATCH 277/281] test --- src/komodo_gateway.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index d3dd38c33..e0f49ddd7 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -861,8 +861,11 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 printf(" v%d %.8f %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),dstr(srcvalues[i]),kmdheights[i],otherheights[i],baseids[i]); if ( baseids[i] < 0 ) { + for (i=0; isymbol); printf("override neg1 with (%s)\n",pax->symbol); From 085c4ee47ae662b42fd4cb22519fac28e2159ef5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 15:45:45 +0200 Subject: [PATCH 278/281] test --- src/assetchains | 86 ++++++++++++++++++++++---------------------- src/komodo_gateway.h | 1 + 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/src/assetchains b/src/assetchains index 10129742e..16f3004d5 100755 --- a/src/assetchains +++ b/src/assetchains @@ -3,48 +3,48 @@ set -x source pubkey.txt echo $pubkey -./komodod -pubkey=$pubkey -ac_name=REVS -ac_supply=1300000 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1401 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=REVS -ac_supply=1300000 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1401 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=78.47.196.146 $1 -gen & -./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=JPY -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=GBP -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=AUD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CAD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CHF -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=NZD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CNY -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=RUB -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=MXN -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BRL -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=INR -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=HKD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=TRY -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=ZAR -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=PLN -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=NOK -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SEK -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=DKK -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=CZK -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=HUF -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=ILS -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=KRW -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=MYR -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=PHP -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=RON -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SGD -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=THB -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=BGN -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=IDR -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=HRK -addnode=78.47.196.146 $1 & +./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=JPY -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=GBP -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=AUD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=CAD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=CHF -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=NZD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=CNY -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=RUB -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=MXN -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=BRL -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=INR -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=HKD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=TRY -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=ZAR -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=PLN -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=NOK -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=SEK -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=DKK -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=CZK -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=HUF -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=ILS -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=KRW -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=MYR -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=PHP -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=RON -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=SGD -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=THB -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=BGN -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=IDR -addnode=78.47.196.146 $1 -gen & +./komodod -pubkey=$pubkey -ac_name=HRK -addnode=78.47.196.146 $1 -gen & diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index e0f49ddd7..98352a9d1 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -191,6 +191,7 @@ int32_t komodo_issued_opreturn(char *base,uint256 *txids,uint16_t *vouts,int64_t if ( KOMODO_PAX == 0 ) return(0); incr = 34 + (iskomodo * (2*sizeof(fiatoshis) + 2*sizeof(height) + 20)); + //41e77b91cb68dc2aa02fa88550eae6b6d44db676a7e935337b6d1392d9718f03cb0200305c90660400000000fbcbeb1f000000bde801006201000058e7945ad08ddba1eac9c9b6c8e1e97e8016a2d152 //for (i=0; i Date: Fri, 30 Dec 2016 15:51:02 +0200 Subject: [PATCH 279/281] test --- src/komodo_gateway.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 98352a9d1..8cadc891b 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -814,7 +814,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 bitcoin_address(coinaddr,addrtype,rmd160,20); checktoshis = PAX_fiatdest(&seed,tokomodo,destaddr,pubkey33,coinaddr,kmdheight,base,value); typestr = "withdraw"; - if ( strcmp(base,"RUB") == 0 ) + if ( 0 && strcmp(base,"RUB") == 0 ) printf("RUB WITHDRAW %s.height.%d vs height.%d check %.8f/%.8f vs %.8f tokomodo.%d %d seed.%llx -> (%s) len.%d\n",ASSETCHAINS_SYMBOL,kmdheight,height,dstr(checktoshis),dstr(komodoshis),dstr(value),komodo_is_issuer(),strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0,(long long)seed,coinaddr,opretlen); didstats = 0; //if ( komodo_paxcmp(base,kmdheight,komodoshis,checktoshis,seed) == 0 ) @@ -857,9 +857,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { for (i=0; i KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); + //printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN); if ( srcvalues[i] == checktoshis ) { if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 ) @@ -895,8 +895,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->approved += values[i]; didstats = 1; - //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f kht.%d %d\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis),kmdheights[i],otherheights[i]); + if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f kht.%d %d\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis),kmdheights[i],otherheights[i]); } //printf(" i.%d (%s) <- %.8f ADDFLAG APPROVED\n",i,coinaddr,dstr(values[i])); } @@ -906,8 +906,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 { basesp->approved += values[i]; didstats = 1; - //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis)); + if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) + printf("pax.%p ########### %p approved %s += %.8f -> %.8f/%.8f\n",pax,basesp,CURRENCIES[baseids[i]],dstr(values[i]),dstr(srcvalues[i]),dstr(checktoshis)); } } //else printf(" i.%d of n.%d pax.%p baseids[] %d\n",i,n,pax,baseids[i]); if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) != 0 ) From e62f71143ab4a81522a8afd4640a757d42d7bd53 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 30 Dec 2016 16:58:49 +0200 Subject: [PATCH 280/281] test --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 8cadc891b..ea3481aae 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -950,7 +950,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 basesp->redeemed += value; pax->didstats = 1; //if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 ) - printf("ht.%d %.8f ########### %p redeemed %s += %.8f kht.%d ht.%d\n",height,dstr(value),basesp,CURRENCIES[baseids[i]],dstr(value),kmdheights[i],otherheights[i]); + printf("ht.%d %.8f ########### %p redeemed %s += %.8f %.8f kht.%d ht.%d\n",height,dstr(value),basesp,CURRENCIES[baseids[i]],dstr(value),dstr(srcvalues[i]),kmdheights[i],otherheights[i]); } } if ( (pax= komodo_paxmark(height,txids[i],vouts[i],'W',height)) != 0 ) From 26ac06c4f5a6b4dc3163b36a1e5d24bfa7eccbd2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 1 Jan 2017 15:40:42 +0200 Subject: [PATCH 281/281] need to delay issuing fiat chain coins so it will have the deposit event in time and not reject --- src/komodo.h | 2 +- src/komodo_gateway.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 8e84a6e02..207e38808 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -23,7 +23,7 @@ // a. automate notarization fee payouts // b. automated distribution of test REVS snapshot -//#define KOMODO_ASSETCHAINS_WAITNOTARIZE +#define KOMODO_ASSETCHAINS_WAITNOTARIZE #define KOMODO_PAXMAX (10000 * COIN) #include diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ea3481aae..b944f861e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -476,7 +476,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to { { #ifdef KOMODO_ASSETCHAINS_WAITNOTARIZE - if ( kmdsp != 0 && kmdsp->NOTARIZED_HEIGHT >= pax->height ) // assumes same chain as notarize + if ( kmdsp != 0 && (kmdsp->NOTARIZED_HEIGHT >= pax->height || kmdsp->CURRENT_HEIGHT > pax->height+30) ) // assumes same chain as notarize pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT; else pax->validated = pax->ready = 0; #endif