12

I am seeing what looks like a fork in the Ropsten testnet at block 296151 (Jan 6, 11:14 PM UTC). Is this expected?

My local Parity node (Parity/v1.4.7-beta-f2058bd-20161227/x86_64-macos/rustc1.13.0) shows block hash 0x779e9f9...:

> web3.eth.getBlock(296151)
{ author: '0x18e79a47d8a58bef5aaecbba85ea1420649c64a8',
  difficulty: { [String: '219610162'] s: 1, e: 8, c: [ 219610162 ] },
  extraData: '0xd5830104078650617269747986312e31342e30826d61',
  gasLimit: 4707788,
  gasUsed: 348478,
  hash: '0x779e9f9558143be43f3eeb58ad1aa7764a03cf7f1bda4d1c29c2e1244d5e606f',
  logsBloom: '...',
  miner: '0x18e79a47d8a58bef5aaecbba85ea1420649c64a8',
  mixHash: '0xbbb4c781b116ea5cc9cd7dd0a74f2464111cbfa3ed46bdd55cf31b774491f5ad',
  nonce: '0x0b4ee2bdab75890e',
  number: 296151,
  parentHash: '0x39df9773206e47b6555531ee0829dd91d1c91e4dad705688ddee9e6d6a94cd32',
  receiptsRoot: '0xf25f318553e87dff90cf96ace80ed47f624b44ead13400709cd19fc24f24cdb5',
  sealFields:
   [ '0xbbb4c781b116ea5cc9cd7dd0a74f2464111cbfa3ed46bdd55cf31b774491f5ad',
     '0x0b4ee2bdab75890e' ],
  sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
  size: 2185,
  stateRoot: '0x934a68c88a3ca2fea112fb08ef2055c9f1ea8310926de3da98cdb51d69ebad3b',
  timestamp: 1483741759,
  totalDifficulty: { [String: '70295938324374'] s: 1, e: 13, c: [ 70295938324374 ] },
  transactions:
   [ '0x2297defea0253c438c4c7a2d399f60fbdf3c647f9dbd2a558165612251030eb6',
     '0x4542e0daaceda8be6039ec135aad5c45cd2026e17884a6d10fec6a9338dc1d77',
     '0x699761a22a793862eacc5c6f80fee7f0bbef318f8eaf756f40a50edf85755a77',
     '0x7173c6479087a3365ebd412e6ef871b40f5ef1269e42fae265e3cf701aeffcb3',
     '0xc68d9b6d271ac294fbc1f86a703f3cbbfe57020ec4087256893565556de74a30',
     '0xd331437b8862ae97f04468f2fe4af54277299501c5deaeeaeaa5fe9184d4b07d',
     '0x3fb032b0c385eba35130e9d55acafaea6a075d91e7c496181435bad49d312ace',
     '0x7e3e3f41526d453165c2dd4c58e9aa5d6e83398d6ad08a316b6017b4f834c0ac',
     '0xbc3f4a530c26dd9c4cad7803347e33d7add544d56a6abcca538703bc1e4d2663',
     '0x676fb70068c62c9f652ceb5475f96f7ca8efe702b0eb97b0e2dfedd2c53b60f5',
     '0xb12084f5f78ad1e6e388aee22d01cc5015f743da30270c5da99000ca316e6c7b',
     '0x38250f96bf25d98b4f9d54d281f7489f42843a4fafba22acb79db741018e58f1',
     '0x66cc9fdc8645ab142ecb425cbb130f5c153e89c827a87f8f536c46ab60598351',
     '0x5c776d9fadc2f07d4742c5fe6daf41a2997596ec15fee17c60a4da1651daf167' ],
  transactionsRoot: '0x7717f5770efde5508bbe97f306e5897e58741a15777460c888e4b40b6c599d56',
  uncles: [] }

But https://testnet.etherscan.io/block/296151 shows a different block with the same parent:

