diff -uNr a/bitcoin/manifest.txt b/bitcoin/manifest.txt --- a/bitcoin/manifest.txt false +++ b/bitcoin/manifest.txt 606e88f58085d688d8bbac0bec1921c583638448703f31ed9fc8e28c6ce7113fd718390dc7013e6c7f29d48bcce41cfbb26662490e0af67cf525971a344e4377 @@ -0,0 +1,29 @@ +542413 genesis asciilifeform TRB Genesis +542413 bitcoin-asciilifeform.1 asciilifeform QT_GUI removal +542413 rm_rf_upnp ben_vulpes Removal of UPnP +542413 bitcoin-asciilifeform.2 asciilifeform Removal of SSL from http service +542413 bitcoin-asciilifeform.3-turdmeister-alert-snip asciilifeform Removal of alert spam +542413 bitcoin-asciilifeform.4-goodbye-win32 asciilifeform Win32 removal +542413 asciilifeform_orphanage_thermonuke asciilifeform Drop orphans on the floor +542413 asciilifeform_tx-orphanage_amputation asciilifeform Remove orphan processing +542413 asciilifeform_dnsseed_snipsnip asciilifeform Abandon the DNS seeding mechanism +542413 bitcoin-v0_5_3-db_config mod6 Add BDB configuration options +542413 asciilifeform_zap_hardcoded_seeds asciilifeform Remove hardcoded node seeds +542413 bitcoin-v0_5_3_1-static_makefile_v002.8 mod6 Add static makefile options +542413 asciilifeform-kills-integer-retardation asciilifeform Fix integer type problems +542413 asciilifeform_zap_showmyip_crud asciilifeform Abolishes the 'showmyip.com' idiocy; prerequisite for the total removal of all instances of DNS invocation +542413 bitcoin-v0_5_3_1-rev_bump ben_vulpes Bump version number to 0.5.3.1 +542413 asciilifeform_and_now_we_have_block_dumper_corrected asciilifeform Add 'dumpblock' RPC command +542413 asciilifeform_dns_thermonyukyoolar_kleansing asciilifeform Abolishes all invocations of DNS +542413 mod6_fix_dumpblock_params mod6 Constrain the 'dumpblock' parameters +542413 asciilifeform_ver_now_5_4_and_irc_is_gone_and_now_must_give_ip Bump version to 0.5.4; Remove IRC seeder and hooks; Removal of mechanisms for determining own external IP +542413 asciilifeform_maxint_locks_corrected asciilifeform Set BDB configuration options to max +542413 asciilifeform_and_now_we_have_eatblock asciilifeform Add 'eatblock' RPC command +542413 asciilifeform_lets_lose_testnet asciilifeform Removal of Testnet +542413 asciilifeform_add_verifyall_option asciilifeform Add 'verifyall' flag +542413 programmable-versionstring asciilifeform Add two optional command-line flags to change the version string and number +542413 malleus_mikehearnificarum asciilifeform Ban peers when attempting to issue unsupported commands +542413 mod6_der_high_low_s mod6 Add command-line flags to set Low-S or High-S +542413 makefiles mod6 Add makefiles to build entire TRB +542413 asciilifeform_aggressive_pushgetblocks asciilifeform Issue PushGetBlocks command to any peer that issues 'version' command +542413 mod6_excise_hash_truncation mod6 Regrind of ben_vulpes original; removes truncation of hashes printed to TRB log file diff -uNr a/bitcoin/src/db.cpp b/bitcoin/src/db.cpp --- a/bitcoin/src/db.cpp f8fcccd44b3635182b65b09b51229bf30bd42e1dcfd91d66c57d82425b055ddfbb8f88249479b6c3ad45d21ae0c0c6cdd920f8ae44693c4256598ea2bb807007 +++ b/bitcoin/src/db.cpp 3ac9ef2c460d73d3376f8ad28423b75aae47d89108e5ec7adb6e86e315e5f095f66db50069016cfc523e28d96baeb022f66600302885cda43e2ce302fed5d8e4 @@ -578,7 +578,7 @@ pindexBest = mapBlockIndex[hashBestChain]; nBestHeight = pindexBest->nHeight; bnBestChainWork = pindexBest->bnChainWork; - printf("LoadBlockIndex(): hashBestChain=%s height=%d\n", hashBestChain.ToString().substr(0,20).c_str(), nBestHeight); + printf("LoadBlockIndex(): hashBestChain=%s height=%d\n", hashBestChain.ToString().c_str(), nBestHeight); // Load bnBestInvalidWork, OK if it doesn't exist ReadBestInvalidWork(bnBestInvalidWork); @@ -836,14 +836,6 @@ } vWalletUpgrade.push_back(hash); } - - //// debug print - //printf("LoadWallet %s\n", wtx.GetHash().ToString().c_str()); - //printf(" %12I64d %s %s %s\n", - // wtx.vout[0].nValue, - // DateTimeStrFormat("%x %H:%M:%S", wtx.GetBlockTime()).c_str(), - // wtx.hashBlock.ToString().substr(0,20).c_str(), - // wtx.mapValue["message"].c_str()); } else if (strType == "acentry") { diff -uNr a/bitcoin/src/main.cpp b/bitcoin/src/main.cpp --- a/bitcoin/src/main.cpp e76829b2488665287ed6037eaa5dd4651a67ddc9a44111089f55249248b6549387b9146bb1e51cc5a659558805bcf8987c10ecad8478f83fc5eb165044ac5d3c +++ b/bitcoin/src/main.cpp 91083aa2a87b340863c1a6e1d12075dab306d8342813b4cadc383218e54657ca2a082afb6067cc3cf42752504e850b619ec40809d7dd433524487d88c4b19e7e @@ -365,8 +365,8 @@ if (!ConnectInputs(txdb, mapUnused, CDiskTxPos(1,1,1), pindexBest, nFees, false, false, 0, fInvalid)) { if (fInvalid) - return error("AcceptToMemoryPool() : FetchInputs found invalid tx %s", hash.ToString().substr(0,10).c_str()); - return error("AcceptToMemoryPool() : ConnectInputs failed %s", hash.ToString().substr(0,10).c_str()); + return error("AcceptToMemoryPool() : FetchInputs found invalid tx %s", hash.ToString().c_str()); + return error("AcceptToMemoryPool() : ConnectInputs failed %s", hash.ToString().c_str()); } // Don't accept it if it can't get into a block @@ -415,7 +415,7 @@ if (ptxOld) EraseFromWallets(ptxOld->GetHash()); - printf("AcceptToMemoryPool(): accepted %s\n", hash.ToString().substr(0,10).c_str()); + printf("AcceptToMemoryPool(): accepted %s\n", hash.ToString().c_str()); return true; } @@ -709,8 +709,8 @@ CTxDB().WriteBestInvalidWork(bnBestInvalidWork); MainFrameRepaint(); } - printf("InvalidChainFound: invalid block=%s height=%d work=%s\n", pindexNew->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->nHeight, pindexNew->bnChainWork.ToString().c_str()); - printf("InvalidChainFound: current best=%s height=%d work=%s\n", hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainWork.ToString().c_str()); + printf("InvalidChainFound: invalid block=%s height=%d work=%s\n", pindexNew->GetBlockHash().ToString().c_str(), pindexNew->nHeight, pindexNew->bnChainWork.ToString().c_str()); + printf("InvalidChainFound: current best=%s height=%d work=%s\n", hashBestChain.ToString().c_str(), nBestHeight, bnBestChainWork.ToString().c_str()); if (pindexBest && bnBestInvalidWork > bnBestChainWork + pindexBest->GetBlockWork() * 6) printf("InvalidChainFound: WARNING: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.\n"); } @@ -796,7 +796,7 @@ fFound = txdb.ReadTxIndex(prevout.hash, txindex); } if (!fFound && (fBlock || fMiner)) - return fMiner ? false : error("ConnectInputs() : %s prev tx %s index entry not found", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + return fMiner ? false : error("ConnectInputs() : %s prev tx %s index entry not found", GetHash().ToString().c_str(), prevout.hash.ToString().c_str()); // Read txPrev CTransaction txPrev; @@ -806,7 +806,7 @@ CRITICAL_BLOCK(cs_mapTransactions) { if (!mapTransactions.count(prevout.hash)) - return error("ConnectInputs() : %s mapTransactions prev not found %s", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + return error("ConnectInputs() : %s mapTransactions prev not found %s", GetHash().ToString().c_str(), prevout.hash.ToString().c_str()); txPrev = mapTransactions[prevout.hash]; } if (!fFound) @@ -816,7 +816,7 @@ { // Get prev tx from disk if (!txPrev.ReadFromDisk(txindex.pos)) - return error("ConnectInputs() : %s ReadFromDisk prev tx %s failed", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + return error("ConnectInputs() : %s ReadFromDisk prev tx %s failed", GetHash().ToString().c_str(), prevout.hash.ToString().c_str()); } if (prevout.n >= txPrev.vout.size() || prevout.n >= txindex.vSpent.size()) @@ -824,7 +824,7 @@ // Revisit this if/when transaction replacement is implemented and allows // adding inputs: fInvalid = true; - return DoS(100, error("ConnectInputs() : %s prevout.n out of range %d %d %d prev tx %s\n%s", GetHash().ToString().substr(0,10).c_str(), prevout.n, txPrev.vout.size(), txindex.vSpent.size(), prevout.hash.ToString().substr(0,10).c_str(), txPrev.ToString().c_str())); + return DoS(100, error("ConnectInputs() : %s prevout.n out of range %d %d %d prev tx %s\n%s", GetHash().ToString().c_str(), prevout.n, txPrev.vout.size(), txindex.vSpent.size(), prevout.hash.ToString().c_str(), txPrev.ToString().c_str())); } // If prev is coinbase, check that it's matured @@ -839,13 +839,13 @@ if (fVerifyAll || (!(fBlock && (nBestHeight < Checkpoints::GetTotalBlocksEstimate())))) // Verify signature if (!VerifySignature(txPrev, *this, i)) - return DoS(100,error("ConnectInputs() : %s VerifySignature failed", GetHash().ToString().substr(0,10).c_str())); + return DoS(100,error("ConnectInputs() : %s VerifySignature failed", GetHash().ToString().c_str())); // Check for conflicts (double-spend) // This doesn't trigger the DoS code on purpose; if it did, it would make it easier // for an attacker to attempt to split the network. if (!txindex.vSpent[prevout.n].IsNull()) - return fMiner ? false : error("ConnectInputs() : %s prev tx already used at %s", GetHash().ToString().substr(0,10).c_str(), txindex.vSpent[prevout.n].ToString().c_str()); + return fMiner ? false : error("ConnectInputs() : %s prev tx already used at %s", GetHash().ToString().c_str(), txindex.vSpent[prevout.n].ToString().c_str()); // Check for negative or overflow input values nValueIn += txPrev.vout[prevout.n].nValue; @@ -863,12 +863,12 @@ } if (nValueIn < GetValueOut()) - return DoS(100, error("ConnectInputs() : %s value in < value out", GetHash().ToString().substr(0,10).c_str())); + return DoS(100, error("ConnectInputs() : %s value in < value out", GetHash().ToString().c_str())); // Tally transaction fees int64 nTxFee = nValueIn - GetValueOut(); if (nTxFee < 0) - return DoS(100, error("ConnectInputs() : %s nTxFee < 0", GetHash().ToString().substr(0,10).c_str())); + return DoS(100, error("ConnectInputs() : %s nTxFee < 0", GetHash().ToString().c_str())); if (nTxFee < nMinFee) return false; nFees += nTxFee; @@ -1174,7 +1174,7 @@ bnBestChainWork = pindexNew->bnChainWork; nTimeBestReceived = GetTime(); nTransactionsUpdated++; - printf("SetBestChain: new best=%s height=%d work=%s\n", hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainWork.ToString().c_str()); + printf("SetBestChain: new best=%s height=%d work=%s\n", hashBestChain.ToString().c_str(), nBestHeight, bnBestChainWork.ToString().c_str()); return true; } @@ -1185,7 +1185,7 @@ // Check for duplicate uint256 hash = GetHash(); if (mapBlockIndex.count(hash)) - return error("AddToBlockIndex() : %s already exists", hash.ToString().substr(0,20).c_str()); + return error("AddToBlockIndex() : %s already exists", hash.ToString().c_str()); // Construct new block index object CBlockIndex* pindexNew = new CBlockIndex(nFile, nBlockPos, *this); @@ -1325,7 +1325,7 @@ // Check for duplicate uint256 hash = pblock->GetHash(); if (mapBlockIndex.count(hash)) - return error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString().substr(0,20).c_str()); + return error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString().c_str()); // Preliminary checks if (!pblock->CheckBlock()) @@ -1357,7 +1357,7 @@ // If don't already have its previous block, throw it out! if (!mapBlockIndex.count(pblock->hashPrevBlock)) { - printf("ProcessBlock: BASTARD BLOCK, prev=%s, DISCARDED\n", pblock->hashPrevBlock.ToString().substr(0,20).c_str()); + printf("ProcessBlock: BASTARD BLOCK, prev=%s, DISCARDED\n", pblock->hashPrevBlock.ToString().c_str()); // Ask this guy to fill in what we're missing if (pfrom) @@ -1553,7 +1553,7 @@ pindex->nHeight, pindex->nFile, pindex->nBlockPos, - block.GetHash().ToString().substr(0,20).c_str(), + block.GetHash().ToString().c_str(), DateTimeStrFormat("%x %H:%M:%S", block.GetBlockTime()).c_str(), block.vtx.size()); @@ -1925,12 +1925,12 @@ pindex = pindex->pnext; int nLimit = 500 + locator.GetDistanceBack(); unsigned int nBytes = 0; - printf("getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str(), nLimit); + printf("getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().c_str(), nLimit); for (; pindex; pindex = pindex->pnext) { if (pindex->GetBlockHash() == hashStop) { - printf(" getblocks stopping at %d %s (%u bytes)\n", pindex->nHeight, pindex->GetBlockHash().ToString().substr(0,20).c_str(), nBytes); + printf(" getblocks stopping at %d %s (%u bytes)\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str(), nBytes); break; } pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); @@ -1941,7 +1941,7 @@ { // When this block is requested, we'll send an inv that'll make them // getblocks the next batch of inventory. - printf(" getblocks stopping at limit %d %s (%u bytes)\n", pindex->nHeight, pindex->GetBlockHash().ToString().substr(0,20).c_str(), nBytes); + printf(" getblocks stopping at limit %d %s (%u bytes)\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str(), nBytes); pfrom->hashContinue = pindex->GetBlockHash(); break; } @@ -1974,7 +1974,7 @@ vector vHeaders; int nLimit = 2000 + locator.GetDistanceBack(); - printf("getheaders %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str(), nLimit); + printf("getheaders %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().c_str(), nLimit); for (; pindex; pindex = pindex->pnext) { vHeaders.push_back(pindex->GetBlockHeader()); @@ -2005,7 +2005,7 @@ } else if (fMissingInputs) { - printf("REJECTED orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str()); + printf("REJECTED orphan tx %s\n", inv.hash.ToString().c_str()); } if (tx.nDoS) pfrom->Misbehaving(tx.nDoS); } @@ -2016,7 +2016,7 @@ CBlock block; vRecv >> block; - printf("received block %s\n", block.GetHash().ToString().substr(0,20).c_str()); + printf("received block %s\n", block.GetHash().ToString().c_str()); // block.print(); CInv inv(MSG_BLOCK, block.GetHash()); @@ -2524,9 +2524,9 @@ void print() const { - printf("COrphan(hash=%s, dPriority=%.1f)\n", ptx->GetHash().ToString().substr(0,10).c_str(), dPriority); + printf("COrphan(hash=%s, dPriority=%.1f)\n", ptx->GetHash().ToString().c_str(), dPriority); BOOST_FOREACH(uint256 hash, setDependsOn) - printf(" setDependsOn %s\n", hash.ToString().substr(0,10).c_str()); + printf(" setDependsOn %s\n", hash.ToString().c_str()); } }; @@ -2608,7 +2608,7 @@ if (fDebug && GetBoolArg("-printpriority")) { - printf("priority %-20.1f %s\n%s", dPriority, tx.GetHash().ToString().substr(0,10).c_str(), tx.ToString().c_str()); + printf("priority %-20.1f %s\n%s", dPriority, tx.GetHash().ToString().c_str(), tx.ToString().c_str()); if (porphan) porphan->print(); printf("\n"); diff -uNr a/bitcoin/src/main.h b/bitcoin/src/main.h --- a/bitcoin/src/main.h ff2bf8f8147dd8df5e1ef1bcea9b0159d3f83c1e30befef56415b99305aa99161ac1c05efb48be87a383ffb6d621fd3761bfb3e4952ca244a6e1398ca3c71dc6 +++ b/bitcoin/src/main.h f15f152d522655f2a02a5fa4c5189d0d6d0fd4608370380d071d4bdb5b90f67f28fdc4fe43403a01fb42bf86271d656893482e09ad1e88155875748730b09bc5 @@ -222,7 +222,7 @@ std::string ToString() const { - return strprintf("COutPoint(%s, %d)", hash.ToString().substr(0,10).c_str(), n); + return strprintf("COutPoint(%s, %d)", hash.ToString().c_str(), n); } void print() const @@ -297,7 +297,7 @@ if (prevout.IsNull()) str += strprintf(", coinbase %s", HexStr(scriptSig).c_str()); else - str += strprintf(", scriptSig=%s", scriptSig.ToString().substr(0,24).c_str()); + str += strprintf(", scriptSig=%s", scriptSig.ToString().c_str()); if (nSequence != UINT_MAX) str += strprintf(", nSequence=%u", nSequence); str += ")"; @@ -371,7 +371,7 @@ { if (scriptPubKey.size() < 6) return "CTxOut(error)"; - return strprintf("CTxOut(nValue=%"PRI64d".%08"PRI64d", scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30).c_str()); + return strprintf("CTxOut(nValue=%"PRI64d".%08"PRI64d", scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().c_str()); } void print() const @@ -608,7 +608,7 @@ { std::string str; str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%d, vout.size=%d, nLockTime=%d)\n", - GetHash().ToString().substr(0,10).c_str(), + GetHash().ToString().c_str(), nVersion, vin.size(), vout.size(), @@ -954,10 +954,10 @@ void print() const { printf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%d)\n", - GetHash().ToString().substr(0,20).c_str(), + GetHash().ToString().c_str(), nVersion, - hashPrevBlock.ToString().substr(0,20).c_str(), - hashMerkleRoot.ToString().substr(0,10).c_str(), + hashPrevBlock.ToString().c_str(), + hashMerkleRoot.ToString().c_str(), nTime, nBits, nNonce, vtx.size()); for (int i = 0; i < vtx.size(); i++) @@ -967,7 +967,7 @@ } printf(" vMerkleTree: "); for (int i = 0; i < vMerkleTree.size(); i++) - printf("%s ", vMerkleTree[i].ToString().substr(0,10).c_str()); + printf("%s ", vMerkleTree[i].ToString().c_str()); printf("\n"); } @@ -1138,8 +1138,8 @@ { return strprintf("CBlockIndex(nprev=%08x, pnext=%08x, nFile=%d, nBlockPos=%-6d nHeight=%d, merkle=%s, hashBlock=%s)", pprev, pnext, nFile, nBlockPos, nHeight, - hashMerkleRoot.ToString().substr(0,10).c_str(), - GetBlockHash().ToString().substr(0,20).c_str()); + hashMerkleRoot.ToString().c_str(), + GetBlockHash().ToString().c_str()); } void print() const @@ -1209,8 +1209,8 @@ str += CBlockIndex::ToString(); str += strprintf("\n hashBlock=%s, hashPrev=%s, hashNext=%s)", GetBlockHash().ToString().c_str(), - hashPrev.ToString().substr(0,20).c_str(), - hashNext.ToString().substr(0,20).c_str()); + hashPrev.ToString().c_str(), + hashNext.ToString().c_str()); return str; } diff -uNr a/bitcoin/src/protocol.cpp b/bitcoin/src/protocol.cpp --- a/bitcoin/src/protocol.cpp 35effbc7f73cdbda92148be58171b2337c090a7997eb3b02daf9a88287b4315c80d7fa5edf403be9cf958969c0c7e0c1b578c10f146ee0ea9b2965a1f97971bf +++ b/bitcoin/src/protocol.cpp 95fb7506570f1455e3e5e0b297970a6bcfa9e538c27aca0dea36944dfd3dd664e96f50716aad1eee7278e1ac89ae1443ccc795c75e870202dea7ef27f1348f5a @@ -297,7 +297,7 @@ std::string CInv::ToString() const { - return strprintf("%s %s", GetCommand(), hash.ToString().substr(0,20).c_str()); + return strprintf("%s %s", GetCommand(), hash.ToString().c_str()); } void CInv::print() const diff -uNr a/bitcoin/src/wallet.cpp b/bitcoin/src/wallet.cpp --- a/bitcoin/src/wallet.cpp bdc4fc472be4a86fb91fa69368faace04414fdeee5b8c82795e31d37e21581b973caf7f3e9ccc27d487944a5782e3b59615180eab87c8b3e81242901f3039e4d +++ b/bitcoin/src/wallet.cpp e5be280cd2a1501130707bdae2501bfa33eff2e156fcb00f82f768dad833ec31107b2e51d1b78c81e98d78de6adac4f560f9e953c1a2d09b27d88abdaa92a9b8 @@ -261,7 +261,7 @@ } //// debug print - printf("AddToWallet %s %s%s\n", wtxIn.GetHash().ToString().substr(0,10).c_str(), (fInsertedNew ? "new" : ""), (fUpdated ? "update" : "")); + printf("AddToWallet %s %s%s\n", wtxIn.GetHash().ToString().c_str(), (fInsertedNew ? "new" : ""), (fUpdated ? "update" : "")); // Write to disk if (fInsertedNew || fUpdated) @@ -458,7 +458,7 @@ } -void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nGenerated, int64& nReceived, +void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nGenerated, int64& nReceived, int64& nSent, int64& nFee) const { nGenerated = nReceived = nSent = nFee = 0; @@ -658,7 +658,7 @@ uint256 hash = GetHash(); if (!txdb.ContainsTx(hash)) { - printf("Relaying wtx %s\n", hash.ToString().substr(0,10).c_str()); + printf("Relaying wtx %s\n", hash.ToString().c_str()); RelayMessage(CInv(MSG_TX, hash), (CTransaction)*this); } }