Skip to content

test(contract): exercise the Verified attestation store end-to-end in sandbox (fixture account key + measurements helper) #3787

Description

@pbeza

Background

The async attestation flow's failure branches are covered in sandbox (#3715), but the successful Verified store path is not: submit_participant_info reads the account key from env::signer_account_pk(), and the fixture quote's report_data binds the fixture node's key, of which only the .pub was ever kept. No sandbox account could produce a matching submission, so the store-path tests landed #[ignore]d in #4085.

Approach

Regenerate the fixtures from a fresh localnet CVM on a TDX host and keep the node's signer key this time. The catch: that key is generated in-enclave, and the only way to run anything inside a CVM is an app-compose script, which validate_app_compose_config rejects as arbitrary root code — so a CVM we can extract the key from is one the contract refuses. Details here. Resolved by relaxing that single field for test builds behind allow-pre-launch-script; init_script and bash_script stay rejected and the production wasm never enables it.

Acceptance Criteria

Dropped: the out-of-gas test for resolve_verification, and the related right-sizing of resolve_verification_tera_gas. near-sdk forwards unused prepaid gas to the callback, so it cannot be starved while the caller attaches max gas — the config is a floor, not a cap.

PR: #4104 (stacked on #4085). Parent: #3738. Epic: #3642.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions