You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(contract): address review on the cross-contract attestation tests
- assert nothing-stored through the typed view: the untyped one cannot
deserialize a stored Dstack entry, so the exact failure it guards for
surfaced as a serde panic instead of the assertion
- take the verifier gas budget from the contract's config view and assert
headroom; a receipt cannot outspend its own prepaid gas, so comparing
against a hand-copied 200 Tgas asserted nothing and could drift from
DEFAULT_VERIFIER_TERA_GAS
- match failure substrings that survive Debug formatting and workspaces'
quote escaping
- bounds-check initial_participant_indices in MpcClusterConfig::validate,
which also covers the pre-existing indexing in init_contract and
add_initial_domains
- name the build task in the tee-verifier wasm panic, spell the intra-doc
link in full so plain cargo doc resolves it, and fix a stale comment in
Makefile.toml
- state the current design in the verifier design doc rather than narrating
how it was reached, and say plainly that the store-path coverage is
inactive until the fixture key lands
Also drops the TODO token from two prose references to #3787, which
scripts/check-todo-format.sh requires to carry a colon.
Copy file name to clipboardExpand all lines: docs/design/attestation-verifier-contract.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -611,7 +611,11 @@ The yield-resume split adds four resolution branches the synchronous version nev
611
611
612
612
The verifier-rotation design changes the test surface in three ways. First, the expiration window itself: an entry whose `expiry_timestamp_seconds` is in the past must be rejected by `re_verify` even when every post-DCAP allowlist invariant still holds, and an entry within the (shortened) window must still pass — this is the existing expiry check, now exercised against the lowered `DEFAULT_EXPIRATION_DURATION_SECONDS`. Second, rotation routing: after `vote_tee_verifier_change` crosses threshold, the next `submit_participant_info` must call `verify_quote` on the new `tee_verifier_account_id`, and existing stored entries must remain present (no purge) until they expire. Third, the in-flight case: a verification scheduled against the old verifier that resolves after the vote crosses threshold must still be stored as a normal entry — it is not treated specially and ages out via the same expiration window as any other entry.
613
613
614
-
What shipped instead of the stub verifier this section originally proposed: the sandbox tests in `crates/contract/tests/sandbox/tee_verifier.rs` deploy the real `tee-verifier` WASM and drive each verdict through `vote_tee_verifier_change` + `submit_participant_info`: `Rejected` with a malformed quote, no-verdict with an undeployed verifier account, and `Verified` with the fixture quote against a verifier built with the `sandbox-test-hooks` feature, which lets the test pin the timestamp `verify_quote` verifies against (the fixture collateral is expired against live chain time, and sandbox time cannot be wound back). A stub verifier was briefly built and then dropped: it duplicated the real verifier and added maintenance surface for little gain. Verified-path tests that store an attestation additionally sign as the fixture account, because the quote's report_data binds the fixture account key (issue #3787 tracks the key asset).
614
+
Status: no stub verifier exists. The design below was superseded during implementation, because a second contract mirroring the real one duplicated it for little gain.
615
+
616
+
Sandbox tests in `crates/contract/tests/sandbox/tee_verifier.rs` deploy the real `tee-verifier` WASM and drive each verdict through `vote_tee_verifier_change` + `submit_participant_info`: `Rejected` with a malformed quote, no-verdict with an undeployed verifier account, and `Verified` with the fixture quote. `Verified` needs the verifier built with the `sandbox-test-hooks` feature, which lets the test pin the timestamp `verify_quote` verifies against: the fixture collateral is valid only inside a fixed window, while sandbox time is wall-clock and forward-only.
617
+
618
+
Tests that assert the *store* additionally sign as the fixture account, because the quote's report_data binds that account key. They are inactive until the fixture secret key asset lands (#3787); until then, the store path is covered in-process instead.
615
619
616
620
E2E tests in `crates/e2e-tests` deploy the real `tee-verifier` and vote it in during cluster startup for topology parity; nodes there submit mock attestations, which the MPC contract verifies without calling the verifier, so the cross-contract flow is covered at the sandbox layer.
0 commit comments