soroban-cli: add replay command to introspect diagnostic events, events, etc

Open
#1,027 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
cli

Research direction

Start by reviewing the soroban-cli contract command and the existing RPC or Horizon transaction retrieval paths. Define how soroban contract replay --tx <txid> should retrieve and expose diagnostic events, events, and related transaction information, then verify that it can replay any transaction without requiring events to have been enabled at execution time.

Written by the indexing model from the issue text.

Description

What problem does your feature solve?

Developers aren't always online when something goes wrong with their contract. It's important that developers can introspect their contracts in pubnet/production without being connected at the time.

To a lesser degree it's unreasonable, I think, to expect that RPCs will always have diagnostic events on given the additional resources they cost, and for the most part their unimportants in the happy path which should be most of the time.

What would you like to see?

A new command added to the soroban-cli that can replay any transaction:

soroban contract replay --tx <txid>
What alternatives are there?

Assume developers will have access to an RPC or Horizon with diagnostic events enabled that they can use to look back.

Dominant language
Rust
Stars
123
Forks
141
Avg merge
2d 21h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/stellar-cli

All issues in stellar/stellar-cli

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.