aboutsummaryrefslogtreecommitdiffstats
path: root/dex/downloader
Commit message (Collapse)AuthorAgeFilesLines
* core: vm: refactor file structurejm2019-02-193-3/+3
| | | | | For support other vm types, this pr modified the core/vm file structures.
* dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg (#188)Sonic2019-02-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-01-241-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 ↵Sonic2019-01-243-32/+217
| | | | | | | logic (#168) Refactor GenerateDexonChain function, move governance tx logic to the user of GenerateDexonChain (testchain_test.go) and move fake node set code to FakeDexcon.
* Revert "core: vm: refactor file structure (#151)"Wei-Ning Huang2019-01-173-3/+3
| | | | This reverts commit 020c8a477578cef3764b54f33d9ca0cf6caf7631.
* core: vm: refactor file structure (#151)JM2019-01-153-3/+3
| | | | For support other vm types, this pr modified the core/vm file structures.
* dex/downloader: fix bug when syncing (#106)Sonic2018-12-281-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)Sonic2018-12-194-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 Huang2018-12-192-8/+8
|
* dex/downloader: fix testsSonic2018-12-192-242/+114
|
* core, dex, downloader: refactor governanceSonic2018-12-191-109/+33
|
* core, dex, dex/downloader: restore insertChain to upstream versionSonic2018-12-191-6/+6
| | | | | Also rename InsertChain2, insertChain2, InsertHeaderChain2, ValidateHeaderChain2
* dex: implement downloader for dexSonic2018-12-197-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 ethSonic2018-12-1912-0/+5871