Skip to content

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

Open
jbencin-stacks wants to merge 9 commits into
stacks-network:mainfrom
jbencin-stacks:refactor/clarity-runtime-tx-error
Open

refactor: Move ClarityRuntimeTxError into clarity and expose whether failed txs are included in block#7486
jbencin-stacks wants to merge 9 commits 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
  • Refactor ClarityRuntimeTxError to make it clear which failed transactions are included in blocks
  • 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

jbencin-stacks and others added 2 commits August 10, 2026 14:09
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) <[email protected]>
@jbencin-stacks
jbencin-stacks force-pushed the refactor/clarity-runtime-tx-error branch from aa0fa92 to 94b2f43 Compare August 10, 2026 18:09
@jbencin-stacks
jbencin-stacks marked this pull request as ready for review August 11, 2026 19:22
@jbencin-stacks jbencin-stacks changed the title Feat: Move ClarityRuntimeTxError into clarity and expose whether failed txs are included in block refactor: Move ClarityRuntimeTxError into clarity and expose whether failed txs are included in block Aug 12, 2026
@dhaney-stacks
dhaney-stacks requested review from aaronb-stacks, brice-stacks and hstove-stacks and removed request for aaronb-stacks August 13, 2026 16:26

@hstove-stacks hstove-stacks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

2 participants