For view change, the view change ID is the key to determine which node
will be next leader. In our original algorithm, the view ID always increased one step
at a time. The view change period increased exponetially based on the square of
the gap between current view changing ID and previous known block view change ID.
However, it is very slow to converge the view change if multiple nodes are offline and
view change can't be reached. Especially, during the shard down event, multiple nodes
are offline and other nodes have advanced their current view changing ID.
The new time-baed synchronuous view change algorithm uses the local timestamp and
the timestamp of the block to calculate the expected view changing ID. In this case,
offline nodes can immediately catch up with the latest view changing ID as long as
the offline nodes have the latest sync'ed block and relatively acturate local
clock. This algorithm will converge the view change faster in one or two view change
duration.
Signed-off-by: Leo Chen <leo@harmony.one>
* [rosetta] Fix pre-staking rewards with GetPreStakingBlockRewards
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [hmy] Refactor GetDetailedBlockSignerInfo to use availability
* Add GetPreStakingBlockRewards with cache
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Fix prestaking block reward unit tests
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Report tx fees of coinbase for prestaking rewards
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
* [rosetta] Update docker file name in readme
* [rosetta] Print node version when running node using docker
* [rosetta] Make docker image smaller & update README.md
Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
In case of ntp server is busy, we added the following
protection.
* increase timeout of ntp query
* ignore timeout error for ntp query
Signed-off-by: Leo Chen <leo@harmony.one>