Skip to content
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

soroban-cli: Warn or Error When Deploying Contracts Compiled with RC Version of Soroban SDK #1061

Merged
merged 11 commits into from
Nov 1, 2023

Conversation

stellarsaur
Copy link
Contributor

What

This PR adds a check to the soroban contract deploy command if the Rust SDK version used to compile it is a release candidate SDK version.

If the new flag --ignore-checks is present, a warning is displayed. Otherwise, the command will return an error.

Why

Release candidate versions of the Soroban Rust SDK are not suitable for use with the Stellar Public Network. We should at the very least warn users if they are deploying contracts compiled with release candidate SDK versions.

Closes #941

@willemneal
Copy link
Member

I've been wanting to remove installing from the deploy command. However, regardless you need to add this check to the install command since the goal is that no incompatible contract should be installed.

So you'll need to add the new -i arg to the install command and move the logic there so that it will happen when the following function is called:

https://github.com/stellar/soroban-tools/pull/1061/files#diff-c8ba4158908b240ce43c9bcc7cbce0c5765ca1e1ab73ff09bce6cd26ea9a7b0fR135

@stellarsaur
Copy link
Contributor Author

I've been wanting to remove installing from the deploy command. However, regardless you need to add this check to the install command since the goal is that no incompatible contract should be installed.

So you'll need to add the new -i arg to the install command and move the logic there so that it will happen when the following function is called:

https://github.com/stellar/soroban-tools/pull/1061/files#diff-c8ba4158908b240ce43c9bcc7cbce0c5765ca1e1ab73ff09bce6cd26ea9a7b0fR135

Thanks for taking a look! I moved the logic to install and propagated -i from the deploy command to install

@stellarsaur stellarsaur self-assigned this Oct 31, 2023
@stellarsaur stellarsaur added the enhancement New feature or request label Oct 31, 2023
@stellarsaur stellarsaur changed the title Warn or Error When Deploying Contracts Compiled with RC Version of Soroban SDK soroban-cli: Warn or Error When Deploying Contracts Compiled with RC Version of Soroban SDK Oct 31, 2023
@stellarsaur stellarsaur marked this pull request as ready for review October 31, 2023 19:45
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stellarsaur stellarsaur merged commit c791a68 into main Nov 1, 2023
22 checks passed
@stellarsaur stellarsaur deleted the cli-sdk-warning branch November 1, 2023 16:48
sreuland pushed a commit to sreuland/soroban-tools that referenced this pull request Nov 2, 2023
…Version of Soroban SDK (stellar#1061)

* Check if contract is compiled using RC SDK version in deploy

* Rust fmt

* Add info for --ignore-check

* Regenerate docs

* Update CLI tests

* Move rc checking logic to install cmd

* Update tests that use install cmd

* Formatting fix

* Gen docs

* rustfmt

* Reference fix
chadoh pushed a commit to AhaLabs/stellar-cli that referenced this pull request Nov 7, 2023
…Version of Soroban SDK (stellar#1061)

* Check if contract is compiled using RC SDK version in deploy

* Rust fmt

* Add info for --ignore-check

* Regenerate docs

* Update CLI tests

* Move rc checking logic to install cmd

* Update tests that use install cmd

* Formatting fix

* Gen docs

* rustfmt

* Reference fix
chadoh pushed a commit that referenced this pull request Nov 8, 2023
…Version of Soroban SDK (#1061)

* Check if contract is compiled using RC SDK version in deploy

* Rust fmt

* Add info for --ignore-check

* Regenerate docs

* Update CLI tests

* Move rc checking logic to install cmd

* Update tests that use install cmd

* Formatting fix

* Gen docs

* rustfmt

* Reference fix

(cherry picked from commit c791a68)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

soroban-cli: warn user when deploying a contract that was compiled using release candidate SDK
3 participants