aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dep: update Gopkg.lock go-tangerine revisionHEADmasterHao2019-09-181-1/+1
|
* misc: migrate to github.com/tangerine-networkHao2019-09-17101-408/+401
|
* core: syncer: recovery votes threshold should be the same as DKGThresholdJhih-Ming Huang2019-09-025-26/+105
|
* core: fix logWei-Ning Huang2019-08-281-1/+1
|
* core: utils: add GetDKGNackThreshold methodWei-Ning Huang2019-08-271-0/+5
| | | | | | Nacking DKG requires a different threshold then DKG itself, since if there are more than t + 1 of node nacking a node, we can assume the node is actually dead.
* core: fix logWei-Ning Huang2019-08-021-1/+1
|
* core: do not panic in deliveryGuard but send a stop message insteadWei-Ning Huang2019-06-235-17/+19
|
* Update import pathWei-Ning Huang2019-06-2397-358/+358
|
* core: optimize dkg protocol (#582)Jimmy Hu2019-05-061-2/+17
| | | | | | * core: fast filter already received prv share * core: do not propose duplicated complaint
* core: optimize syncer handling agreement result (#581)Jimmy Hu2019-05-034-31/+18
|
* core: fix test (#579)Jimmy Hu2019-04-251-1/+1
|
* core: fix dkg complaint handling (#578)Jimmy Hu2019-04-252-6/+9
|
* core: change log level (#577)Jimmy Hu2019-04-241-2/+2
|
* core: prevent vote being filtered (#576)Jimmy Hu2019-04-221-1/+2
|
* utils: fix logic to trigger round events (#575)Mission Liao2019-04-193-53/+51
| | | | | Merge the code to check if DKG valid in: - trigger next round event - check if resetting DKG is required
* misc: fix depJimmy Hu2019-04-183-12/+19
|
* core: optimize handling for bad block (#574)Jimmy Hu2019-04-154-31/+62
| | | | | | * core: optimize handling for bad block * fix test
* core: add whether to report to VerifyPSig (#572)Jimmy Hu2019-04-155-14/+21
| | | | | | * core: add whether to report to VerifyPSig * fixup
* core: start next BA only when previous block delivered (#571)Jimmy Hu2019-04-154-5/+19
|
* core: Add DKGSuccess (#569)Jimmy Hu2019-04-1517-22/+311
| | | | | | * core: Add DKGSuccess * core: reset if not enough of dkg success
* core: fix rebroadcast anti nack complaint (#570)Jimmy Hu2019-04-151-2/+5
|
* core: fix flaky testJimmy Hu2019-04-141-0/+7
|
* core: add log to verify psigJimmy Hu2019-04-131-0/+10
|
* core: add report bad peer interface to network (#559)Jimmy Hu2019-04-1212-55/+178
|
* Remove this purge, it's done in Consensus (#566)Mission Liao2019-04-111-3/+0
|
* misc: fix bls dependencyJimmy Hu2019-04-111-1/+1
|
* core: fix false alarm (#564)Jimmy Hu2019-04-118-67/+117
| | | | | | | | | | | | * ignore test simple * core: update voteFilter to filter old er round * circleci: save logs * core: move check notarySet to agrmgr * fixup
* core: change CRSSignature with bls (#563)Jimmy Hu2019-04-1111-85/+104
|
* dkg: first part of change to BLS12_381 (#561)Sonic2019-04-112-3/+3
| | | | | * bin: polish install_dkg_dep script * dkg: change to use BLS12_381
* core: add reset to db.PutDKGPrivateKey (#560)Jimmy Hu2019-04-106-53/+78
|
* core: try to recover dkg private key from db (#558)Jimmy Hu2019-04-101-20/+42
| | | | | | * core: try to recover dkg private key from db * fixup
* core: syncer: fix force sync (#556)Jimmy Hu2019-04-094-5/+19
| | | | | | | | | | * core: syncer: fix force sync * Fix come logic * core: syncer: fix * fix log
* core: priority process self message (#557)Jimmy Hu2019-04-091-5/+17
| | | | | | | | * core: priority process self message * fix * fixup
* core: remove payload from reportForkBlock (#555)Jimmy Hu2019-04-093-2/+17
|
* core: refine VerifyAgreementResult (#553)Mission Liao2019-04-084-18/+31
| | | | | | | | * Pass notary set directly to VerifyAgreementResult * Fix core.Consensus * Fix syncer
* core: run TSig forever when ForceSync (#554)Jimmy Hu2019-04-083-9/+12
|
* core: filter vote if already processed (#552)Jimmy Hu2019-04-083-1/+21
| | | | | | * core: more aggresive vote filter * add test
* core, core: crypto: dkg: fix concurrent access bug (#551)Jimmy Hu2019-04-063-10/+36
| | | | | | * core: crypto: dkg: fix concurrent access bug * core: fix concurrent bug
* core: do nothing if not in notary set (#549)Jimmy Hu2019-04-041-0/+8
|
* core/crypto/dkg: concurrent access for gpk (#548)Jimmy Hu2019-04-0414-44/+133
| | | | | * core/crypto/dkg: add benchmark * core/crypto/dkg: concurrent access for gpk
* core: add benchmarkJimmy Hu2019-04-031-8/+50
|
* core: prepare signer and npk (#545)Jimmy Hu2019-04-031-6/+22
|
* core: syncer: add deliver pending blocks (#546)Jimmy Hu2019-04-032-0/+33
| | | | | | * core: syncer: deliver pending blocks * fixup
* core: fix disqualified (#544)Jimmy Hu2019-04-022-2/+2
| | | | | | * core: fix disqualified * fix test
* Fix oops (#543)Mission Liao2019-04-021-1/+1
|
* core: optimize message handle (#542)Jimmy Hu2019-04-026-38/+129
| | | | | | | | * core: optimize for handling agremenet result * core: disable clone vote * core: touch npks
* core: only qualified nodes can participant BA (#540)Jimmy Hu2019-04-027-77/+104
| | | | | | * core: only qualified nodes can participant BA * core: remove leader calculation from node set cache
* core: fix 'round not change' bug in receiver (#538)Jimmy Hu2019-04-023-91/+45
| | | | | | * core: remove round and round change height in recv * fixup
* core: expose CalcQualifyNodes function (#541)Wei-Ning Huang2019-04-011-3/+4
|
* core: clean TODOs (#539)Mission Liao2019-04-0132-671/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core: fix block timestamp (#529) * Remove TODO dMoment is still required when the block timestamp of the genesis block is still need to be verified. * Refine timestamp when preparing blocks * Add timestamp checking in sanity check * Revert code to patch position when preparing * Remove TODOs that seems meaningless now * Remove TODOs related to refactoring * core: remove finalization (#531) - Remove types.FinalizationResult, randomness field would be moved to `types.Block` directly. - Add a placeholder for types.Block.Randomness field for blocks proposed from round < DKGDelayRound. (refer to core.NoRand) - Make the height of the genesis block starts from 1. (refer to types.GenesisHeight) - The fullnode's behavior of core.Governance.GetRoundHeight is (assume round-length is 100): - round: 0 -> 0 (we need to workaround this) - round: 1 -> 101 - round: 2 -> 201 - test.Governance already simulate this behavior, and the workaround is wrapped at utils.GetRoundHeight. * core: fix issues (#536) fixing code in these condition: - assigning position without initializing them and expected it's for genesis - compare height with 0
* core: touch node cache even in reset (#537)Jimmy Hu2019-04-011-3/+0
|
* core: Fix invalid block height when triggering init round event (#533)Mission Liao2019-03-292-20/+2
|
* syncer: confirmed block without randomness (#532)Mission Liao2019-03-291-4/+8
|
* core: run dkg by height (#527)Jimmy Hu2019-03-294-73/+180
| | | | | | | | * core: run dkg by height * core: check cc.dkgCtx before running each dkg phases * fix
* core: reset DKG if to less qualified nodes (#528)Jimmy Hu2019-03-293-5/+14
|
* core: fix issues (#525)Mission Liao2019-03-283-15/+20
| | | | | * Refine the logic to append config * Potential fix for round not increase when fast syncing
* core: workaround for GetRoundHeight (#526)Jimmy Hu2019-03-283-3/+18
|
* core: add log for restarting BA (#524)Jimmy Hu2019-03-283-0/+8
| | | | | | * core: add log for restart BA * Add log for changing round
* core: workaround for GetRoundHeight (#523)Jimmy Hu2019-03-274-4/+33
| | | | | | | | * core: workaround for GetRoundHeight * update gopkg.lock * x
* core: fix issues (#522)Jimmy Hu2019-03-273-11/+23
| | | | | | | | * required vote calculation * fix agreement result * core: fix initRound issue of BA
* core: Update BA to the latest version (#519)Jimmy Hu2019-03-275-74/+59
| | | | | | | | | | * core: fastPreCom should not propose fastCom in RBA * add test for fix * core: update BA * core: fix test
* core: sign block hash for empty block (#517)Jimmy Hu2019-03-274-15/+241
| | | | | | * core: sign block hash for empty block * run force synced empty block at startup
* core: bring back agreement result (#515)Jimmy Hu2019-03-278-78/+239
| | | | | | | | | | * core: bring back agreement result * add logger * Fix * fixup
* core: Remove agreement result (#514)Jimmy Hu2019-03-2712-232/+492
| | | | | | | | | | | | * core: remove agreement result for round with randomness * remove agr test in syncer * fixup * remove randomness field from agreement result * modify test
* core: merge notarySet and DKGSet (#488)Jimmy Hu2019-03-2735-870/+413
| | | | | | | | | | | | | | * core: さよなら DKGSet * test logger * temporary fix before finalized * core: Sign psig on commit vote * Add syncer log * fixup
* core: fix required vote calculations (#513)Jimmy Hu2019-03-243-2/+5
|
* core: refine DKG aborting (#512)Mission Liao2019-03-238-42/+81
| | | | | | | | | | | | | | | | | | * Avoid aborting the DKG protocol registered later Although that DKG protocol would be registered after 1/2 round, both of them are triggered in separated go routine and we shouldn't assuem their execution order. * Capitalize logs * Add test * Return aborted when not running * Log DKG aborting result * Remove duplicated DKG abort
* core: remove initRoundBeginHeight paramenterMission Liao2019-03-2213-152/+153
| | | | * Implement Governance.GetRoundHeight in test.Governance.
* core: abort hang DKG (#508)Mission Liao2019-03-2210-116/+152
| | | | | | | | | | | | | | | | | | | | | | | * Capitalize log * Fix DKG aborting hangs Make sure reset cc.dkg to nil in runDKG * Remember to purge tsig verfier too * Replace abortCh with context.Context * Fix obvious bug * Fixup: forever blockin at Wait method when runDKG is not called * Fixup: fix corner case If the Add(1) moved to runDKG under cc.dkgLock, we may not catch it after unlocking cc.dkgLock. * fixup
* core: fix PrivateShares RLP decode/encode bug (#510)bojie2019-03-222-5/+62
|
* core: height event handlers are not called (#509)Mission Liao2019-03-227-103/+154
| | | | | | | * Make utils.RoundEvent.ValidateNextRound non-blocking * Make NotifyHeight called blockingly * Trigger all height event handlers that should be triggered by initBlock * Fixup: forget the syncer part
* core: fix DKGProtocolInfo RLP decode/encode bug (#505)bojie2019-03-202-8/+133
|
* core: reset DKG (#502)Mission Liao2019-03-2019-79/+395
| | | | | | | | | | | | | | * Allow utils.NodeSetCache to purge by rounds. * Purge utils.NodeSetCache when DKG reset. * Add a utils.RoundEvent handler to abort all previous running DKG * Fix test.App hangs in BlockDelivered when utils.RoundEvent is attached. ValidateNextRound is a blocking call and would block test.App.BlockDelivered.
* core: remove round from addDKG fuction (#501)Jimmy Hu2019-03-198-54/+40
|
* core: abort hang dkg (#500)Mission Liao2019-03-194-59/+232
|
* core/syncer: fix a bug in ForceSync (#499)Jimmy Hu2019-03-181-5/+8
|
* core: snapshot DKG protocol struct when finish any phase (#496)bojie2019-03-189-159/+552
|
* test: try to mitigate flaky tests (#498)Mission Liao2019-03-185-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add assertion to make sure all nodes are synced. * Retry round event with BA's interval We are about to modify lambdaDKG with block height, instead of timing. Therefore, the last interval we could use is BA's interval. * Check ctx in inifite loop * Disable this panic temporary If a fast sync triggered by receiving types.AgreementResult from later position, this panic would be triggered 100%, ex. current-round: 1, change-notary-height: 120, agreeemnt-result from round:2 height:121 However, I don't have easy way to fix it temporary. * Lower down the test size for TCP * Fix typo * Fixup: revert the removed panic
* test: fix data race (#497)bojie2019-03-181-9/+17
|
* core: fix 'failed to pre process block' message if unknown block is ↵Jimmy Hu2019-03-181-0/+6
| | | | confirmed (#495)
* dkg: add reset field (#492)Mission Liao2019-03-1714-153/+502
| | | | | | | | | | | | | | | | | | | | | | | | * Add Reset fields to DKG types * Fix crypto part after adding Reset field * Prohibit DKG messages with different resetCount * Add TODO * Add reset parameter to dkgProtocol constructor * Add TODO * Fix inconsist hash to prepare CRS * Add reset parameter when runnning DKG * Fix test for utils.RoundEvent * Add dummy test to prohibit DKG messages with unexpected reset count * Fix test.App
* core: add GetRoundHeight interface (#493)Wei-Ning Huang2019-03-172-0/+8
| | | | Add GetRoundHeight interface for core to query the being height of a round.
* syncer: watchcat: move timeout config to constructor (#494)Wei-Ning Huang2019-03-162-11/+15
| | | | Move timeout configuration from the parameter of `Start` to NewWatchCat so it's easier for fullnode to configure the module.
* core, syncer: integrate utils.RoundEvent (#490)Mission Liao2019-03-1613-354/+478
|
* core/syncer: add force sync (#468)Jimmy Hu2019-03-155-63/+260
| | | | | | | | | | | | | * core: Add Recovery Interface * core/syncer: modify recovery interface * core: fix Recovery interface * core/syncer: rename terminator to watchcat (#491) * core/syncer: rename terminator to watchcat * Add error log * Rename Pat to Feed * core/syncer: add force sync * run prepareRandomness if round >= DKGDelayRound * Add test for Forcsync
* core/syncer: rename terminator to watchcat (#491)Jimmy Hu2019-03-152-54/+61
| | | | | | * core/syncer: rename terminator to watchcat * Add error log * Rename Pat to Feed
* core: Add Recovery Interface (#463)Jimmy Hu2019-03-153-0/+269
| | | | | * core: Add Recovery Interface * core/syncer: modify recovery interface
* test: prohibit dkg (#489)Mission Liao2019-03-1410-21/+301
| | | | | * Allow to prohibit DKG changes at governance layer. * Allow test.App to broadcast RoundEvent
* core: recover DKG master private shares (#487)bojie2019-03-1310-16/+255
|
* utils: add RoundEvent (#482)Mission Liao2019-03-139-76/+722
| | | | | * Move core.roundBasedConfig to core/utils * Refine utils.RoundBasedConfig * Add utils.RoundEvent
* core: touch tsigVerifier in blockchain module (#486)Jimmy Hu2019-03-121-0/+4
|
* core: recoverDKGInfo return partial result (#485)Jimmy Hu2019-03-121-21/+46
|
* core/syncer: fix syncer deadlock (#479)Mission Liao2019-03-121-20/+24
| | | | | | | | * Fix dead lock * core/syncer: prevent selecting on a nil channel * Remove unnecessary reader lock holding
* core: split GroupPublicKey and NodePublicKeys (#484)Jimmy Hu2019-03-125-74/+220
| | | | | | | | * core: add benchmark * core: split NPKs and GPK * Add benchmark
* core: move some dkg utils (#476)Mission Liao2019-03-119-173/+174
| | | | | | * Move core.getDKGThreshold to core.utils.GetDKGThreshold * Move core.DKGGroupPublicKey to typesDKG.GroupPublicKey
* core: reduce blockrandomness message (#477)Jimmy Hu2019-03-103-14/+44
| | | | | | * core: reduce blockchain randomness msg * add test
* core: check if self's privateShare match MPK registered (#474)Jimmy Hu2019-03-102-0/+168
| | | | | | * core: check if self's privateShare match MPK registered * add test
* syncer: avoid attacked by older AgreementResult when syncing (#471)Mission Liao2019-03-081-0/+8
| | | | | | | | | | | | One possible attack for syncer is: - byzantine nodes periodically broadcast some very old types.AgreementResults. - If some syncer receive those types.AgreementResult, they might synced directly while still fall behind other nodes. A quick workaround is ignore types.AgreementResults older than the chain tip when creating the syncer.Consensus instance.
* core: fix empty parent not found (#470)Mission Liao2019-03-083-22/+61
| | | | * Do not panic when empty block is unable to propose * Make blockChain able to handle pulled empty block
* core/utils: fix verifyDKGComplaint bug (#472)Jimmy Hu2019-03-082-3/+3
| | | | | | * core/utils: fix verifydkgcomplaint bug * fix test
* core: Only accept block from nodeset (#467)Jimmy Hu2019-03-071-0/+8
|
* core: PreparePayload/Witness for genesis block (#465)Jimmy Hu2019-03-072-5/+14
|
* core: touch nodeSetCache (#466)Jimmy Hu2019-03-073-0/+36
|
* core: only check block hash and signature for pulled baConfirmed block (#464)Jimmy Hu2019-03-061-7/+5
|
* dkg: no need to rlp encode/decode cache related data (#462)Sonic2019-03-052-47/+12
| | | | | | * dkg: no need to rlp encode/decode cache related data * fixup! dkg: no need to rlp encode/decode cache related data
* core: first few round will not have DKG (#455)Jimmy Hu2019-03-0417-93/+100
| | | | | | | | | | | | | | * core: Add DKGDelayRound constant * core: use constant value * core, utils: set DKGDelayRound for utils. * test: add dkgDelayRound to state * core: do not run dkg and crs for round < DKGDelayRound * fix test
* core: resetDKG interface (#461)Jimmy Hu2019-03-045-18/+129
| | | | | | | | | | * core: resetDKG skeleton * Add Equal test * Add TestLocal * Add TestPacking
* core: fix panic by duplicated pending blocks (#460)Mission Liao2019-02-272-2/+9
|
* syncer: fix syncer panic (#456)Mission Liao2019-02-273-3/+127
| | | | | | | | * Fix syncer panic We can't verify correctness for randomness result from rounds that corresponding configurations are not ready yet. * Fix blocks are not confirmed while they should be
* core: Change RoundInterval to RoundLength (#453)Jimmy Hu2019-02-2617-47/+47
|
* core: remove acks (#451)Mission Liao2019-02-228-76/+11
|
* core: switch round by block height (#450)Mission Liao2019-02-2039-706/+483
|
* core: fix stuffs (#448)Jimmy Hu2019-02-193-16/+26
| | | | | | | | | | * Add log * core: delay first dkg * Fix test * core: only runDKG in prepare at round 0
* big-bang: single chain (#446)Mission Liao2019-02-1968-11863/+1689
|
* core: change pull vote position (#449)Jimmy Hu2019-02-191-6/+6
|
* integration_test: Add a byzantine test (#447)Jimmy Hu2019-02-153-12/+195
| | | | | | * integration_test: Add a byzantine test * test: fix flaky TestPullVote tes
* core: fix closing closed channel (#445)Jimmy Hu2019-02-141-9/+17
|
* core: polish dkg for recovery (#443)Jimmy Hu2019-02-133-5/+16
| | | | | | | | * core: Add an error to NewGroupPublicKey * core: Add Delete to TSigVerifierCache * remove duplicated check
* core: fast forward should close previous done() channel (#444)Jimmy Hu2019-02-132-1/+14
| | | | | | * core: fast forward faster * core: modify unit test
* core: pullvote faster (#442)Jimmy Hu2019-02-111-0/+3
|
* core: Fix rlp encode/decode for DKGComplaint. (#441)Jimmy Hu2019-02-093-1/+144
| | | | | | | | * types: Add RLP Encode/Decode to DKGComplaint * Add test * fix state test
* core: fix lock in agreement (#439)Jimmy Hu2019-02-011-2/+7
| | | | | | | | * core: fix lock in agreement * fix * terminate leader go routine if agreement already restarted to new position
* core: BA3.1 (#437)Jimmy Hu2019-01-282-5/+9
| | | | | | * core: BA 3.1 * core: fix test
* core: fix DKG bug (#435)Jimmy Hu2019-01-271-0/+1
|
* core: Optimize message processing (#434)Jimmy Hu2019-01-263-117/+134
| | | | | | | | | | | | | | | | * core: more strict with 'first' agreement result * core: Fast filter randomness result and agreement result * Optimize touchAgreementResult * core: remove lock in checking first block randomness * psig to go routine * polish * core: polish
* core: Reduce rebroadcast BA result (#433)Jimmy Hu2019-01-252-3/+36
| | | | | | | | | | * core: reduce processing duplicated agreement result * 放這邊應該比較好 * 放這邊才對 * Add TODO
* core: reduce rand result rebroadcast (#432)Jimmy Hu2019-01-242-0/+18
|
* core: Add vote filter (#430)Jimmy Hu2019-01-249-30/+214
| | | | | | | | | | | | * core: ignore usless vote * core: export SkipBlockHash and NullBlockHash * core: add VoteFilter * Add test * New VoteFilter for each round
* core: remove Governance.NotifyRoundHeight (#431)Mission Liao2019-01-2412-46/+49
|
* core: optimize core (#428)Jimmy Hu2019-01-235-71/+169
| | | | | | | | | | | | | | * 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-213-13/+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 implmenetation (#426)Jimmy Hu2019-01-217-58/+67
| | | | | | | | | | | | | | | | * types: Add vote type * core: remove stateFastRollback * core: rename lockRound to lockIter * core: Implement real ba3.0 * core: Add test for confirm * Fix VoteFastCom in agreement result * lockIter will always increase
* ci: Add snyk (#425)Jimmy Hu2019-01-201-0/+30
|
* misc: Add gosec to check security issues (#424)Jimmy Hu2019-01-1817-30/+100
| | | | | | | | * Add gosec to tools * Run security check to ci * Fix secrity issues
* core: Fix stuffs (#422)Jimmy Hu2019-01-186-37/+107
| | | | | | * core: reduce syncing ba msg * core: fix checking period of agreement result
* core: Fix syncing BA issues (#421)Jimmy Hu2019-01-171-6/+13
|
* core: find confirmed block in pending set and candidate set (#419)Mission Liao2019-01-165-31/+74
|
* Makefile: increase test timeout to 15mJimmy Hu2019-01-161-1/+1
|
* core: Fix BA3.0 (#420)Jimmy Hu2019-01-1513-59/+145
| | | | | | | | | | | | | | | | | | * 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-119-68/+274
| | | | | | | | | | | | | | | | - 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: fix issues in consensus core (#415)Jimmy Hu2019-01-104-19/+40
|
* simulation: add more time for k8s to start (#417)Jimmy Hu2019-01-091-1/+1
|
* simulation: fix k8s dmoment issue (#416)Jimmy Hu2019-01-098-21/+81
| | | | | | * Handshake with server dmoment * Start simulation from dMoment * Update k8s config
* 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
|