Improve bandwidth usage - #7960
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/recon-by-meta #7960 +/- ##
===================================================
Coverage 77.71% 77.71%
===================================================
Files 892 892
Lines 129043 129059 +16
===================================================
+ Hits 100287 100304 +17
+ Misses 22206 22203 -3
- Partials 6550 6552 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR reduces unnecessary network/processing load by (1) ignoring duplicate intercepted-data messages earlier in the interceptor pipeline and (2) making marshalled transaction payload generation deterministic, while also simplifying epoch-start “request block info” delay configuration by moving it to the global EpochStartConfig.
Changes:
- Treat duplicated intercepted data (and already-known equivalent proofs) as ignorable messages (
ErrMessageShouldBeIgnored) to avoid redundant processing/propagation. - Ensure
createMarshalledDataV3()output determinism by iterating mini-block maps in sorted key order. - Refactor epoch-start trigger extra-delay configuration: remove per-epoch field +
CommonConfigsHandleraccessor and useEpochStartConfig.ExtraDelayForRequestBlockInfoInMillisecondsinstead.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| update/factory/exportHandlerFactory.go | Wire epoch-start trigger extra-delay from EpochStartConfig instead of common configs handler. |
| testscommon/generalConfig.go | Update test config to reflect removal of per-epoch extra-delay field. |
| testscommon/epochStartConfigsHandlerStub.go | Remove stubbed extra-delay accessor aligned with interface change. |
| testscommon/components/configs.go | Update test component config for per-epoch extra-delay field removal. |
| process/interceptors/singleDataInterceptor.go | Ignore duplicate/intersecting-proof messages via ErrMessageShouldBeIgnored. |
| process/interceptors/singleDataInterceptor_test.go | Add coverage for duplicate messages being ignored. |
| process/interceptors/processor/uniqueChunksProcessor_test.go | Validate deduplication behavior differs for broadcast vs direct. |
| process/interceptors/multiDataInterceptor.go | Ignore duplicated batch/data messages and process only new items when mixed. |
| process/interceptors/multiDataInterceptor_test.go | Add tests for mixed/all-duplicate multi-data handling and duplicate batches. |
| process/interceptors/interceptedDataVerifier.go | Preserve ErrAlreadyExistingEquivalentProof instead of mapping to invalid intercepted data. |
| process/interceptors/interceptedDataVerifier_test.go | Update expectation to match new verifier behavior. |
| process/interceptors/factory/interceptedDataVerifierFactory_test.go | Add test ensuring verifier instances isolate topics. |
| process/coordinator/process.go | Make marshalled tx generation deterministic by sorting miniblock-map keys. |
| process/coordinator/process_test.go | Add determinism tests and direct unit test for key sorting helper. |
| p2p/errors.go | Re-export ErrMessageShouldBeIgnored from communication layer. |
| node/chainSimulator/components/coreComponents_test.go | Adjust test config for per-epoch extra-delay field removal. |
| integrationTests/testProcessorNode.go | Update trigger args to pass extra-delay directly. |
| integrationTests/testFullNode.go | Update trigger args to pass extra-delay directly. |
| integrationTests/testConsensusNode.go | Update trigger args to pass extra-delay directly. |
| go.sum | Bump mx-chain-communication-go pseudo-version checksum entries. |
| go.mod | Bump mx-chain-communication-go dependency version. |
| factory/processing/processComponents.go | Wire epoch-start trigger extra-delay from EpochStartConfig. |
| epochStart/shardchain/triggerRegistry_test.go | Align trigger clone test with new stored extra-delay field. |
| epochStart/shardchain/trigger.go | Store extra-delay as duration from args; remove per-epoch handler lookup. |
| epochStart/shardchain/trigger_test.go | Add tests for negative delay + stored configured delay. |
| config/config.go | Remove per-epoch extra-delay field from EpochStartConfigByEpoch. |
| common/interface.go | Remove GetExtraDelayForRequestBlockInfoInMs from CommonConfigsHandler. |
| common/constants.go | Remove unused ExtraDelayForRequestBlockInfo constant. |
| common/configs/commonConfigs.go | Remove per-epoch extra-delay support from common configs handler. |
| common/configs/commonConfigs_test.go | Update tests to match common configs handler API/struct changes. |
| cmd/node/config/config.toml | Remove per-epoch extra-delay fields from epoch start config list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if err != nil { | ||
| logInterceptedDataCheckValidityErr(interceptedData, err) | ||
| if errors.Is(err, common.ErrAlreadyExistingEquivalentProof) { | ||
| return err | ||
| } |
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:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?