dstack-mr: support QEMU 10 and 11 ACPI measurements - #1049
Closed
kvinwang wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ACPI table generator used for dstack-mr measurements to track QEMU 11.1 compatibility, and also introduces a substantial gateway-side WaveKV sync upgrade (v1/v2 negotiation, push endpoint, admission policy, bounded compression/decompression, and expanded sync telemetry).
Changes:
- Bump the pinned QEMU fork/commit used to generate ACPI tables in verifier/KMS builder images and in the attestation verification tutorial.
- Upgrade the gateway’s WaveKV integration toward a v2 (“SyncEnvelope”) protocol with v1 fallback, plus an opportunistic push route.
- Add hardening and observability around gateway replication (key-prefix admission policy, bounded gzip handling, and new admin/proto telemetry fields).
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dstack/verifier/builder/Dockerfile | Update QEMU fork branch and pinned rev for ACPI table generation. |
| dstack/kms/dstack-app/builder/Dockerfile | Update QEMU fork branch and pinned rev for ACPI table generation. |
| dstack/gateway/src/web_routes/wavekv_sync.rs | Add v2 sync + push endpoints, bounded gunzip, and testable auth decision split. |
| dstack/gateway/src/web_routes.rs | Mount new WaveKV routes and add a test to pin route URIs. |
| dstack/gateway/src/pp.rs | Minor test refactor (repeat_n). |
| dstack/gateway/src/main_service.rs | Reorder local node record publication after bootstrap; plumb uuid into sync service. |
| dstack/gateway/src/kv/sync_service.rs | Add v2 sync and push client paths; centralize peer route construction. |
| dstack/gateway/src/kv/schema.rs | New admission policy constraining replicated key prefixes per store. |
| dstack/gateway/src/kv/mod.rs | Add admission-enabled WaveKV node config, gzip size limits, bounded gunzip, and wire-format tests. |
| dstack/gateway/src/kv/https_client.rs | Bound response bodies, add probe POST for v1/v2 negotiation, and extend tests. |
| dstack/gateway/src/admin_service.rs | Surface per-peer protocol/digest telemetry and new store metrics in admin status. |
| dstack/gateway/rpc/proto/gateway_rpc.proto | Extend sync status RPC schema (protocol, digest mismatches, failures; deprecate buffered_logs). |
| dstack/Cargo.toml | Switch wavekv dependency to an unreleased git branch pending crates.io release. |
| dstack/Cargo.lock | Lockfile updates for the new git dependency and transitive changes. |
| docs/tutorials/attestation-verification.md | Update QEMU fork branch referenced in local build docs. |
Suppressed comments (1)
dstack/gateway/src/kv/mod.rs:430
encodelost its documentation comment whenstore_configand the sync size constants were inserted above it. Restoring the doc comment here avoids confusion about the intended wire format guarantees for KV values.
pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>> {
rmp_serde::encode::to_vec_named(value).context("failed to encode value")
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
371
to
375
| @@ -374,6 +375,56 @@ pub mod keys { | |||
| /// in `#[serde(default)]` fields it does not receive, so the value types below | |||
| /// Read a v2 envelope from a request body, applying the same size cap as the v1 route. | ||
| async fn read_envelope(data: Data<'_>) -> Result<SyncEnvelope, Status> { | ||
| let bytes = data | ||
| .open(16.mebibytes()) |
Comment on lines
+272
to
+282
| if let Err(err) = kv_store.sync_node(config.sync.node_id, &node_data) { | ||
| error!("Failed to sync this node to KvStore: {err:?}"); | ||
| } | ||
| // Set this node's status to Online | ||
| if let Err(err) = kv_store.set_node_status(config.sync.node_id, NodeStatus::Up) { | ||
| error!("Failed to set node status: {err:?}"); | ||
| } | ||
| // Register this node's sync URL in DB (for peer discovery) | ||
| if let Err(err) = kv_store.register_peer_url(config.sync.node_id, &config.sync.my_url) { | ||
| error!("Failed to register peer URL: {err:?}"); | ||
| } |
Comment on lines
+122
to
+123
| # TODO: repoint to `wavekv = "2.0"` once Phala-Network/wavekv#3 is released to crates.io. | ||
| wavekv = { git = "https://github.com/Phala-Network/wavekv", branch = "feat/delta-state-sync" } |
kvinwang
force-pushed
the
fix/dstack-mr-qemu-versions
branch
from
August 13, 2026 08:55
5d3abcf to
40463f6
Compare
kvinwang
force-pushed
the
fix/dstack-mr-qemu-versions
branch
from
August 13, 2026 09:12
40463f6 to
e5dad61
Compare
Collaborator
Author
|
prefer #1050 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
cargo test -p dstack-mr -p dstack-mr-cli