Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | dexcon: correctly fine DKGSet for not producing blocks (#325) | Wei-Ning Huang | 2019-04-09 | 7 | -68/+80 |
| | |||||
* | core: vm: implement node public key replacement (#324) | Wei-Ning Huang | 2019-04-09 | 3 | -1/+102 |
| | |||||
* | vendor: sync to latest core (#320) | Jimmy Hu | 2019-04-09 | 25 | -393/+275 |
| | | | | | | | | * vendor: sync to latest core * dex, core: fix conflict x | ||||
* | core: vm: clear DKG the right way (#319) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core/vm: resetDKG if ttoo less qualified (#318) | Jimmy Hu | 2019-04-09 | 1 | -1/+9 |
| | |||||
* | dex: fix a panic (#317) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | params: update bootnode (#316) | Wei-Ning Huang | 2019-04-09 | 1 | -3/+5 |
| | |||||
* | Dockerfile: include bootnode in image | Wei-Ning Huang | 2019-04-09 | 1 | -1/+2 |
| | |||||
* | vendor: sync to latest core | Jimmy Hu | 2019-04-09 | 5 | -81/+121 |
| | |||||
* | core: fix forget connection in resetDKG (#314) | Jimmy Hu | 2019-04-09 | 2 | -1/+12 |
| | |||||
* | core: vm: make fail stop fine value configurable (#312) | Wei-Ning Huang | 2019-04-09 | 5 | -74/+121 |
| | | | | A node is now quailified only if it has no pending fine and staked >= minstake. | ||||
* | dex: fix initial build connection bug (#311) | Jimmy Hu | 2019-04-09 | 2 | -4/+7 |
| | |||||
* | vendor: sync to latest core | Jimmy Hu | 2019-04-09 | 6 | -34/+62 |
| | |||||
* | dex: rebuild connection if dkg reset, core/vm: fix gov (#308) | Jimmy Hu | 2019-04-09 | 5 | -2/+37 |
| | | | | | * dex: rebuild connection if dkg reset * core: vm: fix governance contract | ||||
* | core: vm: update set size on node info change (#307) | Wei-Ning Huang | 2019-04-09 | 1 | -8/+4 |
| | | | | | | * core: vm: update set size on node info change * fix typo | ||||
* | core: merge notarySet and DKGSet (#265) | Jimmy Hu | 2019-04-09 | 32 | -1033/+1064 |
| | | | | | | | | * vendor: sync to latest core * core: merge notarySet and dkgSet * dex: optimize network traffic for finalized block | ||||
* | backport from v1.8.23 (#304) | Sonic | 2019-04-09 | 13 | -88/+435 |
| | | | | | | | | | | | | | | | | | | * dex: backport f6193ad * dex/downloader: backport accc0fa accc0fab 174083c3 * dex: backport 434dd5b * dex: backport 42a914a 0983d02 * dex: backport 48b70ec 31b3334 and some modification * dex/downloader: backport 5f251a6 * dex/downloader: backport 81c3dc7 * dex, dex/downloader: fix typos | ||||
* | dex: do not propose skip block if not in notary set (#303) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+10 |
| | |||||
* | dex: fix missing trie node when fast syncing (#301) | Sonic | 2019-04-09 | 2 | -2/+4 |
| | | | | | | * dex: don't panic when we don't have gov state peer requested * dex: use correct head block Since we are fast syncing, we probably don't have body, receipt, state | ||||
* | core: fix finalize logic (#302) | Jimmy Hu | 2019-04-09 | 2 | -6/+4 |
| | |||||
* | core: set extended round block reward to zero (#298) | Wei-Ning Huang | 2019-04-09 | 5 | -20/+102 |
| | | | | | To discourage DKG set from prolonging the round indefinitely, we set the block reward of the extended round to 0. The gas fee is send to the DEXON governance owner for safe keeping and later used by the foundation. | ||||
* | vendor: sync to latest core (#300) | Jimmy Hu | 2019-04-09 | 11 | -237/+222 |
| | |||||
* | dex: fix deadlock (#299) | Sonic | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: fix DKG reset (#296) | Wei-Ning Huang | 2019-04-09 | 3 | -24/+27 |
| | |||||
* | vendor: sync to latest core (#295) | Wei-Ning Huang | 2019-04-09 | 5 | -118/+175 |
| | |||||
* | Revert "p2p/discover: increase IP address limits (#60)" | Wei-Ning Huang | 2019-04-09 | 1 | -3/+2 |
| | | | | This reverts commit 3ca44e556bd9561b0c6c64c7d3a4f95726c78be8. | ||||
* | dex: skip duplicate vote to reduce gas used (#293) | Wei-Ning Huang | 2019-04-09 | 1 | -27/+45 |
| | |||||
* | dex: fix fast sync in BP mode (#291) | Wei-Ning Huang | 2019-04-09 | 4 | -44/+78 |
| | | | | Start blockproposer only after fast sync is completed (received ChainHead event), so watchcat is not falsely triggered. | ||||
* | dex: reduce msg when broadcast tx (#292) | Sonic | 2019-04-09 | 2 | -19/+51 |
| | | | | | | | | | | Our network topology is different from ethereum, the nodes in notary set will connect each other directly. So there is a waste for flooding tx msgs in notary set. And nodes in notary set are more likely to propose block successfully, it is not useful to broadcast tx msgs to non notary set nodes. This PR will increase some tx confirm latency, but can reduce waste tx msgs a lot. | ||||
* | core/vm: remove round from addDKG functions (#279) | Jimmy Hu | 2019-04-09 | 23 | -365/+1038 |
| | | | | | | | | * vendor: sync to latest core * core/vm: remove addDKG functions * core: fix conflict | ||||
* | core: vm: deny duplicate public key from registering (#289) | Wei-Ning Huang | 2019-04-09 | 2 | -1/+20 |
| | |||||
* | core: vm: pay fine to governance owner and trigger set size recalculation (#288) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+5 |
| | |||||
* | indexer: support fast-sync (#287) | Chung-Yu Liu | 2019-04-09 | 1 | -0/+2 |
| | |||||
* | dex: recieve bp msg when recovery, use atomic to protect the flag (#286) | Sonic | 2019-04-09 | 2 | -17/+19 |
| | |||||
* | dex: ignore acceptableDist when force synchronise (#285) | Sonic | 2019-04-09 | 3 | -5/+23 |
| | |||||
* | consensus: dexcon: disqualify dead node (#280) | Wei-Ning Huang | 2019-04-09 | 11 | -152/+294 |
| | | | | | | | | | | 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: check coinbase for empty block (#282) | Jimmy Hu | 2019-04-09 | 1 | -6/+13 |
| | |||||
* | dex: fix start bp node with empty datadir (#278) | Sonic | 2019-04-09 | 2 | -22/+31 |
| | | | also modify some debug log | ||||
* | core: vm: emit event when transfering owner (#277) | Wei-Ning Huang | 2019-04-09 | 3 | -0/+48 |
| | |||||
* | core: fix headerchain coinbase validation | Wei-Ning Huang | 2019-04-09 | 1 | -2/+7 |
| | | | | Coinbase address is the owner address of the node. | ||||
* | dex: add block confirme latency (#275) | Jimmy Hu | 2019-04-09 | 2 | -0/+3 |
| | |||||
* | core: vm: automatically calculate notary set size (#276) | Wei-Ning Huang | 2019-04-09 | 6 | -27/+126 |
| | |||||
* | dex: do not start watchcat when blockchain is empty (#273) | Wei-Ning Huang | 2019-04-09 | 1 | -4/+8 |
| | |||||
* | core: vm: add extra checks to prevent DKG spamming (#272) | Wei-Ning Huang | 2019-04-09 | 6 | -67/+187 |
| | | | | Add two maps to check the uniqueness of DKGMasterPublicKey and DKGComplaints to prevent malicious actors from spamming it. | ||||
* | core: vm: fix naming consistency | Wei-Ning Huang | 2019-04-09 | 2 | -11/+11 |
| | |||||
* | app: validate gas price while preparing block (#274) | bojie | 2019-04-09 | 2 | -34/+126 |
| | | | | Skip tx which is under price and add test case. Use the key which has balance in test case to run test more correctly. | ||||
* | dex: align recovery dMoment when resuming consensus (#271) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+16 |
| | | | | | | In theory BA should tolerant inconsistant start time between every node. Since the vote cache is limited, we can not keep all the votes and pass them around all nodes. To fix this, we align the next recovery dmoment so nodes start at the same time. | ||||
* | cmd: fix default recovery network RPC URL | Wei-Ning Huang | 2019-04-09 | 1 | -4/+5 |
| | |||||
* | p2p, dex: add debug log (#269) | Sonic | 2019-04-09 | 5 | -18/+68 |
| | |||||
* | core: check reset of dkg types when adding (#268) | Jimmy Hu | 2019-04-09 | 8 | -54/+195 |
| | | | | | | * vendor: sync to latest core * core: check dkg reset | ||||
* | dex: properly shutdown protocol stack (#267) | Wei-Ning Huang | 2019-04-09 | 3 | -6/+12 |
| | |||||
* | dex: properly start and stop the block proposer module (#264) | Wei-Ning Huang | 2019-04-09 | 4 | -19/+11 |
| | | | | Stop blockproposer in the Stop() method of node service so the process doens't hang. | ||||
* | core: vm: reorder minGasPriceLoc | Wei-Ning Huang | 2019-04-09 | 2 | -5/+5 |
| | |||||
* | core: fill in genesis timstamp and remove dMoment from protocol handshake (#263) | Wei-Ning Huang | 2019-04-09 | 10 | -35/+33 |
| | | | | | | Fill in dmoment as genesis block timestamp. This allow us to remove dMoment check from protocol handshake since genesis block hash itself will protect us against different dMoment. | ||||
* | dex: implement recovery mechanism (#258) | Wei-Ning Huang | 2019-04-09 | 32 | -435/+2435 |
| | | | | | | | | | * dex: implement recovery mechanism The DEXON recovery protocol allows us to use the Ethereum blockchain as a fallback consensus chain to coordinate recovery. * fix | ||||
* | app: remove log handler in test (#261) | bojie | 2019-04-09 | 1 | -3/+0 |
| | |||||
* | dex: add meter for agreement result (#260) | Wei-Ning Huang | 2019-04-09 | 1 | -12/+14 |
| | |||||
* | dex: rename lattice to core | Wei-Ning Huang | 2019-04-09 | 7 | -43/+43 |
| | |||||
* | app: set delivered height correctly (#259) | bojie | 2019-04-09 | 1 | -0/+1 |
| | |||||
* | core: vm: group min gas price with related state variables (#257) | Wei-Ning Huang | 2019-04-09 | 4 | -24/+24 |
| | |||||
* | dex: priority for ba vote (#256) | Jimmy Hu | 2019-04-09 | 1 | -0/+17 |
| | | | | | | | | * dex: priority select on vote * More aggressive priority for vote * collect all queuedVotes | ||||
* | core: vm: implement transfer node ownership (#255) | Wei-Ning Huang | 2019-04-09 | 4 | -10/+85 |
| | |||||
* | p2p: report peer counts to datadog (#254) | Cliff Lin | 2019-04-09 | 2 | -0/+4 |
| | |||||
* | core: vm: create new oracle contract instance in each call (#251) | Wei-Ning Huang | 2019-04-09 | 3 | -6/+16 |
| | | | | | 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. | ||||
* | vendor: sync to latest core (#253) | Jimmy Hu | 2019-04-09 | 16 | -138/+742 |
| | |||||
* | core/vm: use core util to get threshold of tsig (#250) | Jimmy Hu | 2019-04-09 | 1 | -3/+4 |
| | |||||
* | params: update testnet config to 40 nodes | Jimmy Hu | 2019-04-09 | 2 | -8/+8 |
| | |||||
* | vendor: sync to latest core and fix conflict | Jimmy Hu | 2019-04-09 | 11 | -211/+276 |
| | |||||
* | params: update taipei bootnode IP | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | p2p/discover: fix peer discovery (#248) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+2 |
| | | | | | | | | | | The refactor in 4cd90e02e23ecf2bb11bcb4bba4fea2ae164ef74 introduced livness checks for nodes. However, the change in 86ec742f975d825f42dd69ebf17b0adaa66542c0 did not properly set the initial liveness check value for verified node. For verified node we should set livenessCheck to 1 initially. Without this change, the node entry will not be properly send to other nodes and the network would be broken. | ||||
* | core: touch verifierCache at 90% of round (#247) | Jimmy Hu | 2019-04-09 | 1 | -2/+35 |
| | |||||
* | app: new app test flow (#244) | bojie | 2019-04-09 | 9 | -70/+2289 |
| | |||||
* | core: vm: remove delegation mechanism (#245) | Wei-Ning Huang | 2019-04-09 | 8 | -1001/+267 |
| | | | | | | | | | | | | | 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. | ||||
* | dex: fetcher: modify parameters to speedup syncing (#239) | Wei-Ning Huang | 2019-04-09 | 3 | -5/+7 |
| | |||||
* | dex: rename IsLatticeSyncing to IsCoreSyncing (#238) | Wei-Ning Huang | 2019-04-09 | 3 | -5/+5 |
| | |||||
* | core: vm: expose CRSRound and DKGRound and fix consistency (#236) | Wei-Ning Huang | 2019-04-09 | 4 | -63/+121 |
| | |||||
* | vendor: sync to latest core (#237) | Jimmy Hu | 2019-04-09 | 6 | -36/+98 |
| | |||||
* | build: ci: extend legacy-evm test timeout to 10m (#235) | JM | 2019-04-09 | 1 | -1/+1 |
| | | | | Since it costs almost 5min on new tests data, this pr extends the timeout to 10min. | ||||
* | Dockerfile.alltools: update Dockerfile for building tools (#234) | Wei-Ning Huang | 2019-04-09 | 2 | -10/+10 |
| | |||||
* | cmd: nodekey: add command to generate and inspect nodekey (#233) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+93 |
| | |||||
* | dex, dex/downloader: remove some TODO comments (#232) | Sonic | 2019-04-09 | 5 | -13/+1 |
| | |||||
* | misc: update dockerignore | Jimmy Hu | 2019-04-09 | 1 | -1/+2 |
| | |||||
* | app: refactor app run as single chain (#226) | bojie | 2019-04-09 | 4 | -290/+161 |
| | |||||
* | test: update test parameters (#229) | Wei-Ning Huang | 2019-04-09 | 5 | -24/+26 |
| | | | | | | * test: update test parameters * update smoke test parameter | ||||
* | vendor: sync to latest core (#231) | Jimmy Hu | 2019-04-09 | 4 | -27/+52 |
| | |||||
* | core: fix dkg | Jimmy Hu | 2019-04-09 | 1 | -12/+47 |
| | |||||
* | params: Change taipei to 40 nodes (#227) | Jimmy Hu | 2019-04-09 | 2 | -4/+4 |
| | |||||
* | vendor: sync to latest core (#225) | Jimmy Hu | 2019-04-09 | 3 | -73/+33 |
| | |||||
* | dex: fill in correct coinbase address (#223) | Wei-Ning Huang | 2019-04-09 | 3 | -723/+19 |
| | | | Also remove app_test.go because of the refactor bojie@ is working on. | ||||
* | params: Update config (#224) | Jimmy Hu | 2019-04-09 | 2 | -10/+10 |
| | | | | | | * params: Update config * Update taipei to 30 nodes setup | ||||
* | core: vm: validate addDKGMasterPublicKey caller properly (#220) | Wei-Ning Huang | 2019-04-09 | 4 | -63/+62 |
| | | | | | | 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 governance | Wei-Ning Huang | 2019-04-09 | 21 | -631/+679 |
| | |||||
* | core: sync to latest core (#214) | Jimmy Hu | 2019-04-09 | 33 | -759/+555 |
| | | | | | * vendor: sync to latest core * fix for single chain | ||||
* | misc: Update Dockerfile | Jimmy Hu | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | test: build bootnode if not exist | Wei-Ning Huang | 2019-04-09 | 1 | -3/+10 |
| | |||||
* | params: add Yilan network (#207) | Mission Liao | 2019-04-09 | 11 | -5/+96 |
| | | | | | | * Add Yilan network * Fixup: remove dummy log | ||||
* | core: Fixed gas price (#205) | Jimmy Hu | 2019-04-09 | 12 | -13/+161 |
| | | | | | | | | | | * 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: set oracle contract's code (#209) | Sonic | 2019-04-09 | 4 | -4/+9 |
| | | | So that other contract can call oracle contract. | ||||
* | fee: fix wrong gas used (#208) | bojie | 2019-04-09 | 1 | -0/+2 |
| | |||||
* | zoo: reduce monkey value | Jimmy Hu | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | core: Remove K, Phi and NumChains from Governance (#198) | Jimmy Hu | 2019-04-09 | 40 | -4707/+1285 |
| | | | | | | * change default sync_core.sh * vendor: sync to latest core * core: Remove K, Phi and NumChain | ||||
* | copy testnet config to taipei | Jimmy Hu | 2019-04-09 | 2 | -9/+9 |
| | |||||
* | misc: add ignore file | Jimmy Hu | 2019-04-09 | 1 | -0/+1 |
| | |||||
* | core/vm: fix getConfigState (#203) | Jimmy Hu | 2019-04-09 | 1 | -4/+3 |
| | |||||
* | vm: reset DKG (#190) | Jimmy Hu | 2019-04-09 | 4 | -70/+562 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 | ||||
* | dex: some minor improvements (#195) | Sonic | 2019-04-09 | 3 | -144/+117 |
| | | | | | | | | | | * dex: improve some msg propagation * dex: support send a batch of lattice blocks, votes, randomnesses To reduce msgs number of PullBlocks, PullVotes, PullRandomness * dex: minor improvement | ||||
* | dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg (#188) | Sonic | 2019-04-09 | 7 | -63/+95 |
| | | | | | | | | | * dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg So that we can dispatch the response msg to fetcher or downloader easily. * fixup! dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg | ||||
* | travis: Add notification to slack | Jimmy Hu | 2019-04-09 | 1 | -0/+3 |
| | |||||
* | p2p, dex: some fixes (#189) | Sonic | 2019-04-09 | 2 | -1/+4 |
| | | | | | * p2p: try resolving direct dial when dial fail * dex: avoid concurrent map read and map write | ||||
* | p2p, dex: rework connection management (#183) | Sonic | 2019-04-09 | 11 | -1084/+424 |
| | | | | | | * p2p, dex: rework connection management * dex: refresh our node record periodically * dex: don't send new record event if no new record | ||||
* | transaction: use all transaction gas to reduce attack intention (#180) | bojie | 2019-04-09 | 2 | -1/+43 |
| | | | The ci test in /tests will use origin evm logic. | ||||
* | vendor, param: sync to latest core and update dmoment (#182) | Jimmy Hu | 2019-04-09 | 3 | -25/+29 |
| | | | | | | * vendor: sync to latest core * params: update dmoment | ||||
* | app: prepare/verify block limit in correct round (#181) | bojie | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | core/vm: modify Withdrawn event and add NodeRemoved event (#179) | Jimmy Hu | 2019-04-09 | 2 | -4/+31 |
| | | | | | | * core/vm: add delegatorAddr to withdrawn event * core/vm: update gov abi * core/vm: add NodeRemoved event | ||||
* | vendor, param: sync to latest core and update testnet config (#178) | Jimmy Hu | 2019-04-09 | 3 | -24/+25 |
| | | | | | * param: update testnet config * vendor: sync to latest core | ||||
* | params: Update taipei config | Jimmy Hu | 2019-04-09 | 1 | -4/+4 |
| | |||||
* | params: update testnet config (#177) | Jimmy Hu | 2019-04-09 | 5 | -96/+164 |
| | | | | | * vendor:sync to latest core * params: Update config for testnet | ||||
* | core: vm: refactor governance and add node info oracle (#174) | Wei-Ning Huang | 2019-04-09 | 6 | -683/+954 |
| | |||||
* | core: vm: Add amount to undelegate event (#176) | Jimmy Hu | 2019-04-09 | 2 | -4/+9 |
| | |||||
* | core: vm: more change to the randomness calculation (#175) | Wei-Ning Huang | 2019-04-09 | 1 | -5/+5 |
| | | | | To prevent attacker from sending TX through a intermediate contract. Always use the original tx sender's adddress and nonce. | ||||
* | core: vm: modify randomness calculation algorithm (#173) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | The original algorithm used for calculating algorithm is vulnerable to cross context re-entry attack. Example as follows: contract B { event Value(uint256 value); uint256 public value; function call() public { value = rand; emit Value(value); } } contract A { function randTwice(address bAddr) public { B b = B(bAddr); b.call.gas(100000)(); b.call.gas(100000)(); } } The two `b.call` will result in the same randomness value. This commit fix the issue by recording a called index used to store how many times opRand is called, and use it as argument to the Keccak call. | ||||
* | consensus: dexcon: snapshot round height when finalizing block (#170) | Wei-Ning Huang | 2019-04-09 | 17 | -279/+332 |
| | | | | Instead of having BP to send a tx to register the round height, just modify the state when finalizing block. | ||||
* | dex: reduce pullVote (#172) | Jimmy Hu | 2019-04-09 | 1 | -2/+3 |
| | |||||
* | ci: move smoke-test to PR test | Wei-Ning Huang | 2019-04-09 | 1 | -17/+17 |
| | |||||
* | ci: Only build on dev and master (#171) | Jimmy Hu | 2019-04-09 | 1 | -0/+4 |
| | |||||
* | dex: Add rate limit for pullVote (#169) | Jimmy Hu | 2019-04-09 | 1 | -7/+21 |
| | |||||
* | core, dex/downloader: polish headers verification and blocks insertion logic ↵ | Sonic | 2019-04-09 | 14 | -625/+1143 |
| | | | | | | | | (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon. | ||||
* | params: Update testnet dmoment | Jimmy Hu | 2019-04-09 | 2 | -2/+2 |
| | |||||
* | params: Update testnet config (#167) | Jimmy Hu | 2019-04-09 | 13 | -79/+122 |
| | | | | | | | | * vendor: sync to latest core * param: update testnet config * params: update dmoment | ||||
* | param: Update testnet dmoment (#166) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | travis: re-encrypt GCP credential file (#165) | bojie | 2019-04-09 | 3 | -3/+3 |
| | |||||
* | params: update testnet dMoment | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | params: update testnet genesis and dMoment | Wei-Ning Huang | 2019-04-09 | 2 | -6/+5 |
| | |||||
* | p2p: report latency and relative latency to datadog (#162) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+14 |
| | |||||
* | travis: add new CI test to test fullnode (#138) | bojie | 2019-04-09 | 10 | -39/+366 |
| | |||||
* | dex: add block number gauge (#140) | haoping-ku | 2019-04-09 | 1 | -18/+25 |
| | |||||
* | core, dex: use block hash as witness data (#160) | Sonic | 2019-04-09 | 7 | -74/+30 |
| | | | | | | | | | | Using only state root and receipt root as witness data can not protect other fields in block header, ex: bloom, difficulty, gas limit, gas used... So that everyone can manipulate these fields to create as many valid blocks at the same height as he want. Although this will not effect the state, one can spam us when syncing. Using block hash as witness data can solve this. | ||||
* | blockchain: add mutex lock to prevent fork (#159) | bojie | 2019-04-09 | 1 | -1/+6 |
| | |||||
* | common: fix big scan from bytes (#157) | johnliu-dexon | 2019-04-09 | 2 | -2/+6 |
| | | | | | | We store string of number, not bytes value into database 10 is stored as 0x3130, not 0x0a Use UnmarshalText instead of SetBytes | ||||
* | core: sync to latest core (#158) | Jimmy Hu | 2019-04-09 | 7 | -47/+63 |
| | | | | | | * vendor: sync to latest core * param: Update config * core: update genesis alloc | ||||
* | params: update testnet dMoment | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | Fix the usage of sync.Map (#156) | Mission Liao | 2019-04-09 | 1 | -4/+2 |
| | |||||
* | app: fix reward bug with empty block (#155) | bojie | 2019-04-09 | 2 | -12/+15 |
| | | | | | | | | * app: fix reward bug with empty block * make block generation consistent * revert change to dmoment in genesis.json | ||||
* | vendor: sync to latest core (#154) | Jimmy Hu | 2019-04-09 | 21 | -344/+891 |
| | | | | | | * vendor: sync to latest core with BA3.0 * params: Update dmoment | ||||
* | test: update dmoment with python script (#153) | Wei-Ning Huang | 2019-04-09 | 1 | -2/+11 |
| | |||||
* | params: update testnet dMoment | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | app: remove pending block logic (#149) | bojie | 2019-04-09 | 14 | -466/+342 |
| | |||||
* | params: write dMoment into ChainConfig (#150) | Wei-Ning Huang | 2019-04-09 | 11 | -36/+42 |
| | |||||
* | core: update taipei alloc | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | params: update genesis config | Wei-Ning Huang | 2019-04-09 | 4 | -25/+30 |
| | |||||
* | test: Update bootnode path | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | params: update bootnode IP | Wei-Ning Huang | 2019-04-09 | 1 | -8/+3 |
| | |||||
* | consensus: implement DEXON cryptoeconomics v4.0 (#145) | Wei-Ning Huang | 2019-04-09 | 17 | -240/+479 |
| | |||||
* | core: vm: add totalSupply and totalStaked in the governance contract (#144) | Wei-Ning Huang | 2019-04-09 | 5 | -37/+146 |
| | | | | | | | Add totalSupply and totalStaked in the governance contract for the preperation of DEXON cryptoeconomics 4.0. Also removed the unstaked variable in node info and improve tests for delegate/undeleate. | ||||
* | core: vm: move governance abi to a separate file (#143) | Wei-Ning Huang | 2019-04-09 | 3 | -1055/+1076 |
| | |||||
* | core: vm: emit events for more governance actions (#142) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+145 |
| | |||||
* | misc: Fix makefile | Jimmy Hu | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | core: update testnet genesis_alloc | Jimmy Hu | 2019-04-09 | 2 | -3/+3 |
| | |||||
* | core: update taipei network genesis alloc | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | indexer: pass network-related params through config (#133) | Meng-Ying Yang | 2019-04-09 | 2 | -0/+14 |
| | | | | | | | | Pass following network related params: * Genesis block * Network ID And sync mode for indexer configuration. | ||||
* | dex: remove unused log (#136) | Sonic | 2019-04-09 | 1 | -4/+0 |
| | | | | | | * fixup! app: use gcp storage instead of azure for builds (#81) * dex: remove unused log | ||||
* | core: fix corner case when initializing round height (#134) | Sonic | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | app: implement logic for prepare/verify correctly when chain number change ↵ | bojie | 2019-04-09 | 8 | -25/+383 |
| | | | | (#118) | ||||
* | dex: replace NodeMeta with ENR (#132) | Sonic | 2019-04-09 | 9 | -255/+236 |
| | |||||
* | travis-ci: fix gcp-linux build (#131) | Wei-Ning Huang | 2019-04-09 | 1 | -3/+0 |
| | |||||
* | core: vm: implement byzantine reporting mechanism (#128) | Wei-Ning Huang | 2019-04-09 | 8 | -100/+719 |
| | |||||
* | params: update taipei genesis config (#130) | Wei-Ning Huang | 2019-04-09 | 2 | -4/+4 |
| | |||||
* | dex: fix test due to consensus-core change | Wei-Ning Huang | 2019-04-09 | 1 | -9/+9 |
| | |||||
* | vendor: sync to latest core (#129) | Wei-Ning Huang | 2019-04-09 | 13 | -90/+104 |
| | |||||
* | vendor: update bls package (#127) | Meng-Ying Yang | 2019-04-09 | 2 | -3/+6 |
| | | | | * Add missing cpp file * Align root and sub folder hash | ||||
* | dex: fix cache error (#126) | Jimmy Hu | 2019-04-09 | 1 | -0/+1 |
| | |||||
* | vendor: sync to latest core (#125) | Jimmy Hu | 2019-04-09 | 10 | -86/+288 |
| | |||||
* | core, indexer, dex: fix DexconApp block deliver after synced (#122) | Sonic | 2019-04-09 | 3 | -15/+16 |
| | | | | | | | When starts a bp node to sync with the network, bc.chainLastHeight map may not be initialized yet. Just return error if we can not get chain last height when preparing payload and verify block. | ||||
* | core: fix vm wrong round height context (#124) | Sonic | 2019-04-09 | 1 | -0/+45 |
| | | | | Let roundHeightMap be corret whenever we starting a bp node. | ||||
* | core: update taipei testnet genesis config and alloc (#119) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+3 |
| | |||||
* | test: update run_test.sh with dmoment | Jimmy Hu | 2019-04-09 | 1 | -0/+4 |
| | |||||
* | vendor: sync to latest core (#121) | Wei-Ning Huang | 2019-04-09 | 2 | -27/+30 |
| | |||||
* | node: increase default max number of peers (#120) | Wei-Ning Huang | 2019-04-09 | 2 | -2/+2 |
| | |||||
* | Indexer plugin extension and custom flags support (#117) | Meng-Ying Yang | 2019-04-09 | 5 | -0/+13 |
| | | | | | | * indexer: ReadOnlyBlockchain returns underlying engine * indexer: plugin configs support custom flags | ||||
* | core: vm: add missing unittests for nodes/delegators (#116) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+13 |
| | |||||
* | travis-ci: fix gcp-linux build (#114) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | | | | The ubuntu trusty distribution binutils-aarch64-linux-gnu package does not contain the gold linker. Use the xenial distribution instead. | ||||
* | params: update taipei testnet genesis and config (#113) | Wei-Ning Huang | 2019-04-09 | 4 | -9/+11 |
| | |||||
* | indexer: ReadOnlyBlockChain returns related configs (#110) | Meng-Ying Yang | 2019-04-09 | 1 | -0/+4 |
| | | | | For restoring mock componenets (such as: VM, Backend, ...etc), blockchain related configs should be exposed. | ||||
* | Sync latest DEXON core (#111) | Mission Liao | 2019-04-09 | 3 | -66/+112 |
| | |||||
* | travis-ci: fix osx build (#112) | Wei-Ning Huang | 2019-04-09 | 1 | -2/+13 |
| | |||||
* | app: use gcp storage instead of azure for builds (#81) | bojie | 2019-04-09 | 377 | -3483/+142209 |
| | | | | | * vendor: add dependencies for using GCP storage * app: use gcp storage instead of azure for builds | ||||
* | core/vm: Add fine to governance. (#107) | Jimmy Hu | 2019-04-09 | 4 | -135/+295 |
| | | | | | | | | * core/vm: Add Fined field to nodeInfo. * core/vm: Add PayFine to Governance * Not qualify if staked-fine < minStake() * Add test for fine * Update genesis hash | ||||
* | Dockerfile: clean bls before build (#109) | Wei-Ning Huang | 2019-04-09 | 2 | -3/+5 |
| | |||||
* | indexer: support data exporting/forwarding (#103) | Meng-Ying Yang | 2019-04-09 | 8 | -0/+190 |
| | | | | | | | | | To support more effective and flexible blockchain info exploring, we add `indexer` package, defines the flow of indexer dameon, and integrate into dex.Dexon fullnode. For more export options, we use Golang built-in `plugin` package to support mulitple implementations. | ||||
* | vendor: sync dexon-foundation/bls to latest dev (#108) | Wei-Ning Huang | 2019-04-09 | 4 | -32/+10 |
| | |||||
* | dex/downloader: fix bug when syncing (#106) | Sonic | 2019-04-09 | 1 | -2/+13 |
| | | | | | Since blocks will interleave around round change, we will probably need to verify blocks at previous round. | ||||
* | cmd/monkey: change feeder gas limit | Jimmy Hu | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | dex: add pull randomness (#105) | Jimmy Hu | 2019-04-09 | 16 | -167/+361 |
| | | | | | * vendor: sync to latest core * dex: Add PullRandomness | ||||
* | common: add utilities for Big type (#104) | Meng-Ying Yang | 2019-04-09 | 1 | -0/+6 |
| | | | | | - Add String() for common usage which call original `big.Int`'s `String()` - Add ToBigInt() for type convertion | ||||
* | core: add database/sql support for more types (#102) | Meng-Ying Yang | 2019-04-09 | 4 | -9/+243 |
| | | | | | | | | | * core: types: add database/sql support for BlockNonce * common: add database/sql support with Big New Big type is declared to let big.Int support database/sql by implementing Scan() and Value() on new type. | ||||
* | vendor: sync DEXON core and fix conflicts/missings (#101) | Mission Liao | 2019-04-09 | 15 | -311/+366 |
| | | | | | | | Merging these commits in DEXON consensus core: - https://github.com/dexon-foundation/dexon-consensus/commit/dce509a13ef5873b9cae3c1cabdb97e219b6fb7d - https://github.com/dexon-foundation/dexon-consensus/commit/6d1c1aeea0d3e75d10cbb2712c68b4c422ba8ba6 - https://github.com/dexon-foundation/dexon-consensus/commit/c1ed57c4abaf1f4758e52f082bb7114ad00c8b39 | ||||
* | params: enable constantinople fork for testnets | Wei-Ning Huang | 2019-04-09 | 1 | -1/+2 |
| | |||||
* | monkey: add ERC20 token transfer (#99) | johnliu-dexon | 2019-04-09 | 4 | -4/+125 |
| | | | | Add ERC20 token (Banana) and feeder Fix call contract parameters | ||||
* | README.md: clarify licensing terms (#100) | Wei-Ning Huang | 2019-04-09 | 1 | -0/+2 |
| | |||||
* | core/types: SigCache with a limited size (#98) | Jimmy Hu | 2019-04-09 | 2 | -21/+33 |
| | | | | | | * core/types: SigCache with a limited size * minor tweaks | ||||
* | core, dex, internal: block proposer syncing (first iteration) (#96) | Sonic | 2019-04-09 | 12 | -100/+1199 |
| | | | | | | | | | | | | | | | | | | | | | | * dex, internal: block proposer syncing (first iteration) * core: find block from db if not in memory This fix handles stopping proposing and then restarting * core: no need to reorg when reset Dexon will not fork. This commit also fix when a block confirm but its parent is not in db yet, during restarting proposing. * dex: always accept NewBlockMsg, NewBlockHashesMsg We need to accept NewBlockMsg, NewBlockHashesMsg to sync current block with other peers in block proposer mode when syncing lattice data. It's a waste when the node is synced and start proposing. Todo: control msg processing on/off more granular, accept NewBlockMsg, NewBlockHashesMsg when syncing, but stop when synced. | ||||
* | core: vm: Add `MPKReady` to governance (#97) | Jimmy Hu | 2019-04-09 | 19 | -88/+481 |
| | | | | | | * core/vm: Add DKGMPKReady * param: update GenesisHash * vendor: sync to latest core | ||||
* | core/vm: fix nodes method in governance | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | dex: remove duplicate declaration of WitnessData (#92) | Wei-Ning Huang | 2019-04-09 | 4 | -21/+3 |
| | | | | Remove duplicate declaration of WitnessData and remove the TxHash field in witness data since it does not need to be witnessed. | ||||
* | cmd/monkey: decrease Distribute amount to 100 DXN | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: vm: add undelegate fund lockup mechanism (#94) | Wei-Ning Huang | 2019-04-09 | 6 | -45/+251 |
| | | | | | Only allow a user to withdraw funds after a certain lockup period. This way, the fund of a bad actor could be confiscated before he could escape. | ||||
* | core: update genesis alloc | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | dex: stop consensus core (#93) | Jimmy Hu | 2019-04-09 | 1 | -0/+1 |
| | |||||
* | vendor: sync to latest core (#91) | Mission Liao | 2019-04-09 | 15 | -117/+563 |
| | | | | | | - Implement new methods in db to cache DKG private key. - Implement new methods in db to cache compaction chain tip. | ||||
* | vendor: sync to latest core and fix conflict | Jimmy Hu | 2019-04-09 | 17 | -234/+359 |
| | |||||
* | dex, cmd: Add DMoment to command line (#87) | Jimmy Hu | 2019-04-09 | 4 | -6/+20 |
| | |||||
* | cache: prune cache correctly (#88) | bojie | 2019-04-09 | 1 | -2/+1 |
| | |||||
* | ci: auto retry test (#89) | Jimmy Hu | 2019-04-09 | 1 | -3/+3 |
| | |||||
* | app: remove unnecessary code (#86) | bojie | 2019-04-09 | 2 | -15/+3 |
| | |||||
* | core: governance interface should return correct DKG master public keys (#85) | Wei-Ning Huang | 2019-04-09 | 2 | -24/+21 |
| | |||||
* | dex: Pull blocks from blockdb if cache miss (#84) | Jimmy Hu | 2019-04-09 | 3 | -4/+40 |
| | |||||
* | Update README.md (#83) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | ci: migrate to travis-ci.org (#82) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | Dockerfile: fix path and dependency (#80) | s60912frank | 2019-04-09 | 1 | -2/+2 |
| | | | | | | | | * Dockerfile: fix path and dependency * Update Dockerfile Co-Authored-By: s60912frank <s60912frank@gmail.com> | ||||
* | vendor: sync to latest core and fix conflict (#79) | Jimmy Hu | 2019-04-09 | 6 | -99/+272 |
| | |||||
* | app: return retry later instead of retry with sleep time (#78) | bojie | 2019-04-09 | 1 | -31/+22 |
| | |||||
* | core, dex: polish sync (#75) | Sonic | 2019-04-09 | 7 | -8/+82 |
| | | | | | | | | | | | | | | | - Broadcasting blocks at chain head event is not correct when the full node is not running in block proposer mode. Introduce NewFinalizedBlockEvent, this event is post by the full node which runs in block proposer mode when a block is witnessed and resulting in some blocks are considered finalized. - Non block proposer node will still broadcast blocks at the following moment (same as ethereum): 1. a sync with a peer is terminated successfully 2. a block passes the fetcher's header check during inserting blocks 3. a block is successfully inserted by fetcher - Don't trigger a sync when we are not behind other peers more than acceptable distance. Fetcher is able to cover this. | ||||
* | README.md: add gitter.im badges (#77) | Wei-Ning Huang | 2019-04-09 | 1 | -2/+3 |
| | | | | | * README.md: add gitter.im badges * Update README.md | ||||
* | app: misc fixes (#76) | bojie | 2019-04-09 | 1 | -50/+30 |
| | | | | Use sync map to prevent concurrent read write. Use last pending state to prepare/verify transactions. | ||||
* | dex: replace total difficulty with block number (#73) | Sonic | 2019-04-09 | 10 | -177/+143 |
| | | | | | | | In dexon, we don't "mine" and the blockchain won't and shouldn't fork, so there is no difficulty concept, just replace it with block number. Note: this commit only replace total difficulty related logic and code in dex, dex/downloader package. | ||||
* | core, dex: Timeout for prepare payload (#72) | Jimmy Hu | 2019-04-09 | 3 | -8/+68 |
| | | | | | | * Timeout on prepare payload * Leave 2 CPU for others * Add hardLimit and softLimit to PreparePayload | ||||
* | dex: use whole id to query peer info (#74) | Sonic | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | app: add app test case and benchmark (#66) | bojie | 2019-04-09 | 6 | -32/+991 |
| | |||||
* | monkey: increase amount and send random amount (#70) | Jimmy Hu | 2019-04-09 | 1 | -2/+4 |
| | |||||
* | vendor: update to latest core (#71) | Jimmy Hu | 2019-04-09 | 10 | -248/+138 |
| | |||||
* | dex: verify header that imported from fetcher (#68) | Sonic | 2019-04-09 | 2 | -1/+5 |
| | |||||
* | README.md: update CI badge (#67) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: fix tests (#65) | Wei-Ning Huang | 2019-04-09 | 4 | -15/+12 |
| | |||||
* | travis-ci: disable builders (#64) | Wei-Ning Huang | 2019-04-09 | 1 | -161/+161 |
| | | | | Disable automatic builds for now until we come up with a better solution. | ||||
* | Fix lint | Wei-Ning Huang | 2019-04-09 | 14 | -114/+119 |
| | |||||
* | test: improve keygen.go (#62) | Wei-Ning Huang | 2019-04-09 | 9 | -13/+67 |
| | |||||
* | core: Update genesis alloc. (#63) | Jimmy Hu | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | core: panic if fork found when inserting header chain (#61) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+6 |
| | |||||
* | p2p/discover: increase IP address limits (#60) | Sonic | 2019-04-09 | 1 | -2/+3 |
| | |||||
* | internal/ethapi: add transactionHash in blockreceipts (#58) | johnliu-dexon | 2019-04-09 | 1 | -0/+1 |
| | |||||
* | dex: add metrics (#54) | Sonic | 2019-04-09 | 1 | -32/+84 |
| | |||||
* | Makefile: add libbls to test target dependencies (#57) | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | cmd: fix tests (#55) | bojie | 2019-04-09 | 4 | -15/+19 |
| | |||||
* | internal/ethapi: add getBlockReceiptsByHash (#56) | johnliu-dexon | 2019-04-09 | 2 | -0/+55 |
| | | | | | | | | | | * dex: add getBlockReceiptsByHash add rpc method for performance acceleration * Update internal/ethapi/api.go Co-Authored-By: johnliu-dexon <42129254+johnliu-dexon@users.noreply.github.com> | ||||
* | test: add local bootnode (#53) | Jimmy Hu | 2019-04-09 | 1 | -0/+6 |
| | | | | | | * test: add local bootnode * Update run_test.sh | ||||
* | tests: updates testadata | Wei-Ning Huang | 2019-04-09 | 5 | -8/+38 |
| | |||||
* | tests: fix tests | Wei-Ning Huang | 2019-04-09 | 3 | -4/+13 |
| | |||||
* | node: fix tests | Wei-Ning Huang | 2019-04-09 | 1 | -2/+2 |
| | |||||
* | miner: fix test | Wei-Ning Huang | 2019-04-09 | 1 | -1/+1 |
| | |||||
* | dex/downloader: fix tests | Sonic | 2019-04-09 | 2 | -242/+114 |
| |