Developers Forum for XinFin XDC Network

rest 123
rest 123

Posted on

Using XDC with private blockchain

Hi, I am working on a task to use XDC with STELLAR based private blockchain and i am new to blockchain. I ma using the link: https://medium.com/xinfin/how-to-set-up-a-private-blockchain-network-with-xdc-network-codebase-b2ee82368e83

I have few doubts in there:

  1. Since it is not mentioned in the link how to generate the address private key pair before mentioning them in puppeth, I generated 4-5 addresses using webwallet on xinfin network and using those addresses to randomly create one as masternode , 2 as signers and 1 as foundation wallet address, 1 as for swapping. And some random xdc 000...0099, 98,97 as multisig signers address. This way i have created a genesis file. Is it fine?
  2. The enode generated using bootnode key is having default ip 127.0.0.1 .. do we need to change it 3.The link asks to enter bootnode key in local DPOs repo but where? And also before running it asks to replace chain id(which is understood) and enode, but i have generated single enode as mentioned in link using bootnode.key... will my single enode replace all enode mentioned in run.sh and also should i be using it to replace all enodes mentioned in all node.sh files.
  3. When the nodes run with datadir command, they are unable to lock masternode which i am not sure how to resolve as i have mentioned password also and looked a lot on internet but no luck. Help would be really appreciable as i am trying to do since a month now.

Discussion (4)

Collapse
raghuram profile image
Raghuram Dharanipathy • Edited on

Ivan_BlocksScan,

I followed this link How to Set Up a Private Blockchain Network with XDC Network Codebase to setup a XDC private blockchain.

After setting up the nodes as per the link mentioned above, the node starts mining untill it touches block number 899 and then it errors out(with error message "list M1 not found").

Image description

In this link under topic “6. Start the Masternode”

  • Should we place enode of all the three master nodes?
  • 

Do we have to start the first master node and start the second and then, third master node manually or as given in the article should we execute run.sh?
Collapse
ivan_blocksscan profile image
Ivan_BlocksScan

Hello @rest_123_112f6cdb30abc474

Kindly share more detail logs here, so that team will help you.

Collapse
rest_123_112f6cdb30abc474 profile image
rest 123 Author

Hi ,
please find the log below:

INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir path=nodes/1/XDCx
INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir path=nodes/2/XDCx
INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir

