Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d46cf83
feat: amd-sev-snp draft and feature flags for confidential computing
bredamatt Jan 23, 2025
1aeffc6
fix: add missing feature flag
bredamatt Jan 24, 2025
5eabcca
fix: cargo fmt
bredamatt Jan 24, 2025
ca6f794
fix: add None to CoCo constructor
bredamatt Jan 24, 2025
0f45b09
wip: add sev-snp attestation report and certificate chain verificatio…
bredamatt Jan 24, 2025
08fbd67
fix: include the sev-snp feature-gated dependency
bredamatt Jan 24, 2025
46f3ccc
wip: add wrapper struct with verify implementation
bredamatt Jan 30, 2025
bc2488f
feat: add TEEProvider to NodePublicKeyCommittmentEvent
bredamatt Jan 30, 2025
9017a7e
Merge branch 'main' of github.com:atoma-network/atoma-node into feat/…
bredamatt Jan 30, 2025
3f781e8
fix: Add Dockerfile modifications for sev-snp support
bredamatt Feb 6, 2025
870fef2
fix: feature-gate behind linux os, add p384 dependency as optional in…
bredamatt Feb 6, 2025
2a0a2ac
fix: change from Vec<u8> to u16. Must be u16 due to supported types b…
bredamatt Feb 6, 2025
8e6477f
fix: change tee_provider attribute to u16 in stead of Vec<u8>
bredamatt Feb 6, 2025
cd5ff4a
fix: trait implementations, rename error, remove dup Error
bredamatt Feb 6, 2025
214c6b7
fix: revert migration change and add new migration in stead
bredamatt Feb 6, 2025
4902d57
nit: move file
bredamatt Feb 6, 2025
34bd00f
Merge branch 'main' of https://github.com/atoma-network/atoma-node in…
bredamatt Feb 6, 2025
8fb44c1
fix: u16 issues in state_manager
bredamatt Feb 6, 2025
8d0f3da
fix: from and to bytes functions for TEEProvider
bredamatt Feb 6, 2025
879c923
fix: cargo fmt, relabelling of function, add SevSnpDeviceError to Ato…
bredamatt Feb 6, 2025
f718d69
fix: migrations
bredamatt Feb 10, 2025
10c2a6d
fix: conditional logic in Dockerfile
bredamatt Feb 10, 2025
e65c19c
fix: adjust imports
bredamatt Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ IMAGE_GENERATIONS_ARCHITECTURE=flux
MISTRALRS_IMAGE=ghcr.io/ericlbuehler/mistral.rs:cuda-80-0.3.1

# ----------------------------------------------------------------------------------
# TDX configuration
# CC configuration - note that only one of the following can be enabled at a time
# TODO?
# Enable TDX by setting ENABLE_TDX=true for confidential compute, otherwise it will be disabled
ENABLE_TDX=false
# Enable SEV-SNP by setting ENABLE_SEV_SNP=true for ADM SEV-SNP, otherwise it will be disabled
ENABLE_SEV_SNP=false
110 changes: 109 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ atoma-sui = { path = "./atoma-sui" }
atoma-utils = { path = "./atoma-utils" }
axum = "0.7.5"
base64 = "0.22.1"
bincode = "1.3.3"
blake2 = "0.10.6"
clap = "4.5.4"
config = "0.14.0"
Expand All @@ -45,15 +46,18 @@ lazy_static = "1.5.0"
metrics = "0.23"
metrics-exporter-prometheus = "0.14.0"
once_cell = "1.20.2"
p384 = "0.13.0"
prometheus = "0.13.4"
rand = "0.8.5"
reqwest = "0.12.1"
rs_merkle = "1.4.2"
sev = "5.0.0"
serde = "1.0.217"
serde_json = "1.0.138"
serde_yaml = "0.9.34"
serial_test = "3.1.1"
sha2 = "0.10.8"
strum = "0.26.3"
sqlx = "0.8.2"
sui-keys = { git = "https://github.com/mystenlabs/sui", package = "sui-keys", tag = "testnet-v1.41.1" }
sui-sdk = { git = "https://github.com/mystenlabs/sui", package = "sui-sdk", tag = "testnet-v1.41.1" }
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
ARG ENABLE_TDX
ARG ENABLE_SEV_SNP

