Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sovereign] Fix resync cross chain data integrity checks #6587

Open
wants to merge 10 commits into
base: feat/sovereign-mainchain-header-sync
Choose a base branch
from

Conversation

mariusmihaic
Copy link
Contributor

@mariusmihaic mariusmihaic commented Nov 7, 2024

Reasoning behind the pull request

  • When a node was re-syncing the network while there were cross chain mbs/headers/scrs, validity checks for intercepted data would fail

Proposed changes

  • Refactored validity/integrity checks like checkMiniBlocksHeaders & CheckValidity to accept core.MainChainShardID as valid shard ID

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?

@mariusmihaic mariusmihaic self-assigned this Nov 7, 2024
Base automatically changed from MX-15984-fix-request-incoming-header to feat/sovereign-mainchain-header-sync November 8, 2024 11:31
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 66.31579% with 32 lines in your changes missing coverage. Please review.

Project coverage is 77.64%. Comparing base (a8ac19e) to head (7c52836).
Report is 37 commits behind head on feat/sovereign-mainchain-header-sync.

Files with missing lines Patch % Lines
...actory/interceptedMiniBlockSovereignDataFactory.go 0.00% 12 Missing ⚠️
...tory/interceptedShardSovereignHeaderDataFactory.go 0.00% 12 Missing ⚠️
...iner/sovereignShardInterceptorsContainerFactory.go 66.66% 2 Missing and 2 partials ⚠️
...ptorscontainer/baseInterceptorsContainerFactory.go 77.77% 1 Missing and 1 partial ⚠️
...torscontainer/shardInterceptorsContainerFactory.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           feat/sovereign-mainchain-header-sync    #6587      +/-   ##
========================================================================
- Coverage                                 77.65%   77.64%   -0.02%     
========================================================================
  Files                                       953      957       +4     
  Lines                                    108816   108879      +63     
========================================================================
+ Hits                                      84497    84534      +37     
- Misses                                    18499    18524      +25     
- Partials                                   5820     5821       +1     

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

@mariusmihaic mariusmihaic marked this pull request as ready for review November 11, 2024 14:50
@@ -4,6 +4,7 @@ import (
"errors"
"testing"

"github.com/multiversx/mx-chain-core-go/core"
Copy link
Contributor

Choose a reason for hiding this comment

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

Your imports format is broken in Golang

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.

2 participants