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
rs-sdk: tell a transition refused by the local size check apart from a node's rejection #6284
checked_broadcast_request (packages/rs-sdk/src/platform/transition/broadcast_request.rs) refuses a transition over max_state_transition_size before anything is sent. It returns the same Error::Protocol(ConsensusError(StateTransitionMaxSizeExceededError)) that Platform returns when a node rejects the transition. A caller cannot tell "stopped locally, never dispatched" from "reached a node and was rejected".
Effect in platform-wallet
AssetLockManager::submit_with_chain_lock_fallback (rs-platform-wallet/src/wallet/asset_lock/orchestration.rs) treats entering the IS→CL fallback as a possible dispatch (maybe_dispatched). A size error satisfies needs_chain_lock_proof when the shorter ChainLock proof would make the transition fit. Suppose the InstantSend attempt was refused only by the local size check and the ChainLock attempt then fails before dispatch (for example, the signer has no key). The wallet then reports StateTransitionResultUnconfirmed (MaybeSent, FFI code 20) with no held lock. The real outcome is a refusal before dispatch, which should keep the signer diagnostic (31) and name the resumable lock.
The wallet keeps the conservative MaybeSent today, because the SDK gives it no evidence either way.
Proposed
Have the SDK carry "refused before dispatch" evidence out of its local preparation checks, e.g. a distinct error variant or wrapper for checked_broadcast_request refusals that keeps the consensus error as its source. The per-attempt record in submit_with_chain_lock_fallback can then set maybe_dispatched only for attempts that may have reached a node.
Activity
fix(sdk): keep a size-refused invitation claim possibly sent