Skip to content

platform-wallet: an Exact asset lock is not bounded by max_asset_lock_transaction_inputs, so a lock over 100 inputs is dropped by Core and its IS-timeout fallback waits forever #5513

Closed

Description

@romchornyi

Expected Behavior

Every asset lock the wallet builds is refused before broadcast when it has more inputs than max_asset_lock_transaction_inputs (100), as a DrainAll lock already is, with AssetLockTooManyInputs.

Current Behavior

broadcast_funded_asset_lock_with_operation checks the input cap only for AssetLockBuildAmount::DrainAll (build.rs L1053-L1060). An Exact lock (identity registration, identity top-up, platform-address funding, shield of a set amount) is limited only by key-wallet's standard-transaction cap of 500 inputs.

A lock with 101–500 inputs is then:

  1. refused by Dash Core v23.1.7+ / v24 as non-standard (assetlocktx-too-many-inputs); P2P peers drop it without a reject, so the broadcast ends as "outcome uncertain";
  2. never InstantSend-locked, so the build's proof wait ends in FinalityTimeout;
  3. sent to the IS-timeout fallback, whose ChainLock wait (cl_wait = None in the user-facing flows) never ends, because the transaction never reaches a block.

Platform consensus refuses such a lock as well (max_asset_lock_transaction_inputs = 100).

Possible Solution

Apply the cap to every build amount: in the abandon match, check tx.input.len() > max_inputs before the DrainAll-specific arms, so an oversized Exact lock is abandoned with AssetLockTooManyInputs and its reservation released, as a drain is. A wallet that holds the amount only in more than 100 coins then gets a typed error it can act on (consolidate first), instead of a lock that never confirms.

Steps to Reproduce

Not reproduced on this path yet; found by reading the code. The same Core refusal was reproduced for a 104-input drain (support ticket 32500, #5478). Shape: a testnet wallet with ~150 coins of 0.0125 tDASH and no larger coin registers an identity, or tops one up, for an amount that needs more than 100 of them. Expected per the code: the lock is broadcast, never appears on chain, and the flow stays in the ChainLock wait.

Context

Raised by @llbartekll in the review of #5460 (point 1). Related: #5478 (the same cap for drains), dashwallet-ios#1042, support ticket 32500.

Your Environment

platform v5.1-dev with #5460 (2076ed770e); Dash Core v24 testnet.

Activity

  1. added
    bug
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions