feat(external-call): recorded-result consistency checker and extension-service validator - #25
Draft
angelol wants to merge 10 commits into
Conversation
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
June 30, 2026 12:19
db4bbf8 to
4d4d6d3
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr5-extension
branch
2 times, most recently
from
June 30, 2026 14:33
50c4618 to
82a25ba
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
2 times, most recently
from
June 30, 2026 16:31
eaed53c to
80e12d6
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr5-extension
branch
from
July 1, 2026 19:27
b6e9db6 to
8d9554c
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
July 1, 2026 19:27
269670f to
e2fbfd3
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr5-extension
branch
from
July 3, 2026 08:09
230f4b2 to
c690ddf
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
July 3, 2026 08:19
e2fbfd3 to
109754c
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr5-extension
branch
from
July 3, 2026 15:36
c690ddf to
7a301e7
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
July 3, 2026 15:36
8043a5f to
1610e64
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr5-extension
branch
from
July 6, 2026 09:25
7a301e7 to
b213120
Compare
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
July 6, 2026 09:29
edabc86 to
375f885
Compare
…ecution wiring (digital-asset#553) ## Summary This is PR 5 of 8 in the external-call runtime-integration series tracked in digital-asset#513, stacked on PR 4. The external-call stack (digital-asset#513): digital-asset#506 added the transaction-side representation for recording external-call results; digital-asset#514 added the LF `EXTERNAL_CALL` builtin surface; digital-asset#518 wired it into Speedy and the LF engine; digital-asset#522 added transaction protobuf encoding/decoding; digital-asset#526 added Canton protocol serialization for recorded results; digital-asset#537 added the participant-side extension-service client. digital-asset#541 implemented the remaining runtime integration as one PR; this series splits digital-asset#541 into 8 independently reviewable PRs (each < 1000 lines) and supersedes it. This PR connects the digital-asset#537 extension-service client to command execution: it adds the handler that routes engine external-call questions to configured extension services, the participant configuration that keys services by extension id, and the node wiring. ## Scope This PR adds: - the `ExtensionServiceExternalCallHandler` implementation of the PR 3 handler SPI, dispatching engine external-call questions to the digital-asset#537 extension-service client (`ExtensionServiceManager` / `HttpExtensionServiceClient` / `ExtensionServiceClient` glue) - participant extension-service configuration keyed by extension id (`CantonConfig`, `ConfigValidations`, `CantonEngineConfig`) - handler wiring through command execution (`ApiServiceOwner`, `ApiServices`, `StoreBackedCommandInterpreter`) and node startup (`LedgerApiServer`, `ParticipantNode`) - configuration, HTTP-handler and command-interpreter tests ## Out of scope Recorded-result consistency checking and the extension-service validator implementation (PR 6), response routing (PR 7), and activation of validation in transaction processing (PR 8). The handler is dev-gated and off unless an extension service is configured, so the intermediate state is dormant. ## Stacking & review This PR is stacked on PR 4, so its diff against `main` is **cumulative**. The incremental change for this PR alone (it depends on PR 3's handler SPI, not PR 4): digital-asset/canton@zenith-network:angelol/external-call-06-split-pr4-damle-mcc...zenith-network:angelol/external-call-06-split-pr5-extension Refs digital-asset#513.
…and extension validator
The supportsExternalCallResults guard is dead by the checkExternalCallResults invariant (unsupported => results empty on every construction path), and the .nonEmpty guard is redundant since map over empty is empty. Collapse to a plain map.
On empty occurrences the general path already computes Result(Map.empty, Seq.empty), structurally equal to Result.empty, so the isEmpty short-circuit is redundant.
Rename Result.inconsistencies to hostedInconsistencies, aligning the field with the method that computes it, and document the party grouping, the definition of checking parties, and what "visible" means.
Use testedProtocolVersion instead of hardcoding dev, gate the external-call tests to dev and above, and add an any-version test for views without external-call results.
…ion test util Drop the fixtures that only the response-router and confirmation-response tests use (validator mocks, view positions, confirmer/model-conformance helpers); they will be introduced by the PRs that use them.
angelol
force-pushed
the
angelol/external-call-06-split-pr6-checker
branch
from
July 6, 2026 11:03
375f885 to
c0363cb
Compare
…alidator test The unconfigured-extension case goes through a real ExtensionServiceManager, whose choke-point logging (added on digital-asset#553) emits the full-error warning; the validator test never captured it, so it leaked into canton_test.log and failed CI's log check on digital-asset#554 (jobs 3608/3609). Wrap the call in loggerFactory.assertLogs, asserting the complete warning message like the handler test does; assertLogs suppresses asynchronously for Future results, preserving the suite's async style.
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
This is PR 6 of 8 in the external-call runtime-integration series tracked in digital-asset#513, stacked on PR 5.
The external-call stack (digital-asset#513): digital-asset#506 added the transaction-side representation for recording external-call results; digital-asset#514 added the LF
EXTERNAL_CALLbuiltin surface; digital-asset#518 wired it into Speedy and the LF engine; digital-asset#522 added transaction protobuf encoding/decoding; digital-asset#526 added Canton protocol serialization for recorded results; digital-asset#537 added the participant-side extension-service client. digital-asset#541 implemented the remaining runtime integration as one PR; this series splits digital-asset#541 into 8 independently reviewable PRs (each < 1000 lines) and supersedes it.This PR adds the consistency checker that compares recorded external-call results against locally checked results, and the concrete extension-service validator implementing the PR 4 SPI.
Scope
This PR adds:
ExternalCallConsistencyChecker, which compares recorded results with locally checked results and identifies disagreementsExtensionServiceExternalCallValidator, the extension-service implementation of the PR 4ExternalCallValidatorSPIOut of scope
Routing of disagreements to checking parties (PR 7) and activation of the validator in transaction processing (PR 8). The validator is implemented here but not yet threaded into confirmation; it is dev-gated and dormant until PR 8.
Refs digital-asset#513.