Starting the bootnode* ...
Starting the nodes* ...
INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir path=nodes/1/XDCx
INFO [01-04|22:48:20] Allocated cache and file handles database=nodes/1/XDCx cache=134.22mB handles=1024
INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir path=nodes/2/XDCx
INFO [01-04|22:48:20] Allocated cache and file handles database=nodes/2/XDCx cache=134.22mB handles=1024
INFO [01-04|22:48:20] Maximum peer count ETH=25 LES=0 total=25
INFO [01-04|22:48:20] XDCX datadir path=nodes/3/XDCx
INFO [01-04|22:48:20] Allocated cache and file handles database=nodes/3/XDCx cache=134.22mB handles=1024
INFO [01-04|22:48:20] Starting peer-to-peer node instance=XDC/v1.4.4-stable/linux-amd64/go1.13.8
INFO [01-04|22:48:20] Allocated cache and file handles database=/home/Documents/Local_DPoS_Setup/nodes/1/XDC/chaindata cache=805.31mB handles=1024
INFO [01-04|22:48:20] UDP listener up self=enode://d6b0d39601d2e28ce3973b01456ee96691a4718849c44d07024ca09b092536bb1f8ffb4eab0c937dbad483e4f068373bfd237c909aa07e4fa070e82b9c29a339@[::]:30306
INFO [01-04|22:48:20] Starting peer-to-peer node instance=XDC/v1.4.4-stable/linux-amd64/go1.13.8
INFO [01-04|22:48:20] Allocated cache and file handles database=/home/Local_DPoS_Setup/nodes/2/XDC/chaindata cache=805.31mB handles=1024
INFO [01-04|22:48:20] Starting peer-to-peer node instance=XDC/v1.4.4-stable/linux-amd64/go1.13.8
INFO [01-04|22:48:20] Allocated cache and file handles database=/home/Documents/WorkingCode/Local_DPoS_Setup/nodes/3/XDC/chaindata cache=805.31mB handles=1024
INFO [01-04|22:48:20] Initialised chain configuration config="{ChainID: 29122022 Homestead: 1 DAO: DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: Engine: XDPoS}"
INFO [01-04|22:48:20] Initialising Ethereum protocol versions="[63 62]" network=29122022
INFO [01-04|22:48:20] Loaded most recent local header number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local full block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local fast block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded local transaction journal transactions=0 dropped=0
INFO [01-04|22:48:20] Regenerated local transaction journal transactions=0 accounts=0
INFO [01-04|22:48:20] Starting P2P networking
INFO [01-04|22:48:20] Initialised chain configuration config="{ChainID: 29122022 Homestead: 1 DAO: DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: Engine: XDPoS}"
INFO [01-04|22:48:20] Initialising Ethereum protocol versions="[63 62]" network=29122022
INFO [01-04|22:48:20] Loaded most recent local header number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local full block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local fast block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded local transaction journal transactions=0 dropped=0
INFO [01-04|22:48:20] Regenerated local transaction journal transactions=0 accounts=0
INFO [01-04|22:48:20] Starting P2P networking
INFO [01-04|22:48:20] Initialised chain configuration config="{ChainID: 29122022 Homestead: 1 DAO: DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: Engine: XDPoS}"
INFO [01-04|22:48:20] Initialising Ethereum protocol versions="[63 62]" network=29122022
INFO [01-04|22:48:20] Loaded most recent local header number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local full block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded most recent local fast block number=0 hash=0bc667…bb1173 td=1
INFO [01-04|22:48:20] Loaded local transaction journal transactions=0 dropped=0
INFO [01-04|22:48:20] Regenerated local transaction journal transactions=0 accounts=0
INFO [01-04|22:48:20] Starting P2P networking
INFO [01-04|22:48:22] UDP listener up self=enode://3ef5e5105d98f5983a8b342307e572fb31c7283d8fd6d43987df01ce0c6d097270cbaec64d37db1258aafd2603b8b7c48101cb30eefd49a464eddac3ad4f500e@[::]:30304
INFO [01-04|22:48:22] RLPx listener up self=enode://3ef5e5105d98f5983a8b342307e572fb31c7283d8fd6d43987df01ce0c6d097270cbaec64d37db1258aafd2603b8b7c48101cb30eefd49a464eddac3ad4f500e@[::]:30304
INFO [01-04|22:48:22] Stats daemon started
INFO [01-04|22:48:22] IPC endpoint opened url=/home/Documents/WorkingCode/Local_DPoS_Setup/nodes/2/XDC.ipc
INFO [01-04|22:48:22] HTTP endpoint opened url=0.0.0.0:8546 cors=* vhosts=*
INFO [01-04|22:48:22] WebSocket endpoint opened url=ws://[::]:8556
Fatal: Can't verify masternode permission: etherbase must be explicitly specified
INFO [01-04|22:48:22] UDP listener up self=enode://87e112662dc42d6531a4718a43fc98a4fb7da214a8b63ea43a49c30db4476831b13b0013cde9d9877f04a0cfff2a5a52fd816ab852ddc960f9358b5bfd2b5670@[::]:30305
INFO [01-04|22:48:22] RLPx listener up self=enode://87e112662dc42d6531a4718a43fc98a4fb7da214a8b63ea43a49c30db4476831b13b0013cde9d9877f04a0cfff2a5a52fd816ab852ddc960f9358b5bfd2b5670@[::]:30305
INFO [01-04|22:48:22] Stats daemon started
INFO [01-04|22:48:22] UDP listener up self=enode://61faa9c89c91e27d1264c9d2e43e4dc56bf2e28992c4ff52feff4bc63978a253796bda022101452e930a10fbdf144fe4cfb08ceaad9886918e7b34f8cd708e59@[::]:30303
INFO [01-04|22:48:22] Stats daemon started
INFO [01-04|22:48:22] RLPx listener up self=enode://61faa9c89c91e27d1264c9d2e43e4dc56bf2e28992c4ff52feff4bc63978a253796bda022101452e930a10fbdf144fe4cfb08ceaad9886918e7b34f8cd708e59@[::]:30303
INFO [01-04|22:48:22] IPC endpoint opened url=/home/Documents/WorkingCode/Local_DPoS_Setup/nodes/3/XDC.ipc
INFO [01-04|22:48:22] IPC endpoint opened url=/home/Documents/WorkingCode/Local_DPoS_Setup/nodes/1/XDC.ipc
INFO [01-04|22:48:22] HTTP endpoint opened url=0.0.0.0:8544 cors=* vhosts=*
INFO [01-04|22:48:22] HTTP endpoint opened url=0.0.0.0:8547 cors=* vhosts=*
INFO [01-04|22:48:22] WebSocket endpoint opened url=ws://[::]:8555
Fatal: Can't verify masternode permission: etherbase must be explicitly specified
INFO [01-04|22:48:22] WebSocket endpoint opened url=ws://[::]:8557
Fatal: Can't verify masternode permission: etherbase must be explicitly specified

$ ls
add.sh local-run.sh node3.sh README.md setup-XDC01-Network.sh
bootnode.key Misc node4.sh reset.sh testnet_v1.0.0.sh
enodes_list.txt node1.sh nodes runedit.sh todo.md
genesis node2.sh pwd.txt run.sh

$ ls nodes
ls: cannot open directory 'nodes': Permission denied
$ sudo ls nodes
1 2 3

thanks

Collapse
rest_123_112f6cdb30abc474 profile image
rest 123 Author

INFO [01-05|16:14:17] Not my turn to commit block. Waiting...
INFO [01-05|16:14:27] Not my turn to commit block. Waiting...
WARN [01-05|16:14:32] Full stats report failed err="ping timed out"
WARN [01-05|16:14:32] Full stats report failed err="ping timed out"
WARN [01-05|16:14:32] Full stats report failed err="ping timed out"
WARN [01-05|16:14:32] Failed to decode stats server message err="read tcp 100.64.0.1:47654->66.94.120.128:3000: use of closed network connection"
WARN [01-05|16:14:32] Failed to decode stats server message err="read tcp 100.64.0.1:47640->66.94.120.128:3000: use of closed network connection"
WARN [01-05|16:14:32] Failed to decode stats server message err="read tcp 100.64.0.1:47650->66.94.120.128:3000: use of closed network connection"
INFO [01-05|16:14:37] Not my turn to commit block. Waiting...
INFO [01-05|16:14:47] Not my turn to commit block. Waiting...
INFO [01-05|16:14:57] Not my turn to commit block. Waiting...
INFO [01-05|16:15:07] Not my turn to commit block. Waiting...
WARN [01-05|16:15:16] Full stats report failed err="ping timed out"
WARN [01-05|16:15:16] Failed to decode stats server message err="read tcp 100.64.0.1:51292->66.94.120.128:3000: use of closed network connection"
WARN [01-05|16:15:16] Full stats report failed err="ping timed out"
WARN [01-05|16:15:16] Failed to decode stats server message err="read tcp 100.64.0.1:51280->66.94.120.128:3000: use of closed network connection"
WARN [01-05|16:15:16] Full stats report failed

this is the more recent log