From 167a30fcb9becd440da576ed6e5f3229f0709c7a Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 1 Jul 2020 18:54:20 +0200 Subject: [PATCH 1/3] export both apis for miners --- lotus-soup/manifest.toml | 3 +++ lotus-soup/testkit/role_miner.go | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lotus-soup/manifest.toml b/lotus-soup/manifest.toml index 291b7a76f..987250e71 100644 --- a/lotus-soup/manifest.toml +++ b/lotus-soup/manifest.toml @@ -10,6 +10,9 @@ enabled = true build_base_image = "iptestground/oni-buildbase:v1" runtime_image = "iptestground/oni-runtime:v1" +[builders."docker:go".dockerfile_extensions] +exposed_ports = ["6060", "1234", "2345"] + [runners."local:docker"] enabled = true diff --git a/lotus-soup/testkit/role_miner.go b/lotus-soup/testkit/role_miner.go index 200d0ef39..d27b84c55 100644 --- a/lotus-soup/testkit/role_miner.go +++ b/lotus-soup/testkit/role_miner.go @@ -170,6 +170,7 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) { node.Online(), node.Repo(nodeRepo), withGenesis(genesisMsg.Genesis), + withApiEndpoint("/ip4/127.0.0.1/tcp/1234"), withListenAddress(minerIP), withBootstrapper(genesisMsg.Bootstrapper), withPubsubConfig(false, pubsubTracer), @@ -191,7 +192,7 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) { node.Online(), node.Repo(minerRepo), node.Override(new(api.FullNode), n.FullApi), - withApiEndpoint("/ip4/127.0.0.1/tcp/1234"), + withApiEndpoint("/ip4/127.0.0.1/tcp/2345"), withMinerListenAddress(minerIP), } @@ -282,7 +283,12 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) { m := &LotusMiner{n, t} - err = m.startStorageMinerAPIServer(minerRepo, n.MinerApi) + err = startClientAPIServer(nodeRepo, n.FullApi) + if err != nil { + return nil, err + } + + err = startStorageMinerAPIServer(minerRepo, n.MinerApi) if err != nil { return nil, err } @@ -358,7 +364,7 @@ func (m *LotusMiner) RunDefault() error { return nil } -func (m *LotusMiner) startStorageMinerAPIServer(repo *repo.MemRepo, minerApi api.StorageMiner) error { +func startStorageMinerAPIServer(repo *repo.MemRepo, minerApi api.StorageMiner) error { mux := mux.NewRouter() rpcServer := jsonrpc.NewServer() From c7f95280e44c8890c307fd193e7f657bff2eac9c Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 1 Jul 2020 19:39:17 +0200 Subject: [PATCH 2/3] update params for ports --- lotus-soup/compositions/composition-k8s-10-3.toml | 3 +++ lotus-soup/compositions/composition-k8s-3-1.toml | 3 +++ lotus-soup/compositions/composition-k8s-3-2.toml | 3 +++ lotus-soup/compositions/composition-k8s.toml | 3 +++ lotus-soup/compositions/composition.toml | 3 +++ lotus-soup/manifest.toml | 3 --- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lotus-soup/compositions/composition-k8s-10-3.toml b/lotus-soup/compositions/composition-k8s-10-3.toml index 061a1c984..6ff5e79bb 100644 --- a/lotus-soup/compositions/composition-k8s-10-3.toml +++ b/lotus-soup/compositions/composition-k8s-10-3.toml @@ -15,6 +15,9 @@ go_proxy_url="http://localhost:8081" registry_type="aws" +[global.run_config] + exposed_ports = ["6060", "1234", "2345"] + [global.run.test_params] clients = "10" miners = "3" diff --git a/lotus-soup/compositions/composition-k8s-3-1.toml b/lotus-soup/compositions/composition-k8s-3-1.toml index 3470c3093..73d00d459 100644 --- a/lotus-soup/compositions/composition-k8s-3-1.toml +++ b/lotus-soup/compositions/composition-k8s-3-1.toml @@ -15,6 +15,9 @@ go_proxy_url="http://localhost:8081" registry_type="aws" +[global.run_config] + exposed_ports = ["6060", "1234", "2345"] + [global.run.test_params] clients = "3" miners = "1" diff --git a/lotus-soup/compositions/composition-k8s-3-2.toml b/lotus-soup/compositions/composition-k8s-3-2.toml index 8740d4f0c..280af533f 100644 --- a/lotus-soup/compositions/composition-k8s-3-2.toml +++ b/lotus-soup/compositions/composition-k8s-3-2.toml @@ -15,6 +15,9 @@ go_proxy_url="http://localhost:8081" registry_type="aws" +[global.run_config] + exposed_ports = ["6060", "1234", "2345"] + [global.run.test_params] clients = "3" miners = "2" diff --git a/lotus-soup/compositions/composition-k8s.toml b/lotus-soup/compositions/composition-k8s.toml index 548293588..1ee5316e3 100644 --- a/lotus-soup/compositions/composition-k8s.toml +++ b/lotus-soup/compositions/composition-k8s.toml @@ -15,6 +15,9 @@ go_proxy_url="http://localhost:8081" registry_type="aws" +[global.run_config] + exposed_ports = ["6060", "1234", "2345"] + [global.run.test_params] clients = "1" miners = "1" diff --git a/lotus-soup/compositions/composition.toml b/lotus-soup/compositions/composition.toml index cad741422..f6e46638c 100644 --- a/lotus-soup/compositions/composition.toml +++ b/lotus-soup/compositions/composition.toml @@ -12,6 +12,9 @@ [global.build_config] enable_go_build_cache = true +[global.run_config] + exposed_ports = ["6060", "1234", "2345"] + [global.run.test_params] clients = "3" miners = "2" diff --git a/lotus-soup/manifest.toml b/lotus-soup/manifest.toml index 987250e71..291b7a76f 100644 --- a/lotus-soup/manifest.toml +++ b/lotus-soup/manifest.toml @@ -10,9 +10,6 @@ enabled = true build_base_image = "iptestground/oni-buildbase:v1" runtime_image = "iptestground/oni-runtime:v1" -[builders."docker:go".dockerfile_extensions] -exposed_ports = ["6060", "1234", "2345"] - [runners."local:docker"] enabled = true From 740741b129d92af55a699b7162d68e917abf73a9 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 2 Jul 2020 14:13:39 +0200 Subject: [PATCH 3/3] add mining_mode to deals-e2e test case --- lotus-soup/manifest.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/lotus-soup/manifest.toml b/lotus-soup/manifest.toml index 7275406c1..d43c42627 100644 --- a/lotus-soup/manifest.toml +++ b/lotus-soup/manifest.toml @@ -42,6 +42,7 @@ instances = { min = 1, max = 100, default = 5 } # Params relevant to pubsub tracing enable_pubsub_tracer = { type = "bool", default = false } + mining_mode = { type = "enum", default = "synchronized", options = ["synchronized", "natural"] } [[testcases]] name = "drand-halting"