truechain / truechain-engineering-code

Go implementation of TrueChain
GNU Lesser General Public License v3.0
100 stars 81 forks source link

BAD SNAIL BLOCK & invalid committee member #115

Closed rlinxy closed 3 years ago

rlinxy commented 4 years ago

Running the true none by using this command: ./getrue --syncmode "fast" --cache=512 --mine --minerthreads 0 --rpc -rpcaddr 0.0.0.0 -rpcport 17799 --maxpeers 20 --coinbase "0x42571931170ee6ca09c7644a3322c7bb237e3052" --extradata "666" --rpcapi eth,web3,personal,net,etrue --remote --bftkeyhex a2db722dceb0558c2161a69ed42ff84dc7bb7700670fb10ea5c1c798cb4e1541

after around 1 hour syncing, got repeating errors in the log as below, seems the node stuck here.

INFO [05-29|03:42:19.516] VerifySings signs="[0xc011dc6cc0 0xc011dc6d20 0xc011dc6d80 0xc011dc6de0 0xc011dc6e40 0xc011dc6ea0 0xc011dc6f00 0xc011dc6f60 0xc011dc6fc0]" WARN [05-29|03:42:19.549] VerifySigns error err="invalid committee member" INFO [05-29|03:42:19.549] parallelValidateFruit VerifySigns failed. number=2389056 hash=79b5b6…28ad14 err="invalid committee member" WARN [05-29|03:42:19.550] VerifySigns error err="invalid committee member" INFO [05-29|03:42:19.550] parallelValidateFruit VerifySigns failed. number=2389051 hash=e0217a…809e80 err="invalid committee member" INFO [05-29|03:42:19.550] ValidateBody snail validate fruit error block=20228 err="invalid committee member" ERROR[05-29|03:42:19.550] ########## BAD SNAIL BLOCK ######### Chain config: {ChainID: 19330 Engine: {MinimumDifficulty: 134217728 MinimumFruitDifficulty: 262144 DurationLimit: 600}}

Number: 20228 Hash: 0xd0043808289501d83ce2ae1313de17dc9ca08a151d014d8fe5e455798687414d

Error: invalid committee member ##############################

ERROR[05-29|03:42:19.550] Snail downloaded item processing failed number=0xbbf410 hash=d00438…87414d err="invalid committee member" WARN [05-29|03:42:19.550] Skeleton chain invalid peer Snail=39.101.174.77:30313 err="snail block header download canceled (requested)" WARN [05-29|03:42:19.550] Snail Synchronisation failed, dropping peer peer=a95066806e7175df err="snail retrieved hash chain is invalid" INFO [05-29|03:42:19.550] Removing peer Disconnect call=6 peer=a95066806e7175df remoteAddr=39.101.174.77:30313 ERROR[05-29|03:42:19.550] ProtocolManager end err="snail retrieved hash chain is invalid" INFO [05-29|03:42:19.551] Truechain message handling failed id=a95066806e7175df conn=dyndial remoteAddr=39.101.174.77:30313 err="remote shutting down"

Any advice please.

rlinxy commented 4 years ago

Using bftkeyhex c1581e25937d9ab91421a3e1a2667c85b0397c75a195e643109938e987acecfc from #54

Got repeating error log as below

INFO [05-29|04:29:00.789] parallelValidateFruit VerifySigns failed. number=2582109 hash=9d67e1…81afaf err="invalid sign" INFO [05-29|04:29:00.789] ValidateBody snail validate fruit error block=21858 err="invalid sign" ERROR[05-29|04:29:00.789] ########## BAD SNAIL BLOCK ######### Chain config: {ChainID: 19330 Engine: {MinimumDifficulty: 134217728 MinimumFruitDifficulty: 262144 DurationLimit: 600}}

Number: 21858 Hash: 0xde5bccf32b98cf09ef2866db83f4b485ea2c767f7e17c1fb7b0f7ee42d989f23

Error: invalid sign ##############################

ERROR[05-29|04:29:00.789] Snail downloaded item processing failed number=0xbbf410 hash=de5bcc…989f23 err="invalid sign" WARN [05-29|04:29:00.789] Skeleton chain invalid peer Snail=47.112.123.253:30313 err="snail block header download canceled (requested)" WARN [05-29|04:29:00.789] Snail Synchronisation failed, dropping peer peer=e65ef8028032ef2f err="snail retrieved hash chain is invalid"

jiyilanzhou commented 4 years ago

Due to this aleady fix error which not enter insert snail block case, so when fast block verify signs of validators, it can't get correct validators public key.