Show diagnostic events when a transaction fails on-chain - #2700
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Surfaces Soroban diagnostic events when on-chain transaction submission fails.
Changes:
- Adds shared failure-event recovery after polling.
- Formats error, contract, and log diagnostics.
- Applies behavior to invoke, send, and transaction operation commands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cmd/soroban-cli/src/tx.rs |
Adds shared submission and event recovery. |
cmd/soroban-cli/src/log/event.rs |
Formats failed transaction diagnostics. |
cmd/soroban-cli/src/commands/tx/send.rs |
Uses enhanced submission for tx send. |
cmd/soroban-cli/src/commands/tx/args.rs |
Uses enhanced submission for transaction operations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fnando
marked this pull request as draft
August 24, 2026 21:22
fnando
force-pushed
the
detailed-transaction-submission-errors
branch
from
August 26, 2026 03:01
1d19742 to
363cb47
Compare
fnando
marked this pull request as ready for review
August 26, 2026 03:30
fnando
enabled auto-merge (squash)
August 26, 2026 03:31
leighmcculloch
approved these changes
Aug 26, 2026
leighmcculloch
left a comment
Member
There was a problem hiding this comment.
Couple questions otherwise looks good to me.
fnando
disabled auto-merge
August 26, 2026 13:30
fnando
enabled auto-merge (squash)
August 26, 2026 13:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a transaction passes simulation but fails on-chain, the CLI now prints the transaction's diagnostic events (host/contract error, message, and any logs) on stderr, across
contract invoke,tx send, and thetxop commands. Previously only theTransactionResultresult codes were shown. Closes #495.Why
The reason for a failure was never displayed — the diagnostic events were decoded and available on the RPC response but discarded before reaching the user.
Before (
main):After (this branch):
The new
Error eventline surfaces the host's message (operation instructions exceeds amount specified, needs3880vs1allowed) — absent before.Known limitations
Only Soroban transactions have diagnostic events; classic ops print nothing extra. The event line uses raw
ScValJSON rather than fully decoded text.