streamingfast / go-ethereum

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
9 stars 5 forks source link

BNB finality stuck for a few hours #7

Closed sduchesneau closed 9 months ago

sduchesneau commented 1 year ago

Finality was shown as 31045129 on RPC call:

curl -X POST "http://localhost:8545/" -H "Content-Type: application/json"  --data '{"jsonrpc":"2.0","method":"eth_getFinalizedHeader","params":[11],"id":1}'
{"jsonrpc":"2.0","id":1,"result":{"difficulty":"0x2","extraData":"0xd88301020a846765746888676f312e32302e35856c696e7578000000b19df4a2222b050441b952b350f245cc4d33b6449907cb7dc6eb9706a97d6f59bb7c529412f185e601270294a00ce0c941310258660f73ed7fea9e2baf03022cc93a571a01","gasLimit":"0x84fe2c6","gasUsed":"0xd8e658","hash":"0x10172fd8fbf710cc76edc47d0ebcfd2391e6407f5c457833b285685e40d5aff7","logsBloom":"0x1db0e7c6232054304729b5f6a17f53cf22884c56f905141a62b2034e660243139307934a559f1d856320f82f615a2363b101c93eae30220a7b7a291fa7e186e09c54c950c562d2edc5eb4c6bdda204e8befbb927426a79472817b696c1fd1c088e4d9bf3eb06b0df2cc50f447b12cf5d7d7898f851dd4fca03061114e239aed697ecc305463d75470e8525a10de18c8a94b43e777e6a37786195d9cfeaa241b6869f3905f7bd67a82f06e7cccbbb7e005124e7e98cd6177152c6e02db94636f86388d69bd66c39d7b5d0a8edca5a55e9aa190be81f506af5cbd25103e71ae82472b3ca435c2ce15c5ba7dc8144298be44bfa452868686ac91106cf3d1e317096","miner":"0xa6f79b60359f141df90a0c745125b131caaffd12","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x1d9b609","parentHash":"0x9f9dfba03df749fd9d56296d00ffe721802e6edd9da9ad0e25b5ce81ce5cfe52","receiptsRoot":"0xc7a5cea5c415805dcad49da0ab58324b70b592e24d2eeb1d611362fa4772aca4","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x28c","stateRoot":"0x7603fa86c6148e94ccc3339aa7b0d099b364b28ff05e06c0e186362375b6e823","timestamp":"0x64e3482d","totalDifficulty":"0x3ad4973","transactionsRoot":"0x3a77fb833d0ebbe5682c8545261519d1f6eb8652691d1add36b861c53b762f16"}}
(modifié)

but according to our instrumnentation, it was stuck at 31042249

FIRE END_BLOCK 31045028 31014 {"finalizedBlockHash":"0x107e2024c431aad266d0027675962f639d9a486118b2c53291430f9a7a1d7ec8","finalizedBlockNum":"0x1d9aac9"," ...

This '31042249' issue has been observed on multiple unrelated machines running bsc-v1.2.10-fh2.2

It solved itself at block 31045554

sduchesneau commented 1 year ago

Fixed in tag bsc-v1.2.10-fh2.2-2

sduchesneau commented 10 months ago

It seems that this happens again (few reports from Pinax and others)

sduchesneau commented 10 months ago

example here:

0034137009-7d207ab4581d763b-c4b878e229f8e968-34137006-default.dbin.zst
0034137009-d6eb576e901cca43-c4b878e229f8e968-34137007-default.dbin.zst
0034137010-039cb3ec9248b76b-d6eb576e901cca43-34137007-default.dbin.zst
0034137010-1b111828d2da7d08-7d207ab4581d763b-34137007-default.dbin.zst
0034137011-d6a759593ed7a8f5-1b111828d2da7d08-34137008-default.dbin.zst

^this is problematic because the correct path is:

we are missing the previous files to figure out the root cause. The 7009 block links to 7006, but there was probably another block that set the wrong "last final block" before that.

sduchesneau commented 9 months ago

Fixed in https://github.com/streamingfast/go-ethereum/releases/tag/bsc-v1.3.7-fh2.2-1 The "final block num" will not be advertised anymore if the block being written by geth is not canonical.