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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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".
| # Dependencies from elsewhere shared by crates: | ||
| [workspace.dependencies] | ||
| stellar-strkey = "0.0.16" | ||
| stellar-strkey = "0.0.18" |
There was a problem hiding this comment.
Regenerate strkey command docs for stdin input
This bump changes the embedded strkey encode/decode CLI to read its payload from stdin (the updated integration tests now use .write_stdin(...), matching the v0.0.18 upstream examples), but the checked-in help docs still advertise positional arguments at FULL_HELP_DOCS.md:4412 and FULL_HELP_DOCS.md:4422. Since the README links users to that generated file, anyone following the release docs will run stellar strkey decode <STRKEY> / encode <JSON>, which no longer matches the command behavior; please regenerate FULL_HELP_DOCS.md with this dependency bump.
Useful? React with 👍 / 👎.
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).
What
Bump the
stellar-strkeyworkspace dependency from 0.0.16 to 0.0.18. This change targets the stellar-strkey release line for protocol 28. The workspace-direct crates now resolve to strkey 0.0.18, while published transitive consumers pinned to^0.0.16(sep5, soroban-sdk, stellar-rpc-client) and the transitive 0.0.13 via stellar-xdr remain unchanged, so the lockfile carries three strkey nodes.Why
Adopt the latest stellar-strkey release for the protocol 28 line. Version 0.0.17 replaced the single catch-all
DecodeError::Invalidvariant with a set of specific variants, so the two hex-fallback code paths incontract_id_from_str(in soroban-spec-tools and soroban-cli) were updated to map their failures toDecodeError::InvalidPayloadLength, preserving the prior single-error behavior. It also redacts private keys behindUnredacted, so the CLI's secret-printing paths and tests now use.as_unredacted(), and removes positional input for the embeddedstrkey encode/decodecommands in favour of stdin.0.0.18 specifically fixes the bug that blocked the 0.0.17 bump: the embedded
strkey encodecommand rejected owned JSON keys when deserializingDecoded<Strkey>, failing thestrkeyintegration test. stellar/rs-stellar-strkey#125 fixes it.Known limitations
N/A
Protocol 28 coordination
This is one of a coordinated set of PRs bumping
stellar-strkeyto 0.0.18 across the Protocol 28 component stack. It is preferred that all Protocol 28 releases of these components depend on the same version ofstellar-strkey:stellar-strkey0.0.18 raises the minimum supported Rust version to 1.87 and updates/adds transitive dependencies (heapless0.9,zeroize), so MSRV and supply-chain policy (cargo-deny / cackle) updates may be required in some repositories before CI is green.