ethereum / go-ethereum

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

ERROR:Section processing failed type=bloombits error="chain reorged during section processing" #24447

Open sardChen opened 2 years ago

sardChen commented 2 years ago

System information

Geth version: Geth-1.10.9-unstable/go1.13.8 OS & Version: ubuntu 20.04

Expected behaviour

Mining block & Synchronizing the block on the test network as normal

Actual behaviour

Consistently reporting Error:

"ERROR[02-20|12:17:50.897] Section processing failed                type=bloombits error="chain reorged during section processing""

Steps to reproduce the behaviour

../build/bin/geth --identity "ETH-node1" --datadir "node1" --ethash.dagdir "node1" --port "30303" --maxpeers 10 --networkid 10086  --syncmode "full" --bootnodes "enode://6728a506177abb60fd5b49b1461f4b99fc018e4d4c9839a4ded5a395d5b64439fad1d02dd7699324532fbfc82dca501c84eb3dd213b95cdf788454edb7d65cd4@127.0.0.1:0?discport=30301" --mine --miner.etherbase 0xC13CDeDCc4538771654A7062D38C6E8eb486391b --miner.threads 1 --http --http.port 8545

Backtrace

INFO [02-20|12:18:30.845] Looking for peers                        peercount=4 tried=0 static=0
INFO [02-20|12:18:33.203] Imported new chain segment               blocks=1   txs=0 mgas=0.000 elapsed=2.975ms     mgasps=0.000 number=11184 hash=bdfee2..964409 dirty=185.83KiB
INFO [02-20|12:18:33.203] Commit new mining work                   number=11185 sealhash=793f1d..3c1c83 uncles=0 txs=0 gas=0     fees=0       elapsed="84.087µs"
INFO [02-20|12:18:33.203] Commit new mining work                   number=11185 sealhash=793f1d..3c1c83 uncles=0 txs=0 gas=0     fees=0       elapsed="184.423µs"
ERROR[02-20|12:18:33.203] Section processing failed                type=bloombits error="chain reorged during section processing"
INFO [02-20|12:18:34.843] Imported new chain segment               blocks=1   txs=0 mgas=0.000 elapsed=3.977ms     mgasps=0.000 number=11185 hash=3d7ade..0fd866 dirty=185.80KiB
INFO [02-20|12:18:34.843] Upgrading chain index                    type=bloombits percentage=0
INFO [02-20|12:18:34.843] Commit new mining work                   number=11186 sealhash=9cc894..3a8505 uncles=0 txs=0 gas=0     fees=0       elapsed="110.022µs"
INFO [02-20|12:18:34.843] Commit new mining work                   number=11186 sealhash=9cc894..3a8505 uncles=0 txs=0 gas=0     fees=0       elapsed="232.15µs"
ERROR[02-20|12:18:34.843] Section processing failed                type=bloombits error="chain reorged during section processing"
INFO [02-20|12:18:36.001] Imported new chain segment               blocks=1   txs=0 mgas=0.000 elapsed=3.294ms     mgasps=0.000 number=11186 hash=7a318d..8a4075 dirty=186.04KiB
INFO [02-20|12:18:36.001] Commit new mining work                   number=11187 sealhash=4187e9..9e5ff5 uncles=0 txs=0 gas=0     fees=0       elapsed="115.62µs"
INFO [02-20|12:18:36.002] Commit new mining work                   number=11187 sealhash=4187e9..9e5ff5 uncles=0 txs=0 gas=0     fees=0       elapsed="248.584µs"
ERROR[02-20|12:18:36.002] Section processing failed                type=bloombits error="chain reorged during section processing"
INFO [02-20|12:18:40.853] Looking for peers                        peercount=4 tried=0 static=0
INFO [02-20|12:18:45.238] Imported new chain segment               blocks=1   txs=0 mgas=0.000 elapsed=2.564ms     mgasps=0.000 number=11187 hash=79f57c..583080 dirty=185.77KiB
INFO [02-20|12:18:45.238] Upgrading chain index                    type=bloombits percentage=0
INFO [02-20|12:18:45.239] 🔗 block reached canonical chain          number=11180 hash=987d46..cb6f5c
INFO [02-20|12:18:45.239] Commit new mining work                   number=11188 sealhash=49f7c0..dfa54f uncles=0 txs=0 gas=0     fees=0       elapsed="139.293µs"
INFO [02-20|12:18:45.239] Commit new mining work                   number=11188 sealhash=49f7c0..dfa54f uncles=0 txs=0 gas=0     fees=0       elapsed="250.629µs"
ERROR[02-20|12:18:45.239] Section processing failed                type=bloombits error="chain reorged during section processing"
INFO [02-20|12:18:48.638] Successfully sealed new block            number=11188 sealhash=49f7c0..dfa54f hash=6181f8..a2fea3 elapsed=3.399s
INFO [02-20|12:18:48.638] 🔨 mined potential block                  number=11188 hash=6181f8..a2fea3
INFO [02-20|12:18:48.638] Commit new mining work                   number=11189 sealhash=0ad159..7268ae uncles=0 txs=0 gas=0     fees=0       elapsed="189.831µs"
INFO [02-20|12:18:48.638] Commit new mining work                   number=11189 sealhash=0ad159..7268ae uncles=0 txs=0 gas=0     fees=0       elapsed="405.889µs"
ERROR[02-20|12:18:48.638] Section processing failed                type=bloombits error="chain reorged during section processing"

When submitting logs: please submit them as text and not screenshots.

MariusVanDerWijden commented 2 years ago

We discussed this issue internally a bit and came to the following conclusion: This is an expected error, we, we process a section of blocks and do the bloombits processing on that. If we see a reorg during that, it screws with us a bit and we have to stop and restart the bloombits processing.

We should re-architect the whole bloombits processing, as it is not really useful atm (might need to look how other clients are doing it)

Also @rjl493456442 we noticed in the log that the commit new mining work is duplicated with always the same hash. The used version is pretty old, but it might be good to check that we don't replace a work package with the same work package (on empty blocks)