fix(node): keep attestation tasks alive after submission retry timeout - #4201
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
…s-permanently-die-after-12h-retry-timeout
…s-permanently-die-after-12h-retry-timeout
A failed removal-triggered resubmission no longer disarms the monitor; the next TEE-accounts update retries while the node is still absent. Also restore the transient/permanent split for generation-error logging, log anyhow errors with their cause chain, deduplicate the submitter construction and metric increment, and simplify the test fixtures.
…s-permanently-die-after-12h-retry-timeout
…s-permanently-die-after-12h-retry-timeout
…s-permanently-die-after-12h-retry-timeout
The attestation tasks now retry forever instead of giving up, so a node that cannot get its attestation onto the contract fails quietly. Add a submission-outcome counter so operators have something to alert on. Also fold the removal monitor's retry into an inner loop with an exhaustive match on the timeout, drop the test that only asserted JoinHandle::abort, and pause the clock in the remaining monitor tests.
…s-permanently-die-after-12h-retry-timeout
Carry the pending retry as an Option<Duration> instead of nesting a second loop, so the labeled break is no longer needed. A lapsed delay and an incoming update are the same instruction to the loop body, so both collapse into Ok(()) and the exit test becomes a plain is_err(). Behavior is unchanged; the tests are untouched.
…s-permanently-die-after-12h-retry-timeout
|
A few points worth highlighting for reviewers before they start reviewing:
Despite all these changes, the PR is still relatively small, so I think it’s fine not to split the refactor into a separate PR. |
gilcu3
left a comment
There was a problem hiding this comment.
Looks good for what it was trying to do. Left some minor comments, but will come back after some slack discussion, as I am not sure about the approach
|
|
||
| loop Every 7 days | ||
| loop Every hour |
There was a problem hiding this comment.
same, I don't think we need to update this old doc, we could actually remove this one to reduce the noise
gilcu3
left a comment
There was a problem hiding this comment.
Thank you! I think all my comments were already there :)
Replaces the inline crate::indexer::ReadAttestationExpiry, std::sync::Arc and crate::metrics:: paths with imports, matching how the sibling tee module pulls in its metric constants. The std::future and std::time paths stay qualified, which is what the rest of the crate does.
…ounter The registered help string already says what the counter is, and no other metric in the file carries a doc comment.
The backup service has no attestation code yet, so there is nothing for this doc to be out of sync with; the hourly cadence is the node's, not a decision anyone has made for the backup service.
…module run.rs built the interval and held ATTESTATION_RESUBMISSION_INTERVAL, leaving the cadence policy in the bootstrap file while every other attestation timing constant lived beside the submission code. run_periodic_attestation_submission now wraps that setup, so periodic_attestation_submission and Tick can be private and the ticker seam the tests drive stays unchanged.
barakeinav1
left a comment
There was a problem hiding this comment.
I did only a shallow review. but LGTM
Closes #2287