BitShares Forum

Main => General Discussion => Topic started by: Fox on July 21, 2014, 03:31:09 pm

Title: Troubleshooting: Fork, Failed Block Production
Post by: Fox on July 21, 2014, 03:31:09 pm
I am interested in the procedure for troubleshooting missed block production and a fork. 

Case in point, block 20559:

Code: [Select]
blockchain_list_forks
...
20559
     4615a246a6b2e0ea88050c12a1989f914c631ac4                           fox              2       616 2014-07-21T15:10:40         0     YES                  NO
     36e26346e56e443d0beb50dcb44bb7bfd204acc6                          lion              1       390 2014-07-21T15:10:20        22     YES                 YES
...

In this mammalian quadruped battle for block production supremacy, the lion does best the fox even though showing up with a latency of 22 and fewer transactions. 

Is someone willing to enumerate the requisite steps to troubleshoot the blockchain production with me?
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: bytemaster on July 21, 2014, 03:42:21 pm
In this particular case, network propagation caused the producer of block 20560 to receive the block from lion before the block from fox even though from the perspective of fox (and my node) lion was late and fox was on time. 



Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: bytemaster on July 21, 2014, 03:42:54 pm
In this particular case, network propagation caused the producer of block 20560 to receive the block from lion before the block from fox even though from the perspective of fox (and my node) lion was late and fox was on time.

Does anyone have a node that shows lion with low latency?   
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: HackFisher on July 21, 2014, 03:46:47 pm
Add this node to your delegate node

Code: [Select]
network_add_node "5.101.106.138:60713" add
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Fox on July 21, 2014, 03:47:27 pm
In this particular case, network propagation caused the producer of block 20560 to receive the block from lion before the block from fox even though from the perspective of fox (and my node) lion was late and fox was on time.

Does anyone have a node that shows lion with low latency?   

What command(s) shall I execute to perform the latency test of lion? 
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: bytemaster on July 21, 2014, 03:48:59 pm
In this particular case, network propagation caused the producer of block 20560 to receive the block from lion before the block from fox even though from the perspective of fox (and my node) lion was late and fox was on time.

Does anyone have a node that shows lion with low latency?   

What command(s) shall I execute to perform the latency test of lion?

Latency is on a per-block basis.. you already shows your latency was 22 seconds for lions block.

I would recommend increasing the desired number of nodes you are connected to in order to minimize latency.
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Fox on July 21, 2014, 04:26:37 pm
I would recommend increasing the desired number of nodes you are connected to in order to minimize latency.

Code: [Select]
network_set_advanced_node_parameters { "peer_connection_retry_timeout": 30, "desired_number_of_connections": 50, "maximum_number_of_connections": 100 }
Currently --- there are now 23 active connections to the p2p network
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Harvey on July 21, 2014, 05:22:46 pm
I installed ntpd on the server of the delegate lion.
Hope it will reduce the latency.
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Harvey on July 22, 2014, 03:50:18 am
After I install the ntpd and add the server 0.asia.pool.ntp.org, my delegates still have 7 seconds latency compare to the network.
Check it out:

Code: [Select]
harvey (unlocked) >>> getinfo
{
  "blockchain_head_block_num": 24750,
  "blockchain_head_block_age": "7 seconds in the future",
  "blockchain_head_block_timestamp": "20140722T034610",
  "blockchain_average_delegate_participation": 97.115384615384613,
  "blockchain_delegate_pay_rate": 230755,
  "blockchain_blocks_left_in_round": 96,
  "blockchain_confirmation_requirement": 1,
  "blockchain_accumulated_fees": "279,121.57802 BTSX",
  "blockchain_share_supply": 199972087824121,
  "blockchain_random_seed": "c76adb033d918e656613f24c6965d2b36d48e751",
  "blockchain_database_version": 115,
  "blockchain_version": 109,
  "network_num_connections": 18,
  "network_num_connections_max": 100,
  "network_protocol_version": 104,
  "ntp_time": null,
  "ntp_error": null,
  "wallet_open": true,
  "wallet_unlocked": true,
  "wallet_unlocked_until": "31 years  in the future",
  "wallet_unlocked_until_timestamp": "19100221T114701",
  "wallet_block_production_enabled": true,
  "wallet_next_block_production_time": "77 seconds in the future",
  "wallet_next_block_production_timestamp": "20140722T034720",
  "wallet_version": 100
}

The age of last lock is:
Code: [Select]
"blockchain_head_block_age": "7 seconds in the future"
And the ntp_time display:
Code: [Select]
"ntp_time": null,
 "ntp_error": null,

My vps is a 2GB digitalocean node locates in Singapore. Any suggestion will be really appreciated.
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Fox on July 22, 2014, 04:26:40 am
Here is a snipit from a post I made elsewhere:
My experience is with Ubuntu.

Code: [Select]
sudo apt-get install ntp
Add some servers to the config file:
Code: [Select]
sudo nano /etc/npd.confserver ntp.ubuntu.com
server pool.ntp.org
Title: Re: Troubleshooting: Fork, Failed Block Production
Post by: Harvey on July 22, 2014, 08:49:24 am
I found the reason, the ntp servers are down for all Digitalocean nodes in Singapore.
https://www.digitalocean.com/community/questions/droplet-in-singapore-can-t-sync-ntp-server