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.
Loading block index...
CBlock(hash=c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2, nTime=1388419211, nBits=1f00ffff, nNonce=0, vtx=1, vchBlockSig=)
Coinbase(hash=25cc2e3283, nTime=1375995262, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d020f272957687920776f756c6420796f75206e65656420426974207768656e20796f7520686176652053776167)
CTxOut(empty)
vMerkleTree: 25cc2e3283
block.GetHash() == c18a2e48349763b42b90ac00881abee846203b789a2d86aacb2cd2aa5161c66f
block.hashMerkleRoot == 25cc2e3283b86f225057d0eaa0eaa0003b891de79828f59bb4fc0b290ab897e2
block.nTime = 1388419211
block.nNonce = 0
if (true &&block.GetHash() != hashGenesisBlock)
{
printf("Searching for genesis block...\n");
// This will figure out a valid hash and Nonce if you're
// creating a different genesis block:
uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
uint256 thash;
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(block.nTime) + 1)) * 128 ) + 63;
char scratchpad[scrypt_scratpad_size_current_block];
loop
{
// Generic scrypt
scrypt_N_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad, GetNfactor(block.nTime));
if (thash <= hashTarget)
{
printf ("found it!\n");
break;
}
if ((block.nNonce & 0xFFF) == 0)
{
printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
}
++block.nNonce;
if (block.nNonce == 0)
{
printf("NONCE WRAPPED, incrementing time\n");
++block.nTime;
}
}
}
if (true && block.GetHash() != hashGenesisBlock)
{
printf("Searching for genesis block...\n");
uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
uint256 thash;
loop
{
thash = block.GetHash();
if (thash <= hashTarget)
break;
if ((block.nNonce & 0xFFF) == 0)
{
printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
}
++block.nNonce;
if (block.nNonce == 0)
{
printf("NONCE WRAPPED, incrementing time\n");
++block.nTime;
}
}
printf("block.nTime = %u \n", block.nTime);
printf("block.nNonce = %u \n", block.nNonce);
printf("block.nVersion = %u \n", block.nVersion);
printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
}
//// debug print
uint256 hash = block.GetHash();
printf("%s\n", hash.ToString().c_str());
printf("%s\n", hashGenesisBlock.ToString().c_str());
printf("%s\n", block.hashMerkleRoot.ToString().c_str());
assert(block.hashMerkleRoot == uint256("0x"));
hash doesn't match nBits.
if (true && block.GetHash() != hashGenesisBlock)
hash doesn't match nBits.
if (true && block.GetHash() != hashGenesisBlock)
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(pblock->nTime) + 1)) * 128 ) + 63;
char scratchpad[scrypt_scratpad_size_current_block];
import hashlib, binascii, struct, array, os, time, sys, optparse
import scrypt
from construct import *
def main():
options = get_args()
# https://en.bitcoin.it/wiki/Difficulty
bits = get_bits(options)
target = get_target(options)
input_script = create_input_script(options.timestamp)
output_script = create_output_script(options.pubkey)
# hash merkle root is the double sha256 hash of the transaction(s)
tx = create_transaction(input_script, output_script)
hash_merkle_root = hashlib.sha256(hashlib.sha256(tx).digest()).digest()
print_block_info(options, hash_merkle_root)
block_header = create_block_header(hash_merkle_root, options.time, bits, options.nonce)
genesis_hash, nonce = generate_hash(block_header, options.scrypt, options.nonce, target)
announce_found_genesis(genesis_hash, nonce)
def get_args():
parser = optparse.OptionParser()
parser.add_option("-t", "--time", dest="time", default=int(time.time()),
type="int", help="the (unix) time when the genesisblock is created")
parser.add_option("-z", "--timestamp", dest="timestamp", default="The Times 03/Jan/2009 Chancellor on brink of second bailout for banks",
type="string", help="the pszTimestamp found in the coinbase of the genesisblock")
parser.add_option("-n", "--nonce", dest="nonce", default=0,
type="int", help="the first value of the nonce that will be incremented when searching the genesis hash")
parser.add_option("-s", "--scrypt", dest="scrypt", default=False, action="store_true",
help="calculate genesis block using scrypt")
parser.add_option("-p", "--pubkey", dest="pubkey", default="04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f",
type="string", help="the pubkey found in the output script")
(options, args) = parser.parse_args()
return options
def get_bits(options):
return 0x1e0ffff0 if options.scrypt else 0x1d00ffff
def get_target(options):
return 0x0ffff0 * 2**(8*(0x1e - 3)) if options.scrypt else 0x00ffff * 2**(8*(0x1d - 3))
def create_input_script(psz_timestamp):
script_prefix = '04ffff001d0104' + chr(len(psz_timestamp)).encode('hex')
return (script_prefix + psz_timestamp.encode('hex')).decode('hex')
def create_output_script(pubkey):
script_len = '41'
OP_CHECKSIG = 'ac'
return (script_len + pubkey + OP_CHECKSIG).decode('hex')
def create_transaction(input_script, output_script):
transaction = Struct("transaction",
Bytes("version", 4),
Byte("num_inputs"),
StaticField("prev_output", 32),
UBInt32('prev_out_idx'),
Byte('input_script_len'),
Bytes('input_script', len(input_script)),
UBInt32('sequence'),
Byte('num_outputs'),
Bytes('out_value', 8),
Byte('output_script_len'),
Bytes('output_script', 0x43),
UBInt32('locktime'))
tx = transaction.parse('\x00'*(127 + len(input_script)))
tx.version = struct.pack(' tx.num_inputs = 1
tx.prev_output = struct.pack('tx.prev_out_idx = 0xFFFFFFFF
tx.input_script_len = len(input_script)
tx.input_script = input_script
tx.sequence = 0xFFFFFFFF
tx.num_outputs = 1
tx.out_value = struct.pack(' tx.output_script_len = 0x43
tx.output_script = output_script
tx.locktime = 0
return transaction.build(tx)
def create_block_header(hash_merkle_root, time, bits, nonce):
block_header = Struct("block_header",
Bytes("version",4),
Bytes("hash_prev_block", 32),
Bytes("hash_merkle_root", 32),
Bytes("time", 4),
Bytes("bits", 4),
Bytes("nonce", 4))
genesisblock = block_header.parse('\x00'*80)
genesisblock.version = struct.pack(' genesisblock.hash_prev_block = struct.pack('genesisblock.hash_merkle_root = hash_merkle_root
genesisblock.time = struct.pack(' genesisblock.bits = struct.pack(' genesisblock.nonce = struct.pack(' return block_header.build(genesisblock)
# https://en.bitcoin.it/wiki/Block_hashing_algorithm
def generate_hash(data_block, is_scrypt, start_nonce, target):
print 'Searching for genesis hash..'
nonce = start_nonce
last_updated = time.time()
difficulty = float(0xFFFF) * 2**208 / target
update_interval = int(1000000 * difficulty)
while True:
sha256_hash, header_hash = generate_hashes_from_block(data_block, is_scrypt)
last_updated = calculate_hashrate(nonce, update_interval, difficulty, last_updated)
if is_genesis_hash(header_hash, target):
return (sha256_hash, nonce)
else:
nonce = nonce + 1
data_block = data_block[0:len(data_block) - 4] + struct.pack('
def generate_hashes_from_block(data_block, is_scrypt):
sha256_hash = hashlib.sha256(hashlib.sha256(data_block).digest()).digest()[::-1]
header_hash = scrypt.hash(data_block,data_block,1024,1,1,32)[::-1] if is_scrypt else sha256_hash
return sha256_hash, header_hash
def is_genesis_hash(header_hash, target):
return int(header_hash.encode('hex_codec'), 16) < target
def calculate_hashrate(nonce, update_interval, difficulty, last_updated):
if nonce % update_interval == update_interval - 1:
now = time.time()
hashrate = round(update_interval/(now - last_updated))
generation_time = round(difficulty * pow(2, 32) / hashrate / 3600, 1)
sys.stdout.write("\r%s hash/s, estimate: %s h"%(str(hashrate), str(generation_time)))
sys.stdout.flush()
return now
else:
return last_updated
def print_block_info(options, hash_merkle_root):
print "algorithm: " + ("scrypt" if options.scrypt else "sha256")
print "merkle hash: " + hash_merkle_root[::-1].encode('hex_codec')
print "pszTimestamp: " + options.timestamp
print "pubkey: " + options.pubkey
print "time: " + str(options.time)
print "bits: " + str(hex(get_bits(options)))
def announce_found_genesis(genesis_hash, nonce):
print "genesis hash found!"
print "nonce: " + str(nonce)
print "genesis hash: " + genesis_hash.encode('hex_codec')
# GOGOGO!
main()
unsigned long int scrypt_scratpad_size_current_block = ((1 << (GetNfactor(pblock->nTime) + 1)) * 128 ) + 63;
char scratchpad[scrypt_scratpad_size_current_block];