etclabscore / core-geth

A highly configurable Go implementation of the Ethereum protocol.
https://etclabscore.github.io/core-geth
GNU Lesser General Public License v3.0
267 stars 147 forks source link

Mordor Testnet Synchronisation failed #550

Open biluohc opened 1 year ago

biluohc commented 1 year ago

v1.12.12-stable-6d8971c9 mordor testnet Synchronisation failed

System information

CoreGeth/v1.12.12-stable-6d8971c9/linux-amd64/go1.20.4

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

docker run -d \ --name etc-mordor \ -v /opt/etc-geth:/root/.ethereum \ --network host \ --restart always \ etclabscore/core-geth:version-1.12.12 \ --config /root/.ethereum/mordor.toml --mine

Backtrace

INFO [06-02|06:22:11.525] Starting peer-to-peer node               instance=CoreGeth/v1.12.12-stable-6d8971c9/linux-amd64/go1.20.4
INFO [06-02|06:22:11.565] New local node record                    seq=1,654,852,731,224 id=3b6a12049fdecbcc ip=127.0.0.1 udp=31303 tcp=31303
INFO [06-02|06:22:11.574] Started P2P networking                   self=enode://76851e87e95b4960bcfffb0249c2a3e2dce76cfbb08d1ba906da4cab6129c8e8888c449f1ecd40e6e891522570d89a8f1d0aee569512f937681051319a021a48@127.0.0.1:31303
INFO [06-02|06:22:11.593] IPC endpoint opened                      url=/root/.ethereum/mordor/geth.ipc
INFO [06-02|06:22:11.594] Loaded JWT secret file                   path=/root/.ethereum/mordor/geth/jwtsecret crc32=0xe29b07c9
INFO [06-02|06:22:11.594] HTTP server started                      endpoint=[::]:9545 auth=false prefix= cors= vhosts=localhost,host1
INFO [06-02|06:22:11.595] WebSocket enabled                        url=ws://127.0.0.1:8551
INFO [06-02|06:22:11.595] HTTP server started                      endpoint=127.0.0.1:8551 auth=true  prefix= cors=localhost vhosts=localhost
INFO [06-02|06:22:11.595] Transaction pool price threshold updated price=0
INFO [06-02|06:22:11.595] Updated mining threads                   threads=0
INFO [06-02|06:22:11.595] Transaction pool price threshold updated price=1,000,000,000
INFO [06-02|06:22:11.596] Commit new sealing work                  number=8,872,941 sealhash=f226f2..21f698 uncles=0 txs=0 gas=0 fees=0 elapsed="465.244µs"
INFO [06-02|06:22:11.596] Commit new sealing work                  number=8,872,941 sealhash=f226f2..21f698 uncles=0 txs=0 gas=0 fees=0 elapsed="579.493µs"
INFO [06-02|06:22:21.597] Block synchronisation started 
INFO [06-02|06:22:21.597] Mining aborted due to sync 
INFO [06-02|06:22:27.573] Skip duplicated bad block                number=8,872,941 hash=97ae1c..b2cf0d
ERROR[06-02|06:22:27.573] 
########## BAD BLOCK #########
Block: 8872941 (0x97ae1c1615fc25f624b3f33f1d60f049232c5ef3fe4c94fe924179dba4b2cf0d)
Error: invalid mix digest
Platform: geth (devel) go1.20.4 amd64 linux
VCS: 6d8971c9-20230529
Chain config: &coregeth.CoreGethChainConfig{NetworkID:0x7, ChainID:63, SupportedProtocolVersions:[]uint{0x44, 0x43, 0x42}, EIP2FBlock:0, EIP7FBlock:0, DAOForkBlock:<nil>, EIP150Block:0, EIP155Block:0, EIP160FBlock:0, EIP161FBlock:0, EIP170FBlock:0, EIP100FBlock:0, EIP140FBlock:0, EIP198FBlock:0, EIP211FBlock:0, EIP212FBlock:0, EIP213FBlock:0, EIP214FBlock:0, eip649FInferred:true, EIP649FBlock:<nil>, EIP658FBlock:0, EIP145FBlock:301243, EIP1014FBlock:301243, EIP1052FBlock:301243, eip1234FInferred:true, EIP1234FBlock:<nil>, EIP1283FBlock:<nil>, PetersburgBlock:<nil>, EIP152FBlock:999983, EIP1108FBlock:999983, EIP1344FBlock:999983, EIP1884FBlock:999983, EIP2028FBlock:999983, EIP2200FBlock:999983, EIP2200DisableFBlock:<nil>, eip2384Inferred:true, EIP2384FBlock:<nil>, eip3554Inferred:true, EIP3554FBlock:<nil>, eip4345Inferred:true, EIP4345FBlock:<nil>, EIP1706FBlock:<nil>, EIP2537FBlock:<nil>, ECIP1010PauseBlock:<nil>, ECIP1010Length:<nil>, ECIP1017FBlock:0, ECIP1017EraRounds:2000000, ECIP1080FBlock:<nil>, ECIP1099FBlock:2520000, ECBP1100FBlock:2380000, EIP2315FBlock:<nil>, EIP2565FBlock:3985893, EIP2718FBlock:3985893, EIP2929FBlock:3985893, EIP3198FBlock:<nil>, EIP4399FBlock:<nil>, EIP2930FBlock:3985893, EIP1559FBlock:<nil>, EIP3541FBlock:5520000, EIP3529FBlock:5520000, EIP5133FBlock:<nil>, eip5133Inferred:true, EIP3651FTime:(*uint64)(nil), EIP3855FTime:(*uint64)(nil), EIP3860FTime:(*uint64)(nil), EIP4895FTime:(*uint64)(nil), EIP6049FTime:(*uint64)(nil), EIP4844FTime:(*uint64)(nil), MergeNetsplitVBlock:<nil>, DisposalBlock:0, Ethash:(*ctypes.EthashConfig)(0x3575a40), Clique:(*ctypes.CliqueConfig)(nil), Lyra2:(*ctypes.Lyra2Config)(nil), TerminalTotalDifficulty:<nil>, TerminalTotalDifficultyPassed:false, TrustedCheckpoint:(*ctypes.TrustedCheckpoint)(nil), TrustedCheckpointOracle:(*ctypes.CheckpointOracleConfig)(nil), DifficultyBombDelaySchedule:ctypes.Uint64BigMapEncodesHex(nil), BlockRewardSchedule:ctypes.Uint64BigMapEncodesHex(nil), RequireBlockHashes:map[uint64]common.Hash{0xcd14d:0x2ceada2b191879b71a5bcf2241dd9bc50d6d953f1640e62f9c2cee941dc61c9d, 0xcd14e:0x8ec29dd692c8985b82410817bac232fc82805b746538d17bc924624fe74a0fcf}, Lyra2NonceTransitionBlock:<nil>}
Receipts: 
##############################

