aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/governance.go
Commit message (Collapse)AuthorAgeFilesLines
* test: prohibit dkg (#489)Mission Liao2019-03-141-0/+41
| | | | | * Allow to prohibit DKG changes at governance layer. * Allow test.App to broadcast RoundEvent
* core: resetDKG interface (#461)Jimmy Hu2019-03-041-0/+21
| | | | | | | | | | * core: resetDKG skeleton * Add Equal test * Add TestLocal * Add TestPacking
* core: switch round by block height (#450)Mission Liao2019-02-201-1/+1
|
* core: remove Governance.NotifyRoundHeight (#431)Mission Liao2019-01-241-2/+3
|
* misc: Add gosec to check security issues (#424)Jimmy Hu2019-01-181-1/+3
| | | | | | | | * Add gosec to tools * Run security check to ci * Fix secrity issues
* core: add fork reporting interface to governance (#402)Wei-Ning Huang2019-01-051-0/+8
|
* core: Add a `MPKReady` so `MasterPublicKey` cannot be added afterwards (#375)Jimmy Hu2018-12-191-0/+29
| | | | | | | | | | | | | | | | * 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
* test: allow to log in test.State (#359)Mission Liao2018-12-061-7/+2
|
* core: support NumChains change for BA modules (#339)Mission Liao2018-11-201-1/+11
|
* test: fix network (#328)Mission Liao2018-11-151-10/+0
| | | | * Broadcast to set of node instead of broadcasting when attaching cache. * Fix pull blocks
* core: expose implicit round shift (#321)Mission Liao2018-11-131-5/+15
|
* test: implement pulling in network layer (#314)Mission Liao2018-11-091-0/+10
| | | | | | | * 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
* simulation: use test.Governacne in simulation (#311)Mission Liao2018-11-081-17/+58
| | | | | | | | | | | | * 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
* Rename repo to dexon-consensusWei-Ning Huang2018-11-021-10/+10
|
* test: integrate state to gov (#275)Mission Liao2018-10-301-9/+68
| | | | | | * Fix dummy error * Check validity before apply state changes. * Add RegisterConfigChange method to test.Governance * Add SwitchToRemoteMode method to test.State
* test: clone types.Config, test.Governance, test.State (#262)Mission Liao2018-10-261-12/+79
|
* core: Move dkg in types to types/dkg. (#253)Jimmy Hu2018-10-251-5/+6
|
* test: add test.State (#239)Mission Liao2018-10-241-115/+84
| | | | | | | | | * 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: add round parameter to ProposeCRS method (#244)Wei-Ning Huang2018-10-231-1/+1
| | | | | | | | 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.
* core: modify interface (#194)Mission Liao2018-10-121-0/+4
| | | | * Add a new method to notify full node about round cutting. * Modify interface to return error when preparing block
* core: Add round to DKG methods in gov. Change network interface name (#185)Jimmy Hu2018-10-091-3/+13
|
* core: Add DKG final message. (#181)Jimmy Hu2018-10-091-0/+25
|
* core: update config variable name grammar and remove configuration (#184)Wei-Ning Huang2018-10-081-2/+2
|
* core: Remove round from gov.ProposeCRS (#183)Jimmy Hu2018-10-081-4/+11
|
* core: remove NumWitnessSet in governance config (#167)Wei-Ning Huang2018-10-031-1/+0
| | | | NumWitnessSet is no longer required as we don't have witness set in the design anymore.
* core: publish round based config (#165)Mission Liao2018-10-031-1/+0
|
* core: Add unit test for DKG CRS in consensus (#163)Jimmy Hu2018-10-031-1/+13
|
* core: Prevent duplicated nack complaint (#162)Jimmy Hu2018-10-031-0/+5
|
* core: replace reliable-broadcast with shard (#159)Mission Liao2018-10-021-9/+9
|
* core: remove ProposeThresholdSignature/GetThresholdSignature (#158)Wei-Ning Huang2018-10-021-19/+2
| | | Also rename the argument name of ProposeCRS.
* core: run DKG and CRS at background. (#155)Jimmy Hu2018-10-021-4/+6
|
* core: use notarySet for BA module. (#153)Jimmy Hu2018-10-011-1/+8
|
* core: Add sizes of various nodeSets (#148)Jimmy Hu2018-09-281-6/+18
|
* core: hide types.NodeID from full node. (#147)Mission Liao2018-09-281-19/+10
| | | | | | | | | * 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 Huang2018-09-271-9/+13
| | | | | | 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.
* core: rename crypto/eth to crypto/ecdsa (#144)Wei-Ning Huang2018-09-261-2/+2
|
* core: move crypto to core/crypto (#140)Mission Liao2018-09-261-2/+2
| | | | | | | | | - 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
* Fix race (#138)Jimmy Hu2018-09-261-1/+16
|
* core: run TSIG for first configuration block at startup (#135)Jimmy Hu2018-09-261-0/+15
|
* core: update governance interface to consider genesis state (#136)Wei-Ning Huang2018-09-251-8/+9
|
* core: run first DKG at startup. (#129)Jimmy Hu2018-09-231-3/+6
|
* core: add shard (#127)Mission Liao2018-09-211-2/+7
| | | | | | | A shard is basically DEXON v1 components, except the strongly acked part, including: - maintaining lattice structure - total ordering - generate consensus timestamp
* Rename validator* to node* (#120)Mission Liao2018-09-201-14/+14
|
* core: refine governance interface to reduce Get* methods (#114)Wei-Ning Huang2018-09-181-49/+23
| | | | | 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 NewConsensusMission Liao2018-09-181-18/+18
| | | | | | | | | - 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 Huang2018-09-171-2/+7
| | | | | | | 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.
* core: DKG interface (#108)Jimmy Hu2018-09-171-0/+35
|
* Add GetChainNumber to Goverance (#92)Jimmy Hu2018-09-031-0/+5
|
* core: minor change to governance interface (#90)Wei-Ning Huang2018-09-031-5/+0
|
* core: Leader Selector. (#80)Jimmy Hu2018-08-301-0/+10
|
* test: add test.Scheduler (#58)Mission Liao2018-08-151-0/+21
| | | | | | | | | | | When simulating execution of core.Consensus by passing packets through golang-channel or real-socket, we need to utilize time.Sleep and time.Now to simulate the required network/proposing latency. It's problematic when we try to test a simulation with long network latency. Instead, Scheduler would try to execute the event with minimum timestamp, thus time.Sleep is replaced with Scheduler.nextTick, and time.Now is replaced with Event.Time. Changes: - Add test.Scheduler. - Add test.Stopper interface to provide encapsulate different stop conditions for scheduler. - Add a reference implementation for test.Stopper, it will stop scheduler when all validators confirmed X blocks proposed from themselves. - Add a test scenario on core.Consensus that all validators are not byzantine.
* core: Prepare Genesis block. (#54)Jimmy Hu2018-08-141-5/+13
|
* core: update governance interface and move K into config (#40)Wei-Ning Huang2018-08-101-0/+73