XinFinOrg / XDPoSChain

Customer centric, Hybrid & Interoperable XinFin Network
https://www.xinfin.org
GNU Lesser General Public License v3.0
51 stars 63 forks source link

Error list M1 not found #228

Closed liam-lai closed 8 months ago

liam-lai commented 1 year ago

Issue

come from xdc.dev https://www.xdc.dev/lucksin3/xdc-private-network-stuck-at-block-1799-with-error-failed-to-prepare-header-for-new-block-errlist-m1-not-found--7gc

Solution

  1. Follow the right process to create genesis file https://medium.com/xinfin/how-to-set-up-a-private-blockchain-network-with-xdc-network-codebase-b2ee82368e83, you can check the log like this, can see how many masternodes are configurated into genesis file as you want.
    DEBUG[02-17|10:40:48] Masternodes cycle info                   number of masternodes=3 previous=xdc0000000000000000000000000000000000000000 position=-1 current=xdcFeF2baC09ab1DebeC0E839ce8DC661a822f00cCC position=2
    DEBUG[02-17|10:40:48] Masternode:                              index=0 address=xdc09c1a2B3c620665EBDa5AEFcF51B775073b3BE61
    DEBUG[02-17|10:40:48] Masternode:                              index=1 address=xdc757f225273eBA574196EF04f6c22bCC3Ec623aDB
    DEBUG[02-17|10:40:48] Masternode:                              index=2 address=xdcFeF2baC09ab1DebeC0E839ce8DC661a822f00cCC
    INFO [02-17|10:40:48] Not my turn to commit block. Waiting...
  2. Key point is Epoch number must be 900 in the genesis file, due to lots of parameters are bind to Epoch 900.
    "XDPoS": {
      "period": 2,
      "epoch": 900,
      "reward": 10,
      "rewardCheckpoint": 900,
      "gap": 450,
lucksin3 commented 1 year ago

The epoch mentioned in the genisis file is "epoch": 900,

Poonam911 commented 1 year ago

Hii Actually i also checked github.com/XinFinOrg/XDPoSChain/is... this and follow the steps of genesis according to this document but still same issue . Please suggest me what changes are required to fix this error

INFO [06-22|10:33:47] Initialising Ethereum protocol versions="[63 62]" network=111 INFO [06-22|10:33:47] Loaded most recent local header number=1799 hash=fadd85…c1ef80 td=4491 INFO [06-22|10:33:47] Loaded most recent local full block number=1799 hash=fadd85…c1ef80 td=4491 INFO [06-22|10:33:47] Loaded most recent local fast block number=1799 hash=fadd85…c1ef80 td=4491 INFO [06-22|10:33:47] Loaded local transaction journal transactions=0 dropped=0 INFO [06-22|10:33:47] Regenerated local transaction journal transactions=0 accounts=0 INFO [06-22|10:33:47] Starting P2P networking INFO [06-22|10:33:47] RLPx listener up self="enode://ee60711fa9969070abb20b562fd4147b1cfe1a4141f5cd622d496a9caf08264ae3afacbc20d83f4a82f0026471a0b40ea17e0d70a3d8bb5853b8b62af8bcec5d@[::]:30315?discport=0" INFO [06-22|10:33:47] IPC endpoint opened url=/home/poonam/Desktop/XDPoSChain/build/bin/node1/XDC.ipc INFO [06-22|10:33:47] HTTP endpoint opened url=http://localhost:8504 cors= vhosts=localhost INFO [06-22|10:33:47] Mapped network port proto=tcp extport=30315 intport=30315 interface=NAT-PMP(192.168.1.1) INFO [06-22|10:33:47] Unlocked account address=xdc321fC9167817bee6AbAf69425d33E2bDf07AF0e6 INFO [06-22|10:33:47] Etherbase automatically configured address=xdc321fC9167817bee6AbAf69425d33E2bDf07AF0e6 INFO [06-22|10:33:47] Masternode found. Enabling staking mode... INFO [06-22|10:33:47] Transaction pool price threshold updated price=1 INFO [06-22|10:33:47] Enabled staking node!!! INFO [06-22|10:33:47] Starting mining operation INFO [06-22|10:33:47] Not my turn to commit block. Waiting... INFO [06-22|10:33:47] Distance from the parent block seconds=20 hops=1 INFO [06-22|10:33:47] Wait enough. It's my turn waited seconds=146930 ERROR[06-22|10:33:47] Failed to prepare header for new block err="list M1 not found " INFO [06-22|10:33:57] Not my turn to commit block. Waiting... INFO [06-22|10:33:57] Distance from the parent block seconds=20 hops=1 INFO [06-22|10:33:57] Wait enough. It's my turn waited seconds=146940 ERROR[06-22|10:33:57] Failed to prepare header for new block err="list M1 not found " INFO [06-22|10:34:07] Not my turn to commit block. Waiting... INFO [06-22|10:34:07] Distance from the parent block seconds=20 hops=1 INFO [06-22|10:34:07] Wait enough. It's my turn waited seconds=146950 ERROR[06-22|10:34:07] Failed to prepare header for new block err="list M1 not found " INFO [06-22|10:34:17] Not my turn to commit block. Waiting... INFO [06-22|10:34:17] Distance from the parent block seconds=20 hops=1 INFO [06-22|10:34:17] Wait enough. It's my turn waited seconds=146960 ERROR[06-22|10:34:17] Failed to prepare header for new block err="list M1 not found " INFO [06-22|10:34:27] Not my turn to commit block. Waiting... INFO [06-22|10:34:27] Distance from the parent block seconds=20 hops=1 Kindly help me to resolve this error THanks

gzliudan commented 7 months ago

This issue has been fixed by #430 accidentally.