fix(e2e): remove epoch gap flakiness - #3445
Open
jpraynaud wants to merge 5 commits into
Open
Conversation
jpraynaud
temporarily deployed
to
testing-preview
July 30, 2026 18:00 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
July 30, 2026 18:00 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-preview
July 30, 2026 19:23 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
July 30, 2026 19:23 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-preview
July 30, 2026 20:45 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
July 30, 2026 20:45 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
July 31, 2026 07:58 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-preview
July 31, 2026 07:58 — with
GitHub Actions
Inactive
jpraynaud
force-pushed
the
jpraynaud/fix-e2e-flakiness
branch
4 times, most recently
from
August 3, 2026 06:30
4847826 to
4f65f57
Compare
jpraynaud
temporarily deployed
to
testing-preview
August 3, 2026 06:48 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
August 3, 2026 06:48 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-preview
August 3, 2026 10:43 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-2-preview
August 3, 2026 10:43 — with
GitHub Actions
Inactive
jpraynaud
force-pushed
the
jpraynaud/fix-e2e-flakiness
branch
from
August 3, 2026 14:59
4f65f57 to
8ad0e8c
Compare
The exponential poll backoff exceeded short devnet epochs, so target epochs could be detected up to a full epoch after their boundary.
A restart crossing an epoch boundary before the current epoch is certified creates an unrecoverable epoch gap that blocks the aggregator.
A single epoch left no slack for certificate sealing latency, causing spurious 'Timeout exhausted waiting for...' failures.
Reduce the number of lotteries played to get closer to the initial parameter set, as the test only needs to exercise the parameters update.
* mithril-end-to-end from `0.5.9` to `0.5.10`
jpraynaud
force-pushed
the
jpraynaud/fix-e2e-flakiness
branch
from
August 3, 2026 15:51
8ad0e8c to
520f12b
Compare
jpraynaud
marked this pull request as ready for review
August 3, 2026 15:52
There was a problem hiding this comment.
Pull request overview
This PR reduces intermittent e2e CI failures caused by epoch-boundary timing and aggregator restarts by tightening epoch transition polling, ensuring certificate continuity across restarts, and increasing artifact wait timeouts.
Changes:
- Switch epoch-transition waiting to a constant “tenth of epoch” polling cadence.
- Ensure the current epoch is certified before restarting the aggregator for protocol-parameter updates.
- Increase artifact production timeout to cover up to three epochs and reduce concatenation protocol parameters used during the update.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-test-lab/mithril-end-to-end/src/toolkit/wait.rs | Uses the new constant tenth-of-epoch backoff when waiting for target epoch transitions. |
| mithril-test-lab/mithril-end-to-end/src/toolkit/exec.rs | Lightens concatenation protocol parameters used during the update/restart step. |
| mithril-test-lab/mithril-end-to-end/src/toolkit/context.rs | Adds tenth_of_epoch_poll_backoff() and increases artifact production timeout to 3 epochs (plus tests). |
| mithril-test-lab/mithril-end-to-end/src/scenario/full.rs | Adds a pre-restart certification check to prevent unrecoverable epoch gaps. |
| mithril-test-lab/mithril-end-to-end/Cargo.toml | Bumps mithril-end-to-end crate version to 0.5.10. |
| Cargo.lock | Updates lockfile for the mithril-end-to-end version bump. |
| // A certificate chain lagging one epoch behind the chain tip is normal, but a restart | ||
| // crossing an epoch boundary before the current epoch is certified would create an | ||
| // unrecoverable epoch gap and block the aggregator | ||
| let current_epoch = chain_observer.get_current_epoch().await?.unwrap_or_default(); |
Comment on lines
+37
to
+38
| let delay = self.timeout_for_epochs(1) / 10; | ||
| Backoff::new(delay, delay, 1) |
jpraynaud
temporarily deployed
to
testing-2-preview
August 3, 2026 16:09 — with
GitHub Actions
Inactive
jpraynaud
temporarily deployed
to
testing-preview
August 3, 2026 16:09 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content
This PR includes the removal of several sources of flakiness in the e2e tests which caused intermittent
Timeout exhausted waiting for Certificate for epoch XXfailures in the CI:The fixed e2e test has been run 381 times with 1 failure, a 99.74% success ratio.
Pre-submit checklist
Issue(s)
Closes #3452