aboutsummaryrefslogtreecommitdiffstats
path: root/core/lattice.go
Commit message (Collapse)AuthorAgeFilesLines
* core: Integrate totalOrdering syncer (#322)Jimmy Hu2018-11-131-21/+27
|
* core: expose implicit round shift (#321)Mission Liao2018-11-131-1/+0
|
* simulation: use test.Governacne in simulation (#311)Mission Liao2018-11-081-1/+1
| | | | | | | | | | | | * Move simulation.Network to test package * Use test.Governance in simulation * Pack/Apply state request in blocks payload * Add Governance.SwitchToRemoteMode This would trigger governance to broadcast pending state change requests when changes. * Allow to marshal/unmarshal packedStateChanges * Attach test.Network and test.State
* core: lattice, total-ordering: remove newGenesisConfig (#308)haoping-ku2018-11-081-4/+2
| | | | | | * core: lattice, total-ordering: remove newGenesisConfig * fixup
* core: Optimize core (#307)Jimmy Hu2018-11-081-8/+0
|
* core: lattice: add round in NewLattice() (#303)haoping-ku2018-11-071-3/+3
|
* core: lattice-data: fix details and add test (#299)haoping-ku2018-11-061-85/+86
|
* Rename repo to dexon-consensusWei-Ning Huang2018-11-021-8/+8
|
* core: core.Lattice supports config change (#276)Mission Liao2018-11-011-3/+1
| | | | | | | | | | | 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.
* core: Leader selector will retry sanityCheck (#261)Jimmy Hu2018-10-261-3/+13
|
* core: Lock entire lattice.ProcessBlock (#259)Jimmy Hu2018-10-261-2/+3
| | | | | | * Lock entire ProcessBlock * Lock Consensus.processBlock
* core: lattice sync (#257)Jimmy Hu2018-10-251-37/+78
|
* core: reduce calls to Application.VerifyBlock (#247)Mission Liao2018-10-241-16/+17
| | | | | | * remove sanity check when adding blocks. * call VerifyBlock after lattice's sanity check. * remove checkRelation flag.
* core: Change interface of Application.VerifyBlock (#246)Jimmy Hu2018-10-231-1/+2
| | | | * Change interface of Application.VerifyBlock
* core: prepare empty block if null block is confirmed by BA. (#231)Jimmy Hu2018-10-231-3/+25
|
* core: initial commit for logger (#228)Mission Liao2018-10-191-1/+11
| | | | | | | | | | | | | * 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: total-ordering: change early flag to mode (#227)Haoping Ku2018-10-191-6/+6
| | | * core: total-ordering: change early flag to mode
* core: total ordering flush (#212)Mission Liao2018-10-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement flush * Panic for all errors from total-ordering * Fix test failure All DAGs generated by blocks-generator would trigger round switching. * Add NewBlocksGeneratorConfig * Add test caes for numChains changes * Resize internal structures * Perform total ordering based on current numChains * Fix not a valid DAG checking * Comparing blocks by height is not correct * Fix blocks from future round are delivered first by revealer * Make sure only picking one candidate in one chain. Blocks on the same chain in different rounds would not have acking relation. * Fix stuffs * Fix the issue that two candidates from the same chain are picked. * Rework candidateChainMapping * Add test case for phi, k changed * Refine testing code for round change * Add breakpoints in global vector * Remove not a valid dag checking. * Adding comments * Add check to forward acking * Fix vet failure * Prepareing height record with breakpoint * Fixup: add check to make sure delivered round IDs are increasing.
* core: consensus-timestamp: add sync (#219)Haoping Ku2018-10-181-1/+1
| | | | | | | | | | | | | | * core: consensus-timestamp: add sync * core: consensus-timestamp: add config change * fix go comment * add config change test * fixup: add error case handling * fixup: round interleave
* core: Some sync functions (#220)Jimmy Hu2018-10-171-2/+6
|
* core: genesis consensus timestamp (#217)Mission Liao2018-10-171-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: check if flush is required when round switching in total-ordering (#197)Mission Liao2018-10-151-24/+8
|
* core: modify interface (#194)Mission Liao2018-10-121-2/+6
| | | | * Add a new method to notify full node about round cutting. * Modify interface to return error when preparing block
* core: latticeData supports config change (#190)Mission Liao2018-10-121-5/+8
| | | | | | | | | | | | | | | * 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: Move BlockConfirmed to Application interface (#192)Mission Liao2018-10-111-1/+1
| | | | | | | | When a block is confirmed, all its txs are permitted to be executed. Therefore, exporting this method provides more and earlier information about txs to be executed, and helps application layer to process txs more efficiently.
* core: types: fix nodeID generation (#191)Wei-Ning Huang2018-10-111-1/+1
| | | | | Use ethereum style nodeID generation (keccak on compressed public key without the first byte).
* core: Fix timestamp (#182)Jimmy Hu2018-10-081-3/+1
|
* core: find block in db (#174)Mission Liao2018-10-051-12/+16
| | | | | | | | | | | | | | | | | | | | * 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.
* core: Check sorted ack in sanity check (#173)Jimmy Hu2018-10-041-0/+9
|
* core: split lattice-data to another file (#172)Mission Liao2018-10-041-388/+0
| | | | | - Split latticeData to another file - Remove areAllAcksInLattice
* core: Check Witness height. Add ConsensusTime and ConsensusHeight to block. ↵Jimmy Hu2018-10-041-1/+12
| | | | (#170)
* core: publish round based config (#165)Mission Liao2018-10-031-1/+47
|
* core: remove shard (#161)Mission Liao2018-10-021-0/+555