aboutsummaryrefslogtreecommitdiffstats
path: root/core/lattice-data.go
Commit message (Collapse)AuthorAgeFilesLines
* core: optimize core (#428)Jimmy Hu2019-01-231-0/+13
| | | | | | | | | | | | | | * core: Use a channel to process ba confirmed block * change the implementation of done() to react faster * Fix restart * Wait tipRound to change * fix corner case * Check for context
* core: fix issue (#427)Mission Liao2019-01-211-7/+12
| | | | | | | | * Dropped block should not be added to db - Here "dropped" means a block is older than current tip of that chain. * "Acking blocks doesn't exist" should be treated as an error when adding a block
* core: Fix BA3.0 (#420)Jimmy Hu2019-01-151-16/+41
| | | | | | | | | | | | | | | | | | * Add Restart to Ticker * Change pre allocated size * Return NextTime from lattice * Few hacky fixes for BA * PullVote in FastRollback state * Add shallowBlock for agreementResult * Extend period * Fixup
* syncer: fix issues when switching to core.Consensus (#418)Mission Liao2019-01-111-1/+1
| | | | | | | | | | | | | | | | - when confirmed blocks passed to core.Consensus aren't continuous in position in some chain, the pulling would skip those missing blocks. - fix: when some block is missing, avoid adding it and all blocks after it to core.Consensus. - we need to avoid the receive channel of network module full. - fix: during switching to core.Consensus, we need to launch a dummy receiver to receive from receive channel of network module. - fix: between the period during core.Consensus created and before running, a dummy receiver is also required to receive from receive channel of network module.
* core: remove useless branching code (#403)wmin02019-01-071-4/+1
|
* db: rename blockdb to db (#367)Mission Liao2018-12-131-9/+9
| | | | | | | | | | * 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
* core: support NumChains change for BA modules (#339)Mission Liao2018-11-201-53/+60
|
* utils: add utils package (#327)Mission Liao2018-11-141-3/+3
|
* core: lattice, total-ordering: remove newGenesisConfig (#308)haoping-ku2018-11-081-13/+7
| | | | | | * core: lattice, total-ordering: remove newGenesisConfig * fixup
* core: lattice-data: fix details and add test (#299)haoping-ku2018-11-061-44/+46
|
* core: Copy witness for empty block (#292)Jimmy Hu2018-11-051-0/+3
|
* core: Remove max block interval (#287)Jimmy Hu2018-11-021-15/+7
|
* Rename repo to dexon-consensusWei-Ning Huang2018-11-021-8/+8
|
* core: fix lattice bugs (#274)Mission Liao2018-10-301-3/+10
| | | | | | | | | | | | | | | | | * Fix bug: the block pool is not resized. * Fix forward acking. * Fix panic when total ordering * Fix total ordering flush hang The blocks arrived first might be not delivered before other block. Therefore, if some last block of previous round arrived before last blocks in other chains, and are not delivered when entering flush mode. Their corresponding flush-ready flag won't be turned on. * Fix bug in core.latticeData Invalid chainID is not thrown when preparing blocks.
* core: lattice sync (#257)Jimmy Hu2018-10-251-11/+65
|
* core: reduce calls to Application.VerifyBlock (#247)Mission Liao2018-10-241-5/+0
| | | | | | * remove sanity check when adding blocks. * call VerifyBlock after lattice's sanity check. * remove checkRelation flag.
* core: prepare empty block if null block is confirmed by BA. (#231)Jimmy Hu2018-10-231-0/+34
|
* core: check if flush is required when round switching in total-ordering (#197)Mission Liao2018-10-151-23/+15
|
* core: blocks generation supports rounds (#196)Mission Liao2018-10-141-0/+2
| | | | | | | * Block proposing based on timestamp, instead of count of blocks generated. * Add method to find tips of each round in blockdb. * Block proposing based on tips of last round found on blockdb.
* core: latticeData supports config change (#190)Mission Liao2018-10-121-216/+306
| | | | | | | | | | | | | | | * 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: find block in db (#174)Mission Liao2018-10-051-54/+127
| | | | | | | | | | | | | | | | | | | | * 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: Use event to run DKG and CRS in Consensus. (#171)Jimmy Hu2018-10-041-1/+8
|
* core: Check sorted ack in sanity check (#173)Jimmy Hu2018-10-041-0/+1
|
* core: split lattice-data to another file (#172)Mission Liao2018-10-041-0/+390
- Split latticeData to another file - Remove areAllAcksInLattice