Skip to content

re-trial on transient execution result mismatch#7901

Merged
AdoAdoAdo merged 4 commits into
feat/testnet-fixesfrom
fix-recover-on-sync-error
Jul 7, 2026
Merged

re-trial on transient execution result mismatch#7901
AdoAdoAdo merged 4 commits into
feat/testnet-fixesfrom
fix-recover-on-sync-error

Conversation

@AdoAdoAdo

Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

Proposed changes

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automatic recovery path for shard bootstrap syncing when a transient ErrExecutionResultDoesNotMatch occurs, by rewinding local pending execution results and triggering re-execution, with a per-nonce cooldown to prevent repeated rewinds.

Changes:

  • Add recovery logic in baseBootstrap.doJobOnSyncBlockFail() to handle execution-result mismatches by removing pending results from the first diverging nonce (or from last notarized + 1).
  • Track recovery attempts per nonce with a cooldown window, and clean up attempt-tracking data behind the final block nonce.
  • Add a comprehensive shard bootstrap test suite covering mismatch scenarios, fallbacks, cooldown behavior, and failure modes, plus test-only accessors.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
process/sync/baseSync.go Adds mismatch-recovery logic with per-nonce cooldown tracking and cleanup.
process/sync/shardblock_test.go Adds tests validating recovery triggering, rewind selection, fallback behavior, and cooldown semantics.
process/sync/export_test.go Exposes test-only helpers to observe/adjust preparedForSync, cooldown, and recovery-attempt counters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread process/sync/baseSync.go
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.78947% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.69%. Comparing base (2539513) to head (6bc12b1).

Files with missing lines Patch % Lines
process/sync/baseSync.go 90.78% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat/testnet-fixes    #7901   +/-   ##
===================================================
  Coverage               77.68%   77.69%           
===================================================
  Files                     885      885           
  Lines                  125828   125904   +76     
===================================================
+ Hits                    97745    97816   +71     
- Misses                  21603    21608    +5     
  Partials                 6480     6480           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ssd04 ssd04 self-requested a review July 6, 2026 08:49
sstanculeanu
sstanculeanu previously approved these changes Jul 6, 2026
ssd04
ssd04 previously approved these changes Jul 6, 2026
@AdoAdoAdo AdoAdoAdo dismissed stale reviews from ssd04 and sstanculeanu via 6bc12b1 July 7, 2026 07:33
@AdoAdoAdo AdoAdoAdo merged commit 4247666 into feat/testnet-fixes Jul 7, 2026
11 checks passed
@AdoAdoAdo AdoAdoAdo deleted the fix-recover-on-sync-error branch July 7, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants