aboutsummaryrefslogtreecommitdiffstats
path: root/dex/sync.go
Commit message (Collapse)AuthorAgeFilesLines
* dex: replace NodeMeta with ENR (#132)Sonic2019-04-091-29/+31
|
* core, dex: polish sync (#75)Sonic2019-04-091-1/+7
| | | | | | | | | | | | | | | - 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.
* dex: replace total difficulty with block number (#73)Sonic2019-04-091-7/+8
| | | | | | | 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.
* dex: use dex/downloader in dexSonic2019-04-091-1/+1
| | | | | To compatible with ethereum code base, make Downloader a interface in internal/ethapi
* dex: redesign p2p network topologySonic2019-04-091-2/+93
| | | | | | | | | | - Let p2p server support direct connection and group connection. - Introduce node meta table to maintain IP of all nodes in node set, in memory and let nodes in the network can sync this table. - Let peerSet able to manage direct connections to notary set and dkg set. The mechanism to refresh the network topology when configuration round change is not done yet.
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-5/+5
|
* Change package name from eth to dexSonic2019-04-091-1/+1
|
* Copy codebase from ethSonic2019-04-091-0/+217