fix(cli): read allowance fields from AuthorizationExtent#125
Merged
Conversation
CI Summary
Release - PassedTest this PR Download artifact (GitHub CLI required): gh run download 25516226869 -n cli-release-0.0.0-pr.125 -R paritytech/dotns-sdkInstall globally: npm install -g ./parity-dotns-cli-0.0.0-pr.125.tgzVerify: dotns --helpDeploy Example — Passed
Labelspkg: cli, scope: bulletin, dependencies Test - Passed163 passed, 0 failed across 163 tests. |
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.
Problem
dotns bulletin authorizereportsAuthorization was finalized but not appliedeven when the on-chain call succeeds. The misleading errormay not have Authorizer privilegesfires every time, blocking CI deploys. Example in mark3t CI.Root cause
After paritytech/polkadot-bulletin-chain #448, AuthorizationExtent fields
transactionsandbytesnow mean consumed counters, not allowances. New fieldstransactions_allowanceandbytes_allowancecarry the granted total instead.The CLI compares the consumed counter (0 for a fresh authorization) against the requested allowance (1_000_000 default), so 0 >= 1_000_000 is false → "not applied".
The error fires only when on-chain dispatch already succeeded (event.ok === true in the finalized case handler). The "Authorizer privileges" wording is a misleading hardcoded message - the actual cause is the wrong field read.
Fix
Read
transactions_allowanceandbytes_allowancefromAuthorizationExtent, updateAuthorizationStatustype to expose them, fix the comparison in the post-flight verification and pre-flight quota check. JSON output field names kept stable for backwards-compat.Test plan
transactions_allowance,bytes_allowance,bytes_permanent