Skip to content

Complete restricted-output fundrawtransaction edge coverage and launch verification #81

Closed

Description

@kiwidream

Summary

The 1.0.0 target contains the production guard introduced by
#37.

fundrawtransaction preserves the original decoded outputs and validates each
scriptPubKey against Consensus::IsRestrictedOutputModeConsensusOutput() at
next-block height before wallet funding. Existing tests cover rejection of
P2PKH, P2SH-SegWit, P2WPKH, and P2TR outputs and acceptance of P2MR, OP_RETURN,
and PayToAnchor.

This issue tracks the remaining edge coverage and launch-verification work.

Remaining test coverage

Extend wallet_p2mr.py to cover:

  • P2WSH output rejection.
  • A mixed P2MR/non-P2MR output set, proving one invalid output rejects the
    entire request.
  • A non-extractable, non-exempt script.
  • A reserved-witness output, asserting the intended wallet policy result.
  • An invalid output referenced by subtractFeeFromOutputs.
  • Decoding successful P2MR, OP_RETURN, and PayToAnchor results and confirming
    that their original scripts are preserved.

All rejection cases must fail before wallet funding returns transaction hex or
locks newly selected inputs.

Validation

Run:

ulimit -n 10240
build/test/functional/test_runner.py wallet_p2mr.py wallet_fundrawtransaction.py
build/bin/test_qbit --run_test=wallet_tests
build/bin/test_qbit --run_test=wallet_rpc_tests

Also rerun or explicitly schedule bounded launch-target verification against
the intended release commit.

Acceptance criteria

  • The launch target is recorded as containing the production fix from
    Reject non-P2MR raw funding outputs #37.
  • All edge cases above have deterministic functional coverage.
  • Existing allowed-output tests continue to pass.
  • The review tracker is updated with the target commit and validation evidence.

Consensus impact

Consensus-adjacent, not consensus-changing.

This work must not alter the restricted-output consensus classifier or
validation rules. It verifies that the wallet RPC fails early for transactions
those existing rules would reject. Mempool and block validation already reject
restricted-output-invalid transactions, so there is no identified
consensus-split path.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions