Skip to content

recreate interceptors on bootstrap#7861

Merged
AdoAdoAdo merged 16 commits into
masterfrom
start-in-epoch-reload-interceptors
Jun 10, 2026
Merged

recreate interceptors on bootstrap#7861
AdoAdoAdo merged 16 commits into
masterfrom
start-in-epoch-reload-interceptors

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 fixes a bootstrap correctness issue where network components (resolvers, request handler, interceptors/syncers) were created against the bootstrap-time shard coordinator and never rebuilt after requestAndProcessing() reassigns e.shardCoordinator to the node's resolved destination shard. The fix introduces rebuildNetworkComponentsForShard(), which tears down the existing main/full-archive interceptor containers and resolvers container (unregistering their topics on both messengers) and recreates them with the resolved coordinator before the consensus topic is created. The deferred close in Bootstrap() is made nil-safe to avoid double-close after teardown.

Changes:

  • Add resolversContainer field and rebuildNetworkComponentsForShard/tearDownStaleNetworkComponents helpers; invoke the rebuild after the shard coordinator is reassigned in requestAndProcessing().
  • Make the deferred interceptor-container Close() in Bootstrap() nil-safe.
  • Add test-only accessors and three unit tests covering no-op, rewire, and error propagation behaviors.

Reviewed changes

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

File Description
epochStart/bootstrap/process.go Adds rebuild/teardown helpers, stores resolvers container, hooks rebuild into requestAndProcessing(), makes deferred close nil-safe.
epochStart/bootstrap/process_test.go Adds tests for the new rebuild behavior (no-op, rewire, error propagation) and helpers to collect topics.
epochStart/bootstrap/export_test.go Exports the new method and internal containers/request handler for tests.

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

Comment thread epochStart/bootstrap/process.go Outdated
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.61%. Comparing base (adf0114) to head (48c6755).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
epochStart/bootstrap/process.go 58.18% 16 Missing and 7 partials ⚠️
epochStart/bootstrap/storageProcess.go 48.88% 19 Missing and 4 partials ⚠️
process/sync/metablock.go 76.78% 9 Missing and 4 partials ⚠️
epochStart/shardchain/trigger.go 95.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7861      +/-   ##
==========================================
- Coverage   76.62%   76.61%   -0.01%     
==========================================
  Files         814      814              
  Lines      110955   111153     +198     
==========================================
+ Hits        85019    85165     +146     
- Misses      20142    20180      +38     
- Partials     5794     5808      +14     

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

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

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

sstanculeanu
sstanculeanu previously approved these changes May 28, 2026
ssd04
ssd04 previously approved these changes May 28, 2026
@AdoAdoAdo AdoAdoAdo dismissed stale reviews from ssd04 and sstanculeanu via 87c1564 May 28, 2026 14:39
sstanculeanu
sstanculeanu previously approved these changes May 28, 2026
@github-actions

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 87c1564052899fdad4f0eb87c9c6f338ffc2232c
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_MAY_28__14_40_12
  • PYTEST_EXIT_CODE: 1

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: f0c8c15dc75e48fb75a1609c34c57966940bab29
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_JUNE_02__10_05_15
  • PYTEST_EXIT_CODE: 1

@AdoAdoAdo AdoAdoAdo marked this pull request as ready for review June 9, 2026 08:09
@AdoAdoAdo AdoAdoAdo requested a review from Copilot June 9, 2026 08:09

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread epochStart/bootstrap/process.go Outdated
Comment thread epochStart/bootstrap/storageProcess.go
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 98c228b964c5a3763ce48cbbbeb24f3b9963b9b8
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_JUNE_09__14_14_57
  • PYTEST_EXIT_CODE: 1

sstanculeanu
sstanculeanu previously approved these changes Jun 10, 2026
…e-order

Fix transition on msg reverse order
sstanculeanu
sstanculeanu previously approved these changes Jun 10, 2026
ssd04
ssd04 previously approved these changes Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 2ea25abd4b7a2e74975ea30c6ecdd3e87e794e31
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_JUNE_10__08_35_01
  • PYTEST_EXIT_CODE: 1

@AdoAdoAdo AdoAdoAdo dismissed stale reviews from ssd04 and sstanculeanu via 1dfe150 June 10, 2026 11:02
sstanculeanu
sstanculeanu previously approved these changes Jun 10, 2026

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

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

Comments suppressed due to low confidence (1)

epochStart/shardchain/triggerRegistry_test.go:26

  • In cloneTrigger(), metaEpoch is being copied from t.epoch instead of t.metaEpoch. Since the new tests rely on cloneTrigger() for equality checks, this can mask real state mismatches and produce false positives.
	rt.epoch = t.epoch
	rt.metaEpoch = t.epoch
	rt.currentRoundIndex = t.currentRoundIndex

Comment thread epochStart/shardchain/triggerRegistry_test.go Outdated
@github-actions

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 1dfe15095866cfdb829fbcf5e1ee39b136d1c4d5
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_JUNE_10__11_03_19
  • PYTEST_EXIT_CODE: 1

@AdoAdoAdo AdoAdoAdo merged commit ba99de8 into master Jun 10, 2026
11 of 14 checks passed
@AdoAdoAdo AdoAdoAdo deleted the start-in-epoch-reload-interceptors branch June 10, 2026 12:09
@github-actions

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 48c6755fd49ae4bc245ffada038a8c8921dcc140
  • Current Branch: start-in-epoch-reload-interceptors
  • mx-chain-go Target Branch: master
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main
  • mx-chain-simulator-go Commit Hash: 771e2f48f7a5d3cc83fc880558e5efe7befd7ee8

🚀 Environment Variables:

  • TIMESTAMP: 2026_JUNE_10__11_21_05
  • PYTEST_EXIT_CODE: 1

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.

5 participants