Repository navigation
chore(ckbtc/ckdoge): DEFI-3048: use the shared ICRC-21 consent message argument helpers - #12103
Open
mbjorkqvist wants to merge 1 commit into
Open
mbjorkqvist wants to merge 1 commit into
mbjorkqvist wants to merge 1 commit into
Conversation
…e argument helpers Replace the minters' own size check and Candid decoder configuration for the ICRC-21 consent message argument with validate_consent_message_arg_size and decode_consent_message_arg from icrc-ledger-types, so the limits live in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the ckBTC and ckDOGE consent-message helper consolidation.
No open issues 🎉
What changed in this PR
This PR consolidates ICRC-21 consent-message argument handling in the ckBTC and ckDOGE minters using the shared icrc-ledger-types helpers introduced in #12078, preserving the decoding protections added in #12072.
Changes:
- Replace duplicated argument-size checks and decoder configuration with shared helpers.
- Update both minters’ skipping-quota regression tests to use the shared decoder.
| File | Description |
|---|---|
rs/dogecoin/ckdoge/minter/src/updates/tests.rs |
Update ckDOGE quota tests to use the shared decoder. |
rs/dogecoin/ckdoge/minter/src/updates/icrc21.rs |
Use shared size-validation and decoding helpers in ckDOGE. |
rs/bitcoin/ckbtc/minter/src/updates/tests.rs |
Update ckBTC quota tests to use the shared decoder. |
rs/bitcoin/ckbtc/minter/src/updates/icrc21.rs |
Use shared size-validation and decoding helpers in ckBTC. |
Review effort: Balanced
|
✅ No security or compliance issues detected. Reviewed everything up to f4e3c09. Security OverviewDetected Code Changes
|
|
✅ No security or compliance issues detected. Reviewed everything up to f4e3c09. Security OverviewDetected Code Changes
|
This branch has not been deployed
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.
Why
#12072 bounded Candid decoding in the ICRC-21 consent message endpoints of the ckBTC and ckDOGE minters with minter-local copies of the argument size check and decoder configuration. #12078 has since added shared helpers for this to
icrc-ledger-types, which the ICP and ICRC ledgers use.What
validate_consent_message_arg_sizeanddecode_consent_message_arg, so the size limit and the skipping quota are defined in one place. The behavior is unchanged.🤖 Generated with Claude Code