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
With dcap-qvl-free wire types now in place (#3235, #3245, #3246), mpc-contract can finally call out to tee-verifier.near over a cross-contract Promise instead of running dcap_qvl::verify::verify itself. This is where the WASM size drop materializes.
User Story
As an MPC contract maintainer, I want submit_participant_info to verify Dstack attestations via cross-contract Promise to tee-verifier.near, so that dcap-qvl and its closure leave the MPC contract's WASM and the contract gains safe headroom under NEP-509's 1,490,000-byte limit.
Acceptance Criteria
Attestation::verify splits into extract_dcap_inputs (pre-Promise) + finish_verify (in callback).
submit_participant_info's Dstack arm schedules a Promise to tee-verifier.{near,testnet}'s verify_quote and stashes a PendingAttestation keyed by account_id.
Mock attestations remain synchronous (no Promise, no pending entry).
New on_attestation_verified callback re-reads allowlists fresh from tee_state, runs the post-DCAP body, inserts into stored_attestations, refunds the caller's deposit on failure (or on PromiseError::Failed), and clears the pending entry.
State migration initializes the new pending_attestations map empty.
cargo tree -p mpc-contract --target wasm32-unknown-unknown -e no-proc-macro -i dcap-qvl returns nothing in normal (non-dev) deps.
Reproducible WASM drops at least 200 KB below the 1,490,000-byte NEP-509 limit.
Unit tests cover both submit_participant_info arms and the four callback paths (success, promise failed, post-DCAP failed, allowlist re-read).
Background
With dcap-qvl-free wire types now in place (#3235, #3245, #3246),
mpc-contractcan finally call out totee-verifier.nearover a cross-contract Promise instead of runningdcap_qvl::verify::verifyitself. This is where the WASM size drop materializes.User Story
As an MPC contract maintainer, I want
submit_participant_infoto verify Dstack attestations via cross-contract Promise totee-verifier.near, so thatdcap-qvland its closure leave the MPC contract's WASM and the contract gains safe headroom under NEP-509's 1,490,000-byte limit.Acceptance Criteria
Attestation::verifysplits intoextract_dcap_inputs(pre-Promise) +finish_verify(in callback).submit_participant_info'sDstackarm schedules a Promise totee-verifier.{near,testnet}'sverify_quoteand stashes aPendingAttestationkeyed byaccount_id.Mockattestations remain synchronous (no Promise, no pending entry).on_attestation_verifiedcallback re-reads allowlists fresh fromtee_state, runs the post-DCAP body, inserts intostored_attestations, refunds the caller's deposit on failure (or onPromiseError::Failed), and clears the pending entry.pending_attestationsmap empty.cargo tree -p mpc-contract --target wasm32-unknown-unknown -e no-proc-macro -i dcap-qvlreturns nothing in normal (non-dev) deps.submit_participant_infoarms and the four callback paths (success, promise failed, post-DCAP failed, allowlist re-read).Resources & Additional Notes
PR: #3247. Depends on #3235, #3237, #3245, #3246. Tracked by #3264.