From e5529373f0b5abef436464f53a5b80874d189a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Wed, 25 Sep 2024 16:20:37 +0200 Subject: [PATCH 1/3] oasis-test-runner: Enable sgx_loader in client node --- go/oasis-test-runner/oasis/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/oasis-test-runner/oasis/client.go b/go/oasis-test-runner/oasis/client.go index cd8277691a6..7e2e98a9d11 100644 --- a/go/oasis-test-runner/oasis/client.go +++ b/go/oasis-test-runner/oasis/client.go @@ -61,6 +61,8 @@ func (client *Client) ModifyConfig() error { if len(client.runtimes) > 0 { client.Config.Mode = config.ModeClient client.Config.Runtime.Provisioner = client.runtimeProvisioner + client.Config.Runtime.SGXLoader = client.net.cfg.RuntimeSGXLoaderBinary + client.Config.Runtime.AttestInterval = client.net.cfg.RuntimeAttestInterval } client.AddSeedNodesToConfig() From f1a1e2f6bb0083b5beb989811988b6beb9858a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Thu, 26 Sep 2024 16:53:53 +0200 Subject: [PATCH 2/3] oasis-test-runner: Enable client node registration --- go/oasis-net-runner/fixtures/default.go | 1 + go/oasis-test-runner/oasis/client.go | 5 +++++ go/oasis-test-runner/oasis/fixture.go | 2 ++ 3 files changed, 8 insertions(+) diff --git a/go/oasis-net-runner/fixtures/default.go b/go/oasis-net-runner/fixtures/default.go index 182e20c7e4c..5aa8ba611a0 100644 --- a/go/oasis-net-runner/fixtures/default.go +++ b/go/oasis-net-runner/fixtures/default.go @@ -260,6 +260,7 @@ func newDefaultFixture() (*oasis.NetworkFixture, error) { fixture.ComputeWorkers[j].Runtimes = append(fixture.ComputeWorkers[j].Runtimes, rtIndex) } fixture.Clients[0].Runtimes = append(fixture.Clients[0].Runtimes, rtIndex) + fixture.Clients[0].Entity = 1 // Runtime state paths to use to initialize the runtime with. if len(runtimeStatePaths) <= i { diff --git a/go/oasis-test-runner/oasis/client.go b/go/oasis-test-runner/oasis/client.go index 7e2e98a9d11..4d785e63e36 100644 --- a/go/oasis-test-runner/oasis/client.go +++ b/go/oasis-test-runner/oasis/client.go @@ -58,6 +58,11 @@ func (client *Client) ModifyConfig() error { client.Config.P2P.Port = client.p2pPort + if !client.entity.isDebugTestEntity { + entityID, _ := client.entity.ID().MarshalText() // Cannot fail. + client.Config.Registration.EntityID = string(entityID) + } + if len(client.runtimes) > 0 { client.Config.Mode = config.ModeClient client.Config.Runtime.Provisioner = client.runtimeProvisioner diff --git a/go/oasis-test-runner/oasis/fixture.go b/go/oasis-test-runner/oasis/fixture.go index be60faae827..dca781db3c3 100644 --- a/go/oasis-test-runner/oasis/fixture.go +++ b/go/oasis-test-runner/oasis/fixture.go @@ -496,6 +496,8 @@ func (f *SentryFixture) Create(net *Network) (*Sentry, error) { type ClientFixture struct { NodeFixture + Entity int `json:"entity"` + AllowErrorTermination bool `json:"allow_error_termination"` AllowEarlyTermination bool `json:"allow_early_termination"` From ea33628fedd4539165c0bf62ad6a2ccbea91f7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Thu, 26 Sep 2024 17:15:47 +0200 Subject: [PATCH 3/3] oasis-test-runner: Undo node registration --- go/oasis-net-runner/fixtures/default.go | 1 - go/oasis-test-runner/oasis/client.go | 5 ----- go/oasis-test-runner/oasis/fixture.go | 2 -- 3 files changed, 8 deletions(-) diff --git a/go/oasis-net-runner/fixtures/default.go b/go/oasis-net-runner/fixtures/default.go index 5aa8ba611a0..182e20c7e4c 100644 --- a/go/oasis-net-runner/fixtures/default.go +++ b/go/oasis-net-runner/fixtures/default.go @@ -260,7 +260,6 @@ func newDefaultFixture() (*oasis.NetworkFixture, error) { fixture.ComputeWorkers[j].Runtimes = append(fixture.ComputeWorkers[j].Runtimes, rtIndex) } fixture.Clients[0].Runtimes = append(fixture.Clients[0].Runtimes, rtIndex) - fixture.Clients[0].Entity = 1 // Runtime state paths to use to initialize the runtime with. if len(runtimeStatePaths) <= i { diff --git a/go/oasis-test-runner/oasis/client.go b/go/oasis-test-runner/oasis/client.go index 4d785e63e36..7e2e98a9d11 100644 --- a/go/oasis-test-runner/oasis/client.go +++ b/go/oasis-test-runner/oasis/client.go @@ -58,11 +58,6 @@ func (client *Client) ModifyConfig() error { client.Config.P2P.Port = client.p2pPort - if !client.entity.isDebugTestEntity { - entityID, _ := client.entity.ID().MarshalText() // Cannot fail. - client.Config.Registration.EntityID = string(entityID) - } - if len(client.runtimes) > 0 { client.Config.Mode = config.ModeClient client.Config.Runtime.Provisioner = client.runtimeProvisioner diff --git a/go/oasis-test-runner/oasis/fixture.go b/go/oasis-test-runner/oasis/fixture.go index dca781db3c3..be60faae827 100644 --- a/go/oasis-test-runner/oasis/fixture.go +++ b/go/oasis-test-runner/oasis/fixture.go @@ -496,8 +496,6 @@ func (f *SentryFixture) Create(net *Network) (*Sentry, error) { type ClientFixture struct { NodeFixture - Entity int `json:"entity"` - AllowErrorTermination bool `json:"allow_error_termination"` AllowEarlyTermination bool `json:"allow_early_termination"`