Skip to content

Refresh protocol-20-era XDR on the Stellar Transaction page (create-contract V2, smart-account credentials) #2714

Description

@ElliotFriend

The XDR quoted on Stellar Transaction is protocol-20-era in several places. Surfaced while reviewing #2655, where the SorobanTransactionData reference link was pinned to a commit predating diskReadBytes. That one link is fixed; the rest of the page still needs a pass.

Comparing against v27.0/Stellar-transaction.x:

HostFunction (#invokehostfunctionop)

  • Missing case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2;
  • CreateContractArgsV2 (adds SCVal constructorArgs<>) isn't documented at all, so contract constructors — protocol 22 — have no coverage here.

SorobanCredentials (#authorization-data)

  • Missing SOROBAN_CREDENTIALS_ADDRESS_V2 and SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES / SorobanAddressCredentialsWithDelegates. Relevant to smart accounts and delegated signers.

SorobanAuthorizedFunction

  • Missing SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN.
  • Shows SorobanAuthorizedContractFunction contractFn; and then defines that struct. It no longer exists in the protocol — the variant is InvokeContractArgs contractFn;.
  • The prose says "SorobanAuthorizedFunction has two variants"; there are three.

HashIDPreimage

  • Missing ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS / sorobanAuthorizationWithAddress. The signature field description points readers at the plain ENVELOPE_TYPE_SOROBAN_AUTHORIZATION preimage only.

Stale reference pin

  • The [xdr] link for the HostFunction / InvokeHostFunctionOp block is still pinned to e372df9, a commit old enough that it names the op BumpFootprintExpirationOp. Deliberately left alone in Correct Soroban transaction resource, TTL, and SAC XDR references #2655: repointing it at v27.0 would only expose the CREATE_CONTRACT_V2 gap above. Bump it as part of this refresh.

Each struct edit needs matching prose, so this wants a protocol-accuracy review rather than a mechanical copy-paste from the .x file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions