It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
find . -type f -print0 | xargs -0 sed -i 's/bitcoin/newname/g'
find . -type f -exec rename 's/bitcoin/newname/to change all the filenames.
ls -r | grep -i 'bitcoin'reveals that no other capitalization matters in the filenames.
ls -r | grep -i 'btc'will find three files in the 'resources' directory under 'qt' that used 'btc' in their filenames,
find src/qt/res/ -type f -exec rename 's/btc/NEW/.
grep -R 8332and
grep -R 8333to look at all the places where those numbers occur in source. You'll find the port numbers in the source, but the strings also pop up in test vectors in the test directory, which you don't want to change. So you need to do this in a way that leaves the test directories out of it. But that's easy, because the places you do want to change it in source are all in the same directory. So you type
sed -i 's/8332/newnumber1/g' src/*.cppand
sed -i 's/8333/newnumber2/g' src/*.cpp, and that's done.
base58Prefixes[PUBKEY_ADDRESS] = list_of(number);
base58Prefixes[SCRIPT_ADDRESS] = list_of(number);
base58Prefixes[SECRET_KEY] = list_of(number);
pchMessageStart[0]through
pchMessageStart[3]that get set at the top of CMainParams and CTestParams. So you edit those to be your new numbers.
date -+%sat the command line to find the current time in seconds since the epoch, add seven thousand or so to it, and plug it into all the parameters blocks replacing all the numbers that match the one that bitcoin's code sets genesis.ntime to. You can change the
const char* pszTimestamp =string too, but keep it under 90 characters. Then insert this code into each of the mainparams and testparams blocks, right after the line that sets HashGenesisBlock:
if ((genesis.GetHash() != hashGenesisBlock) && true)
{
Logprintf("recalculating params for mainnet.\n");
Logprintf("old mainnet genesis merkle root: %s\n", genesis.hashMerkleRoot.ToString().c_str());
Logprintf("old mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
Logprintf("old mainnet genesis hash: %s\n", hashGenesisBlock.ToString().c_str());
for(genesis.nNonce == 0; genesis.GetHash() > bnProofOfWorkLimit; genesis.nNonce++){ } // deliberately empty for loop; finds nonce value
Logprintf("new mainnet genesis merkle root: %s\n", genesis.hashMerkleRoot.ToString().c_str());
Logprintf("new mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
Logprintf("new mainnet genesis hash: %s\n", genesis.GetHash().ToString().c_str());
}
automake; configure -with-incompabible-bdb; makein the project's root directory) and start it up. It'll chew for ~20 minutes to ~2 hours or so figuring out a new nonce and hash, drop them to the logfile, then hit the assert() statement right after that block and crap out immediately. Then
tail ~/.newcoin/debug.logwill tell you the new parameters. Plug them in where the code sets nNonce and HashGenesisBlock, recompile, rinse, and repeat for the testnet and regtest initializers. You will probably want to
rm -rf ~/.newcoina few times along the way if you need to recover from any mistakes, and after you have the new parameters plugged in, change those 'true's into 'false's so that the client doesn't just start working on a new genesis block later if it follows a fake chain all the way back to a genesis block that doesn't match.
static const Checkpoints::CheckpointData data = {and delete all those bitcoin checkpoints that come after it. replace all of them with a single checkpoint at height zero and the hash of your new genesis block. While you're at it, be sure you have updated the CCheckpointData right after it to your new timestamp. Also in CCheckpointData you need to set the height of the last checkpoint to zero. If you're a completist, you'll want to do the same thing (with the new testnet values) at the line that says
static const Checkpoints::CcheckpointData dataTestnet = {right after it. You'll also want to delete all those network seeds and URLs and stuff that are bitcoin-specific; you'd need to put machines up at URLs that are specific to your altcoin to replace them. Compile one more time.