Сryptocurrency development analysis

# Expected behavior
The live notification about changed headers should reach all of the connected Peers to provide the live network update. Otherwise, relying on the headers while selecting matching broadhash peers / calculating Consensus is not reliable and another mechanism of propagating headers needs to be used.
### Actual behavior
In the current < 1.0.0-alpha.0 < 1.0.0-beta.8 implementation, the headers might be propagated in 2 ways: #### 1. Live update `rpc.updateMyself` - push notification about headers every time when a new block is being applied. https://github.com/LiskHQ/lisk/blob/ffd881c40885bc8ee41bbbea698338fb380c5cc7/modules/transport.js#L380 100 random peers are being selected to update their headers. The push notification about changed headers doesn't reach all of the peers - Peers List can possibly contain much more. If Peers List contains 200 peers, we are notifying only 50 % of the network. The data we are relying on while calculating Consensus or selecting Peers to communicate with is outdated. #### 2. Discovery process Discover new peeers every 30 sec process that: - gathers data about new peers in the network (`rpc.list`), - reconnects to disconnected peers to re-establish a previously broken connection. Every newly discovered Peer is being added to Peers List with `DISCONNECTED` state. Later on, every peer (not only the newly added ones) is being reached and being asked about its headers: https://github.com/LiskHQ/lisk/blob/development/modules/peers.js#L807. Up to 100 random peers will be updated. The same problem occurs - Peers List can possibly contain much more. ### Steps to reproduce Test headers propagation ### Which version(s) does this affect? (Environment, OS, etc...) 1.0.0-alpha.0 < 1.0.0-beta.8

Добавить комментарий