aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/utils.go
Commit message (Collapse)AuthorAgeFilesLines
* misc: migrate to github.com/tangerine-networkHao2019-09-171-3/+3
|
* 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.
* Update import pathWei-Ning Huang2019-06-231-3/+3
|
* utils: fix logic to trigger round events (#575)Mission Liao2019-04-191-0/+38
| | | | | Merge the code to check if DKG valid in: - trigger next round event - check if resetting DKG is required
* core: add report bad peer interface to network (#559)Jimmy Hu2019-04-121-1/+1
|
* core: only qualified nodes can participant BA (#540)Jimmy Hu2019-04-021-0/+5
| | | | | | * core: only qualified nodes can participant BA * core: remove leader calculation from node set cache
* core: clean TODOs (#539)Mission Liao2019-04-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: reset DKG if to less qualified nodes (#528)Jimmy Hu2019-03-291-0/+5
|
* core: merge notarySet and DKGSet (#488)Jimmy Hu2019-03-271-1/+1
| | | | | | | | | | | | | | * core: さよăȘら DKGSet * test logger * temporary fix before finalized * core: Sign psig on commit vote * Add syncer log * fixup
* core, syncer: integrate utils.RoundEvent (#490)Mission Liao2019-03-161-3/+3
|
* test: prohibit dkg (#489)Mission Liao2019-03-141-0/+6
| | | | | * Allow to prohibit DKG changes at governance layer. * Allow test.App to broadcast RoundEvent
* core: move some dkg utils (#476)Mission Liao2019-03-111-0/+5
| | | | | | * Move core.getDKGThreshold to core.utils.GetDKGThreshold * Move core.DKGGroupPublicKey to typesDKG.GroupPublicKey
* core/utils: fix verifyDKGComplaint bug (#472)Jimmy Hu2019-03-081-1/+1
| | | | | | * core/utils: fix verifydkgcomplaint bug * fix test
* core: first few round will not have DKG (#455)Jimmy Hu2019-03-041-0/+7
| | | | | | | | | | | | | | * 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
* syncer: fix issues when switching to core.Consensus (#418)Mission Liao2019-01-111-0/+34
| | | | | | | | | | | | | | | | - 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.
* test: allow empty change request (#398)Jimmy Hu2019-01-041-16/+0
| | | | | | * allow empty reqs * Fix license
* core/utils: Add Penalty checker and VerifyDKGComplaint (#393)Jimmy Hu2019-01-041-0/+49
| | | | | | | | | | * Add Util for checking penalty * Add VerifyDKGComplaints * Fixup and rename * Happy New Year!
* misc: panic not ready (#374)Mission Liao2018-12-181-0/+61
* 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