aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/oracle_contracts_test.go
Commit message (Collapse)AuthorAgeFilesLines
* core: add p2p whitelist for consortiumJhih-Ming Huang2019-09-171-0/+191
|
* params: update testnet config and dMomentWei-Ning Huang2019-09-171-1/+1
|
* core: add GovUtil to unify governance state related accessWei-Ning Huang2019-09-171-2/+2
| | | | | Add GovUtil so we could use the same logic in everywhere that requires access to governance state, such as configuration and CRS.
* import: switch consensus core to ↵Wei-Ning Huang2019-09-171-7/+7
| | | | gitlab.com/tangerine-network/tangerine-consensus
* core: vm: update governance test suite nameWei-Ning Huang2019-09-171-20/+20
|
* core: vm: remove opRand and use oracle contract to get random numberJhih-Ming Huang2019-09-171-0/+48
|
* core: set block timestamp to second instead of millisecondWei-Ning Huang2019-09-171-1/+1
|
* core: vm: add updateNodeInfo governance methodWei-Ning Huang2019-09-171-0/+24
|
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-14/+14
|
* core: vm: prevent replace duplicate nodeKeyWei-Ning Huang2019-09-171-0/+16
|
* core: vm: fix payFine functionWei-Ning Huang2019-09-171-0/+8
|
* core: vm: implement transferNodeOwnershipByFoundation (#399)Wei-Ning Huang2019-06-151-0/+34
|
* core: vm: fix node offset during transfer (#377)Wei-Ning Huang2019-06-151-11/+7
|
* core: vm: add withdrawable (#373)Jimmy Hu2019-06-151-0/+19
|
* core: vm: prevent setting owner to blackhole (#366)Jimmy Hu2019-06-151-1/+13
| | | | | | * core: vm: prevent setting owner to blackhole * core: vm: same for transferNodeOwner
* core: implement DKG success (#362)Jimmy Hu2019-06-151-1/+15
| | | | | | | | * vendor: sync to latest core * core: implmenet dkg success * cmd: govtool: add DKGSuccess
* core: vm: improve MPK reverse lookup performanceWei-Ning Huang2019-06-151-2/+4
| | | | | By storing array offset in the original DKGMasterPublicKeyProposed map, we can locate MPK by proposer ID easily.
* core: vm: fineFailStopDKG if MPK not registered (#329)Jimmy Hu2019-06-151-0/+1
| | | | | * core: vm: fineFailStopDKG if MPK not registered * prevent on-chain randomness
* core: vm: implement node public key replacement (#324)Wei-Ning Huang2019-06-151-1/+30
|
* core: vm: make fail stop fine value configurable (#312)Wei-Ning Huang2019-06-151-16/+13
| | | | A node is now quailified only if it has no pending fine and staked >= minstake.
* core: merge notarySet and DKGSet (#265)Jimmy Hu2019-06-151-16/+6
| | | | | | | | * vendor: sync to latest core * core: merge notarySet and dkgSet * dex: optimize network traffic for finalized block
* core: vm: fix DKG reset (#296)Wei-Ning Huang2019-06-131-3/+1
|
* core: vm: deny duplicate public key from registering (#289)Wei-Ning Huang2019-06-131-0/+7
|
* consensus: dexcon: disqualify dead node (#280)Wei-Ning Huang2019-06-131-28/+60
| | | | | | | | | | Since a qualified node might fail stopped, we need to remove them from qualified nodes to maintain network integrity. We do this by inspect the previous round to see if there are dead nodes. A dead node is a notary set node that does not propose any block in the previous round. We disqualify them by fining them so their staked value is 1 wei below minStake. This make them unqualified for being notary set in the follow on rounds.
* core: vm: emit event when transfering owner (#277)Wei-Ning Huang2019-06-131-0/+14
|
* core: vm: automatically calculate notary set size (#276)Wei-Ning Huang2019-06-131-4/+4
|
* core: vm: add extra checks to prevent DKG spamming (#272)Wei-Ning Huang2019-06-121-2/+15
| | | | Add two maps to check the uniqueness of DKGMasterPublicKey and DKGComplaints to prevent malicious actors from spamming it.
* core: vm: fix naming consistencyWei-Ning Huang2019-06-121-2/+2
|
* dex: implement recovery mechanism (#258)Wei-Ning Huang2019-06-121-1/+1
| | | | | | | | | * dex: implement recovery mechanism The DEXON recovery protocol allows us to use the Ethereum blockchain as a fallback consensus chain to coordinate recovery. * fix
* core: vm: group min gas price with related state variables (#257)Wei-Ning Huang2019-06-121-2/+2
|
* core: vm: implement transfer node ownership (#255)Wei-Ning Huang2019-06-121-0/+33
|
* core: vm: create new oracle contract instance in each call (#251)Wei-Ning Huang2019-06-121-2/+10
| | | | | 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-06-121-347/+74
| | | | | | | | | | | | | 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.
* core: vm: expose CRSRound and DKGRound and fix consistency (#236)Wei-Ning Huang2019-06-121-1/+20
|
* core: vm: validate addDKGMasterPublicKey caller properly (#220)Wei-Ning Huang2019-06-121-4/+4
| | | | | | There are two keys in the system: one is the owner's key which is used for stake / unstake. The other is the node key which is used for DKG related operations. We need to allow them to be different so fund renmains safe even if the the node key is lost.
* core: vm: flatten governanceWei-Ning Huang2019-06-121-76/+95
|
* core: Fixed gas price (#205)Jimmy Hu2019-06-121-1/+11
| | | | | | | | | | * core/vm: update abi * core/vm: add MinGasPrice to gov * params: Add MinGasPrice to Config * dex: SuggestPrice from Governance * test: add minGasPrice to genesis.json * core: check underpriced tx * dex: verify with gas price
* core: Remove K, Phi and NumChains from Governance (#198)Jimmy Hu2019-06-121-36/+6
| | | | | | * change default sync_core.sh * vendor: sync to latest core * core: Remove K, Phi and NumChain
* vm: reset DKG (#190)Jimmy Hu2019-06-121-20/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-06-121-0/+1063