Developers Forum for XinFin XDC Network

inv4fee2020
inv4fee2020

Posted on • Updated on

[Resolved]Masternode on testnet not syncing

Hey team,

Is there any particular step that I am missing with deploying a master node to the testnet?

Do I need to request 10M XDC on Apothem?

I have had the node deployed for a few hours now and still no syncing. In contrast I have a fully operational private node on mainnet running just fine.

Appreciate any guidance @anilchinchawale

Thanks

Discussion (13)

Collapse
anilchinchawale profile image
AnilChinchawale

Hello,

As per XDC Stats page, I can see that as of now your node not connected to any health peers.

Sometime it takes few hours to find intial peers , I would suggest you to use below snapshot to setup your apothem node quickly.

Link :- download.xinfin.network/apothem.tar

Collapse
inv4fee2020 profile image
inv4fee2020 Author

hey @anilchinchawale,

so I let the node run after extracting the tar file into the testnet folder. The stats reflected the snapshot size in terms of blocks, but having let it run a few hours now the number has not incremented.

I have manually deleted the LOG & LOCK files and restarted the node but there is little sign of any change.. see logs below;

root@artemis:/home/plimaster/XinFin-Node/testnet/xdcchain-testnet/XDC/chaindata# tail -f LOG
=============== Feb 5, 2023 (CET) ===============
15:29:03.610975 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed
15:29:03.671739 version@stat F·[2 55 567 5471 22334] S·54GiB[490B 98MiB 998MiB 9GiB 44GiB] Sc·[0.50 0.99 1.00 1.00 0.45]
15:29:03.671837 db@open opening
15:29:03.721482 journal@recovery F·1
15:29:03.725672 journal@recovery recovering @384751
15:29:03.727434 memdb@flush created L0@384753 N·2 S·245B "Blo..ion,v603996921":"Las..der,v603996922"
15:29:03.730335 version@stat F·[3 55 567 5471 22334] S·54GiB[735B 98MiB 998MiB 9GiB 44GiB] Sc·[0.75 0.99 1.00 1.00 0.45]
15:29:03.804871 db@janitor F·28432 G·0
15:29:03.804981 db@open done T·133.132348ms

Enter fullscreen mode Exit fullscreen mode
Collapse
mrblockchain22 profile image
Salomon Morales

You dont need the 10 million XDC for the node to be fully operational. Take a look at the logs and share what you find.

Collapse
inv4fee2020 profile image
inv4fee2020 Author

Thanks Sal.

There are no errors showing in the log when running

