CLI: Deploying a contract should fail or warn if the supplied WASM file is clearly invalid
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust, wasm
- Domain
- blockchain, cli
Research direction
Start at the deploy sub-command's handling of the --wasm parameter and review the linked Discord discussion for the unresolved validation scope. Define the invalid-binary cases and warning, prompt, and --force behavior before implementing; done means clearly invalid contract files cannot be deployed accidentally without the intended override.
Written by the indexing model from the issue text.
Description
This issue is linked to this Discord discussion
What problem does your feature solve?
At the moment the cli will upload what ever file was supplied to the ´--wasm´ parameter when using the deploy sub-command.
It is never checked / verified that the 'contract'-file is actually valid.
What would you like to see?
Add a warning and corresponding overwrite parameter (e.g. --force) to the deploy sub-command such that clearly invalid contract binaries will not find their way on chain on accident.
The definition of what is deemed to be an invalid contract binary is still tbd.
On the most basic level a check should verify the WASMs magic word validity (00 61 73 6d).
What alternatives are there?
- Don't warn the user at all
- Warn the user but still deploy the given file as is
- Add a prompt to continue/abort the deployment process
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
stellar/stellar-cli#2723 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100