Skip to content

feat(signer): allow explicit signature_expiration_ledger for Soroban authorizations - #2872

Closed
jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-2780-explicit-signature-expiration-ledger
Closed

jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-2780-explicit-signature-expiration-ledger

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Resolves #2780.

Previously, \sign_soroban_authorizations\ unconditionally fetched the latest ledger sequence from RPC via \client.get_latest_ledger().await?.sequence\ and hardcoded \latest_ledger + 60. This bound the authorization signature expiration window solely to remote network state, making authorization validity unpredictable for offline signing, test harnesses, and client-side automation.

This PR exposes --signature-expiration-ledger\ (and \STELLAR_SIGNATURE_EXPIRATION_LEDGER):

  1. CLI Flag & Env Var: Adds \signature_expiration_ledger: Option\ to \sign_with::Args.
  2. Explicit Override: When provided, \sign_soroban_authorizations\ directly uses the specified expiration ledger without an unnecessary \get_latest_ledger\ network round-trip.
  3. Fallback: When omitted, preserves existing behavior (\latest_ledger + 60).
  4. Docs & Tests: Documents option in \SKILL.md\ and adds unit tests covering default, CLI argument, and environment variable resolution.

Verification

  • \cargo test --package soroban-cli --lib config::sign_with::tests: Passes.
  • Tested explicit flag override and fallback behavior.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 23, 2026
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Reconsider deriving signature_expiration_ledger from getLatestLedger

2 participants