aboutsummaryrefslogtreecommitdiffstats
path: root/dex/peer.go
Commit message (Collapse)AuthorAgeFilesLines
* core: merge notarySet and DKGSet (#265)Jimmy Hu2019-04-091-84/+17
| | | | | | | | * vendor: sync to latest core * core: merge notarySet and dkgSet * dex: optimize network traffic for finalized block
* backport from v1.8.23 (#304)Sonic2019-04-091-0/+5
| | | | | | | | | | | | | | | | | | * 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: reduce msg when broadcast tx (#292)Sonic2019-04-091-15/+0
| | | | | | | | | | 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.
* p2p, dex: add debug log (#269)Sonic2019-04-091-18/+25
|
* core: fill in genesis timstamp and remove dMoment from protocol handshake (#263)Wei-Ning Huang2019-04-091-7/+3
| | | | | | 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: rename lattice to coreWei-Ning Huang2019-04-091-11/+11
|
* dex: priority for ba vote (#256)Jimmy Hu2019-04-091-0/+17
| | | | | | | | * dex: priority select on vote * More aggressive priority for vote * collect all queuedVotes
* dex: fetcher: modify parameters to speedup syncing (#239)Wei-Ning Huang2019-04-091-2/+3
|
* core: sync to latest core (#214)Jimmy Hu2019-04-091-20/+17
| | | | | * vendor: sync to latest core * fix for single chain
* dex: some minor improvements (#195)Sonic2019-04-091-79/+60
| | | | | | | | | | * 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)Sonic2019-04-091-17/+20
| | | | | | | | | * 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
* p2p, dex: some fixes (#189)Sonic2019-04-091-0/+3
| | | | | * p2p: try resolving direct dial when dial fail * dex: avoid concurrent map read and map write
* p2p, dex: rework connection management (#183)Sonic2019-04-091-298/+165
| | | | | | * p2p, dex: rework connection management * dex: refresh our node record periodically * dex: don't send new record event if no new record
* params: write dMoment into ChainConfig (#150)Wei-Ning Huang2019-04-091-3/+7
|
* dex: replace NodeMeta with ENR (#132)Sonic2019-04-091-41/+39
|
* dex: add pull randomness (#105)Jimmy Hu2019-04-091-0/+20
| | | | | * vendor: sync to latest core * dex: Add PullRandomness
* dex: replace total difficulty with block number (#73)Sonic2019-04-091-39/+32
| | | | | | | 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-04-091-6/+8
|
* dex: implement downloader for dexSonic2019-04-091-8/+17
| | | | | | | | | | | 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: Tx message optimization (#39)Jimmy Hu2019-04-091-6/+26
| | | | | | | | * dex: Add a tx queue in broadcast * Modify queue parameter * Priority select all messages except tx
* dex: peer: more fix on ID conversionWei-Ning Huang2019-04-091-53/+53
|
* dex: fix conflict caused by rebaseWei-Ning Huang2019-04-091-48/+62
|
* Rename import due to dexon-consensus renameWei-Ning Huang2019-04-091-3/+3
|
* dex: implement PullBlocks/PullVotes (#1)Jimmy Hu2019-04-091-1/+54
|
* dex: increase TX queue sizeWei-Ning Huang2019-04-091-1/+1
|
* vendor: sync consensus core and fix conflictWei-Ning Huang2019-04-091-8/+9
|
* dex: no need to rlp encode/decode now, consensus supports itSonic2019-04-091-10/+6
|
* dex: polish network related functionSonic2019-04-091-57/+120
|
* dex: let notary nodes connect to some dkg nodesSonic2019-04-091-38/+178
| | | | BuildConnection builds notary and dkg connections together
* dex: implement peerSetLoopSonic2019-04-091-0/+16
|
* dex: gov: using dex-consensus-core NodeSetCacheSonic2019-04-091-4/+24
|
* dex: add method to get NumChains, NotarySet, DKGSet easilySonic2019-04-091-6/+6
|
* dex: network: implement the network interfaceSonic2019-04-091-30/+200
|
* dex: remove DAO related codeSonic2019-04-091-3/+2
|
* dex: redesign p2p network topologySonic2019-04-091-66/+230
| | | | | | | | | | - 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-4/+4
|
* dex: let peer able to send notary node infoSonic2019-04-091-3/+41
|
* dex: let peerSet able to manage notary peersSonic2019-04-091-1/+64
|
* Change package name from eth to dexSonic2019-04-091-1/+1
|
* Copy codebase from ethSonic2019-04-091-0/+522