Check I'm on the right chain

RiskyFireRiskyFire Member Posts: 18
I using Geth, how can I check I'm on the right chain?

Match my block hashes to block explorer hashes?

Comments

  • roz303roz303 Member Posts: 66
    edited July 2015
    If you start geth without any arguments and watch it sync, comparing block numbers to the number of blocks on block explorer, you'll know whether or not you're on the right chain.

    Also, start geth with --verbosity=0 console , and check how many peers you're connected to.
  • RiskyFireRiskyFire Member Posts: 18
    Thanks, I used this and then compared to the block Explorer. I on the right chain :)

    web3.eth.getBlock(10500)

    {
    difficulty: '628948472368',
    extraData: '0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32',
    gasLimit: 5000,
    gasUsed: 0,
    hash: '0xfe84255e43fc808614ccccf77fde71eb31db552d12b34d9fbd43cc52e9a34c0f',
    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
    miner: '0xbb7b8287f3f0a933474a79eae42cbca977791171',
    nonce: '0x9365ec4692c8cd86',
    number: 10500,
    parentHash: '0x9fd2ff61a7f21ebed36e362ba36356cfb516edfcc00319ca0e8447d88e040255',
    sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
    size: 544,
    stateRoot: '0x5163d5d3159d979e1a8b72e4460549ac8ab0ce1f6099226cf9dd1103f8eedf9c',
    timestamp: 1438341500,
    totalDifficulty: '2610650845634781',
    transactions: [ ],
    transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
    uncles: [ ]
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
  • caylorcaylor Member Posts: 25 ✭✭
    I started geth without specifying a genesis json and I've found the same block 10500 when using the block explorer. Does this mean that specifying genesis json is no longer required or is it simply pot luck which chain you get, depending on the nodes your geth client connects to?
  • corsarocorsaro Member Posts: 28
    yes, genesis json is not required anymore in most recent geth and eth versions due to the fact it is loaded directly from inside source code.
Sign In or Register to comment.