Developers Forum for XinFin XDC Network

Naresh Mohanraj
Naresh Mohanraj

Posted on

XDC apothem masternode setup failing

Hi team,
I am trying to setup a apothem master node locally by following the docker installation.
The node was able to fetch blocks till #30,309,618 after this node has stopped fetching blocks(attached screenshot from https://apothem.network/#stats)
Image description

In the node logs I could see unknown ancestor error(as attached in the screenshot):
Image description

Can you please guide me to resolve this issue.

Regards,
Naresh Mohanraj

Discussion (13)

Collapse
gzliudan profile image
Daniel Liu

Would you please share more log before this message ?

Collapse
naresh_mohanraj profile image
Naresh Mohanraj Author

these logs are coming in loop:

Round: 0
Error: unknown ancestor

WARN [10-30|05:15:28] Synchronisation failed, dropping peer peer=0164239a3a89f505 err="retrieved hash chain is invalid"
ERROR[10-30|05:15:46]

#### BAD BLOCK

Chain config: {"chainId":51,"homesteadBlock":1,"eip150Block":2,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"XDPoS":{"period":2,"epoch":900,"reward":5000,"rewardCheckpoint":900,"gap":450,"foudationWalletAddr":"0x746249c61f5832c5eed53172776b460491bdcd5c","SkipV1Validation":false,"v2":{"switchBlock":56828700,"config":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"allConfigs":{"0":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"900000":{"maxMasternodes":108,"switchRound":900000,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":30,"certificateThreshold":0.667}},"SkipV2Validation":false}}}

Number: 30309619
Hash: 0x2911924aedfd856923fc2dab0e5864b00e6a726d7cead47fcf64bfad88e2f713

Round: 0
Error: unknown ancestor

WARN [10-30|05:15:46] Synchronisation failed, dropping peer peer=94389b49ca856a91 err="retrieved hash chain is invalid"
ERROR[10-30|05:15:48]

#### BAD BLOCK

Chain config: {"chainId":51,"homesteadBlock":1,"eip150Block":2,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"XDPoS":{"period":2,"epoch":900,"reward":5000,"rewardCheckpoint":900,"gap":450,"foudationWalletAddr":"0x746249c61f5832c5eed53172776b460491bdcd5c","SkipV1Validation":false,"v2":{"switchBlock":56828700,"config":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"allConfigs":{"0":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"900000":{"maxMasternodes":108,"switchRound":900000,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":30,"certificateThreshold":0.667}},"SkipV2Validation":false}}}

Number: 30309619
Hash: 0x2911924aedfd856923fc2dab0e5864b00e6a726d7cead47fcf64bfad88e2f713

Round: 0
Error: unknown ancestor

WARN [10-30|05:15:48] Synchronisation failed, dropping peer peer=e9684ecbf9634872 err="retrieved hash chain is invalid"
ERROR[10-30|05:15:58]

#### BAD BLOCK

Chain config: {"chainId":51,"homesteadBlock":1,"eip150Block":2,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"XDPoS":{"period":2,"epoch":900,"reward":5000,"rewardCheckpoint":900,"gap":450,"foudationWalletAddr":"0x746249c61f5832c5eed53172776b460491bdcd5c","SkipV1Validation":false,"v2":{"switchBlock":56828700,"config":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"allConfigs":{"0":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"900000":{"maxMasternodes":108,"switchRound":900000,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":30,"certificateThreshold":0.667}},"SkipV2Validation":false}}}

Number: 30309619
Hash: 0x2911924aedfd856923fc2dab0e5864b00e6a726d7cead47fcf64bfad88e2f713

Round: 0
Error: unknown ancestor

WARN [10-30|05:15:58] Synchronisation failed, dropping peer peer=3c7138ea28f83e7d err="retrieved hash chain is invalid"
ERROR[10-30|05:16:08]

#### BAD BLOCK

Chain config: {"chainId":51,"homesteadBlock":1,"eip150Block":2,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"XDPoS":{"period":2,"epoch":900,"reward":5000,"rewardCheckpoint":900,"gap":450,"foudationWalletAddr":"0x746249c61f5832c5eed53172776b460491bdcd5c","SkipV1Validation":false,"v2":{"switchBlock":56828700,"config":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"allConfigs":{"0":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"900000":{"maxMasternodes":108,"switchRound":900000,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":30,"certificateThreshold":0.667}},"SkipV2Validation":false}}}

Number: 30309619
Hash: 0x2911924aedfd856923fc2dab0e5864b00e6a726d7cead47fcf64bfad88e2f713

Collapse
naresh_mohanraj profile image
Naresh Mohanraj Author

HI Daniel, any updates regarding this issue?

Collapse
gzliudan profile image
Daniel Liu

Which docker image are you using ?

Thread Thread
naresh_mohanraj profile image
Naresh Mohanraj Author • Edited on

IMAGE : xinfinorg/xdposchain:v2.4.0-beta1
NAMES: testnet_xinfinnetwork_1

Thread Thread
gzliudan profile image
Daniel Liu

Please add flag --apothem to the file testnet/start-apothem.sh as github.com/XinFinOrg/XinFin-Node/p....

Thread Thread
naresh_mohanraj profile image
Naresh Mohanraj Author

I still see same errors even after adding this flag.

Thread Thread
gzliudan profile image
Daniel Liu

Let me do a full sync test. It will takes about 3 days to reach your block number.

Thread Thread
naresh_mohanraj profile image
Naresh Mohanraj Author

Ok please let me know the results.

Thread Thread
gzliudan profile image
Daniel Liu • Edited on

I have no problem to pass block number 30309619. I used 3 ways to do sync test:

All passed block number 30310000

Thread Thread
naresh_mohanraj profile image
Naresh Mohanraj Author

Can you share me the exact steps(or link) you followed for this setup using docker?

Thread Thread
gzliudan profile image
Daniel Liu • Edited on
if [[ -d "XinFin-Node" ]]; then 
    cd XinFin-Node
    git pull
    cd testnet
    sudo rm -rf xdcchain-testnet
else
   git clone https://github.com/XinFinOrg/XinFin-Node
   cd XinFin-Node/testnet
   # please modify the file .env before start your node
fi

./docker-up.sh
Enter fullscreen mode Exit fullscreen mode
Thread Thread
gzliudan profile image
Daniel Liu

How about your problem now ?