ERROR[06-02|06:22:27.574] Failed to retrieve beacon bounds for bad block reporting err="beacon sync not yet started"
WARN [06-02|06:22:27.574] Synchronisation failed, dropping peer    peer=0cc37098ea6aa4f73e9e028a101a7f9f9013aecbdeff6f6ee3895a1c65ed6adc err="retrieved hash chain is invalid: invalid mix digest"
ziogaschr commented 1 year ago

I will try a sync to see if it's reproducible now.

ziogaschr commented 1 year ago

Can you please share your mordor.toml data, with any personal info removed. Thanks

biluohc commented 1 year ago

Thanks for your reply.

Note: this config doesn't contain the genesis block.

[Eth] NetworkId = 7 SyncMode = "snap" EthDiscoveryURLs = ["enrtree://AJE62Q4DUX4QMMXEHCSSCSC65TDHZYSMONSD64P3WULVLSF6MRQ3K@all.mordor.blockd.info"] SnapDiscoveryURLs = ["enrtree://AJE62Q4DUX4QMMXEHCSSCSC65TDHZYSMONSD64P3WULVLSF6MRQ3K@all.mordor.blockd.info"] NoPruning = false NoPrefetch = false TxLookupLimit = 2350000 LightPeers = 100 UltraLightFraction = 75 DatabaseCache = 512 DatabaseFreezer = "" TrieCleanCache = 154 TrieCleanCacheJournal = "triecache" TrieCleanCacheRejournal = 3600000000000 TrieDirtyCache = 256 TrieTimeout = 3600000000000 SnapshotCache = 102 Preimages = false EnablePreimageRecording = false EWASMInterpreter = "" EVMInterpreter = "" RPCGasCap = 50000000 RPCEVMTimeout = 5000000000 RPCTxFeeCap = 1e+00

[Eth.Miner] Etherbase = "0x0239da7F7D5aF4CFF574C507bb6ce18DdC73b875" Notify = ["http://127.0.0.1:8000/"] GasFloor = 0 GasCeil = 8000000 GasPrice = 1000000000 Recommit = 5000000000 Noverify = false

[Eth.Ethash] CacheDir = "etchash" CachesInMem = 2 CachesOnDisk = 3 CachesLockMmap = false DatasetDir = "/root/.etchash" DatasetsInMem = 1 DatasetsOnDisk = 2 DatasetsLockMmap = false PowMode = 0 NotifyFull = false

