88//! time is wall-clock and forward-only, and the fixture collateral has
99//! expired against it.
1010//!
11- //! Verified-path tests that store an attestation must sign as the fixture
12- //! account (the quote's report_data binds the fixture account key, and the
13- //! contract reads that key from the transaction signer). They are ignored
14- //! until the fixture secret key asset lands; see TODO(#3787).
11+ //! Verified-path tests that store an attestation sign as the fixture account:
12+ //! the quote's report_data binds the fixture account key, and the contract
13+ //! reads that key from the transaction signer.
1514#![ allow( non_snake_case) ]
1615
1716use crate :: sandbox:: {
@@ -53,6 +52,16 @@ async fn setup() -> SandboxTestSetup {
5352 . await
5453}
5554
55+ /// Setup for tests that expect the fixture to pass the post-DCAP checks, which needs the
56+ /// wasm that accepts its app-compose.
57+ async fn setup_accepting_fixture_attestation ( ) -> SandboxTestSetup {
58+ SandboxTestSetup :: builder ( )
59+ . with_protocols ( ALL_PROTOCOLS )
60+ . with_sandbox_test_attestation ( )
61+ . build ( )
62+ . await
63+ }
64+
5665/// Votes `verifier` in as `mpc-contract`'s trusted verifier (all participants vote
5766/// so the change crosses threshold).
5867async fn trust_verifier ( contract : & Contract , participants : & [ Account ] , verifier : & AccountId ) {
@@ -418,15 +427,14 @@ async fn submit_participant_info__should_fail_cleanly_when_verifier_gas_budget_t
418427}
419428
420429#[ tokio:: test]
421- #[ ignore = "TODO(#3787): requires the near_account_secret_key asset" ]
422430async fn submit_participant_info__should_store_attestation_on_verified_quote ( ) {
423431 // Given
424432 let SandboxTestSetup {
425433 worker,
426434 mpc_signer_accounts,
427435 contract,
428436 ..
429- } = setup ( ) . await ;
437+ } = setup_accepting_fixture_attestation ( ) . await ;
430438 deploy_and_trust_pinned_verifier ( & worker, & contract, & mpc_signer_accounts) . await ;
431439 whitelist_fixture_dstack_measurements ( & contract, & mpc_signer_accounts) . await ;
432440 let submitter = create_fixture_account ( & worker, "fixture-node-a" ) . await ;
@@ -461,46 +469,6 @@ async fn submit_participant_info__should_store_attestation_on_verified_quote() {
461469}
462470
463471#[ tokio:: test]
464- #[ ignore = "TODO(#3787): requires the near_account_secret_key asset" ]
465- async fn submit_participant_info__should_fail_and_store_nothing_when_resolve_verification_runs_out_of_gas ( )
466- {
467- // Given: a callback budget far below the ~20 Tgas the post-DCAP work needs,
468- // but enough to schedule the callback receipt. Reaching that gas-heavy path
469- // requires a Verified verdict and a submitter holding the fixture key.
470- let SandboxTestSetup {
471- worker,
472- mpc_signer_accounts,
473- contract,
474- ..
475- } = SandboxTestSetup :: builder ( )
476- . with_protocols ( ALL_PROTOCOLS )
477- . with_init_config ( dtos:: InitConfig {
478- resolve_verification_tera_gas : Some ( 3 ) ,
479- ..Default :: default ( )
480- } )
481- . build ( )
482- . await ;
483- deploy_and_trust_pinned_verifier ( & worker, & contract, & mpc_signer_accounts) . await ;
484- whitelist_fixture_dstack_measurements ( & contract, & mpc_signer_accounts) . await ;
485- let submitter = create_fixture_account ( & worker, "fixture-node-a" ) . await ;
486- let balance_before = submitter. view_account ( ) . await . unwrap ( ) . balance ;
487-
488- // When
489- let result = submit_dstack ( & submitter, & contract) . await ;
490-
491- // Then: the callback receipt rolls back, so nothing may be stored.
492- assert_submission_failed_cleanly (
493- & result,
494- & contract,
495- & submitter,
496- balance_before,
497- "Exceeded the prepaid gas" ,
498- )
499- . await ;
500- }
501-
502- #[ tokio:: test]
503- #[ ignore = "TODO(#3787): requires the near_account_secret_key asset" ]
504472async fn submit_participant_info__should_reject_verified_quote_when_tls_key_owned_by_other_account ( )
505473{
506474 // Given: an owner stored a Verified attestation for the fixture TLS key.
@@ -513,7 +481,7 @@ async fn submit_participant_info__should_reject_verified_quote_when_tls_key_owne
513481 mpc_signer_accounts,
514482 contract,
515483 ..
516- } = setup ( ) . await ;
484+ } = setup_accepting_fixture_attestation ( ) . await ;
517485 deploy_and_trust_pinned_verifier ( & worker, & contract, & mpc_signer_accounts) . await ;
518486 whitelist_fixture_dstack_measurements ( & contract, & mpc_signer_accounts) . await ;
519487 let owner = create_fixture_account ( & worker, "fixture-node-a" ) . await ;
0 commit comments