Skip to content

Storage save optimizations#7864

Draft
ssd04 wants to merge 3 commits into
feat/testnet-fixesfrom
storage-save-optimizations
Draft

Storage save optimizations#7864
ssd04 wants to merge 3 commits into
feat/testnet-fixesfrom
storage-save-optimizations

Conversation

@ssd04

@ssd04 ssd04 commented May 29, 2026

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?

@ssd04 ssd04 self-assigned this May 29, 2026
@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.52%. Comparing base (5adab78) to head (0e1af9a).

Files with missing lines Patch % Lines
process/block/metablock.go 33.33% 5 Missing and 3 partials ⚠️
process/block/shardblock.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/testnet-fixes    #7864      +/-   ##
======================================================
- Coverage               77.53%   77.52%   -0.01%     
======================================================
  Files                     883      883              
  Lines                  124506   124519      +13     
======================================================
  Hits                    96536    96536              
- Misses                  21558    21565       +7     
- Partials                 6412     6418       +6     

☔ 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.

}

if metaHeader.IsStartOfEpochBlock() {
log.LogIfError(mp.epochStartTrigger.RevertStateToBlock(metaHeader))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

calling RevertStateToBlock might not fully revert SetProcessed, tbd

_ = mp.blockChain.SetCurrentBlockHeader(prevBlockHeader)
mp.blockChain.SetCurrentBlockHeaderHash(prevBlockHeaderHash)

mp.revertEpochStartTrigger(headerHandler)

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.

the RevertStateToBlock which is called inside revertEpochStartTrigger was supposed to be called with the previous header not the header being reverted.
Now we do need the current header as well (for the new flag) but I don't think the new method was fully adapted.

@sstanculeanu sstanculeanu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

no other comment

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.

3 participants