Skip to content

extra checks shard data proposal#7877

Merged
miiu96 merged 4 commits into
feat/testnet-fixesfrom
extra-checks-meta-data-proposal
Jun 19, 2026
Merged

extra checks shard data proposal#7877
miiu96 merged 4 commits into
feat/testnet-fixesfrom
extra-checks-meta-data-proposal

Conversation

@miiu96

@miiu96 miiu96 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

  • Extra checks shard data proposal

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?

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.62%. Comparing base (36c6953) to head (e32ad1f).

Files with missing lines Patch % Lines
...ck/interceptedBlocks/interceptedMetaBlockHeader.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat/testnet-fixes    #7877   +/-   ##
===================================================
  Coverage               77.61%   77.62%           
===================================================
  Files                     885      885           
  Lines                  125414   125425   +11     
===================================================
+ Hits                    97345    97359   +14     
+ Misses                  21587    21585    -2     
+ Partials                 6482     6481    -1     

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

Comment on lines +153 to +162
for _, sd := range shardDataProposed {
if sd.GetShardID() >= coordinator.NumberOfShards() && sd.GetShardID() != core.MetachainShardId {
return process.ErrInvalidShardId
}
}

shardDataHashes := make([][]byte, len(shardDataProposed))
for i, sd := range shardDataProposed {
shardDataHashes[i] = sd.GetHeaderHash()
}

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.

collect shardDataHashes in the first loop to avoid iterating twice?

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.

done

assert.Equal(t, process.ErrDuplicatedHashInBlock, err)
}

// ------- checkMetaShardDataProposal

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.

not needed

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.

removed

@miiu96 miiu96 merged commit 53da698 into feat/testnet-fixes Jun 19, 2026
11 checks passed
@miiu96 miiu96 deleted the extra-checks-meta-data-proposal branch June 19, 2026 07:40
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