You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check PV16 emergency switches before signing or submitting wallet operations #6450
TL;DR: The SDK and wallet should check whether a network emergency pause blocks an operation before asking the user to sign it.
User story
As a wallet developer, I want to tell users when a network emergency pause blocks their operation, so they can understand the refusal before signing.
Scenario
Base flow
A wallet user starts an operation on a protocol version 16 network. The wallet selects an eligible signing key and submits the signed operation while an applicable emergency switch is active.
Actual behavior
Platform can refuse the operation with consensus error 41400 even though the wallet selected an eligible key.
Expected behavior
The SDK or wallet checks the verified switch status before signing or submitting and explains a known block to the caller. Platform makes the final admission decision using the state at block execution.
Detailed discussion
On PV16, an active key-type restriction can block a transition signed with that type. StopTransfersToCore can block a withdrawal regardless of the signing key. The signing-key selection API evaluates the key, signing scope, and signer availability. Those inputs carry no emergency switch state.
Use the SDK's proved emergency switch status for preflight in the SDK or wallet operation path. Check which switches apply to the transition with dpp's StateTransition::gating_emergency_switches (the one owner of that mapping, which also covers address spends, shielded pools, asset-lock funding and the type of a key being added) instead of restating the rules, and report the blocking switch when the proved state rules out submission. Switch status can change after the proof is fetched, so admission remains subject to block-time state.
Activity