Height:           296151
TimeStamp:        5 days 14 mins ago (Jan-06-2017 11:14:41 PM +UTC)
Transactions:     0 transactions and 0 contract internal transactions in this block
Hash:             0xb3fe6d6ba7bfa04a9e8c295033e603d617b7dd1c4244f0f70997de0492b7e4c7
Parent Hash:      0x39df9773206e47b6555531ee0829dd91d1c91e4dad705688ddee9e6d6a94cd32
Sha3Uncles:       0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
Mined By:         0x817562f86cee143236962249453ae54e2b530140 IN 2784 secs
Difficulty:       209,505,820
Total Difficulty: 70,295,928,220,032
Size:             526 bytes
Gas Limit:        4,716,988
Gas Used:         0
Nonce:            0x4880dcc18186c893
Block Reward:     5 Ether
Uncles Reward:    0
Extra Data:       Get forked! (Hex:0x47657420666f726b656421)

Notice the different block hash and "Get forked!" message in extraData.

Infura shows the same block as etherscan.io:

curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["296151",false],"id":0}' https://testnet.infura.io/<apikeyXXX>
"result" : {
   "transactionsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
   "totalDifficulty" : "0x3fef0bd4a980",
   "size" : "0x20e",
   "parentHash" : "0x39df9773206e47b6555531ee0829dd91d1c91e4dad705688ddee9e6d6a94cd32",
   "mixHash" : "0x4196dda6dde22c62fbe95160b300935589f2eb5b19826cf01b559b0f7023125d",
   "extraData" : "0x47657420666f726b656421",
   "difficulty" : "0xc7cce1c",
   "hash" : "0xb3fe6d6ba7bfa04a9e8c295033e603d617b7dd1c4244f0f70997de0492b7e4c7",
   "number" : "0x484d7",
   "stateRoot" : "0x263abade588bbce1bc9dcc62f203d3b31c75474145942d88ba4bc2582862c884",
   "miner" : "0x817562f86cee143236962249453ae54e2b530140",
   "transactions" : [],
   "sha3Uncles" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
   "gasUsed" : "0x0",
   "gasLimit" : "0x47f9bc",
   "logsBloom" : "...",
   "timestamp" : "0x587024e1",
   "uncles" : [],
   "receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
   "nonce" : "0x4880dcc18186c893"
},

EDIT 1/12/2016:

My local node shows the latest block to be:

> web3.eth.getBlock('latest')
{
author: '0x919eb73b9d4d306188b12874f3efdccb6cdcd1b8',
difficulty: { [String: '11274423'] s: 1, e: 7, c: [ 11274423 ] },
extraData: '0xd783010502846765746887676f312e372e33856c696e7578',
gasLimit: 4712388,
gasUsed: 43104,
hash: '0xc30c5b3874d718de2a4d902f8a971cee4c4b0c0072e6c084c74efd83762efb31',
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
miner: '0x919eb73b9d4d306188b12874f3efdccb6cdcd1b8',
mixHash: '0x9b8167fc2e675f65294c09acd2ef7e48a8467814fb05217260c0df6735ce050b',
nonce: '0x5c8934db7ca0c3da',
number: 304548,
parentHash: '0x890f0b9e8960872a0708c0b4a7310b77088ef6e1b31c8538132427bfeadc8e38',
receiptsRoot: '0x60879c208751b2693f21cdb42430e39534e09dc69885d583579211338d0fba12',
sealFields:
 [ '0x9b8167fc2e675f65294c09acd2ef7e48a8467814fb05217260c0df6735ce050b',
   '0x5c8934db7ca0c3da' ],
sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
size: 861,
stateRoot: '0x2bd997576e784437838f33b0d14474468af0f2ae7d48946b281aa843b83f35ae',
timestamp: 1483922649,
totalDifficulty: { [String: '70669121674025'] s: 1, e: 13, c: [ 70669121674025 ] },
transactions:
 [ '0x4fabc7fbd712666527522c985b618fea7be25c5507b066393f258632b65ad5e2',
   '0x22d0cd3abcaad4c221b8f92e74c359bb22ce7d78fb52bb28a356738a8c8db488' ],
transactionsRoot: '0x5f3992b1d9e0cc84bee3b3b876fd87adce1de81b09b74800b107f569f40c4485',
uncles: []
}

