aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block.go
Commit message (Collapse)AuthorAgeFilesLines
* core: total ordering flush (#212)Mission Liao2018-10-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: sync compaction chain (#222)Jimmy Hu2018-10-181-0/+31
|
* core: Some sync functions (#220)Jimmy Hu2018-10-171-0/+5
|
* core: fix timestamp marshaling (#207)Wei-Ning Huang2018-10-151-1/+1
|
* core: change interface (#193)Mission Liao2018-10-111-16/+21
| | | | | | | * Extract types.FinalizationResult * Change interface: - Application.BlockConfirmed returns whole block. - Application.BlockDelivered returns partial result.
* core: General tsig (#177)Jimmy Hu2018-10-051-0/+3
|
* types: Test block clone (#175)Jimmy Hu2018-10-051-0/+2
|
* core: Check Witness height. Add ConsensusTime and ConsensusHeight to block. ↵Jimmy Hu2018-10-041-9/+13
| | | | (#170)
* core: update data model to reflect new model (#157)Wei-Ning Huang2018-10-011-3/+8
| | | | | | Update data model: 1) Remove witness ack. 2) Add round to block. 3) Update governance interface.
* core: move crypto to core/crypto (#140)Mission Liao2018-09-261-1/+1
| | | | | | | | | - 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: add blockpool (#121)Mission Liao2018-09-201-6/+21
| | | | | | core.blockPool is used to cache blocks arrived out-of-order. Our consensus should retry those blocks after their acking blocks added to lattice.
* Rename validator* to node* (#120)Mission Liao2018-09-201-1/+1
|
* core: rename Notary (Acks) to Witness (#118)Wei-Ning Huang2018-09-191-4/+4
|
* core: replace acks with slice (#102)Mission Liao2018-09-121-19/+20
|
* core: types: use []byte for block Payload type (#101)Wei-Ning Huang2018-09-121-6/+3
| | | | | Change payload type to []byte instead of [][]byte to make it more generic. The user of the consensus core should marshal the payload into a byte slice by themselves.
* core: timestamp (#98)Jimmy Hu2018-09-111-20/+9
|
* 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-8/+6
| | | | `Height` from `Block` (#89)
* core: Add PreparePayloads to Application and Remove blockConverter ↵Jimmy Hu2018-08-301-23/+6
| | | | interface. (#84)
* Copy block (#82)Jimmy Hu2018-08-301-0/+2
|
* core: Leader Selector. (#80)Jimmy Hu2018-08-301-0/+3
|
* core: tune performance (#73)Mission Liao2018-08-281-14/+48
| | | | | | | | | | | | | | | | | | | | | | - 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.
* core: Add vote type and add field to block. (#76)Jimmy Hu2018-08-281-1/+3
|
* core: NotaryAck interfaces. (#67)Jimmy Hu2018-08-201-41/+2
|
* core: implicit fields in types.Block used in reliable broadcast (#59)Haoping Ku2018-08-171-15/+9
|
* core: Remove notary ack. (#64)Jimmy Hu2018-08-161-30/+36
|
* core: Add compaction chain module. (#60)Jimmy Hu2018-08-161-4/+4
|
* core: Prepare Genesis block. (#54)Jimmy Hu2018-08-141-0/+1
|
* core: reliable-broadcast: delete old blocks (#47)Haoping Ku2018-08-101-0/+1
| | | | Delete all blocks in received blocks array for avoiding using too much memory space.
* core: Modify Consensus interface (#45)Jimmy Hu2018-08-101-3/+9
|
* core: Add block hash signature functions in core/ctypto.go. (#39)Jimmy Hu2018-08-101-0/+12
|
* core: Add Block.IsGenesis() and set Block.ParentHash to 0 in genesis block. ↵Jimmy Hu2018-08-091-0/+5
| | | | (#37)
* core: Add Consensus to replace core.Blocklattice (#35)Mission Liao2018-08-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make Sequencer return slice of blocks. * Fix naming issue The function 'getHeightVecto' would return ackingStatusVector. * Fix comment error. * Add methods to collect info when proposing blocks. * Add test.App * Add test.Gov * Move this type to core.types to avoid cyclic import. * Add core.Consensus * Move getMedianTime, interpoTime to util These functions are not depending on members of core.consensusTimestamp and is required when testing core.Consensus. * Make sure types.Block.Clone would copy critical fields. * Remove core.blocklattice * Define 'infinity' in core/total-ordering This definition is defined in core/blocklattice originally. * Fix a bug when processing the same block twice. * Integrate simulation with core.Consensus core.Consensus is a replacement of core.Blocklattice * Fix the comment to use sigular form. * Move lock mechanism to sub modules. * phi should be 2*fmax+1 * Fixup: should aborting when the validator is added * Fix for new block fields * Fix the bug that the total ordering sequence is wrong.
* crypto: Add crypto module. (#34)Jimmy Hu2018-08-081-8/+28
|
* core: DEXON Consensus Timestamp Algorithm. (#29)Jimmy Hu2018-08-031-10/+12
|
* core: refine Application interface and add Governance interface (#24)Wei-Ning Huang2018-07-311-0/+6
| | | | | | | 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/+15
| | | | - Add types.ByHeight to sort slice of blocks by their heights. - Add test case for sorting methods of types.Block.
* Add acking module (#13)Haoping Ku2018-07-301-6/+7
| | | | | | | * Refactor and add acking module Extract acking module for unit testing. This commit splits functions into small pieces for better understanding and easy unit testing.
* Implement simulation on a real network (#5)Wei-Ning Huang2018-07-201-8/+8
| | | simulation: implement simulation on a real network
* core: refactor acking relationship (#3)Wei-Ning Huang2018-07-181-3/+2
| | | | | | | | | * core: refactor acking relationship Use AckBy only, and remove IndirectAcks. Also fix the issue where validator is not filling Height when proposing block.
* Fix typos and add .gitignore (#2)Haoping Ku2018-07-171-1/+1
| | | | | * Fix typos and add .gitignore * Add more rule on .gitignore
* Initial implementation of DEXON consensus algorithmWei-Ning Huang2018-07-161-0/+89