Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

kms: record OS image version and dev flag on-chain in the next-gen contract

Offen
#1,384 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust, solidity
Bereich
blockchain, security

Rechercherichtung

Start with the next-generation KMS contract around DstackKms, addOsImageHash, allowedOsImages, and isAppAllowed, then trace the verifier's attestation paths that consume os_image_hash. Resolve the compatibility and dev-image policy questions before implementing storage and events; done means on-chain metadata can be retrieved for each hash and unavailable platform fields can be filled from it.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

The verifier only reports os_image_is_dev / os_image_version on the TDX legacy path, the one path that downloads the image and reads metadata.json. TDX lite, SEV-SNP, GCP TDX, AWS NitroTPM and Nitro Enclave carry only the manifest digest, so both fields are null there (#1266). Right now relying parties can't tell a dev image from a prod image on those paths, and can't enforce a minimum version. The only thing they can do is keep their own os_image_hash allowlist.

DstackKms already whitelists OS images on-chain, but it stores just a bool for each hash (allowedOsImages), so the chain doesn't know what the hash is.

Proposal

In the next-generation KMS contract, store metadata for each OS image hash, for example:

struct OsImageInfo {
    bool allowed;
    bool isDev;
    string version; // e.g. "0.5.10"
}
mapping(bytes32 => OsImageInfo) public osImages;
  • addOsImageHash takes isDev and version, and emits them in the event.
  • Every attestation path can look up version and dev status by os_image_hash from the same source. This doesn't need image downloads or metadata.json.
  • KMS / relying-party policy can reject dev images or enforce a minimum version from on-chain data.
  • The verifier can fill in os_image_is_dev / os_image_version from the contract when the platform doesn't expose them.

The owner who allowlists a hash vouches for its metadata. This is the same trust we already give to the allowlist.

Open questions

  • Keep allowedOsImages(bytes32) -> bool as a view for compatibility with existing consumers?
  • Should dev images be allowed at all on production KMS instances, or should the contract reject isDev images directly in isAppAllowed?
Vorherrschende Sprache
Rust
Sterne
551
Forks
97
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
182

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Dstack-TEE/dstack

Alle Issues in Dstack-TEE/dstack

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.