aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/oracle.go
Commit message (Collapse)AuthorAgeFilesLines
* core: vm: create new oracle contract instance in each call (#251)Wei-Ning Huang2019-04-091-3/+5
| | | | | Since the VM might be called from different source (downloader, RPC, etc.). We need to make the call state separate. Modify the calling sequence so a new oracle contract instance is used on each run.
* core: vm: remove delegation mechanism (#245)Wei-Ning Huang2019-04-091-4/+0
| | | | | | | | | | | | | The current delegation mechanism are prone to unstaking attack. i.e. a malicious attacker could unstake a small amount from a lot of node it staked before and make them unqualified, which leads to potential failure of the network. Since DEXON does not use consensus like DPoS, node is required to have at least MinStake in order to become a node. Voting mechanism is not required in our system since qualified node does not depends on the number of votes. Instead of managing the delegation mechanism in governance contract, we should let the owner manage the delegation and reward distribution mechanism on their own.
* vm: reset DKG (#190)Jimmy Hu2019-04-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm: Update gov abi * vm: Add DKGResetCount to state helper * vm: add getter * vm: Add DKGReset event * vm: Add resetDKG method * vm: check resetDKG criteria * vm: Add new CRS * vm: add helper pop2DByteArray * vm: emit event * vm: Add CoreMock to GovernanceContract * vm: bug fix * add test for resetDKG * vm: Add test * fix test * Modify mock interface
* core: vm: refactor governance and add node info oracle (#174)Wei-Ning Huang2019-04-091-0/+88