-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect tx_status after error #2777
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Has this been fixed? |
Temporarily assigning @zone117x so this issue has an owner. Please feel free to re-assign as you see fit. |
I doubt I'm going to be working on code around this anytime soon. @friedger do you feel strongly that this behavior should be changed? I'm inclined to close this unless someone more familiar with this area of the code agrees with the change request. |
Yes, this is very visible and confusing for developers like the explorer developers. Users of the explorer see the big warning that the post conditions were not satisfied. As a workaround we could update the documentation and say that abort_by_poatxonditions does not imply that the tx was aborted by post conditions. This is only the case if the tx result is ok. |
Would you agree that this is somewhat of an order of precedence issue with what we declare as the cause of the abort? If the tx had an error result, and also did not fulfill the post-condition requirements, then it sounds like the abort "reason" could arguably be both? Either way, I agree a more helpful error message should be displayed. It sounds like this is something that could be handled client side. Both the tx If we changed this on the stacks-node, it would technically be breaking change to the event-stream history. And on the API side, I'd prefer not to override/transform data from the stacks-node. That usually backfires and causes more confusion. |
However, this is a bug. |
Assigning to @kantai to give some input. I'm not going to be working on this area of the code either way. |
Is this a bug, or just something that needs more information in the specification? The transaction runs, and the result of the execution is It's true that the transaction would have been aborted because of The value result of the transaction is always provided exactly so that clients can differentiate between these kinds of cases. |
Thank you for the clarification. Are there well known use cases where post conditions are met and the tx aborts due to an error? |
I’ll find a specific transaction to link, but you could always create such a case with the post conditions set to ALLOW mode. Contracts that have side effects without assets could also exhibit this case (for example, a PoX transaction can abort without any post conditions) even if you were using post conditions in DENY mode. |
There is never a tx with a post condition that is satisfied when the tx fails with an error. |
Not exactly -- a transaction with one of However, transactions with |
I see. Thank you |
Describe the bug
The
tx_status
of https://stacks-node-api.mainnet.stacks.co/extended/v1/tx/0x38e2f50a4c410e2835a3497d0a7f68c2e81150a3f95956333c31d7b68beb647b?chain=mainnet is shown asabort_by_post_condition
. However, thetx result
is(err u5)
.Expected behavior
I'd expect the tx status as
abort_by_response
Additional context
First reported on hirosystems/stacks-blockchain-api#671 because the explorer shows the status of the tx wrongly.
The text was updated successfully, but these errors were encountered: