Skip to content

fix: compare sudo key on pubkey bytes (SS58-prefix safe) + fix authorizedUpgrade wait timeout#17

Merged
eduardspa merged 1 commit into
mainfrom
eduardspa/fix-ss58-prefix-aware-sudo-check
May 13, 2026
Merged

fix: compare sudo key on pubkey bytes (SS58-prefix safe) + fix authorizedUpgrade wait timeout#17
eduardspa merged 1 commit into
mainfrom
eduardspa/fix-ss58-prefix-aware-sudo-check

Conversation

@eduardspa
Copy link
Copy Markdown
Contributor

The sudo/proxy permission check compared SS58 strings, which mismatch when the chain's SS58 prefix differs from the keyring's default (42). This made //Alice fail as sudo on previewnet-asset-hub (prefix 0, Polkadot AH style) even though it is the chain's sudo. Compare on raw public key bytes and re-encode the chain sudo key with prefix 42 for log parity. Also fix the wait loop so the advertised 5m timeout on system.authorizedUpgrade is actually used (was capping at ~60s).

Ref: https://github.com/paritytech/devops-cloud-infra/actions/runs/25815120656

SS58 string comparison broke the sudo/proxy permission check on chains
whose registered SS58 prefix differs from the keyring default (e.g. 0 on
Polkadot Asset Hub, 42 on the keyring), so the same account could render
as different strings and fail the check. Compare on raw public key bytes
instead and re-encode the chain sudo key with prefix 42 for log parity.

Also fix the wait for system.authorizedUpgrade so the advertised 5m
timeout is actually used (was capping at ~60s due to i===29 inside a
i<150 loop).
@eduardspa eduardspa merged commit fe7b7e0 into main May 13, 2026
4 checks passed
@eduardspa eduardspa deleted the eduardspa/fix-ss58-prefix-aware-sudo-check branch May 13, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant