Skip to content

Feat: Move ClarityRuntimeTxError into clarity and expose whether failed txs are included in block - #7486

Draft
jbencin-stacks wants to merge 1 commit into
stacks-network:mainfrom
jbencin-stacks:refactor/clarity-runtime-tx-error
Draft

Feat: Move ClarityRuntimeTxError into clarity and expose whether failed txs are included in block#7486
jbencin-stacks wants to merge 1 commit into
stacks-network:mainfrom
jbencin-stacks:refactor/clarity-runtime-tx-error

Conversation

@jbencin-stacks

@jbencin-stacks jbencin-stacks commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR contains a couple more changes needed for Clarinet:

  • Move ClarityRuntimeTxError into clarity, so it builds for WASM
  • Add is_included_in_block() so Clarinet can tell if failed transaction was included in block

This will expose information to Clarinet about why a transaction failed, which it needs to know if the transaction charges a fee and consumes a nonce

Applicable issues

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • For new Clarity features or consensus changes, add property tests (see docs/property-testing.md)
  • Changelog fragment(s) or "no changelog" label added (see changelog.d/README.md)
  • Required documentation changes (e.g., rpc/openapi.yaml for RPC endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

Move `ClarityRuntimeTxError` and `handle_clarity_runtime_error` from `stackslib`
to `clarity`, and add `ClarityRuntimeTxError::is_included_in_block` plus
`analysis_failure_is_included_in_block`.

This will allow Clarinet to tell if a failed transaction was included
in a block, and whether to charge the sender a fee and increment its nonce.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jbencin-stacks
jbencin-stacks force-pushed the refactor/clarity-runtime-tx-error branch from d3187e2 to aa0fa92 Compare August 4, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant