Skip to content

Support annexes in element txenv #315

Description

@apoelstra

Right now when the user adds an annex to their Elements transaction environment, it's silently dropped, causing sighash computations and other jets to provide incorrect results.

There is a FIXME in src/jet/elementsc/c_env.rs in new_raw_input about this, as of current master 06e656a. This issue is to track the FIXME.

See also BlockstreamResearch/simplicity#311 which is a libsimplicity issue which causes some minor complication (basically, we've gotta build a vector of annex pointers, which is fine, just a little inefficient).

Activity

  1. EvanWinget commented on May 1, 2026

    @EvanWinget

    +1 on this. I'm working on reimplementing chia-gaming state-channels in Simplicity, and my slash-path programs require annex padding to broadcast.

    Programs within budget broadcast fine on regtest, but programs that need annex padding fail consensus with "Assertion failed inside jet" which can be traced to the sighash mismatch between simplicity-lang's new_raw_input passing annex: null while C-side build_txEnv includes the annex via annexHash.

    Not asking for a timeline on this - just adding signal that this blocks the class of high-cost programs that the annex mechanism was designed for. Happy to test against a branch in the future if useful!

  2. delta1 commented on May 1, 2026

    @delta1
    Contributor
  3. EvanWinget commented on May 1, 2026

    @EvanWinget

    #345

    Thank you for the PR link - I missed this earlier!

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