HIGH-004 - Fix cleanup on consensus reached and rename#7696
Merged
sstanculeanu merged 1 commit intoFeb 11, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns naming around the async header/body storage by renaming “BlocksQueue” to “BlocksCache” across constructors/tests, and ensures async-execution state is cleaned when consensus is reached for HeaderV3 blocks.
Changes:
- Rename
ArgsExecutionManager.BlocksQueuetoBlocksCacheand update call sites (unit tests, integration tests, factory wiring). - Rename the test mock
BlocksQueueMocktoBlocksCacheMockand remove an unused eviction-subscriber mock. - Extend
CleanOnConsensusReachedto also evict cached header/body pairs atnonce+1and add coverage for the new behavior + V3 path.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| testscommon/processMocks/queue/blocksQueueEvictionSubscriberMock.go | Removes an unused queue eviction subscriber mock (file deleted). |
| testscommon/processMocks/blocksCacheMock.go | Renames the mock type from BlocksQueueMock to BlocksCacheMock. |
| process/block/shardblockProposal_test.go | Updates execution manager args to use BlocksCache. |
| process/block/metablock_test.go | Updates execution manager args to use BlocksCache. |
| process/block/export_test.go | Renames local variable to blocksCache and wires it to both execution manager + headers executor. |
| process/block/baseProcess_test.go | Renames local variable to blocksCache and wires it via BlocksCache. |
| process/block/baseProcessHeaderV3_test.go | Adds a unit test asserting V3 path calls CleanOnConsensusReached. |
| process/block/baseProcess.go | Calls executionManager.CleanOnConsensusReached() in the HeaderV3 branch before setting current header. |
| process/asyncExecution/headersExecutor_test.go | Uses blocksCache naming and swaps mock to BlocksCacheMock. |
| process/asyncExecution/executionManager/executionManager_test.go | Updates to BlocksCache args/errors and adds coverage for CleanOnConsensusReached evicting cache. |
| process/asyncExecution/executionManager/executionManager.go | Renames arg field to BlocksCache; CleanOnConsensusReached now also evicts cached blocks at nonce+1. |
| process/asyncExecution/executionManager/errors.go | Renames error from ErrNilBlocksQueue to ErrNilBlocksCache. |
| process/asyncExecution/cache/headerBodyCache_test.go | Renames test name from queue terminology to cache terminology. |
| integrationTests/vm/staking/metaBlockProcessorCreator.go | Wires BlocksCache into execution manager and headers executor. |
| integrationTests/testSyncNode.go | Updates execution manager args to use BlocksCache. |
| integrationTests/testProcessorNode.go | Updates execution manager args to use BlocksCache. |
| integrationTests/testFullNode.go | Updates execution manager args to use BlocksCache. |
| factory/processing/processComponents.go | Updates factory wiring to create/use blocksCache and pass it via BlocksCache. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sstanculeanu
approved these changes
Feb 11, 2026
ssd04
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reasoning behind the pull request
This PR aligns naming around the async header/body storage by renaming “BlocksQueue” to “BlocksCache” across constructors/tests, and ensures async-execution state is cleaned when consensus is reached for HeaderV3 blocks.
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?