Skip to content

Unilateral exit integration test #31

Description

@louisinger

#30 includes support of CSV tapscript ark closures, used for unilateral exit scripts. We should add e2e test verifying a VTXO owner is able to unilateral exit with introspector (spending the exit CSV script).


expanded by Arkana:

Background

PR #30 extended ReadArkadeScript to handle all closure types via scriptlib.DecodeClosure() — not just MultisigClosure. This includes CSVMultisigClosure, which is the tapscript leaf used for unilateral exits: the VTXO owner sweeps their funds after a CSV timelock, without server cooperation.

Before PR #30, introspector would reject any VTXO using a CSVMultisigClosure because it couldn't decode pubkeys from non-multisig closures. PR #30 fixed the decoder. This issue tracks adding an integration test to prove the full flow works.

What needs to be tested

An end-to-end test that:

  • Creates a VTXO tapscript with a CSVMultisigClosure exit leaf alongside the normal collaborative MultisigClosure
  • Submits a unilateral exit tx spending via the CSV leaf to introspector
  • Verifies introspector decodes the CSVMultisigClosure, extracts the owner pubkey, and signs
  • Verifies the signed tx is valid and broadcastable on regtest

Suggested location: test/unilateral_exit_test.go (parallel to test/pay_2_out_test.go)

Why this matters

The unilateral exit guarantee is Ark's core security property. If introspector can't sign a CSV exit, any VTXO using introspector in its tapscript loses its exit backstop. This test closes the loop on PR #30 and guards against silent regressions in the closure decoder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions