Default simulation and authorizeInvocation to CAP-71 v2 address credentials - #1653
Merged
Conversation
quietbits
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CAP-71
SOROBAN_CREDENTIALS_ADDRESS_V2credentials become the default on both ends of the Soroban auth flow, now that the network runs protocol 27.rpc.Server.simulateTransaction'suseUpgradedAuthandauthorizeInvocation'sauthV2both default totrue, so simulation asks RPC to record v2 entries andauthorizeInvocationbuilds them. Passfalseto either one for the legacySOROBAN_CREDENTIALS_ADDRESSformat. Both flags stay transitional and become no-ops when v2 is mandatory in protocol 28.simulateTransactionalso now always sendsuseUpgradedAuthin the JSON-RPC request, where it previously omitted the field when the flag was unset. TheuseUpgradedAuthdefault reaches everything built on simulation, includingcontract.AssembledTransaction.simulate()and theuseUpgradedAuthmethod option.Two things break for callers. Code that reads the credential arm by hand has to handle
addressV2and not justaddress, or switch toinspectAuthEntry, which normalizes the arms. And a hand-rolled signer that hardcodes the legacyENVELOPE_TYPE_SOROBAN_AUTHORIZATIONpreimage now produces signatures the network rejects, so it should usebuildAuthorizationEntryPreimageorauthorizeEntry, both of which pick the address-bound payload off the entry itself. SDK-driven signing (contract.Client,authorizeEntry,signAuthEntries) needs no change: it signs whichever credential the entry carries.Tests cover both defaults and both opt-outs. The simulation fixture in
simulate_transaction.test.tspinsauthV2: false, since it rebuilds and asserts on the legacy arm. The changelog entry goes under a new## Unreleasedheading rather than the publishedv17.0.0-rc.1section, and the migration guide, the Protocol 27 auth guide, and the contract-auth guide are updated to describe v2 as the default instead of opt-in.