Skip to content

Fix removing headers at bootstrap#7798

Merged
ssd04 merged 2 commits into
feat/supernova-async-execfrom
fix-meta-bootstrap-round-index
Mar 26, 2026
Merged

Fix removing headers at bootstrap#7798
ssd04 merged 2 commits into
feat/supernova-async-execfrom
fix-meta-bootstrap-round-index

Conversation

@ssd04
Copy link
Copy Markdown
Contributor

@ssd04 ssd04 commented Mar 20, 2026

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?

@ssd04 ssd04 self-assigned this Mar 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.53%. Comparing base (8eab550) to head (9b5233c).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat/supernova-async-exec    #7798      +/-   ##
=============================================================
- Coverage                      77.54%   77.53%   -0.01%     
=============================================================
  Files                            882      882              
  Lines                         123683   123690       +7     
=============================================================
+ Hits                           95908    95909       +1     
- Misses                         21429    21436       +7     
+ Partials                        6346     6345       -1     

☔ View full report in Codecov by Sentry.
📢 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 marked this pull request as ready for review March 23, 2026 12:50
@AdoAdoAdo AdoAdoAdo requested a review from Copilot March 25, 2026 13:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 addresses storage bootstrap behavior by cleaning up header-related storage entries for rounds above the configured BootstrapRoundIndex, preventing stale data from persisting across restarts.

Changes:

  • Update loadBlocks() to immediately remove storage + notarized storage for bootstrap rounds above BootstrapRoundIndex.
  • Add shard bootstrap tests validating cleanup behavior for BootstrapRoundIndex > 0 and BootstrapRoundIndex == 0.
  • Add equivalent metachain bootstrap tests validating the same cleanup behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
process/sync/storageBootstrap/baseStorageBootstrapper.go Cleans up storage entries for rounds above BootstrapRoundIndex during bootstrap iteration (not only after successful bootstrap).
process/sync/storageBootstrap/shardStorageBootstrapper_test.go Adds tests asserting round cleanup behavior during shard storage bootstrap.
process/sync/storageBootstrap/metaStorageBootstrapper_test.go Adds tests asserting round cleanup behavior during metachain storage bootstrap.

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

Comment thread process/sync/storageBootstrap/metaStorageBootstrapper_test.go
assert.True(t, wasCalledBlockchainSetHeader)
})

t.Run("bootstrapRoundIndex zero should cleaned all", func(t *testing.T) {
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This subtest title has a grammatical error: "should cleaned all" -> "should clean all" (or similar).

Suggested change
t.Run("bootstrapRoundIndex zero should cleaned all", func(t *testing.T) {
t.Run("bootstrapRoundIndex zero should clean all", func(t *testing.T) {

Copilot uses AI. Check for mistakes.
Comment thread process/sync/storageBootstrap/metaStorageBootstrapper_test.go
Comment thread process/sync/storageBootstrap/shardStorageBootstrapper_test.go
Comment thread process/sync/storageBootstrap/shardStorageBootstrapper_test.go
Comment thread process/sync/storageBootstrap/shardStorageBootstrapper_test.go
@ssd04 ssd04 merged commit 2451f5b into feat/supernova-async-exec Mar 26, 2026
13 of 14 checks passed
@ssd04 ssd04 deleted the fix-meta-bootstrap-round-index branch March 26, 2026 07:51
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