Fix RpcFrontend consensus and history publication - #8127
Draft
Amaury Chamayou (achamayou) wants to merge 5 commits into
Draft
Fix RpcFrontend consensus and history publication#8127Amaury Chamayou (achamayou) wants to merge 5 commits into
Amaury Chamayou (achamayou) wants to merge 5 commits into
Conversation
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
August 7, 2026 16:03
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Publishes consensus/history from NodeState to RPC frontends and synchronizes request-side access.
Changes:
- Adds atomic frontend pointer publication and null-safe redirects.
- Adds concurrency and unpublished-consensus tests.
- Removes the obsolete TSAN suppression.
Custom instructions used:
.github/copilot-instructions.md.github/instructions/reviewing.instructions.md
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tsan_env_suppressions |
Removes the frontend race suppression. |
src/node/rpc/test/frontend_test.cpp |
Adds publication and redirect regression tests. |
src/node/rpc/frontend.h |
Implements atomic publication and request-local pointer loads. |
src/node/node_state.h |
Publishes consensus and history to frontends. |
src/enclave/rpc_handler.h |
Adds the publication interface. |
Copilot started reviewing on behalf of
Amaury Chamayou (achamayou)
August 7, 2026 20:16
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
Suppressed comments (1)
include/ccf/endpoint_registry.h:177
EndpointRegistryis a public application API, and changing its protectedconsensus/historymembers to atomics changes how downstream subclasses can use them (the logging sample in this PR already has to switch toget_consensus()). Repository policy requires user-facing API changes to be recorded inCHANGELOG.md; please add a migration note directing subclasses to the new accessors.
std::atomic<ccf::kv::Consensus*> consensus{nullptr};
std::atomic<ccf::kv::TxHistory*> history{nullptr};
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.
Summary
NodeStateto each RPC frontendRpcFrontendandEndpointRegistryEndpointRegistryconsensus reader through/txduring concurrent publicationRpcFrontendTSAN suppressionTesting
ninja -C buildcd build && ./tests.sh --output-on-failure -R '^(frontend_test|node_frontend_test)$'cd build-tsan && TSAN_OPTIONS="suppressions=$PWD/../tsan_env_suppressions:halt_on_error=1" ./tests.sh --output-on-failure -R '^frontend_test$'scripts/cpp-format-checks.shscripts/includes-checks.shscripts/copyright-checks.shscripts/ascii-checks.shCloses #8123