aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: panic after no blocks delivered for 1 minute (#414)Jimmy Hu2019-01-091-16/+40
|
* syncer: skip error (#412)Mission Liao2019-01-081-0/+4
| | | | | | This error would always be raised when trying to sync from consensusHeight == 0. However, this error is mostly meaningless to fullnode, they just need to retry it later.
* simulation: fix k8s simulation stuff (#410)Jimmy Hu2019-01-089-19/+28
| | | | | | * simulation: fix k8s simulation stuff * Default K to 0
* core: fix ci fail (#411)Mission Liao2019-01-082-12/+12
| | | | | | | | | | * Compose hashes for debugApp only * Remove TODOs They are already done * Fix total ordering handing issue
* core: report fork (#409)Mission Liao2019-01-085-15/+89
|
* sync: Verify randomness result before caching them. (#392)Mission Liao2019-01-081-9/+34
| | | | NOTE: the assurance between block's hash and block's position would be done in core.Consensus.
* core: BA 3.0 (#408)Jimmy Hu2019-01-0712-55/+401
| | | | | | | | | | | | | | * Add v3 enum * Add BA leader calculation * Fast BA * Add unittest for Fast BA * Add comment * Select leader in notarySet
* sync: add log for syncer to debug hanging issue (#407)Mission Liao2019-01-072-76/+143
| | | | | | | | | Besides adding logs, also include these minor fixes: * Accessing con.validatedChains under locking * Access con.latticeLastRound under locking * Fix incorrect waitGroup usage * Remove unused parameter in startAgreement
* core: Add check for vote type (#406)Jimmy Hu2019-01-071-0/+4
|
* simulation: Fix simulation stuffs (#405)Jimmy Hu2019-01-072-2/+22
| | | | | | * test: fix marshal randomness pullrequest * Add result for witness latency
* core: remove useless branching code (#403)wmin02019-01-077-80/+29
|
* core: fix ci fail (#404)Mission Liao2019-01-051-2/+1
| | | | | | * Clean DKG instance after finished * Fix CI failure by workaround....
* core: add fork reporting interface to governance (#402)Wei-Ning Huang2019-01-052-0/+14
|
* core: fix stuffs (#401)Mission Liao2019-01-057-35/+32
| | | | | | | * Remove block recycling mechanism * Return directly when previous DKG is not finished. * Adjust some logging level * Skip pulling when hashes to pull is empty
* test: allow empty change request (#398)Jimmy Hu2019-01-042-16/+3
| | | | | | * allow empty reqs * Fix license
* core: expose HashVote function for test (#400)Wei-Ning Huang2019-01-044-8/+9
|
* core: syncer: safe spawn go routine (#399)wmin02019-01-042-10/+6
|
* core: Change target of each nodeset (#397)Jimmy Hu2019-01-041-13/+17
|
* core: check if deliverable for each added block in total ordering (#395)Mission Liao2019-01-044-74/+110
| | | | | | * Check if deliverable multiple times for each added block * Fix format
* core: agreement mgr safe spawn go routine (#396)wmin02019-01-041-4/+10
| | | | Set waitGroup.Add inner go routine is not safe. You can see the example here https://play.golang.org/p/AexsKUD-4WK
* core/utils: Add Penalty checker and VerifyDKGComplaint (#393)Jimmy Hu2019-01-046-5/+519
| | | | | | | | | | * Add Util for checking penalty * Add VerifyDKGComplaints * Fixup and rename * Happy New Year!
* core: stop leaking timer (#394)wmin02019-01-031-0/+2
|
* simulation: add latency for gossip (#389)Mission Liao2019-01-0314-212/+244
|
* core: Refine message of lattice (#391)Jimmy Hu2019-01-031-1/+2
|
* Fix TODO (#390)Mission Liao2019-01-021-6/+9
|
* sync: fix panic (#388)Mission Liao2018-12-281-32/+47
| | | | | * Merge several CRS notifications into one. * Sync config when new CRS is found
* sync: filter duplicated randomness (#387)Mission Liao2018-12-282-13/+35
|
* Fix: consensusTimestamp panic when numChains increased at round 1(#382)Mission Liao2018-12-273-3/+29
|
* test: add witness preparation/verification (#386)Mission Liao2018-12-274-31/+199
|
* core: Polish randomness (#385)Jimmy Hu2018-12-262-4/+10
|
* core: fix stuffs (#383)Mission Liao2018-12-268-181/+128
| | | | | | * Merge core.Consensus constructors * Downgrade severity of logs * Refine logic to add blocks from pool to lattice * Add test.LaunchDummyReceiver
* core: pull block random (#384)Jimmy Hu2018-12-266-55/+206
| | | | | | | | * Add PullRandomness to interface * Add pendingBlocksWithoutRandomness to compactionChain * Pull randomness every 1 second
* simulation: support config change (#381)Mission Liao2018-12-2612-114/+365
|
* core: fix issues found when testing syncing. (#379)Mission Liao2018-12-244-28/+78
| | | | | | | | * Avoid panic when stopping multiple times. * Fix syncer panic when round switching * Add getCurrentConfig to total-ordering, and panic with more info * Avoid infinite loop.
* core: simulation: add throughput and block event monitoring (#380)haoping-ku2018-12-226-57/+267
| | | | | | | | | | | * core: simulation: add throughput and block event monitoring Added throughput and block event monitoring in TCP-local network. These data is collected by nodes and reported to peer server. * fix issues * fix sent time of throughput issue
* utils: move authenticator to utils package (#378)Mission Liao2018-12-2233-598/+487
|
* core: Add TODOJimmy Hu2018-12-201-0/+1
|
* core: Add VerifyDKGMPKReadySignature (#377)Jimmy Hu2018-12-203-1/+30
| | | | | | * core: Add VerifyDKGMPKReadySignature * Fix typo
* core: deliver finalized blocks upon receiving randomness results. (#376)Mission Liao2018-12-206-21/+47
|
* core: Add a `MPKReady` so `MasterPublicKey` cannot be added afterwards (#375)Jimmy Hu2018-12-1917-21/+421
| | | | | | | | | | | | | | | | * Add type DKGReady * Add DKGReady to interface and state * DKG will wait for MPK to be ready before running * Modify test * Check if self's MPK is registered * Add test for delay add MPK * Rename Ready to MPKReady
* circleci: Fix circleciJimmy Hu2018-12-181-5/+6
|
* misc: panic not ready (#374)Mission Liao2018-12-188-50/+103
| | | | | | | | | | | | | | | | * Panic when config/crs not ready For those calls to Governace.Configuration and Governance.CRS without checking returns, replace those calls with these newly added helpers: - utils.GetConfigurationWithPanic - utils.GetCRSWithPanic They would check returns, and panic directly if not ready yet. * Fix a bug that config is not ready when syncing
* syncer: fix stuffs (#373)Mission Liao2018-12-183-49/+84
| | | | | | | | | | | | * Add a new method: GetSyncedConsensus This method avoids calling BlockDelivered in SyncBlocks methods, which avoid potential deadlock. * Add a method to stop the syncer before synced * Enable nonBlockingApp for synced Consensus instance.
* test: check causality (#372)Mission Liao2018-12-174-7/+101
|
* core: cache dkg's private key in db (#371)Mission Liao2018-12-1612-45/+307
|
* core: Fix a bug of DKGNackComplaints (#370)Jimmy Hu2018-12-144-7/+133
| | | | | | * core: Fix a bug if DKGNackComplaint is added after required time. * Duplicated NackComplaint should be only count once.
* db: cache compaction chain tip in db (#369)Mission Liao2018-12-1311-75/+282
| | | | | * Replace JSON with RLP in levelDB implementation. * Make sure blocks to sync following compaction chain tip
* core: check if CRS is proposed before running CRS (#368)Jimmy Hu2018-12-131-9/+12
|
* db: rename blockdb to db (#367)Mission Liao2018-12-1326-405/+410
| | | | | | | | | | * 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
* syncer: fix stuffs (#366)Mission Liao2018-12-127-73/+160
| | | | | | | | | | * return delivered blocks when processing finalized blocks * check deliver sequence when processing finalized blocks * skip delivery of finalized blocks * remove duplicated calls to BlockConfirmed * add numChains change in test scenario * fix the bug that restartNotary is triggered by older block than current aID.
* circleci: Add workflow (#364)Jimmy Hu2018-12-101-16/+78
| | | | | | | | | | * Adding workflw * Add name to command * Change name * Move format check to lint
* core: Longer lambda for TravisCI (#365)Jimmy Hu2018-12-103-2/+17
| | | | | | * Longer time for TravisCI. * Update CI setting for PR
* ci: Add TravisCI setting. (#363)Jimmy Hu2018-12-086-57/+230
| | | | | | | | | | | | | | * Update Gopkg.lock * Fix test * Add travisCI setting * Print log using fmt * Update GNUmakefile * Use single go rountine for consensus_test
* core: fix bugs found when node-set is not equal to notary-set (#362)Mission Liao2018-12-077-62/+106
|
* simulation: fix concurrency issue, add lock (#361)haoping-ku2018-12-061-3/+7
|
* ci: some change to circleci (#360)Jimmy Hu2018-12-063-4/+4
| | | | | | | | * CircleCI: change to go1.11 * fix gofmt * Reduce test size
* test: allow to log in test.State (#359)Mission Liao2018-12-0616-62/+153
|
* Haoping fix simulation (#356)haoping-ku2018-12-058-15/+168
| | | | | | | | | | | | | | | * simulation: add benchmark features * tmp * simulation: modify Debug interface * Added BlockReceived and BlockReady function to Debug interface. * Added Benchmark features. * fix * fix typos
* core: fix agreement sync issue. (#358)Jimmy Hu2018-12-051-2/+3
|
* core: syncer: fix round finding process (#357)haoping-ku2018-12-051-3/+3
| | | | | | * core: syncer: fix round finding process * Fix comment
* core: log the last pending block in compaction chain (#355)Mission Liao2018-12-043-20/+25
|
* core: Fix stuffs (#354)Jimmy Hu2018-12-043-2/+43
| | | | | | - Add common.CustomLogger - CRS will wait for DKG to finish - Fix core.agreementMgr.processAgreementResult
* core: construct consensus from syncer (#352)Mission Liao2018-12-047-84/+273
|
* simulation: fix confirm latency (#353)haoping-ku2018-12-032-6/+10
|
* core: Fix stuffs (#351)Jimmy Hu2018-11-303-2/+10
| | | | | | * Use non-blocking app in consensus core * Prevent panic when getting nextHeight
* core: remove finalized from compaction-chain module (#350)Mission Liao2018-11-303-345/+57
| | | | | | | | | | | | * Remove extractFinalizedBlock * Fix/Remove tests related to extractFinalizedBlocks * Remove unused function * Provide randomness result from finalized blocks, nothing more. * Make init block matched with pendingBlocks[0]
* test: Fix for state (#349)Jimmy Hu2018-11-291-3/+23
| | | | | | * Only apply each requests once * Sort by time
* simulation: -log to dump log to file as well (#348)Jimmy Hu2018-11-293-22/+32
|
* core: syncer: add syncer (#346)haoping-ku2018-11-2919-127/+1291
|
* core: remove StronglyAcked (#347)Mission Liao2018-11-2911-110/+53
|
* core: fix license in common/types.go (#345)haoping-ku2018-11-281-17/+0
|
* misc: Update README.md (#344)Jimmy Hu2018-11-271-8/+9
|
* core: Fix stuffs (#342)Jimmy Hu2018-11-276-160/+124
|
* core: support NumChains change for BA modules (#339)Mission Liao2018-11-2015-333/+763
|
* core: Add function alias (#341)Jimmy Hu2018-11-201-0/+4
|
* core: Block randomness will be processed again in finalized block (#338)Jimmy Hu2018-11-203-78/+165
| | | | | | * Process randomness result in finalized block if missed * Add test for missing block randomness
* core, test: Fix various issues (#337)Jimmy Hu2018-11-192-2/+4
|
* core: Fix data race (#335)Jimmy Hu2018-11-191-0/+2
|
* core: Handle issues if DKG/CRS is already finished (#334)Jimmy Hu2018-11-183-38/+28
|
* core: Fix various syncing issue. (#331)Jimmy Hu2018-11-164-19/+32
|
* core: Add timeout to TSig (#330)Jimmy Hu2018-11-152-1/+49
|
* test: fix network (#328)Mission Liao2018-11-155-82/+184
| | | | * Broadcast to set of node instead of broadcasting when attaching cache. * Fix pull blocks
* core: Fix issues in syncing mode (#329)Jimmy Hu2018-11-153-0/+32
|
* core: Fix syncing issues (#326)Jimmy Hu2018-11-141-2/+9
| | | | | | * BA should not start if governance is out-of-sync * Should not do sync BA if consensus is not started
* utils: add utils package (#327)Mission Liao2018-11-148-26/+20
|
* core: sync logger with dex (#325)Mission Liao2018-11-146-10/+16
|
* simulation: Fix simulation failure (#324)Mission Liao2018-11-141-0/+2
|
* core: Integrate totalOrdering syncer (#322)Jimmy Hu2018-11-132-21/+29
|
* core: expose implicit round shift (#321)Mission Liao2018-11-1318-61/+71
|
* core: Fix data race. (#320)Jimmy Hu2018-11-131-6/+8
| | | Finalization.Randomness will be set at output
* core: Fix data race (#319)Jimmy Hu2018-11-131-0/+4
|
* Add LICENSE declaration file (#318)Wei-Ning Huang2018-11-131-0/+165
|
* core: Reduce call to Application.VerifyBlock (#317)Jimmy Hu2018-11-134-12/+61
|
* core: lattice: fix test (#316)haoping-ku2018-11-121-1/+1
|
* test: add integration test (#315)Mission Liao2018-11-117-20/+197
| | | | | | * Rename NonByzantineTestSuite to WithSchedulerTestsuite * Add a method to query the latest position delivered * Add integration test for core.Consensus * Show detailed list for test cases in CI
* test: implement pulling in network layer (#314)Mission Liao2018-11-094-43/+580
| | | | | | | * Add definition for test.PullRequest * Cache notary sets for each round in network module * Cache peers as nodeID in network module. * Implement pull blocks * Implement pull vote
* core: Extract VoteHeader (#313)Mission Liao2018-11-097-61/+45
|
* core: consensus-timestamp: add comments (#312)haoping-ku2018-11-092-26/+39
|
* simulation: use test.Governacne in simulation (#311)Mission Liao2018-11-0812-320/+185
| | | | | | | | | | | | * 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: Fix panic (#310)Jimmy Hu2018-11-081-4/+11
| | | | * Fix panic
* core: lattice, total-ordering: remove newGenesisConfig (#308)haoping-ku2018-11-087-159/+117
| | | | | | * core: lattice, total-ordering: remove newGenesisConfig * fixup
* core: revert the revert for broken commit and fix (#309)Mission Liao2018-11-083-69/+82
| | | | | | | | * Revert "Revert "core: unbind global round in Consensus (#304)" (#306)" This reverts commit 33d9311270414d8911122a4c7354773786df7f85. * Remove TODO After verified with full node, this call to VerifyBlock is not required.
* core: Optimize core (#307)Jimmy Hu2018-11-086-32/+60
|
* Revert "core: unbind global round in Consensus (#304)" (#306)Mission Liao2018-11-083-63/+59
| | | This reverts commit 3714ebf2f1054d9984d37b89cf17e885a5856532.
* test: make StateChangeRequest broadcast-able (#305)Mission Liao2018-11-075-278/+445
| | | | | | | | | | | | | | | | | | | | | | | | | Make `test.StateChangeRequest` behaves like tx on ethereum: - Can be broadcasted and cached in a pool. - Uniquely indexed, and be removed after applied. Changes: - Make cloneDKGx functions in test.State as utilities. - Add hash and timestamp fields to test.StateChangeRequest. - Add two methods to test.State: - PackOwnRequests would pack all pending change requests owned by this instance as byte slice, and move them to global pending requests pool. - AddRequestsFromOthers would add pending change requests from others to global pending requests pool. - The method State.PackRequests now would pack requests in global pending requests pool. - The method State.Apply would remove corresponding StateChangeRequest by hash.
* core: lattice: add round in NewLattice() (#303)haoping-ku2018-11-073-9/+10
|
* core: unbind global round in Consensus (#304)Mission Liao2018-11-063-59/+63
|
* core: Run DKG stuffs only if the node is in DKG set (#302)Jimmy Hu2018-11-0615-40/+165
|
* misc: Rollback circleci workaround (#301)Jimmy Hu2018-11-061-0/+1
|
* core: lattice-data: fix details and add test (#299)haoping-ku2018-11-067-152/+168
|
* core: Fix deadlock (#298)Jimmy Hu2018-11-051-0/+9
|
* misc: Fix circleci (#300)Jimmy Hu2018-11-051-1/+0
|
* test: move simulation.network to test package (#297)Mission Liao2018-11-058-245/+328
|
* core: notify consensus height for genesis rounds (#296)Mission Liao2018-11-056-7/+47
| | | | * Add notifyGenesisRounds * Log round for types.Vote and types.Block
* core: Fix dkg and CRS signature (#294)Jimmy Hu2018-11-054-19/+68
|
* core: New BA (#295)Jimmy Hu2018-11-052-5/+7
|
* core: Fix BA stuffs (#293)Jimmy Hu2018-11-052-3/+15
|
* core: Copy witness for empty block (#292)Jimmy Hu2018-11-051-0/+3
|
* core: Fix fork vote (#290)Jimmy Hu2018-11-033-16/+18
|
* core: total-ordering: fix details and add sync test (#288)Haoping Ku2018-11-023-309/+401
|
* core: reset CRS in leader selector by round (#286)Mission Liao2018-11-027-34/+28
|
* core: block deliver with position (#289)Mission Liao2018-11-0210-21/+26
| | | | | This info is required when application layer needs to do something related to the underlying DAG, not just compaction chain.
* core: Remove max block interval (#287)Jimmy Hu2018-11-0217-84/+41
|
* Rename repo to dexon-consensusWei-Ning Huang2018-11-02114-847/+847
|
* core: Fix various locking issues (#285)Jimmy Hu2018-11-023-24/+40
|
* core: Total Ordering syncer (#277)Jimmy Hu2018-11-012-0/+485
| | | | | | | | | | | | | | | | * Add simple processFinalizedBlock logic * processBlock * Bootstrap mode * Sort before flush * Add syncer test * Clean more data for memory * Add comments. Fix some stuffs.
* core: core.Lattice supports config change (#276)Mission Liao2018-11-0112-156/+499
| | | | | | | | | | | 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: fix possible fork vote (#283)Jimmy Hu2018-11-012-15/+19
|
* Add pprof to dexcon commands (#282)Mission Liao2018-11-012-4/+12
|
* core: Add PullVotes to Network. (#281)Jimmy Hu2018-10-318-71/+69
|
* core: Add a repeat vote state. (#280)Jimmy Hu2018-10-313-12/+105
|
* core: fix NotifyRoundHeight is not called when processing blocksMission Liao2018-10-311-10/+16
| | | - also add missing logs when calling Application.BlockDelivered.
* misc: Change bls stuffs for docker build (#278)Jimmy Hu2018-10-311-2/+2
|
* core: fix lattice bugs (#274)Mission Liao2018-10-303-5/+38
| | | | | | | | | | | | | | | | | * 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.
* test: integrate state to gov (#275)Mission Liao2018-10-303-9/+113
| | | | | | * Fix dummy error * Check validity before apply state changes. * Add RegisterConfigChange method to test.Governance * Add SwitchToRemoteMode method to test.State
* core: Create an interface for TSigVerifierCache (#273)Jimmy Hu2018-10-301-7/+24
|
* core: fix consensus timestamp (#272)Mission Liao2018-10-291-2/+12
| | | | | | | | | | | * Fix panic Assume DAG would be increased to 7 chains at round 4. When encounter the first block from round 4, this module would attempt to resize its working set to the numChains in round 2 or 3. * Add a check to make sure consensus timestamps are increasing * Fix consensus timestamp rewind
* core: Add BlockSkeleton and Verify functions (#271)Jimmy Hu2018-10-296-3/+75
|
* core: Fix goroutine leaks (#270)Jimmy Hu2018-10-292-1/+8
|
* core: Do not process vote/block in agreement if it has stopped (#269)Jimmy Hu2018-10-291-4/+18
|
* test: Handle blocks that should retry sanity check later. (#267)Mission Liao2018-10-272-14/+36
|
* core: Fix missing fields when cloning blocks. (#268)Mission Liao2018-10-272-4/+33
|
* core: Remove atomic (#266)Jimmy Hu2018-10-272-14/+11
|
* core: Unit test for BA sync (#265)Jimmy Hu2018-10-262-0/+86
|
* core: sync BA (#264)Jimmy Hu2018-10-263-19/+72
|
* test: clone types.Config, test.Governance, test.State (#262)Mission Liao2018-10-266-42/+608
|
* core: Pull block (#263)Jimmy Hu2018-10-267-32/+141
|
* core: Leader selector will retry sanityCheck (#261)Jimmy Hu2018-10-268-27/+118
|
* misc: Increase CircleCI no output time to 15 min (#260)Jimmy Hu2018-10-261-0/+1
|
* core: Lock entire lattice.ProcessBlock (#259)Jimmy Hu2018-10-262-2/+7
| | | | | | * Lock entire ProcessBlock * Lock Consensus.processBlock
* misc: Add longer timeout for test in master (#258)Jimmy Hu2018-10-252-8/+14
|
* core: lattice sync (#257)Jimmy Hu2018-10-2512-119/+507
|
* core: handle round 0 randomness in processFinalizedBlock (#256)Jimmy Hu2018-10-252-12/+26
|
* test: add test.Stopper to stop by round (#255)Mission Liao2018-10-252-32/+162
|
* core: Move dkg in types to types/dkg. (#253)Jimmy Hu2018-10-2519-278/+297
|
* core: fix stuffs (#250)Mission Liao2018-10-249-52/+33
| | | | | | | | * 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.
* test: Fix datarace in test (#251)Jimmy Hu2018-10-241-6/+12
|
* test: add test.State (#239)Mission Liao2018-10-2411-154/+1019
| | | | | | | | | * separate test utility and interface implementation for test.Governance. * add test.State. * integrate test.State to test.Governance. test.State is mainly used to emulate state propagation on fullnode.
* core: disable nonblocking temporarily (#249)Mission Liao2018-10-242-10/+5
|
* core: reduce calls to Application.VerifyBlock (#247)Mission Liao2018-10-245-29/+25
| | | | | | * 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 Liao2018-10-241-0/+4
|
* core: Change interface of Application.VerifyBlock (#246)Jimmy Hu2018-10-237-10/+25
| | | | * Change interface of Application.VerifyBlock
* Change BLS to dexon-foundation (#245)Jimmy Hu2018-10-237-19/+18
|
* core: notify fullnode to snapshot configs when round change. (#243)Mission Liao2018-10-231-8/+19
|
* core: add equality checker for dkg related structure (#237)Mission Liao2018-10-234-26/+379
| | | | | | | | | Besides adding equality, also renaming those fields. - PublicKeyShares.shares -> shareCaches - PublicKeyShares.shareIndex -> shareCacheIndex - rlpPublicKeyShares.Shares -> ShareCaches - rlpPublicKeyShares.ShareIndexK -> ShareCacheIndexK - rlpPublicKeyShares.ShareIndexV -> ShareCahceIndexV
* core: add round parameter to ProposeCRS method (#244)Wei-Ning Huang2018-10-235-5/+12
| | | | | | | | 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 Hu2018-10-232-20/+41
|
* core: Change dkg timing (#241)Jimmy Hu2018-10-231-12/+17
| | | | | * Register DKG after CRS is proposed * Change round at only one place
* core: remove duplicate BroadcastRandomnessResult call (#240)Wei-Ning Huang2018-10-231-6/+1
|
* core: prepare empty block if null block is confirmed by BA. (#231)Jimmy Hu2018-10-237-23/+136
|
* core: fix uninitialized variable in configuration chain (#238)Wei-Ning Huang2018-10-222-1/+2
|
* core: Handling self proposed DKG private share (#236)Jimmy Hu2018-10-223-27/+34
|
* core: total-ordering: add test TestRunFromNonGenesis (#226)Haoping Ku2018-10-223-22/+96
| | | | * core: total-ordering: add test TestRunFromNonGenesis
* crypto: dkg: implement rlp.Encoder, rlp.Decoder for PrivateKey (#235)Sonic2018-10-202-0/+26
|
* core: fix logging for SendDKGPrivateShare (#234)Wei-Ning Huang2018-10-201-1/+2
|
* Start Run() until dMoment. (#233)Jimmy Hu2018-10-201-0/+2
|
* core: types: implement rlp.Encoder and rlp.Decoder (#232)Sonic2018-10-206-7/+379
| | | | | * core: types: implement rlp.Encoder and rlp.Decoder * crypto: dkg: fix PublicKey.Bytes
* core: initial commit for logger (#228)Mission Liao2018-10-1912-52/+280
| | | | | | | | | | | | | * 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
* misc: Fix simulation error (#230)Jimmy Hu2018-10-196-24/+78
|
* core: Sync from BA and test. (#224)Jimmy Hu2018-10-192-64/+199
|
* core: total-ordering: change early flag to mode (#227)Haoping Ku2018-10-1910-49/+64
| | | * core: total-ordering: change early flag to mode
* crypto: ecdsa: make NodeID match dexon address (#229)Sonic2018-10-193-51/+35
| | | | | | | * Remove publicKey struct * PublicKey.Bytes() return uncompressed public key to match the address format of dexon (Keccak256(pubBytes[1:])[12:], where pubBytes is 65 bytes uncompressed public key.). * Rename ethcrypto to dexCrypto
* core: Append all config till Initial block (#225)Jimmy Hu2018-10-181-0/+7
|
* core: types: implements UnmarshalJSON from DKGMasterPublicKey (#223)Wei-Ning Huang2018-10-181-0/+8
|
* core: total ordering flush (#212)Mission Liao2018-10-189-229/+737
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-186-27/+391
|
* core: consensus-timestamp: add sync (#219)Haoping Ku2018-10-183-29/+118
| | | | | | | | | | | | | | * 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: Add init block to Run() (#221)Jimmy Hu2018-10-186-14/+24
|
* core: Some sync functions (#220)Jimmy Hu2018-10-177-27/+107
|
* core: Rebroadcast agreement and randomness result. (#218)Jimmy Hu2018-10-173-30/+49
|
* core: genesis consensus timestamp (#217)Mission Liao2018-10-176-30/+48
| | | | | | | | | | * 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: Add stop function to all components (#216)Jimmy Hu2018-10-175-28/+79
|
* Finalization Height starts from 1 (#215)Jimmy Hu2018-10-162-0/+7
|
* core: consensus-timestamp: modify for round change (#214)Haoping Ku2018-10-161-4/+12
| | | | | | * core: consensus-timestamp: modify for round change * core: consensus-timestamp: fix typos
* core: New dexon ba (#210)Jimmy Hu2018-10-168-479/+405
|
* core: Fix corner cases (#211)Jimmy Hu2018-10-164-2/+8
| | | | | | * leader selector will choose smaller hash if distance to crs is the same * Set initial value of aID in BA before start
* core: set genesis block finalization timestamp to zero time (#213)Wei-Ning Huang2018-10-161-0/+2
|
* core: Change First round dkg timing (#209)Jimmy Hu2018-10-162-4/+6
|
* core: fix block confirmed is not called when Debug is not implemented. (#208)Mission Liao2018-10-162-3/+54
|
* core: Change threshold (#205)Jimmy Hu2018-10-151-1/+1
|
* core: fix timestamp marshaling (#207)Wei-Ning Huang2018-10-152-3/+3
|
* Remove duplicated dMoment in Consensus.Run (#206)Jimmy Hu2018-10-152-3/+5
|
* core: Add NodeSetCacheInterface (#203)Jimmy Hu2018-10-152-31/+42
|
* core: Change DKG threshold (#204)Jimmy Hu2018-10-153-6/+6
|
* core: Fix simulation errors. (#202)Jimmy Hu2018-10-154-35/+36
|
* core: fix simulation error (#201)Jimmy Hu2018-10-155-12/+29
| | | | | * Sync dMoment for all consensus core * App check for randomness ignore round 0
* test_config: sync default config (#200)Wei-Ning Huang2018-10-152-2/+4
|
* misc: Use prebuild bls docker image. (#199)Jimmy Hu2018-10-152-5/+18
|
* core: No randomness for round 0 (#198)Jimmy Hu2018-10-153-1/+45
| | | | | * No randomness for round 0 * Ignore round 0 randomness
* core: check if flush is required when round switching in total-ordering (#197)Mission Liao2018-10-156-220/+304
|
* core: blocks generation supports rounds (#196)Mission Liao2018-10-146-219/+445
| | | | | | | * 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: crypto: ecdsa: add method to create PrivateKey from ecdsa.PrivateKey ↵Wei-Ning Huang2018-10-131-0/+9
| | | | (#195)
* core: modify interface (#194)Mission Liao2018-10-129-20/+38
| | | | * 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-1214-597/+802
| | | | | | | | | | | | | | | * 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-1119-92/+110
| | | | | | | * 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-113-5/+5
| | | | | | | | 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-114-6/+10
| | | | | Use ethereum style nodeID generation (keccak on compressed public key without the first byte).
* simulation: Fix docker build fail (#188)Jimmy Hu2018-10-093-3/+9
|
* Merge pull request #187 from dexon-foundation/w-bytesSonic2018-10-091-0/+5
|\ | | | | common: add Bytes() method to Hash
| * Merge branch 'master' into w-bytesWei-Ning Huang2018-10-0912-39/+74
| |\ | |/ |/|
* | Fix typo in crypto (#186)Jimmy Hu2018-10-092-2/+16
| |
* | core: Add round to DKG methods in gov. Change network interface name (#185)Jimmy Hu2018-10-0910-37/+58
| |
| * common: add Bytes() method to HashWei-Ning Huang2018-10-091-0/+5
|/
* core: Add DKG final message. (#181)Jimmy Hu2018-10-0914-2/+175
|
* core: update config variable name grammar and remove configuration (#184)Wei-Ning Huang2018-10-088-64/+26
|
* core: Fix timestamp (#182)Jimmy Hu2018-10-082-5/+1
|
* core: Remove round from gov.ProposeCRS (#183)Jimmy Hu2018-10-085-18/+31
|
* core: Check PrivateShare in DKGComplaint (#180)Jimmy Hu2018-10-082-25/+75
|
* core: Add block randomness in compaction-chain module (#179)Jimmy Hu2018-10-086-32/+153
|
* core: Block randomness generation. (#178)Jimmy Hu2018-10-084-7/+73
|
* core: General tsig (#177)Jimmy Hu2018-10-0514-73/+287
|
* core: Add NotarySet and DKGSet to cache (#176)Jimmy Hu2018-10-053-27/+94
|
* types: Test block clone (#175)Jimmy Hu2018-10-052-0/+73
|
* core: find block in db (#174)Mission Liao2018-10-057-79/+199
| | | | | | | | | | | | | | | | | | | | * 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-044-53/+71
|
* core: Check sorted ack in sanity check (#173)Jimmy Hu2018-10-044-1/+44
|
* core: split lattice-data to another file (#172)Mission Liao2018-10-044-1058/+1069
| | | | | - Split latticeData to another file - Remove areAllAcksInLattice
* core: Check Witness height. Add ConsensusTime and ConsensusHeight to block. ↵Jimmy Hu2018-10-0416-61/+159
| | | | (#170)
* common: Add an Event module (#169)Jimmy Hu2018-10-042-0/+175
|
* test: Short test applied to some long running tests (#168)Jimmy Hu2018-10-043-3/+16
|
* core: remove NumWitnessSet in governance config (#167)Wei-Ning Huang2018-10-033-9/+3
| | | | NumWitnessSet is no longer required as we don't have witness set in the design anymore.
* core: export some crypto verification function (#166)Wei-Ning Huang2018-10-033-7/+9
| | | | | verifyDKGMasterPublicKeySignature and verifyDKGComplaintSignature are needed in the governance contract to verify the signature. Export than so fullnode can use it.
* core: publish round based config (#165)Mission Liao2018-10-0311-33/+147
|
* CurcleCI: Run full test on master (#164)Jimmy Hu2018-10-032-1/+16
|
* core: Add unit test for DKG CRS in consensus (#163)Jimmy Hu2018-10-033-4/+120
|
* core: Prevent duplicated nack complaint (#162)Jimmy Hu2018-10-032-1/+14
|
* core: remove shard (#161)Mission Liao2018-10-027-683/+620
|
* core: Export DKGGroupPublicKey and its verify function (#160)Jimmy Hu2018-10-023-18/+21
|
* core: replace reliable-broadcast with shard (#159)Mission Liao2018-10-0216-1458/+264
|
* core: remove ProposeThresholdSignature/GetThresholdSignature (#158)Wei-Ning Huang2018-10-024-48/+5
| | | Also rename the argument name of ProposeCRS.