Skip to content

fix: remove tx source from auth entry signing logic#2386

Open
mootz12 wants to merge 3 commits intomainfrom
remove-auth-entry-source-signer
Open

fix: remove tx source from auth entry signing logic#2386
mootz12 wants to merge 3 commits intomainfrom
remove-auth-entry-source-signer

Conversation

@mootz12
Copy link
Contributor

@mootz12 mootz12 commented Feb 11, 2026

What

Removes the tx source signer from the sign_soroban_authorizations function.

Why

The tx source account does not need to explicitly sign authorization entries. Signing the transaction is enough to authorize these entries.

Known limitations

None

Copilot AI review requested due to automatic review settings February 11, 2026 22:54
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Feb 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Soroban auth-entry signing so the transaction source account is no longer used as an explicit signer for sign_soroban_authorizations, based on the premise that the tx signature alone authorizes source-account auth entries.

Changes:

  • Removes the source_signer parameter/plumbing from Soroban auth-entry signing.
  • Refactors sign_soroban_authorizations to operate directly on the single InvokeHostFunction operation and rebuild the transaction only when needed.
  • Updates an integration test to exercise invoking auth with a non-source identity.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cmd/soroban-cli/src/signer/mod.rs Refactors auth signing and removes tx-source signer fallback.
cmd/soroban-cli/src/config/mod.rs Stops resolving/passing the tx source signer into auth signing.
cmd/soroban-cli/src/assembled.rs Removes now-unused requires_auth helper/method.
cmd/crates/soroban-test/tests/it/integration/hello_world.rs Adds coverage for auth invocation where the authorized address differs from --source.
Comments suppressed due to low confidence (1)

cmd/soroban-cli/src/signer/mod.rs:127

  • After removing the source_signer fallback, an auth entry whose address equals the transaction source account will now hit MissingSignerForAddress unless the caller also included the source in signers. This contradicts the PR intent (“tx source doesn’t need to explicitly sign auth entries”) and will break contracts that require_auth() on the invoker/source without passing an address argument (so no signer is resolved). Consider detecting when the auth address equals raw.source_account and, in that case, leaving the entry untouched (and not requiring a signer).
        match signer {
            Some(signer) => {
                let signed_entry = sign_soroban_authorization_entry(
                    raw_auth,
                    signer,
                    signature_expiration_ledger,
                    &network_id,
                )?;
                signed_auths.push(signed_entry);
            }
            None => {
                return Err(Error::MissingSignerForAddress {
                    address: stellar_strkey::Strkey::PublicKeyEd25519(
                        stellar_strkey::ed25519::PublicKey(*needle),
                    )
                    .to_string(),
                });
            }

@mootz12 mootz12 requested a review from a team February 12, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

1 participant