Update stellar-strkey to 0.0.18 - #2614
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XiSfu2MM5xbdGjxj7oXys8
0.0.18 includes the strkey CLI fix (accept owned variant keys for Decoded<Strkey>). It is not yet on crates.io, so temporarily patch stellar-strkey to the release/v0.0.18 branch to validate ahead of the release. Remove the patch once 0.0.18 is published.
0.0.18 is now published to crates.io, so drop the temporary [patch.crates-io] that pointed stellar-strkey at the release/v0.0.18 git branch (and the matching stellar-cli deny.toml allow-git entry). The dependency now resolves from crates.io.
There was a problem hiding this comment.
✅ Ready to approve
The dependency bump is consistently applied, required call sites/tests are updated for the new redaction/stdin behaviors, and no correctness issues were identified in the changed regions.
Note: this review does not count toward required approvals for merging.
Pull request overview
Bumps the workspace stellar-strkey dependency to 0.0.18 (Protocol 28 line) and updates the CLI/spec tooling glue code and tests to match upstream API/CLI behavior changes (more specific decode errors, secret redaction via Unredacted, and strkey encode/decode reading from stdin).
Changes:
- Update workspace dependency to
stellar-strkey = 0.0.18(and refreshCargo.lockfor new transitive graph). - Adjust hex-fallback contract ID parsing to map failures to
DecodeError::InvalidPayloadLength. - Update secret-key printing/serialization and tests to use
.as_unredacted(), and updatestrkeyintegration tests to pass input via stdin.
File summaries
| File | Description |
|---|---|
| cmd/soroban-cli/src/utils.rs | Updates contract ID hex-fallback error mapping for new stellar-strkey decode error variants. |
| cmd/soroban-cli/src/config/secret.rs | Ensures secret-key serialization and assertions use unredacted formatting. |
| cmd/soroban-cli/src/config/key.rs | Updates key round-trip test to serialize secret keys using .as_unredacted(). |
| cmd/soroban-cli/src/commands/network/root_account/secret.rs | Prints root account secret key using .as_unredacted() to avoid redaction. |
| cmd/soroban-cli/src/commands/keys/secret.rs | Prints identity secret key using .as_unredacted() to avoid redaction. |
| cmd/crates/soroban-test/tests/it/strkey.rs | Updates strkey encode/decode integration tests to provide input via stdin (no positional input). |
| cmd/crates/soroban-test/src/lib.rs | Updates test helper output to use .as_unredacted() for secret key display. |
| cmd/crates/soroban-spec-tools/src/utils.rs | Mirrors CLI contract ID parsing error mapping changes in shared spec tools. |
| Cargo.toml | Bumps workspace stellar-strkey dependency to 0.0.18. |
| Cargo.lock | Records new stellar-strkey 0.0.18 node and transitive dependency updates (incl. additional heapless version). |
Copilot's findings
- Files reviewed: 9/10 changed files
- Comments generated: 0
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d20a12a9af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
stellar-strkey 0.0.18's embedded encode/decode commands read their input from stdin instead of a positional argument, so the generated FULL_HELP_DOCS.md entries for `stellar strkey decode/encode` were stale. Regenerated the strkey section to match (stdin input, new --quiet option).
> [!NOTE] > Updating the lib across the stack: > - stellar/rs-stellar-xdr#547 > - stellar#1694 > - stellar/rs-soroban-sdk#1913 > - stellar/rs-stellar-rpc-client#99 > - stellar/stellar-cli#2614 ### What Bump the workspace `stellar-strkey` dependency to `=0.0.18`. ### Why This adopts the latest `stellar-strkey` release. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
> [!NOTE] > Updating the lib across the stack: > - stellar/rs-stellar-xdr#547 > - stellar/rs-soroban-env#1694 > - stellar#1913 > - stellar/rs-stellar-rpc-client#99 > - stellar/stellar-cli#2614 ### What Bump the workspace `stellar-strkey` dependency to `=0.0.18`. ### Why This adopts the latest `stellar-strkey` release. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
### What Wrap the embedded strkey CLI so that `stellar strkey decode` and `stellar strkey encode` accept their input as an argument again, falling back to stdin when it is omitted. ### Why Updating stellar-strkey to 0.0.18 in #2614 made the embedded CLI read that input only from stdin, which breaks existing scripts that run `stellar strkey decode <STRKEY>` or `stellar strkey encode <JSON>`. ### Known limitations The argument path copies the embedded CLI's decode and encode logic, with a test checking that both paths stay in sync, until the wrapper is deleted at the next major version (v29/30).

Note
Updating the lib across the stack:
What
Bump the workspace
stellar-strkeydependency to=0.0.18.Why
This adopts the latest
stellar-strkeyrelease.