aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/utils.go
Commit message (Collapse)AuthorAgeFilesLines
* Revert "core: consider reset round when getting config state"Wei-Ning Huang2019-09-171-33/+7
| | | | This reverts commit 01cb8de88b0697879cc366e3ee962c9523dfcc14.
* core: consider reset round when getting config stateWei-Ning Huang2019-09-171-7/+33
| | | | | | | | | | | | | | | | | | Previous config snapshot is determined as follows, for round n: Return the snapshot state of round (n - ConfigRoundShift) However this may cause the system to stuck at a particular round if the DKG for the next round continues to fail (maybe due to node failure). To fix this, instead of using the simple logic above, we consider the reset rounds as a normal round, and use the snapshot of the reset rounds as config. Thus we could gradually push out the broken nodes from nodeset. The snapshot is now determined as follows, for round n: If resetCount < ConfigRoundShift Return the snapshot state of round (n - ConfigRoundShift) Else Reutrn the stateshot state of (n + resetCount - ConfigRoundShift)
* core: add GovUtil to unify governance state related accessWei-Ning Huang2019-09-171-0/+92
Add GovUtil so we could use the same logic in everywhere that requires access to governance state, such as configuration and CRS.