Block-on-commit with inline signature response#7785
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for returning transaction receipts inline from block-until-commit endpoints by caching recent signature material at commit time and extending the consensus-committed callback to include receipt leaf components.
Changes:
- Introduces a
SignatureCacheSubsystemthat captures recent signature/COSE signature/serialised Merkle tree data via global commit hooks. - Updates the consensus-committed endpoint callback API to pass a
CommittedTxInfostruct, enabling inline receipt construction on commit. - Extends sample logging app + OpenAPI schema and e2e tests to cover a new blocking-with-receipt endpoint and invalidation paths.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/partitions_test.py | Extends invalidation test to cover receipt-capable blocking endpoint. |
| tests/e2e_logging.py | Adds receipt endpoint to blocking/non-blocking timing tests and verifies returned receipts. |
| src/node/snapshotter.h | Updates write-set observer to accept a digest directly. |
| src/node/signature_cache_subsystem.h | New subsystem caching recent signatures/trees for inline receipt construction. |
| src/node/signature_cache_interface.h | New node subsystem interface for querying cached signature material. |
| src/node/rpc_context_impl.h | Adds claims digest getter and expands respond-on-commit stored info. |
| src/node/rpc/frontend.h | Captures write set digest + commit evidence at commit time for later commit callbacks. |
| src/node/node_state.h | Wires signature cache hook registration into node startup. |
| src/node/historical_queries.h | Uses encryptor helper to format commit evidence, removing duplication. |
| src/kv/kv_types.h | Adds AbstractTxEncryptor::get_commit_evidence() helper. |
| src/kv/committable_tx.h | Refactors commit evidence formatting and changes write-set observer to pass digest. |
| src/http/http_session.h | Builds CommittedTxInfo and invokes new consensus-committed callback signature. |
| src/endpoints/endpoint_registry.cpp | Adds receipt builder helper + “respond with receipt on commit” callback factory. |
| src/enclave/enclave.h | Installs SignatureCacheSubsystem in the node context. |
| samples/apps/logging/logging.cpp | Adds /log/blocking/private/receipt endpoint using inline receipt response. |
| include/ccf/rpc_context.h | Adds get_claims_digest() to the public RpcContext interface. |
| include/ccf/endpoint_registry.h | Exposes new receipt-on-commit helpers in the public endpoint registry API. |
| include/ccf/endpoint_context.h | Introduces CommittedTxInfo and updates consensus-committed callback type. |
| doc/schemas/app_openapi.json | Updates sample app OpenAPI version and documents new receipt endpoint path. |
achamayou
reviewed
Mar 31, 2026
achamayou
approved these changes
Mar 31, 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.
Implementing #7781.
SignatureCacheSubsystemcaptures signature, COSE signature, and serialised merkle tree via global commit hooks on the KV tables, making recent signature data available for inline receipt construction.ConsensusCommittedEndpointFunctioncallback signature passes aCommittedTxInfostruct containing all receipt leaf components (write set digest, commit evidence, claims digest), enabling commit callbacks to build full transaction receipts inline.build_receipt_for_committed_tx()reconstructs the merkle tree from cached data, extracts a proof for the specific seqno, and assembles a completeTxReceiptImpl— available for any endpoint to embed receipts in their own response format.write_set_observercallback to pass the digest (not raw bytes), and movedget_commit_evidence()formatting into the encryptor to eliminate duplication acrosscommittable_tx.h,historical_queries.h, and the new receipt path.test_blocking_callsto cover all three endpoint variants (non-blocking, blocking, blocking-with-receipt) with receipt verification viaverify_receipt, and added invalidation testing for the receipt path inpartitions_test.py.