aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test
Commit message (Collapse)AuthorAgeFilesLines
* simulation: add latency for gossip (#389)Mission Liao2019-01-031-5/+6
|
* sync: filter duplicated randomness (#387)Mission Liao2018-12-281-1/+1
|
* Fix: consensusTimestamp panic when numChains increased at round 1(#382)Mission Liao2018-12-271-3/+8
|
* test: add witness preparation/verification (#386)Mission Liao2018-12-271-0/+4
|
* core: fix stuffs (#383)Mission Liao2018-12-261-51/+19
| | | | | | * Merge core.Consensus constructors * Downgrade severity of logs * Refine logic to add blocks from pool to lattice * Add test.LaunchDummyReceiver
* utils: move authenticator to utils package (#378)Mission Liao2018-12-221-1/+1
|
* core: Add a `MPKReady` so `MasterPublicKey` cannot be added afterwards (#375)Jimmy Hu2018-12-191-11/+15
| | | | | | | | | | | | | | | | * Add type DKGReady * Add DKGReady to interface and state * DKG will wait for MPK to be ready before running * Modify test * Check if self's MPK is registered * Add test for delay add MPK * Rename Ready to MPKReady
* syncer: fix stuffs (#373)Mission Liao2018-12-181-2/+7
| | | | | | | | | | | | * Add a new method: GetSyncedConsensus This method avoids calling BlockDelivered in SyncBlocks methods, which avoid potential deadlock. * Add a method to stop the syncer before synced * Enable nonBlockingApp for synced Consensus instance.
* db: cache compaction chain tip in db (#369)Mission Liao2018-12-131-0/+1
| | | | | * Replace JSON with RLP in levelDB implementation. * Make sure blocks to sync following compaction chain tip
* db: rename blockdb to db (#367)Mission Liao2018-12-133-21/+21
| | | | | | | | | | * Rename blockdb package to db * Rename 'BlockDB' to 'DB' * Make all methods in db specific for ''block'. * Rename db.BlockDatabase to db.Database * Rename revealer to block-revealer * Rename test.Revealer to test.BlockRevealer
* syncer: fix stuffs (#366)Mission Liao2018-12-121-1/+7
| | | | | | | | | | * return delivered blocks when processing finalized blocks * check deliver sequence when processing finalized blocks * skip delivery of finalized blocks * remove duplicated calls to BlockConfirmed * add numChains change in test scenario * fix the bug that restartNotary is triggered by older block than current aID.
* ci: Add TravisCI setting. (#363)Jimmy Hu2018-12-081-6/+25
| | | | | | | | | | | | | | * Update Gopkg.lock * Fix test * Add travisCI setting * Print log using fmt * Update GNUmakefile * Use single go rountine for consensus_test
* test: allow to log in test.State (#359)Mission Liao2018-12-063-6/+20
|
* core: construct consensus from syncer (#352)Mission Liao2018-12-041-20/+47
|
* core: syncer: add syncer (#346)haoping-ku2018-11-294-9/+257
|
* core: remove StronglyAcked (#347)Mission Liao2018-11-292-15/+14
|
* core: support NumChains change for BA modules (#339)Mission Liao2018-11-202-15/+103
|
* test: fix network (#328)Mission Liao2018-11-151-1/+3
| | | | * Broadcast to set of node instead of broadcasting when attaching cache. * Fix pull blocks
* utils: add utils package (#327)Mission Liao2018-11-141-1/+2
|
* core: expose implicit round shift (#321)Mission Liao2018-11-133-4/+11
|
* test: add integration test (#315)Mission Liao2018-11-112-5/+144
| | | | | | * Rename NonByzantineTestSuite to WithSchedulerTestsuite * Add a method to query the latest position delivered * Add integration test for core.Consensus * Show detailed list for test cases in CI
* core: lattice-data: fix details and add test (#299)haoping-ku2018-11-061-0/+1
|
* core: block deliver with position (#289)Mission Liao2018-11-021-1/+1
| | | | | This info is required when application layer needs to do something related to the underlying DAG, not just compaction chain.
* Rename repo to dexon-consensusWei-Ning Huang2018-11-026-30/+30
|
* core: core.Lattice supports config change (#276)Mission Liao2018-11-015-117/+428
| | | | | | | | | | | Besides making core.Lattice supports config change, This PR also include the first test for below scenario: - Configuration changes are registered before test running - Those changes are carried/broadcasted as payload of blocks - Only one node would initiate these changes, however, all nodes would finally receive/apply those changes to their own test.Governance instance.
* test: Handle blocks that should retry sanity check later. (#267)Mission Liao2018-10-272-14/+36
|
* core: Leader selector will retry sanityCheck (#261)Jimmy Hu2018-10-261-1/+1
|
* core: lattice sync (#257)Jimmy Hu2018-10-251-21/+15
|
* test: add test.State (#239)Mission Liao2018-10-241-5/+7
| | | | | | | | | * separate test utility and interface implementation for test.Governance. * add test.State. * integrate test.State to test.Governance. test.State is mainly used to emulate state propagation on fullnode.
* core: reduce calls to Application.VerifyBlock (#247)Mission Liao2018-10-241-1/+1
| | | | | | * remove sanity check when adding blocks. * call VerifyBlock after lattice's sanity check. * remove checkRelation flag.
* core: initial commit for logger (#228)Mission Liao2018-10-191-1/+2
| | | | | | | | | | | | | * Replace "log.*" with logger. * Add simple logger to log with log package. * Add debug logs to all calls to these interfaces: - core.Application - core.Governance - core.Network * Add Stringer to these types: - types.DKGComplaint - types.AgreementResult - types.DKGMasterPublicKey - types.DKGFinalize
* core: Some sync functions (#220)Jimmy Hu2018-10-171-1/+1
|
* core: genesis consensus timestamp (#217)Mission Liao2018-10-172-1/+3
| | | | | | | | | | * Refine the initial value for empty time slot. * Fix DATA RACE netowrkConnection is reset for each test, however, our Consensus instance is not stopped after one test is finished, they might continue use network interface for a while.
* core: latticeData supports config change (#190)Mission Liao2018-10-121-2/+2
| | | | | | | | | | | | | | | * Add test for num of chains changes. * Return error in latticeData.prepareBlock * Compare two positions * Modify chainStatus from height-based to index-based. * Fix consensus to use round variable * Remove sanity check in chainStatus * Fixup: refine sanity check - verify if round switching is required or not by chainTip's config. - make the logic in sanity check more clear - pospone acking relationship checking, they are more expensive to check.
* core: change interface (#193)Mission Liao2018-10-111-1/+1
| | | | | | | * Extract types.FinalizationResult * Change interface: - Application.BlockConfirmed returns whole block. - Application.BlockDelivered returns partial result.
* core: find block in db (#174)Mission Liao2018-10-051-1/+4
| | | | | | | | | | | | | | | | | | | | * Make sure block pool is large enough It's safe to use a larger blockPool when the number of chains is smaller. * Construct latticeData via config. * Seek acked blocks in blockdb when unable to find them in memory cache. In previous implementation, we assume our cache in memory is enough to perform DAG's sanity check. However, it's no longer true when the number of chains might be changed between rounds. * Simplify purge. Remove the relation to purge block by chainStatus.
* test: Short test applied to some long running tests (#168)Jimmy Hu2018-10-041-1/+5
|
* core: publish round based config (#165)Mission Liao2018-10-031-0/+2
|
* core: remove shard (#161)Mission Liao2018-10-021-7/+7
|
* core: replace reliable-broadcast with shard (#159)Mission Liao2018-10-022-5/+3
|
* core: integrate authenticator (#150)Mission Liao2018-09-301-1/+1
|
* core: hide types.NodeID from full node. (#147)Mission Liao2018-09-282-18/+12
| | | | | | | | | * Refine core.Governance interface - Remove types.NodeID from interface declaration. - All parameter should be round based. * Add core.NodeSetCache * Agreement accepts map of nodeID directly. * test.Transport.Peers method return public keys.
* core: update governance interface and config (#145)Wei-Ning Huang2018-09-272-3/+3
| | | | | | 1) Remove RoundHeight from config. 2) NotarySet is not from governance contract, we get Node set intead. Notary set is caculated from the NodeSet using CRS. 3) CRS is not in the governance interface.
* crypto: sigtopub to crypto package. remove SigToPubFn (#141)Jimmy Hu2018-09-261-2/+0
|
* core: move crypto to core/crypto (#140)Mission Liao2018-09-262-3/+3
| | | | | | | | | - Move key-holder to authenticator Make core.keyHolder public as core.Authenticator, it is not required to make this part an interface. - Make private when there is no need to go public. - Fix data race
* core: update governance interface to consider genesis state (#136)Wei-Ning Huang2018-09-252-3/+3
|
* Fix naming of methods (#134)Mission Liao2018-09-251-1/+1
| | | | | | - BlockDeliver -> BlockDelivered - TotalOrderingDeliver -> TotalOrderingDelivered - WitnessAckDeliver -> WitnessAckDelivered - VerifyPayload -> VerifyPayloads
* core: add debug (#133)Mission Liao2018-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | * Split interface * Rename nonblocking-application to nonblocking Parts needs nonblocking gets more. * Implement core.nonBlocking based on interface split * Fix: the witness parent hash could be parent on compaction chain. * Rename Application.DeliverBlock to BlockDeliver To sync with naming of other methods. * Change methods' fingerprint - BlockConfirmed provides block hash only. - BlockDeliver provde a whole block.
* core: add shard (#127)Mission Liao2018-09-213-78/+81
| | | | | | | A shard is basically DEXON v1 components, except the strongly acked part, including: - maintaining lattice structure - total ordering - generate consensus timestamp
* Rename validator* to node* (#120)Mission Liao2018-09-206-82/+82
|
* core: rename Notary (Acks) to Witness (#118)Wei-Ning Huang2018-09-191-2/+2
|
* core: refine governance interface to reduce Get* methods (#114)Wei-Ning Huang2018-09-182-4/+4
| | | | | Since we have a bunch of static configurations in the governance contract, instead of using a Get* method for each of them, we instead implement a GetConfiguration() method to return a structure of the configurations.
* core: remove ticker parameter from NewConsensusMission Liao2018-09-182-3/+4
| | | | | | | | | - remove BlockProposingInterval, it's replaced by lambda. - remove ticker parameter of NewConsensus, ticker would be derived from governance. - leave a backdoor to hook the construction of ticker. - move 'Lambda' config from to consensus.
* core: move blockdb into core package and minor change on governance ↵Wei-Ning Huang2018-09-173-3/+3
| | | | | | | interface (#110) Since third party apps will possibly implement their only blockdb class, it make sense for the interface to be in core. Also add GetNumShards into the governance interface.
* core: DKG interface (#108)Jimmy Hu2018-09-171-0/+5
|
* test: add transport layer (#97)Mission Liao2018-09-105-63/+9
| | | | | | | | | | The purpose of transport layer is to abstract the way to send messages and setup connections between peers in a p2p network. The peer discovery is simulated by a hosted server: every peer sends its address to a known server. Once collecting enough peers, respond the whole peers lists to all peers. Changes: - Add test.Trasnport interface - Add test.Transport implementation by golang channel. - Add test.transport implementation by TCP connection. - Move LatencyModel to core/test package - Add Marshaller interface
* core: BA-based consensus core. (#93)Jimmy Hu2018-09-041-1/+2
|
* core: Add a new structure `Position` and move `ShardID`, `ChainID` and ↵Jimmy Hu2018-09-031-4/+6
| | | | `Height` from `Block` (#89)
* Use Network in Consensus core (#85)Jimmy Hu2018-08-312-1/+43
|
* core: Change the lattice key from validatorID to chainID. (#83)Jimmy Hu2018-08-301-1/+21
| | | | | * Add chainID in simulation.Validator * Change validatorid to chainID in rbModule
* core: tune performance (#73)Mission Liao2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | - Avoid using recursive function in critical path. - Do not write through when using levelDB. Things put to levelDB would be safe from panic even we didn't force to write through every time. - Dump count of confirmed blocks proposed by self. - Avoid allocating variables in loop. - Return length of acking node set, we only need that when total ordering. - Fix potential bug: make sure win records updated when acking height vectors of candidates are changed. - Keep dirty validators in slice. - Add cache for objects to ease the pressure to garbage collector. - Cache global acking status when total ordering. - Add method to recycle blocks. - Marshal JSON should be called once for each broadcast. - Make updateWinRecord called in parallel. - Log average / deviation of latencies when simulation finished.
* simulation: add simulation with scheduler (#71)Mission Liao2018-08-216-46/+348
| | | | | | | | - Add new field in test.Event: HistoryIndex HistoryIndex allow us to access them by their position in event history. - Record local time in test.App when receiving events. - Add statisitics module for slices of test.Event. - add new command line utility *dexcon-simulation-with-scheduler to verify the execution time of core.Consensus.
* test: add test.Scheduler (#58)Mission Liao2018-08-153-0/+265
When simulating execution of core.Consensus by passing packets through golang-channel or real-socket, we need to utilize time.Sleep and time.Now to simulate the required network/proposing latency. It's problematic when we try to test a simulation with long network latency. Instead, Scheduler would try to execute the event with minimum timestamp, thus time.Sleep is replaced with Scheduler.nextTick, and time.Now is replaced with Event.Time. Changes: - Add test.Scheduler. - Add test.Stopper interface to provide encapsulate different stop conditions for scheduler. - Add a reference implementation for test.Stopper, it will stop scheduler when all validators confirmed X blocks proposed from themselves. - Add a test scenario on core.Consensus that all validators are not byzantine.