aboutsummaryrefslogtreecommitdiffstats
path: root/dex/helper_test.go
Commit message (Collapse)AuthorAgeFilesLines
* core: vm: refactor vm config and contextJhih-Ming Huang2019-05-061-3/+7
| | | | | | | | | | | | | | | | To support multiple VMs, there must be a shared execution environment for each VM, so this pull request moved some shared component to vm.Context and implemented the vm.ExecPack to hold the list of VM, list of VM configures, context and some shared resources. The adjustment includes: * Move NoRecursion, Depth, ReadOnly, RandCallIndex, IntPool and CallGasTemp to Context. * Adjust VM enumeration from byte to uint8, and the VMList from map to array. * Register VM constructor in each VM package's init function. * Initialize all VM instance in NewExecPack. * Remove EVMImplement, and modify EVM, such that EVM can do the same functions with EVMImplement.
* core: vm: refactor file structurejm2019-05-061-1/+1
| | | | | For support other vm types, this pr modified the core/vm file structures.
* dex: rebuild connection if dkg reset, core/vm: fix gov (#308)Jimmy Hu2019-04-091-0/+6
| | | | | * dex: rebuild connection if dkg reset * core: vm: fix governance contract
* backport from v1.8.23 (#304)Sonic2019-04-091-1/+1
| | | | | | | | | | | | | | | | | | * 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: fill in genesis timstamp and remove dMoment from protocol handshake (#263)Wei-Ning Huang2019-04-091-6/+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.
* core: vm: flatten governanceWei-Ning Huang2019-04-091-1/+5
|
* core: sync to latest core (#214)Jimmy Hu2019-04-091-10/+4
| | | | | * vendor: sync to latest core * fix for single chain
* params: write dMoment into ChainConfig (#150)Wei-Ning Huang2019-04-091-3/+6
|
* core, dex: polish sync (#75)Sonic2019-04-091-1/+10
| | | | | | | | | | | | | | | - 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-4/+4
| | | | | | | 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: fix testsWei-Ning Huang2019-04-091-1/+5
|
* dex: use dex/downloader in dexSonic2019-04-091-1/+1
| | | | | To compatible with ethereum code base, make Downloader a interface in internal/ethapi
* dex: porting test to enode (#9)Sonic2019-04-091-19/+33
|
* dex: let notary nodes connect to some dkg nodesSonic2019-04-091-1/+8
| | | | BuildConnection builds notary and dkg connections together
* dex: implement peerSetLoopSonic2019-04-091-0/+5
|
* dex: gov: using dex-consensus-core NodeSetCacheSonic2019-04-091-5/+6
|
* dex: add method to get NumChains, NotarySet, DKGSet easilySonic2019-04-091-13/+9
|
* dex: network: implement the network interfaceSonic2019-04-091-1/+1
|
* dex: redesign p2p network topologySonic2019-04-091-16/+62
| | | | | | | | | | - 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-12/+12
|
* dex: implement notary node info propagation and management mechanismSonic2019-04-091-1/+23
|
* Change package name from eth to dexSonic2019-04-091-1/+1
|
* Copy codebase from ethSonic2019-04-091-0/+201