xinfinnetwork_1  | INFO [02-04|16:50:25] Maximum peer count                       ETH=25 LES=0 total=25
xinfinnetwork_1  | INFO [02-04|16:50:25] XDCX datadir                             path=/work/xdcchain-testnet/XDCx
xinfinnetwork_1  | INFO [02-04|16:50:25] Allocated cache and file handles         database=/work/xdcchain-testnet/XDCx cache=134.22mB handles=1024
xinfinnetwork_1  | INFO [02-04|16:50:25] Starting peer-to-peer node               instance=XDC/v1.4.6-stable/linux-amd64/go1.14.15
xinfinnetwork_1  | INFO [02-04|16:50:25] Allocated cache and file handles         database=/work/xdcchain-testnet/XDC/chaindata cache=805.31mB handles=1024
xinfinnetwork_1  | INFO [02-04|16:50:25] Initialised chain configuration          config="{ChainID: 51 Homestead: 1 DAO: <nil> DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: XDPoS}"
xinfinnetwork_1  | INFO [02-04|16:50:25] Initialising Ethereum protocol           versions="[63 62]" network=51
xinfinnetwork_1  | INFO [02-04|16:50:25] Loaded most recent local header          number=0 hash=bdea51…640075 td=1
xinfinnetwork_1  | INFO [02-04|16:50:25] Loaded most recent local full block      number=0 hash=bdea51…640075 td=1
xinfinnetwork_1  | INFO [02-04|16:50:25] Loaded most recent local fast block      number=0 hash=bdea51…640075 td=1
xinfinnetwork_1  | INFO [02-04|16:50:25] Loaded local transaction journal         transactions=0 dropped=0
xinfinnetwork_1  | INFO [02-04|16:50:25] Regenerated local transaction journal    transactions=0 accounts=0
xinfinnetwork_1  | INFO [02-04|16:50:25] Starting P2P networking
xinfinnetwork_1  | INFO [02-04|16:50:27] UDP listener up                          self=enode://2dcb7fd099a8c99c7dcb05160a4460f495eb3d809aaa64ea0358af56e3417d76afbef035344166b72d243f705655bd24aa275a59b1e7e8636d99ba854c80e12b@[::]:30304
xinfinnetwork_1  | INFO [02-04|16:50:27] Stats daemon started
xinfinnetwork_1  | INFO [02-04|16:50:27] RLPx listener up                         self=enode://2dcb7fd099a8c99c7dcb05160a4460f495eb3d809aaa64ea0358af56e3417d76afbef035344166b72d243f705655bd24aa275a59b1e7e8636d99ba854c80e12b@[::]:30304
xinfinnetwork_1  | INFO [02-04|16:50:27] IPC endpoint opened                      url=/work/xdcchain-testnet/XDC.ipc
xinfinnetwork_1  | INFO [02-04|16:50:27] HTTP endpoint opened                     url=http://0.0.0.0:8555            cors=* vhosts=*
xinfinnetwork_1  | INFO [02-04|16:50:27] WebSocket endpoint opened                url=ws://[::]:8556
xinfinnetwork_1  | INFO [02-04|16:50:28] Unlocked account                         address=xdc42e490E0c04F1be8c8cb9b76f630BF97F662169D
xinfinnetwork_1  | INFO [02-04|16:50:28] Etherbase automatically configured       address=xdc42e490E0c04F1be8c8cb9b76f630BF97F662169D
Enter fullscreen mode Exit fullscreen mode
Collapse
inv4fee2020 profile image
inv4fee2020 Author

I node that docker process is binding to ipv6 - I have ensured that the necessary ports are permitted inbound in ufw.

There are no other log sources that I can check based on exploring the docker image.

Thread Thread
mrblockchain22 profile image
Salomon Morales

Usually when I stand a node and it doesnt gain peers, bringing down the node, restarting the server and bring the node back up helps with that. If you dont see any errors in the logs, could be a firewall issue but you said you already checked ports. Maybe @anilchinchawale has more details.

Thread Thread
inv4fee2020 profile image
inv4fee2020 Author

Thanks Sal. Appreciate you looking into it. Its a strange one to be sure.
I have looked at the listening ports and ensured that ufw reflected the same across both ipv4 & ipv6. I have also disabled ipv6 and re-installed the node. I have disabled the ufw firewall also but to no avail.

I know it should be just a case of plug and play as such, the lack of any error or info messages makes it difficult to trouble shoot.

There are no other form of firewalls from a hosting provider perspective.

I am using the exact same server spec & provider as my mainnet master node which has experienced no issues with syncing.

thoughts?

Thread Thread
mrblockchain22 profile image
Salomon Morales

Which host provider are you using? if you dont mind me asking. I have installed XDC nodes from Vultr, LiteServer, and several others but I found that Contabo sometimes requires a reboot after installing the node...not sure why. Same issues you encountered...no errors in the logs or anything to indicate issues. Im just curious.

Collapse
inv4fee2020 profile image
inv4fee2020 Author

a final note to advise that this is now resolved.

Collapse
anilchinchawale profile image
AnilChinchawale

Hey,

Can you share step that you followed to setup , We would replicate same at our end.

Collapse
inv4fee2020 profile image
inv4fee2020 Author

@anilchinchawale I followed the same steps as my mainnet master node. Taken from here;
xinfin.org/setup-Masternode.php

Instead of mainnet, I select testnet.

  1. create a new user account with sudo permission
  2. switch into the new account
  3. run the following code;
sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
cd XinFin-Node/
cd testnet/
sudo nano .env 
sudo docker-compose -f docker-compose.yml up -d 
Enter fullscreen mode Exit fullscreen mode
Collapse
inv4fee2020 profile image
inv4fee2020 Author • Edited on

A quick update @anilchinchawale. As you can see after leaving over night something finally kicked in and the node started to sync.

Thread Thread
inv4fee2020 profile image
inv4fee2020 Author