[Eth.TxPool] Locals = [] NoLocals = false Journal = "transactions.rlp" Rejournal = 3600000000000 PriceLimit = 1 PriceBump = 10 AccountSlots = 16 GlobalSlots = 5120 AccountQueue = 64 GlobalQueue = 1024 Lifetime = 10800000000000

[Eth.GPO] Blocks = 20 Percentile = 60 MaxHeaderHistory = 1024 MaxBlockHistory = 1024 MaxPrice = 500000000000 IgnorePrice = 2

[Node] DataDir = "/root/.ethereum/mordor" IPCPath = "geth.ipc" HTTPHost = "0.0.0.0" HTTPPort = 9545 HTTPVirtualHosts = ["localhost", "host1"] HTTPModules = ["net", "web3", "eth"] WSHost = "" WSPort = 9546 WSModules = ["net", "web3", "eth"] GraphQLVirtualHosts = ["localhost"]

[Node.P2P] MaxPeers = 50 NoDiscovery = false BootstrapNodes = ["enode://534d18fd46c5cd5ba48a68250c47cea27a1376869755ed631c94b91386328039eb607cf10dd8d0aa173f5ec21e3fb45c5d7a7aa904f97bc2557e9cb4ccc703f1@51.158.190.99:30303", "enode://15b6ae4e9e18772f297c90d83645b0fbdb56667ce2d747d6d575b21d7b60c2d3cd52b11dec24e418438caf80ddc433232b3685320ed5d0e768e3972596385bfc@51.158.191.43:41235", "enode://8fa15f5012ac3c47619147220b7772fcc5db0cb7fd132b5d196e7ccacb166ac1fcf83be1dace6cd288e288a85e032423b6e7e9e57f479fe7373edea045caa56b@176.9.51.216:31355", "enode://34c14141b79652afc334dcd2ba4d8047946246b2310dc8e45737ebe3e6f15f9279ca4702b90bc5be12929f6194e2c3ce19a837b7fec7ebffcee9e9fe4693b504@176.9.51.216:31365"] BootstrapNodesV5 = ["enode://534d18fd46c5cd5ba48a68250c47cea27a1376869755ed631c94b91386328039eb607cf10dd8d0aa173f5ec21e3fb45c5d7a7aa904f97bc2557e9cb4ccc703f1@51.158.190.99:30303", "enode://15b6ae4e9e18772f297c90d83645b0fbdb56667ce2d747d6d575b21d7b60c2d3cd52b11dec24e418438caf80ddc433232b3685320ed5d0e768e3972596385bfc@51.158.191.43:41235", "enode://8fa15f5012ac3c47619147220b7772fcc5db0cb7fd132b5d196e7ccacb166ac1fcf83be1dace6cd288e288a85e032423b6e7e9e57f479fe7373edea045caa56b@176.9.51.216:31355", "enode://34c14141b79652afc334dcd2ba4d8047946246b2310dc8e45737ebe3e6f15f9279ca4702b90bc5be12929f6194e2c3ce19a837b7fec7ebffcee9e9fe4693b504@176.9.51.216:31365"] StaticNodes = [] TrustedNodes = [] ListenAddr = ":31303" EnableMsgEvents = false

[Node.HTTPTimeouts] ReadTimeout = 30000000000 WriteTimeout = 30000000000 IdleTimeout = 120000000000

[Metrics] HTTP = "127.0.0.1" Port = 6060 InfluxDBEndpoint = "http://localhost:8086" InfluxDBDatabase = "geth" InfluxDBUsername = "test" InfluxDBPassword = "test" InfluxDBTags = "host=localhost" InfluxDBToken = "test" InfluxDBBucket = "geth" InfluxDBOrganization = "geth"

ziogaschr commented 1 year ago

I tried to reproduce it, but with no luck. Here are some suggestions for the syncing issue:

  1. Start with a clean datadir, in your case delete /opt/etc-geth, but take care if you have more data inside.
  2. Delete this container, in your case etc-mordor
  3. First do a sync, without passing --mine and once finished restart with it.

Also, I see that you want to mine, for this you have to explicitly set --miner.etherbase= 0x0239da7F7D5aF4CFF574C507bb6ce18DdC73b875 in your CLI params.

biluohc commented 1 year ago

Thanks for you trying.

I found that running with the "--mordor" flag will work fine.

But previous versions can rely on configuration files only.

ziogaschr commented 1 year ago

Thanks for your report. I will check if --mordor flag is mandatory, and can't be read from config.