Skip to content

Conversation

rdeioris
Copy link
Contributor

@rdeioris rdeioris commented Oct 8, 2025

Description

This patch improves the Block Replay endpoint by allowing it to returns the specific vm_error of a failed transaction.

A new test has been added and the TestRPC framework has been improved for allowing the addition of custom transactions in the tip block.

Applicable issues

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo
  • New integration test(s) added to bitcoin-tests.yml

@rdeioris rdeioris marked this pull request as ready for review October 8, 2025 12:10
@rdeioris rdeioris requested review from a team as code owners October 8, 2025 12:10
@rdeioris rdeioris requested review from jcnelson and obycode October 8, 2025 13:16
@janniks
Copy link
Contributor

janniks commented Oct 8, 2025

Awesome! So we can assume any time there is a non-null vm-error string something went wrong, in my case we don't really care what went wrong, but can use the presence as a general failed indicator?

@rdeioris
Copy link
Contributor Author

rdeioris commented Oct 8, 2025

Awesome! So we can assume any time there is a non-null vm-error string something went wrong, in my case we don't really care what went wrong, but can use the presence as a general failed indicator?

Correct, the presence of vm_error signals a runtime error

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@rdeioris rdeioris requested a review from Jiloc October 13, 2025 13:56
description: transaction id
description: transaction id
vm_error:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
type: string
type: [string, "null"]

Comment on lines +107 to +108
pub tip_transactions: Vec<StacksTransaction>,
pub ignore_transaction_errors: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add two docstring one liners with what these two parameters do? We also started using the NakamotoBootPlan for AAC, and documenting this parameters will be useful for the rest of the team!

},
NakamotoBootTenure::NoSortition(boot_steps) => {
let boot_steps_len = boot_steps.len();
match boot_steps.get_mut(boot_steps_len - 2).unwrap() {
Copy link
Contributor

Choose a reason for hiding this comment

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

just for my own understanding: why the -2 in case of NoSortition?

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.

4 participants