During synchronization process, the client node will ask some of the DNS nodes instead of all of them.
- Add some print message in function
node.forEachPeer
to print out all the nodes being used. - Start node.sh to join mainnet with the customized binary file.
- See the log for intended message. Shall see number of DNS nodes being queried shall be 4 for beacon.
- Add print message as test_diff.batch
- Run a mainnet node with command
./node.sh -S -z -k 28142f0baf00edd18016d4d9d95f3844d7cff29e613b2a80b9623e1e38a0485c37a13f413499ce48f9bcae69c4d4b289.key -D
- Got a print log. Please see the file
2.node_print.log
- The log shows that connected peers are reduced to 4, half of the original dns number, which is expected.
- Query the latest headers. Node is syncing.
[yx@ip-172-31-37-52 hmy]$ ./hmy blockchain latest-headers
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"beacon-chain-header": {
"block-header-hash": "0xc56b6221fd7e215a6762d2aec8a7c6dbcd371af758498148bc7a464a556174b3",
"block-number": 10066,
"epoch": 0,
"shard-id": 0,
"view-id": 10065
},
"shard-chain-header": {
"block-header-hash": "0x2e20b98ce7a9e21ac156bfad2298db17c85ae0a73a447319571f26abe8e81894",
"block-number": 7408,
"epoch": 0,
"shard-id": 1,
"view-id": 7407
}
}
}
Test passed