aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/state_test.go
Commit message (Collapse)AuthorAgeFilesLines
* core: merge notarySet and DKGSet (#488)Jimmy Hu2019-03-271-3/+0
| | | | | | | | | | | | | | * core: さよăȘら DKGSet * test logger * temporary fix before finalized * core: Sign psig on commit vote * Add syncer log * fixup
* core: reset DKG (#502)Mission Liao2019-03-201-4/+4
| | | | | | | | | | | | | | * 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.
* dkg: add reset field (#492)Mission Liao2019-03-171-38/+80
| | | | | | | | | | | | | | | | | | | | | | | | * 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: first few round will not have DKG (#455)Jimmy Hu2019-03-041-20/+11
| | | | | | | | | | | | | | * 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-041-18/+57
| | | | | | | | | | * core: resetDKG skeleton * Add Equal test * Add TestLocal * Add TestPacking
* core: Change RoundInterval to RoundLength (#453)Jimmy Hu2019-02-261-3/+3
|
* core: switch round by block height (#450)Mission Liao2019-02-201-13/+4
|
* core: Fix rlp encode/decode for DKGComplaint. (#441)Jimmy Hu2019-02-091-1/+4
| | | | | | | | * types: Add RLP Encode/Decode to DKGComplaint * Add test * fix state test
* utils: move authenticator to utils package (#378)Mission Liao2018-12-221-20/+12
|
* core: Add a `MPKReady` so `MasterPublicKey` cannot be added afterwards (#375)Jimmy Hu2018-12-191-5/+34
| | | | | | | | | | | | | | | | * 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-8/+7
|
* simulation: use test.Governacne in simulation (#311)Mission Liao2018-11-081-0/+3
| | | | | | | | | | | | * 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
* test: make StateChangeRequest broadcast-able (#305)Mission Liao2018-11-071-25/+73
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove max block interval (#287)Jimmy Hu2018-11-021-2/+0
|
* Rename repo to dexon-consensusWei-Ning Huang2018-11-021-11/+11
|
* test: clone types.Config, test.Governance, test.State (#262)Mission Liao2018-10-261-11/+93
|
* core: Move dkg in types to types/dkg. (#253)Jimmy Hu2018-10-251-10/+11
|
* test: add test.State (#239)Mission Liao2018-10-241-0/+277
* 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.