Hey bitcore team, awesome work you do here! I really love insight and want to fork the project for another cryptocurrency named fuckcoin. (yes, i know ^^)
I find it hard to get the networks.js settings of bitcore right, resulting in
[historic_sync] ERROR: Bad genesis block. Network mismatch between Insight and bitcoind? Insight is configured for:livenet
when starting insight / bitcore.
The hexdump for the fuckcoin genesis block is
00000000 fb c0 b6 db 04 01 00 00 01 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 db 2c ed d9 |.............,..|
00000030 d5 98 36 30 e1 03 ef 34 4b 15 99 9e 4f 4d 55 f9 |..60...4K...OMU.|
00000040 45 d3 0d 68 dd a2 44 fe 10 50 7b 53 9d 81 d8 52 |E..h..D..P{S...R|
00000050 ff ff 0f 1e d4 fb 0c 00 01 01 00 00 00 01 00 00 |................|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff |................|
00000080 ff ff 34 04 ff ff 00 1d 01 04 2c 48 6f 77 20 53 |..4.......,How S|
00000090 65 78 20 41 66 66 65 63 74 73 20 49 6e 74 65 6c |ex Affects Intel|
000000a0 6c 69 67 65 6e 63 65 2c 20 61 6e 64 20 56 69 63 |ligence, and Vic|
000000b0 65 20 56 65 72 73 61 ff ff ff ff 01 00 a5 45 9b |e Versa.......E.|
000000c0 01 00 00 00 43 41 04 01 84 71 0f a6 89 ad 50 23 |....CA...q....P#|
000000d0 69 0c 80 f3 a4 9c 8f 13 f8 d4 5b 8c 85 7f bc bc |i.........[.....|
000000e0 8b c4 a8 e4 d3 eb 4b 10 f4 d4 60 4f a0 8d ce 60 |......K...`O...`|
000000f0 1a af 0f 47 02 16 fe 1b 51 85 0b 4a cf 21 b1 79 |...G....Q..J.!.y|
00000100 c4 50 70 ac 7b 03 a9 ac 00 00 00 00 fb c0 b6 db |.Pp.{...........|
00000110 bb 00 00 00 02 00 00 00 a9 07 e6 72 1d 87 d0 26 |...........r...&|
00000120 5b f2 fe d6 a1 0a 00 0c fd dc da 10 |[...........|
0000012c
Genesis Block Blockexplorer
Genesis Block main.cpp
base58.h fuckcoin
I set networks.js to
exports.livenet = {
name: 'livenet',
addressVersion: 0x23,
magic: hex('fbc0b6db'),
genesisBlock: {
height: 0,
nonce: 850900,
version: 1,
hash: hex('32F3A2C560499F2600108F5B10DADCFD0C000AA1D6FEF25B26D0871D72E607A9'),
prev_hash: buffertools.fill(new Buffer(32), 0),
timestamp: 1389920669,
merkle_root: hex('537B5010FE44A2DD680DD345F9554D4F9E99154B34EF03E1303698D5D9ED2CDB'),
bits: 486604799
},
genesisBlockTx: {
outs: [{
v: hex('00A5459B01000000'), // 69 FUCKs
s: new Put()
.word8(65) // 65 bytes of data follow
.put(hex('040184710FA689AD5023690C80F3A49C8F13F8D45B8C857FBCBC8BC4A8E4D3EB4B10F4D4604FA08DCE601AAF0F470216FE1B51850B4ACF21B179C45070AC7B03A9'))
.word8(0xAC) // OP_CHECKSIG
.buffer()
}],
lock_time: 0,
version: 1,
hash: hex('537B5010FE44A2DD680DD345F9554D4F9E99154B34EF03E1303698D5D9ED2CDB'),
ins: [{
q: 0xFFFFFFFF,
o: hex("0000000000000000000000000000000000000000000000000000000000000000FFFFFFFF"),
s: new Put()
.put(hex('04FFFF001D01042C'))
.put(new Buffer('How Sex Affects Intelligence, ' +
'and Vice Versa', 'ascii'))
.buffer()
}]
},
proofOfWorkLimit: hex("00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
checkpoints: [], // need to put checkpoint blocks here
addressPubkey: 35,
addressScript: 5,
keySecret: 128,
};
I don't have a full code overview, yet. Are there other dependencies that could cause the Bad genesis block error? Or can you please check if there is an error in my version of networks.js? Thank you!