fix(attestation): revert DEFAULT_EXPIRATION_DURATION_SECONDS to 7 days - #3948
Conversation
Restores the 7-day attestation validity window that was reduced to 1 day in #3626. The contract stamps expiry = block_timestamp + this constant, so a 1-day window leaves nodes ~24h to refresh before being dropped; 7 days restores the intended margin (nodes re-attest hourly, well within it). Refs #3947
There was a problem hiding this comment.
Pull request overview
Reverts the attestation expiry window in mpc-attestation back to 7 days to restore operational slack during upstream Intel PCS/collateral incidents, and aligns the inline comment with the restored value.
Changes:
- Restore
DEFAULT_EXPIRATION_DURATION_SECONDSfrom 1 day to 7 days. - Update the inline
// 1 daycomment to// 7 days.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull request overviewReverts Changes:
Reviewed changesPer-file summary
FindingsVerified the safety claim against
No blocking or non-blocking issues found. ✅ Approved |
What
Reverts
DEFAULT_EXPIRATION_DURATION_SECONDS(crates/mpc-attestation/src/attestation.rs) from 1 day back to 7 days, and fixes the stale// 1 dayinline comment.Why
The contract stamps each accepted attestation with
expiry = block_timestamp + DEFAULT_EXPIRATION_DURATION_SECONDS(TeeState::add_participant). The value was dropped from 7d to 1d in #3626, which leaves almost no margin: if a node can't refresh its attestation for ~24h it gets dropped. This bit us during an Intel PCS incident where the PCK CRL went stale (>7 days without re-sign) and node-side collateral freshness rejected fresh quote generation — with a 1-day expiry, nodes are ~24h from being kicked; the previous 7-day window would have given a week of runway. Nodes re-attest hourly, well within 7 days.Safety — no node/contract version-skew hazard
Made safe by #3736 (
fix(node): confirm submit_participant_info via advancing attestation expiry, already onmain). The node used to confirm its submission by reconstructing the attestation's creation time asstored_expiry − DEFAULT_EXPIRATION_DURATION_SECONDS; under skew (contract stamping 7d while a node still assumes 1d) the reconstructed age (~6d) exceeds the 120s freshness bound, so every submission is treated asNotExecutedand retried indefinitely. #3736 replaced that with an expiry-advanced check that doesn't depend on the constant's value, so this 1d→7d change cannot trigger that retry loop. (Holds provided nodes are on the #3736 build.)Notes
MAX_COLLATERAL_AGE/ per-field PCK CRL handling) is a separate PR.Closes #3947