soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

CLI: inconsistencies in silent auto-restoring of expired entries

Open c0linw opened this issue 1 year ago • 5 comments

The CLI will silently restore contract entries when using soroban contract invoke, but not when using soroban contract bump. This could confuse developers when they are able to call a contract that cannot be found, or make it unclear that the contract actually needs to be bumped. It may be helpful to keep the behaviour consistent across CLI operations either by adding the silent restore to all relevant operations, or by removing it.

image

c0linw avatar Oct 12 '23 22:10 c0linw

Is there an equivalent to soroban contract bump now that it's removed (according to latest changes on main)? Looks like soroban contract invoke is still silently restoring contract entries, unless I'm mistaken.

stellarsaur avatar Nov 22 '23 20:11 stellarsaur

Bump was renamed to extend in:

  • https://github.com/stellar/soroban-tools/pull/1029

leighmcculloch avatar Nov 22 '23 20:11 leighmcculloch

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello I'm a frontend and also a blockchain developer and I would love to work on this issue.

CollinsC1O avatar Sep 26 '24 07:09 CollinsC1O

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have extensive experience working with CLI tools in JavaScript, TypeScript, Go, and Rust, including contributing to open-source projects. My background in designing consistent user experiences in CLI tools, particularly in ensuring predictable and clear behavior for developers, will be valuable in addressing this issue.

How I plan on tackling this issue

I would first analyze the root cause of the silent auto-restoring behavior by examining both soroban contract invoke and soroban contract bump commands. My approach would focus on ensuring consistency across these operations. To achieve this, I would:

Determine whether to standardize the silent restore behavior for all CLI operations or remove it entirely. Update the documentation to clearly outline the behavior for each command. Implement tests to validate consistent behavior across both scenarios, ensuring developers have a clear understanding of when and why a contract is restored or needs to be bumped.

gregemax avatar Sep 27 '24 05:09 gregemax

Thank you I will start right away

gregemax avatar Sep 28 '24 15:09 gregemax