It has been stuck on this block for quite a while. The timestamp translates to 2017-01-09T00:44:09.000Z which is about 3 days ago.

EDIT 1/12/2016:

I updated parity to the latest commit from master (Parity/v1.6.0-unstable-887e5f7-20170112/x86_64-macos/rustc1‌​.13.0) and resynced from scratch. Now I get the "main" chain:

> web3.eth.getBlock(296151).hash
'0xb3fe6d6ba7bfa04a9e8c295033e603d617b7dd1c4244f0f70997de0492b7e4c7'
  • How long did your client stay on this fork? Has it switched back to the same chain as etherscan? – Tjaden Hess Jan 12 '17 at 1:02
  • My geth node reports web3.eth.getBlock(296151).hash as "0xb3fe6d6ba7bfa04a9e8c295033e603d617b7dd1c4244f0f70997de0492b7e4c7" – Bokky WeAreAllAssange PooBah Jan 12 '17 at 1:46
  • I just started Parity with --chain ropsten --warp and web3.eth.getBlock(296151).hash returns "0xb3fe6d6ba7bfa04a9e8c295033e603d617b7dd1c4244f0f70997de0492b7e4c7". Parity//v1.5.0-unstable-6c3b932-20170103/x86_64-macos/rustc1.13.0 – Bokky WeAreAllAssange PooBah Jan 12 '17 at 2:26
  • Before posting my question, I deleted my parity blockchain folder and did a full sync from scratch. It followed the same fork as before and remains on the fork. Currently the depth of the fork is > 26000 blocks. – pyggie Jan 12 '17 at 4:08
  • I updated my parity checkout to the latest tag, recompiled (Parity/v1.4.9-beta-48924e9-20170109/x86_64-macos/rustc1.13.0), deleted my chain data, and re-synced. Still forked: web3.eth.getBlock(296151).hash '0x779e9f955... – pyggie Jan 12 '17 at 5:46
16

So, the geth monitoring-node first seems to have imported the same one as reported above:

Jan 06 23:29:21 geth-testnet: I0106 22:29:21.064938 core/blockchain.go:1073] imported 1 blocks,    14 txs (  0.348 Mg) in  19.168ms (18.180 Mg/s). #296151 [779e9f95…]

A hash 0x779e9f9558143be43f3eeb58ad1aa7764a03cf7f1bda4d1c29c2e1244d5e606f.

Then, a bit later on:

Jan 07 03:01:22 geth-testnet: I0107 02:01:22.283970 core/blockchain.go:1073] imported 1 blocks,     0 txs (  0.000 Mg) in   3.660ms ( 0.000 Mg/s). #297061 [3f857e90…] 
Jan 07 03:01:33 geth-testnet: I0107 02:01:33.483050 core/blockchain.go:1073] imported 192 blocks,     0 txs (  0.000 Mg) in 395.052ms ( 0.000 Mg/s). #296342 [b3fe6d6b… / 0086e376…] 
Jan 07 03:01:35 geth-testnet: I0107 02:01:35.155511 core/blockchain.go:1073] imported 576 blocks,     0 txs (  0.000 Mg) in 948.451ms ( 0.000 Mg/s). #296918 [cf88cd25… / e11de460…] 
Jan 07 03:01:36 geth-testnet: I0107 02:01:36.089260 core/blockchain.go:1073] imported 134 blocks,     0 txs (  0.000 Mg) in 929.458ms ( 0.000 Mg/s). #297052 [a8cfdb90… / 07022b4a…] 
Jan 07 03:01:39 geth-testnet: I0107 02:01:39.327721 core/blockchain.go:1073] imported 1 blocks,     0 txs (  0.000 Mg) in   3.956ms ( 0.000 Mg/s). #297053 [06757b24…]  

First there's an import of 192 blocks, ending at 296342, so seems to reorg from 296150, which seems consistent. So at Jan 07, 03:01, there seems to have been a 51%-attack performed, rolling out 902 blocks (give or take).

Since Parity has 64-block pruning enabled by default, they would not be able to reorg to the 'canon' chain without a resync from scratch, leaving them on another chain.

  • Great detective work! – pyggie Jan 17 '17 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.