`stellar contract restore`: if an entry is already restored as of the simulation, we should not submit the tx to the network

Open
#2,201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
blockchain, cli

Research direction

Start in src/commands/contract/invoke.rs and read the run_against_rpc_server function, focusing on the simulation result and restored ledger entries. Exercise the stellar contract restore path with an entry already restored as of the simulation. Done means the command returns without submitting that transaction to the network.

Written by the indexing model from the issue text.

Description

This issue is from a conversation on https://github.com/stellar/stellar-cli/pull/2199#discussion_r2341878542

Basically, if an entry ledger has already be restored as of a simulation, we shouldn't need to submit that tx to the network. We could make some changes in src/commands/contract/invoke.rs in the run_against_rpc_server fn to check if a ledger entry has been restored, and if so, dont send the tx to the network, just return.

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.