feat: add packageIdSelectionPreference and rework batch-delete example#22
Draft
scolear wants to merge 1 commit into
Draft
feat: add packageIdSelectionPreference and rework batch-delete example#22scolear wants to merge 1 commit into
scolear wants to merge 1 commit into
Conversation
Add Submission.package_id_selection_preference (serialized as packageIdSelectionPreference) so callers can pin Canton's package-name resolution to specific package hashes instead of its default smart-upgrade selection. Rework the delete_executed_transfers example to use it: - call CBTCGovernanceRules_BatchDeleteExecutedTransfers - pass RegistrarService via a choice arg with read-as visibility (no disclosed_contracts blob) - configurable BATCH_SIZE with automatic bisection on PACKAGE_SELECTION_FAILED - append processed/failed contract IDs to CSV files for safe re-runs
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.
What
Adds a
packageIdSelectionPreferencefield toSubmissionand reworks thedelete_executed_transfersexample to use it.This is the work-in-progress that was sitting uncommitted on the old
I11-endpoint-migrationbranch. The endpoint migration itself already landed onmain(squash-merged as #13), so this PR carries only the remaining follow-onchanges, replanted onto current
main.Changes
commonSubmission.package_id_selection_preference(serialized aspackageIdSelectionPreference, omitted when empty). Lets callers pin Canton'spackage-name resolution to specific package hashes instead of relying on its
default smart-upgrade selection — needed when a participant has multiple vetted
versions of a package and the choice you need only exists in one of them.
examples/delete_executed_transfersCBTCGovernanceRules_BatchDeleteExecutedTransfers.RegistrarServiceas a choice argument with read-as visibility on thedecentralized party — no
disclosed_contractsblob required.PACKAGE_ID_PREFERENCEenv var, fed intopackageIdSelectionPreference.BATCH_SIZEwith automatic bisection onPACKAGE_SELECTION_FAILED(a failed batch is split in half and retried, so a few bad contracts don't sink
the whole batch).
(
PROCESSED_CSV/FAILED_CSV) for safe, resumable re-runs.Replant notes
Rebased cleanly onto current
main; verified the following improvements thatmainmade after the WIP's base were preserved (not reverted):token_url(.../auth, realm)(feat(keycloak): added Quarkus-style token URL helpers #19)div_ceilclippy fixes for chunk/batch sizingsubmit::wait_for_transactionendpointVerification
cargo clippy -p examples -p common --all-targets— clean, no warnings.cargo fmtwas not run repo-wide:mainis not rustfmt-clean (23 dirtyfiles under the pinned toolchain) and there's no fmt CI gate. Only the reworked
example file was formatted, to keep this diff focused.