diff --git a/lotus-soup/compositions/composition-drand-halt.toml b/lotus-soup/compositions/composition-drand-halt.toml index 866e58adb..0251e5f24 100644 --- a/lotus-soup/compositions/composition-drand-halt.toml +++ b/lotus-soup/compositions/composition-drand-halt.toml @@ -4,7 +4,7 @@ [global] plan = "lotus-soup" - case = "lotus-baseline" + case = "drand-halting" total_instances = 6 builder = "docker:go" runner = "local:docker" @@ -73,4 +73,4 @@ drand_period = "1s" drand_halt_duration = "20s" drand_halt_begin = "10s" - drand_log_level = "info" + drand_log_level = "none" diff --git a/lotus-soup/main.go b/lotus-soup/main.go index 051f51eb6..8e389c8ba 100644 --- a/lotus-soup/main.go +++ b/lotus-soup/main.go @@ -9,6 +9,7 @@ import ( var testplans = map[string]interface{}{ "lotus-baseline": doRun(basicRoles), + "drand-halting": doRun(basicRoles), } func main() { diff --git a/lotus-soup/manifest.toml b/lotus-soup/manifest.toml index 227a086a6..f6b7e5955 100644 --- a/lotus-soup/manifest.toml +++ b/lotus-soup/manifest.toml @@ -39,11 +39,32 @@ instances = { min = 1, max = 100, default = 5 } drand_threshold = { type = "int", default = 2 } drand_gossip_relay = { type = "bool", default = true } drand_halt_duration = { type = "duration", default="0", desc = "how long to halt drand chain before resuming" } + + +[[testcases]] +name = "drand-halting" +instances = { min = 1, max = 100, default = 5 } + + [testcases.params] + clients = { type = "int", default = 1 } + miners = { type = "int", default = 1 } + balance = { type = "int", default = 1 } + sectors = { type = "int", default = 1 } + role = { type = "string" } + + random_beacon_type = { type = "enum", default = "local-drand", options = ["mock", "local-drand", "external-drand"] } + + # Params relevant to drand nodes. drand nodes should have role="drand", and must all be + # in the same composition group. There must be at least threshold drand nodes. + # To get lotus nodes to actually use the drand nodes, you must set random_beacon_type="local-drand" + # for the lotus node groups. + drand_period = { type = "duration", default="10s" } + drand_threshold = { type = "int", default = 2 } + drand_gossip_relay = { type = "bool", default = true } + drand_halt_duration = { type = "duration", default="30s", desc = "how long to halt drand chain before resuming" } drand_halt_begin = { type = "duration", default="1m", desc = "when to start drand halting (relative to test start time)"} drand_log_level = { type = "string", default="info" } - # Params relevant to pubsub tracing enable_pubsub_tracer = { type = "bool", default = false } - # Mining Mode: synchronized -vs- natural time mining_mode = { type = "enum", default = "synchronized", options = ["synchronized", "natural"] } diff --git a/lotus-soup/role_drand.go b/lotus-soup/role_drand.go index 694d6be30..9f8d50826 100644 --- a/lotus-soup/role_drand.go +++ b/lotus-soup/role_drand.go @@ -144,7 +144,10 @@ func runDrandNode(t *TestEnvironment) error { ctx := context.Background() t.SyncClient.MustSignalAndWait(ctx, stateReady, t.TestInstanceCount) - haltDuration := t.DurationParam("drand_halt_duration") + haltDuration := time.Duration(0) + if t.IsParamSet("drand_halt_duration") { + haltDuration = t.DurationParam("drand_halt_duration") + } if haltDuration != 0 { startTime := t.DurationParam("drand_halt_begin") time.AfterFunc(startTime, func() {