@@ -14,6 +14,7 @@ import (
1414 "github.com/oasisprotocol/oasis-core/go/common/crypto/hash"
1515 "github.com/oasisprotocol/oasis-core/go/common/node"
1616 "github.com/oasisprotocol/oasis-core/go/common/sgx"
17+ "github.com/oasisprotocol/oasis-core/go/common/sgx/quote"
1718 "github.com/oasisprotocol/oasis-core/go/common/version"
1819 "github.com/oasisprotocol/oasis-core/go/oasis-test-runner/env"
1920 registry "github.com/oasisprotocol/oasis-core/go/registry/api"
@@ -48,8 +49,9 @@ type Runtime struct {
4849 // of this file is discouraged (if not entirely forbidden).
4950 cfgSave runtimeCfgSave
5051
51- teeHardware node.TEEHardware
52- mrSigner * sgx.MrSigner
52+ teeHardware node.TEEHardware
53+ mrSigner * sgx.MrSigner
54+ computePolicy * quote.Policy
5355
5456 pruner RuntimePrunerCfg
5557
@@ -59,12 +61,13 @@ type Runtime struct {
5961
6062// RuntimeCfg is the Oasis runtime provisioning configuration.
6163type RuntimeCfg struct {
62- ID common.Namespace
63- Kind registry.RuntimeKind
64- Entity * Entity
65- Keymanager * Runtime
66- TEEHardware node.TEEHardware
67- MrSigner * sgx.MrSigner
64+ ID common.Namespace
65+ Kind registry.RuntimeKind
66+ Entity * Entity
67+ Keymanager * Runtime
68+ TEEHardware node.TEEHardware
69+ MrSigner * sgx.MrSigner
70+ ComputePolicy * quote.Policy
6871
6972 Deployments []DeploymentCfg
7073 GenesisRound uint64
@@ -231,12 +234,14 @@ func (rt *Runtime) toRuntimeBundle(index int, cfg *deploymentCfg) (*bundle.Bundl
231234 }
232235
233236 cfg .versionInfo .TEE = cbor .Marshal (node.SGXConstraints {
237+ Versioned : cbor .NewVersioned (1 ),
234238 Enclaves : []sgx.EnclaveIdentity {
235239 {
236240 MrEnclave : * mrEnclave ,
237241 MrSigner : * rt .mrSigner ,
238242 },
239243 },
244+ ComputePolicy : rt .computePolicy ,
240245 })
241246 cfg .mrEnclave = mrEnclave
242247 return nil
@@ -371,6 +376,7 @@ func (net *Network) NewRuntime(cfg *RuntimeCfg) (*Runtime, error) {
371376 kind : cfg .Kind ,
372377 teeHardware : cfg .TEEHardware ,
373378 mrSigner : cfg .MrSigner ,
379+ computePolicy : cfg .ComputePolicy ,
374380 pruner : cfg .Pruner ,
375381 excludeFromGenesis : cfg .ExcludeFromGenesis ,
376382 descriptor : descriptor ,
0 commit comments