# Install build dependencies
RUN apt-get update && apt-get install -y \
Expand All @@ -14,7 +15,7 @@ RUN apt-get update && apt-get install -y \
curl \
libssl-dev \
libssl1.1 \
&& if [ "$ENABLE_TDX" = "true" ]; then \
&& if [ "$ENABLE_TDX" = "true" ] || [ "$ENABLE_SEV_SNP" = "true" ]; then \
apt-get install -y libtss2-dev; \
fi \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -24,8 +25,10 @@ WORKDIR /usr/src/atoma-node
COPY . .

# Compile
RUN if [ "$ENABLE_TDX" = "true" ]; then \
RUN if [ "$ENABLE_TDX" = "true" ] && [ "$ENABLE_SEV_SNP" = "false" ]; then \
RUST_LOG=${TRACE_LEVEL} cargo build --release --bin atoma-node --features tdx; \
elif [ "$ENABLE_SEV_SNP" = "true" ] && [ "$ENABLE_TDX" = "false" ]; then \
RUST_LOG=${TRACE_LEVEL} cargo build --release --bin atoma-node --features sev-snp; \
else \
RUST_LOG=${TRACE_LEVEL} cargo build --release --bin atoma-node; \
fi
Expand Down
9 changes: 8 additions & 1 deletion atoma-bin/atoma_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
};

use anyhow::{Context, Result};
use atoma_confidential::AtomaConfidentialCompute;
use atoma_confidential::{service::AtomaConfidentialComputeProvider, AtomaConfidentialCompute};
use atoma_daemon::{AtomaDaemonConfig, DaemonState};
use atoma_service::{
config::AtomaServiceConfig,
Expand Down Expand Up @@ -266,13 +266,20 @@ async fn main() -> Result<()> {
let (compute_shared_secret_sender, compute_shared_secret_receiver) =
tokio::sync::mpsc::unbounded_channel();

let confidential_compute_provider = config
.service
.confidential_compute_provider
.as_ref()
.and_then(|provider| AtomaConfidentialComputeProvider::from_str(provider).ok());

let confidential_compute_service_handle = spawn_with_shutdown(
AtomaConfidentialCompute::start_confidential_compute_service(
client.clone(),
subscriber_confidential_compute_receiver,
app_state_decryption_receiver,
app_state_encryption_receiver,
compute_shared_secret_receiver,
confidential_compute_provider,
shutdown_receiver.clone(),
),
shutdown_sender.clone(),
Expand Down
8 changes: 7 additions & 1 deletion atoma-confidential/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ aes-gcm = { workspace = true }
anyhow = { workspace = true }
atoma-sui = { workspace = true }
atoma-utils = { workspace = true }
bincode = { workspace = true }
blake2 = { workspace = true }
dcap-rs = { workspace = true, optional = true }
flume = { workspace = true }
p384 = { workspace = true, optional = true }
rand = { workspace = true }
tokio = { workspace = true }
sev = { workspace = true, optional = true, features = ["crypto_nossl"]}
sha2 = { workspace = true }
strum = { workspace = true, features = ["derive"] }
tdx = { workspace = true, optional = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
x25519-dalek = { workspace = true, features = ["static_secrets"] }

[features]
default = []
tdx = ["dep:dcap-rs", "dep:tdx" ]
sev-snp = [ "dep:p384", "dep:sev" ]
2 changes: 2 additions & 0 deletions atoma-confidential/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

pub mod key_management;
pub mod service;
#[cfg(feature = "sev-snp")]
pub mod sev_snp;
#[cfg(feature = "tdx")]
pub mod tdx;
pub mod types;
Expand Down
Loading
Loading