-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into pab/solidity-compatib…
…le-pubkey-in-report-data
- Loading branch information
Showing
15 changed files
with
742 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2025 Matter Labs | ||
# | ||
|
||
set -ex | ||
|
||
NO=${NO:-1} | ||
|
||
nix build -L .#tdx_google | ||
|
||
gsutil cp result/tdx_base_1.vmdk gs://tdx_vms/ | ||
|
||
gcloud migration vms image-imports create \ | ||
--location=us-central1 \ | ||
--target-project=tdx-pilot \ | ||
--project=tdx-pilot \ | ||
--skip-os-adaptation \ | ||
--source-file=gs://tdx_vms/tdx_base_1.vmdk \ | ||
tdx-img-pre-"${NO}" | ||
|
||
gcloud compute instances stop tdx-pilot --zone us-central1-c --project tdx-pilot || : | ||
gcloud compute instances delete tdx-pilot --zone us-central1-c --project tdx-pilot || : | ||
|
||
while gcloud migration vms image-imports list --location=us-central1 --project=tdx-pilot | grep -F RUNNING; do | ||
sleep 1 | ||
done | ||
|
||
gcloud compute images create \ | ||
--project tdx-pilot \ | ||
--guest-os-features=UEFI_COMPATIBLE,TDX_CAPABLE,GVNIC,VIRTIO_SCSI_MULTIQUEUE \ | ||
--storage-location=us-central1 \ | ||
--source-image=tdx-img-pre-"${NO}" \ | ||
tdx-img-f-"${NO}" | ||
|
||
gcloud compute instances create tdx-pilot \ | ||
--machine-type c3-standard-4 --zone us-central1-c \ | ||
--confidential-compute-type=TDX \ | ||
--maintenance-policy=TERMINATE \ | ||
--image-project=tdx-pilot \ | ||
--project tdx-pilot \ | ||
--metadata=container_hub="docker.io",container_image="amd64/hello-world@sha256:e2fc4e5012d16e7fe466f5291c476431beaa1f9b90a5c2125b493ed28e2aba57" \ | ||
--image tdx-img-f-"${NO}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ ... }: { | ||
nixosGenerate = import ./nixos-generate.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ pkgs | ||
, nixosSystem | ||
, formatModule | ||
, system | ||
, specialArgs ? { } | ||
, modules ? [ ] | ||
}: | ||
let | ||
image = nixosSystem { | ||
inherit pkgs specialArgs; | ||
modules = | ||
[ | ||
formatModule | ||
( | ||
{ lib, ... }: { | ||
options = { | ||
fileExtension = lib.mkOption { | ||
type = lib.types.str; | ||
description = "Declare the path of the wanted file in the output directory"; | ||
default = ""; | ||
}; | ||
formatAttr = lib.mkOption { | ||
type = lib.types.str; | ||
description = "Declare the default attribute to build"; | ||
}; | ||
}; | ||
} | ||
) | ||
] | ||
++ modules; | ||
}; | ||
in | ||
image.config.system.build.${image.config.formatAttr} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2024 Matter Labs | ||
{ teepot | ||
, pkgs | ||
, bash | ||
, coreutils | ||
, container-name ? "teepot-key-preexec-dcap" | ||
, tag ? null | ||
}: let | ||
entrypoint = "${bash}/bin/bash"; | ||
in | ||
pkgs.lib.tee.sgxGramineContainer { | ||
name = container-name; | ||
inherit tag entrypoint; | ||
|
||
packages = [ teepot.teepot.tee_key_preexec coreutils bash ]; | ||
|
||
manifest = { | ||
loader = { | ||
argv = [ | ||
entrypoint | ||
"-c" | ||
("${teepot.teepot.tee_key_preexec}/bin/tee-key-preexec -- bash -c " | ||
+ "'echo \"SIGNING_KEY=$SIGNING_KEY\"; echo \"TEE_TYPE=$TEE_TYPE\";exec base64 \"$ATTESTATION_QUOTE_FILE_PATH\";'") | ||
]; | ||
|
||
log_level = "error"; | ||
env = { | ||
RUST_BACKTRACE = "1"; | ||
RUST_LOG = "trace"; | ||
}; | ||
}; | ||
sgx = { | ||
edmm_enable = true; | ||
max_threads = 2; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.