aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Rename repo to dexon-consensusWei-Ning Huang2018-11-021-7/+7
|
* core: Add BlockSkeleton and Verify functions (#271)Jimmy Hu2018-10-291-1/+3
|
* core: Fix missing fields when cloning blocks. (#268)Mission Liao2018-10-271-4/+32
|
* core: fix stuffs (#250)Mission Liao2018-10-241-3/+2
| | | | | | | | * fix discontinuous finalization height * remove types.Block.Witness.Timestamp field * add field: types.Block.Finalization.ParentHash * fix log format of CRS * switch round and chain in log of types.Position.
* core: types: implement rlp.Encoder and rlp.Decoder (#232)Sonic2018-10-201-4/+19
| | | | | * core: types: implement rlp.Encoder and rlp.Decoder * crypto: dkg: fix PublicKey.Bytes
* core: total ordering flush (#212)Mission Liao2018-10-181-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: change interface (#193)Mission Liao2018-10-111-6/+8
| | | | | | | * Extract types.FinalizationResult * Change interface: - Application.BlockConfirmed returns whole block. - Application.BlockDelivered returns partial result.
* core: General tsig (#177)Jimmy Hu2018-10-051-0/+1
|
* types: Test block clone (#175)Jimmy Hu2018-10-051-0/+71
|
* core: replace acks with slice (#102)Mission Liao2018-09-121-0/+14
|
* core: Add a new structure `Position` and move `ShardID`, `ChainID` and ↵Jimmy Hu2018-09-031-7/+13
| | | | `Height` from `Block` (#89)
* core: Add Block.IsGenesis() and set Block.ParentHash to 0 in genesis block. ↵Jimmy Hu2018-08-091-6/+24
| | | | (#37)
* test: random blocks generator (#26)Mission Liao2018-08-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | * Add blocks generator. This helper would randomly generate blocks that forms valid DAGs. * Add revealer Revealer is an extension of blockdb.BlockIterator. The block sequence from 'Next' method would be either randomly (see RandomRevealer) or meeting some specific condition (ex. forming a DAG, see RandomDAGRevealer). * Add test for sequencer based on random blocks. * core: refine Application interface and add Governance interface (#24) Add a new Governance interface for interaction with the governance contract. Also remove the ValidateBlock call in application interface as the application should validate it before putting it into the consensus module. A new BlockConverter interface is also added. The consensus module should accept the BlockConverter interface in future implementation, and use the Block() function to get the underlying block info.
* Add new sorting method for blocksMission Liao2018-07-311-0/+50
- Add types.ByHeight to sort slice of blocks by their heights. - Add test case for sorting methods of types.Block.