Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | core: Fix goroutine leaks (#270) | Jimmy Hu | 2018-10-29 | 1 | -0/+1 |
| | |||||
* | core: Unit test for BA sync (#265) | Jimmy Hu | 2018-10-26 | 1 | -0/+13 |
| | |||||
* | core: sync BA (#264) | Jimmy Hu | 2018-10-26 | 1 | -15/+40 |
| | |||||
* | core: Pull block (#263) | Jimmy Hu | 2018-10-26 | 1 | -23/+65 |
| | |||||
* | core: Leader selector will retry sanityCheck (#261) | Jimmy Hu | 2018-10-26 | 1 | -3/+8 |
| | |||||
* | core: Lock entire lattice.ProcessBlock (#259) | Jimmy Hu | 2018-10-26 | 1 | -0/+4 |
| | | | | | | * Lock entire ProcessBlock * Lock Consensus.processBlock | ||||
* | core: lattice sync (#257) | Jimmy Hu | 2018-10-25 | 1 | -9/+6 |
| | |||||
* | core: Move dkg in types to types/dkg. (#253) | Jimmy Hu | 2018-10-25 | 1 | -7/+8 |
| | |||||
* | core: fix stuffs (#250) | Mission Liao | 2018-10-24 | 1 | -2/+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: disable nonblocking temporarily (#249) | Mission Liao | 2018-10-24 | 1 | -9/+5 |
| | |||||
* | core: reduce calls to Application.VerifyBlock (#247) | Mission Liao | 2018-10-24 | 1 | -2/+2 |
| | | | | | | * remove sanity check when adding blocks. * call VerifyBlock after lattice's sanity check. * remove checkRelation flag. | ||||
* | core: fix panic when proposed block is nil (#248) | Mission Liao | 2018-10-24 | 1 | -0/+4 |
| | |||||
* | core: notify fullnode to snapshot configs when round change. (#243) | Mission Liao | 2018-10-23 | 1 | -8/+19 |
| | |||||
* | core: add round parameter to ProposeCRS method (#244) | Wei-Ning Huang | 2018-10-23 | 1 | -2/+2 |
| | | | | | | | | Since all DKG set members may ProposeCRS, but only one will get through, we need to be able to tell which round the CRS is intended for in order to skip CRS submission of the same round. Also this commit add check to make sure we have enough master public key when initializing DKGGroupPublicKey. | ||||
* | simulation: Cache network broadcasted message (#242) | Jimmy Hu | 2018-10-23 | 1 | -10/+5 |
| | |||||
* | core: Change dkg timing (#241) | Jimmy Hu | 2018-10-23 | 1 | -12/+17 |
| | | | | | * Register DKG after CRS is proposed * Change round at only one place | ||||
* | core: remove duplicate BroadcastRandomnessResult call (#240) | Wei-Ning Huang | 2018-10-23 | 1 | -6/+1 |
| | |||||
* | core: prepare empty block if null block is confirmed by BA. (#231) | Jimmy Hu | 2018-10-23 | 1 | -6/+35 |
| | |||||
* | core: fix uninitialized variable in configuration chain (#238) | Wei-Ning Huang | 2018-10-22 | 1 | -1/+1 |
| | |||||
* | core: Handling self proposed DKG private share (#236) | Jimmy Hu | 2018-10-22 | 1 | -11/+22 |
| | |||||
* | core: fix logging for SendDKGPrivateShare (#234) | Wei-Ning Huang | 2018-10-20 | 1 | -1/+2 |
| | |||||
* | Start Run() until dMoment. (#233) | Jimmy Hu | 2018-10-20 | 1 | -0/+2 |
| | |||||
* | core: initial commit for logger (#228) | Mission Liao | 2018-10-19 | 1 | -36/+107 |
| | | | | | | | | | | | | | * 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: Append all config till Initial block (#225) | Jimmy Hu | 2018-10-18 | 1 | -0/+7 |
| | |||||
* | core: sync compaction chain (#222) | Jimmy Hu | 2018-10-18 | 1 | -1/+19 |
| | |||||
* | core: Add init block to Run() (#221) | Jimmy Hu | 2018-10-18 | 1 | -1/+2 |
| | |||||
* | core: Some sync functions (#220) | Jimmy Hu | 2018-10-17 | 1 | -4/+20 |
| | |||||
* | core: Rebroadcast agreement and randomness result. (#218) | Jimmy Hu | 2018-10-17 | 1 | -18/+28 |
| | |||||
* | core: Add stop function to all components (#216) | Jimmy Hu | 2018-10-17 | 1 | -4/+11 |
| | |||||
* | core: New dexon ba (#210) | Jimmy Hu | 2018-10-16 | 1 | -5/+16 |
| | |||||
* | core: Change First round dkg timing (#209) | Jimmy Hu | 2018-10-16 | 1 | -4/+5 |
| | |||||
* | core: Change threshold (#205) | Jimmy Hu | 2018-10-15 | 1 | -1/+1 |
| | |||||
* | Remove duplicated dMoment in Consensus.Run (#206) | Jimmy Hu | 2018-10-15 | 1 | -2/+4 |
| | |||||
* | core: Change DKG threshold (#204) | Jimmy Hu | 2018-10-15 | 1 | -2/+2 |
| | |||||
* | core: Fix simulation errors. (#202) | Jimmy Hu | 2018-10-15 | 1 | -28/+32 |
| | |||||
* | core: fix simulation error (#201) | Jimmy Hu | 2018-10-15 | 1 | -2/+2 |
| | | | | | * Sync dMoment for all consensus core * App check for randomness ignore round 0 | ||||
* | core: No randomness for round 0 (#198) | Jimmy Hu | 2018-10-15 | 1 | -0/+6 |
| | | | | | * No randomness for round 0 * Ignore round 0 randomness | ||||
* | core: latticeData supports config change (#190) | Mission Liao | 2018-10-12 | 1 | -8/+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 Liao | 2018-10-11 | 1 | -6/+3 |
| | | | | | | | * Extract types.FinalizationResult * Change interface: - Application.BlockConfirmed returns whole block. - Application.BlockDelivered returns partial result. | ||||
* | core: Add round to DKG methods in gov. Change network interface name (#185) | Jimmy Hu | 2018-10-09 | 1 | -4/+4 |
| | |||||
* | core: Add DKG final message. (#181) | Jimmy Hu | 2018-10-09 | 1 | -0/+9 |
| | |||||
* | core: update config variable name grammar and remove configuration (#184) | Wei-Ning Huang | 2018-10-08 | 1 | -5/+7 |
| | |||||
* | core: Remove round from gov.ProposeCRS (#183) | Jimmy Hu | 2018-10-08 | 1 | -1/+1 |
| | |||||
* | core: Add block randomness in compaction-chain module (#179) | Jimmy Hu | 2018-10-08 | 1 | -3/+13 |
| | |||||
* | core: Block randomness generation. (#178) | Jimmy Hu | 2018-10-08 | 1 | -3/+66 |
| | |||||
* | core: General tsig (#177) | Jimmy Hu | 2018-10-05 | 1 | -2/+61 |
| | |||||
* | core: find block in db (#174) | Mission Liao | 2018-10-05 | 1 | -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. | ||||
* | core: Use event to run DKG and CRS in Consensus. (#171) | Jimmy Hu | 2018-10-04 | 1 | -40/+44 |
| | |||||
* | core: publish round based config (#165) | Mission Liao | 2018-10-03 | 1 | -1/+1 |
| | |||||
* | core: Add unit test for DKG CRS in consensus (#163) | Jimmy Hu | 2018-10-03 | 1 | -0/+5 |
| | |||||
* | core: remove shard (#161) | Mission Liao | 2018-10-02 | 1 | -11/+11 |
| | |||||
* | core: replace reliable-broadcast with shard (#159) | Mission Liao | 2018-10-02 | 1 | -171/+50 |
| | |||||
* | core: run DKG and CRS at background. (#155) | Jimmy Hu | 2018-10-02 | 1 | -16/+71 |
| | |||||
* | core: update data model to reflect new model (#157) | Wei-Ning Huang | 2018-10-01 | 1 | -64/+2 |
| | | | | | | Update data model: 1) Remove witness ack. 2) Add round to block. 3) Update governance interface. | ||||
* | core: check block timestamp (#156) | Jimmy Hu | 2018-10-01 | 1 | -0/+10 |
| | |||||
* | core: use notarySet for BA module. (#153) | Jimmy Hu | 2018-10-01 | 1 | -32/+36 |
| | |||||
* | core: integrate authenticator (#150) | Mission Liao | 2018-09-30 | 1 | -45/+31 |
| | |||||
* | core: remove legacy mode (#149) | Mission Liao | 2018-09-28 | 1 | -25/+9 |
| | |||||
* | core: hide types.NodeID from full node. (#147) | Mission Liao | 2018-09-28 | 1 | -89/+50 |
| | | | | | | | | | * 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 Huang | 2018-09-27 | 1 | -6/+11 |
| | | | | | | 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 Hu | 2018-09-26 | 1 | -14/+5 |
| | |||||
* | core: move crypto to core/crypto (#140) | Mission Liao | 2018-09-26 | 1 | -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: configuration chain test (#137) | Jimmy Hu | 2018-09-26 | 1 | -1/+1 |
| | |||||
* | core: run TSIG for first configuration block at startup (#135) | Jimmy Hu | 2018-09-26 | 1 | -42/+35 |
| | |||||
* | core: update governance interface to consider genesis state (#136) | Wei-Ning Huang | 2018-09-25 | 1 | -52/+70 |
| | |||||
* | Fix naming of methods (#134) | Mission Liao | 2018-09-25 | 1 | -3/+3 |
| | | | | | | - BlockDeliver -> BlockDelivered - TotalOrderingDeliver -> TotalOrderingDelivered - WitnessAckDeliver -> WitnessAckDelivered - VerifyPayload -> VerifyPayloads | ||||
* | core: add debug (#133) | Mission Liao | 2018-09-25 | 1 | -15/+13 |
| | | | | | | | | | | | | | | | | | | | | | * 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: run first DKG at startup. (#129) | Jimmy Hu | 2018-09-23 | 1 | -21/+163 |
| | |||||
* | core: add shard (#127) | Mission Liao | 2018-09-21 | 1 | -9/+9 |
| | | | | | | | A shard is basically DEXON v1 components, except the strongly acked part, including: - maintaining lattice structure - total ordering - generate consensus timestamp | ||||
* | core: refactor witness data processing flow (#124) | Wei-Ning Huang | 2018-09-20 | 1 | -10/+42 |
| | | | | | | | | | | | Since witness data need to include data from application after it processed a block (e.g. stateRoot). We should make the process of witness data asynchronous. An interface `BlockProcessedChan()` is added to the application interface to return a channel for notifying the consensus core when a block is processed. The notification object includes a byte slice (witenss data) which will be include in the final witness data object. | ||||
* | Rename validator* to node* (#120) | Mission Liao | 2018-09-20 | 1 | -24/+24 |
| | |||||
* | core: rename Notary (Acks) to Witness (#118) | Wei-Ning Huang | 2018-09-19 | 1 | -15/+15 |
| | |||||
* | core: refine governance interface to reduce Get* methods (#114) | Wei-Ning Huang | 2018-09-18 | 1 | -15/+19 |
| | | | | | 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 NewConsensus | Mission Liao | 2018-09-18 | 1 | -8/+6 |
| | | | | | | | | | - 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 Huang | 2018-09-17 | 1 | -8/+8 |
| | | | | | | | 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. | ||||
* | cleanup (#109) | Mission Liao | 2018-09-17 | 1 | -27/+24 |
| | | | | | | - With context, we don't need stopChan - Remove core.BlockChain. - Remove unused variable. | ||||
* | core: Fix BA Fork issues (#104) | Jimmy Hu | 2018-09-13 | 1 | -16/+16 |
| | |||||
* | core: replace acks with slice (#102) | Mission Liao | 2018-09-12 | 1 | -1/+0 |
| | |||||
* | core: types: use []byte for block Payload type (#101) | Wei-Ning Huang | 2018-09-12 | 1 | -2/+2 |
| | | | | | 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: total ordering with chain ID (#100) | Mission Liao | 2018-09-12 | 1 | -1/+1 |
| | |||||
* | simulation: integrate test.Transport (#99) | Mission Liao | 2018-09-11 | 1 | -1/+0 |
| | | | | | - Add marshaller for simulation by encoding/json - Implement peer server based on test.TranportServer - Remove network models, they are replaced with test.LatencyModel | ||||
* | core: timestamp (#98) | Jimmy Hu | 2018-09-11 | 1 | -8/+3 |
| | |||||
* | misc: Polish BA. (#94) | Jimmy Hu | 2018-09-05 | 1 | -5/+6 |
| | |||||
* | core: BA-based consensus core. (#93) | Jimmy Hu | 2018-09-04 | 1 | -27/+220 |
| | |||||
* | core: Add a new structure `Position` and move `ShardID`, `ChainID` and ↵ | Jimmy Hu | 2018-09-03 | 1 | -6/+10 |
| | | | | `Height` from `Block` (#89) | ||||
* | Add methods to Application interface. (#86) | Jimmy Hu | 2018-08-31 | 1 | -0/+1 |
| | |||||
* | Use Network in Consensus core (#85) | Jimmy Hu | 2018-08-31 | 1 | -0/+94 |
| | |||||
* | core: Add PreparePayloads to Application and Remove blockConverter ↵ | Jimmy Hu | 2018-08-30 | 1 | -13/+8 |
| | | | | interface. (#84) | ||||
* | core: Change the lattice key from validatorID to chainID. (#83) | Jimmy Hu | 2018-08-30 | 1 | -0/+1 |
| | | | | | * Add chainID in simulation.Validator * Change validatorid to chainID in rbModule | ||||
* | core: tune total ordering performance (#81) | Mission Liao | 2018-08-30 | 1 | -1/+5 |
| | | | | | - Replace map with slice Compared to slice, accessing to map is slower and the memory usage is inefficient. | ||||
* | core: tune performance (#73) | Mission Liao | 2018-08-28 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | | | | | | | - 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 Hu | 2018-08-28 | 1 | -0/+5 |
| | |||||
* | core: Notary ack application. (#70) | Jimmy Hu | 2018-08-22 | 1 | -0/+4 |
| | |||||
* | core: Notary ack (#69) | Jimmy Hu | 2018-08-21 | 1 | -35/+13 |
| | |||||
* | core: NotaryAck interfaces. (#67) | Jimmy Hu | 2018-08-20 | 1 | -6/+22 |
| | |||||
* | core: Remove notary ack. (#64) | Jimmy Hu | 2018-08-16 | 1 | -22/+25 |
| | |||||
* | Verify consensus info and the acking's signature (#63) | Jimmy Hu | 2018-08-16 | 1 | -3/+29 |
| | |||||
* | core: Add compaction chain module. (#60) | Jimmy Hu | 2018-08-16 | 1 | -0/+9 |
| | |||||
* | core: Add a nonBlockingApplication. (#62) | Jimmy Hu | 2018-08-15 | 1 | -1/+1 |
| | |||||
* | core: Prepare Genesis block. (#54) | Jimmy Hu | 2018-08-14 | 1 | -8/+45 |
| | |||||
* | core: Sign block in Consensus.PrepareBlock. (#50) | Jimmy Hu | 2018-08-13 | 1 | -2/+33 |
| | |||||
* | core: Hash block in Consensus.PrepareBlock. (#46) | Jimmy Hu | 2018-08-12 | 1 | -0/+22 |
| | | | | | | | | * Add hash to block * Check block hash in Consensus.sanityCheck * Add hashBlockFn in block generator.go | ||||
* | core: Modify Consensus interface (#45) | Jimmy Hu | 2018-08-10 | 1 | -3/+21 |
| | |||||
* | core: update governance interface and move K into config (#40) | Wei-Ning Huang | 2018-08-10 | 1 | -5/+2 |
| | |||||
* | core: Deliver only Hash to Application. (#43) | Jimmy Hu | 2018-08-10 | 1 | -2/+6 |
| | |||||
* | core: Add Consensus to replace core.Blocklattice (#35) | Mission Liao | 2018-08-08 | 1 | -0/+130 |
* 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. |