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
Follow-up to #3293 / #3785. Two loose ends remain after making mock attestations cleanable:
The genesis sentinel path TeeState::with_mocked_participant_attestations (used by init / init_running, crates/contract/src/tee/tee_state.rs) still stores non-expiring MockAttestation::Valid. fix(contract): make mock attestations cleanable via expiry #3785 stamps an expiry on submitted mocks and migrates existing stored entries, but a fresh init can still create a mock that never expires and can never be cleaned up. Stamping these too changes the Figure out a good way to initialize the contract with attestations enforced for hard launch #1087 placeholder semantics (a participant that never submits a real attestation would auto-expire), which is why it was deferred.
Because a no-expiry mock can still exist, the node keeps a backward-compat fallback in submitted_attestation_landed (crates/node/src/indexer/tx_sender.rs): a mock with no stored expiry is matched by identity instead of the expiry-changed heuristic. Once every stored mock carries an expiry, that None arm is dead code and the mock case collapses into the same heuristic Dstack uses.
Background
Follow-up to #3293 / #3785. Two loose ends remain after making mock attestations cleanable:
TeeState::with_mocked_participant_attestations(used byinit/init_running,crates/contract/src/tee/tee_state.rs) still stores non-expiringMockAttestation::Valid. fix(contract): make mock attestations cleanable via expiry #3785 stamps an expiry on submitted mocks and migrates existing stored entries, but a fresh init can still create a mock that never expires and can never be cleaned up. Stamping these too changes the Figure out a good way to initialize the contract with attestations enforced for hard launch #1087 placeholder semantics (a participant that never submits a real attestation would auto-expire), which is why it was deferred.submitted_attestation_landed(crates/node/src/indexer/tx_sender.rs): a mock with no stored expiry is matched by identity instead of the expiry-changed heuristic. Once every stored mock carries an expiry, thatNonearm is dead code and the mock case collapses into the same heuristic Dstack uses.Acceptance Criteria
with_mocked_participant_attestationsstamps an expiry on the mock sentinels it creates (decide on the Figure out a good way to initialize the contract with attestations enforced for hard launch #1087 auto-expiry behavior first).submitted_attestation_landedmock-identity fallback (Nonearm) is removed once all stored mocks are guaranteed to carry an expiry.Resources & Additional Notes
TODO(#1639)expiry heuristic which would eventually replace this landing check entirely.