aboutsummaryrefslogtreecommitdiffstats
path: root/dex/downloader
Commit message (Collapse)AuthorAgeFilesLines
* core: add GovUtil to unify governance state related accessWei-Ning Huang2019-09-171-4/+4
| | | | | 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-173-6/+5
| | | | gitlab.com/tangerine-network/tangerine-consensus
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-1711-86/+86
|
* dex/downloader: fix find common ancestor (#376)Sonic2019-06-151-2/+2
|
* dexcon: correctly fine DKGSet for not producing blocks (#325)Wei-Ning Huang2019-06-151-1/+1
|
* backport from v1.8.23 (#304)Sonic2019-06-134-57/+237
| | | | | | | | | | | | | | | | | | * 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
* core/vm: remove round from addDKG functions (#279)Jimmy Hu2019-06-131-3/+3
| | | | | | | | * vendor: sync to latest core * core/vm: remove addDKG functions * core: fix conflict
* consensus: dexcon: disqualify dead node (#280)Wei-Ning Huang2019-06-131-0/+4
| | | | | | | | | | 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.
* dex, dex/downloader: remove some TODO comments (#232)Sonic2019-06-123-4/+1
|
* core: vm: flatten governanceWei-Ning Huang2019-06-122-61/+26
|
* dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg (#188)Sonic2019-06-123-10/+10
| | | | | | | | | * 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
* consensus: dexcon: snapshot round height when finalizing block (#170)Wei-Ning Huang2019-06-121-9/+0
| | | | Instead of having BP to send a tx to register the round height, just modify the state when finalizing block.
* core, dex/downloader: polish headers verification and blocks insertion logic ↵Sonic2019-06-123-32/+217
| | | | | | | | (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon.
* dex/downloader: fix bug when syncing (#106)Sonic2019-06-121-2/+13
| | | | | Since blocks will interleave around round change, we will probably need to verify blocks at previous round.
* dex: replace total difficulty with block number (#73)Sonic2019-06-124-87/+67
| | | | | | | 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.
* Fix lintWei-Ning Huang2019-06-122-8/+8
|
* dex/downloader: fix testsSonic2019-06-122-242/+114
|
* core, dex, downloader: refactor governanceSonic2019-06-121-109/+33
|
* core, dex, dex/downloader: restore insertChain to upstream versionSonic2019-06-121-6/+6
| | | | | Also rename InsertChain2, insertChain2, InsertHeaderChain2, ValidateHeaderChain2
* dex: implement downloader for dexSonic2019-06-127-72/+391
| | | | | | | | | | | We need governance state to verify block's signature (randomness), but in ethereum fast sync mode, eth downloader only downloads the whole state of pivot block, so we don't have governance state to verify the downloaded block that is before pivot block if we don't processing transaction. To avoid running transactions, dex downloader also downloads the governance state (merkle proof and storage) at snapshot height of each round, so that we can verify blocks in fast sync mode.
* dex: copy fetcher and downloader from ethSonic2019-06-1212-0/+5871