Repository navigation
Synced to ocp-protobuf-api@1600673e,
picking up #72 and #73 (docs only).
common.v1 and transaction.v1 moved.
Swaps can now be built as v1 Solana transactions. The client opts in per swap through
transaction_version. The server returns v1 parameters only to a client that asked for them, so an
upgrade that leaves transaction_version unset changes nothing on the wire, and the signed
Initiate bytes stay the same.
Added
-
common.v1.SolanaTransactionConfig:compute_unit_limit(1),loaded_accounts_data_size_limit
(2),priority_fee_lamports(3) andheap_size(4). A v1 transaction takes its compute budget
from this message instead of ComputeBudget instructions. -
transaction_version(uint32, at most 1) onStatefulSwapRequest.Initiate(field 13) and
StatelessSwapRequest.Initiate(field 5).0or unset is v0 with ALTs, and1is v1. A client
that sends1must still handle v0 server parameters. Set it before signing: theInitiate
signature covers it. -
transaction_configon the swap server parameters:StatefulSwapResponse.ServerParameters.ReserveExistingCurrencyServerParameters(field 11)StatefulSwapResponse.ServerParameters.ReserveNewCurrencyServerParameter(field 17)StatefulSwapResponse.ServerParameters.CoinbaseStableSwapperServerParameter(field 10)StatelessSwapResponse.ServerParameters.CoinbaseStableSwapperServerParameter(field 8)
When it is set, the transaction is built as v1 without ALTs,
altsis empty, and
compute_unit_limitandcompute_unit_priceare 0. -
On
ReserveNewCurrencyServerParameter:memory_accounts(field 18, at most 8):VmMemoryAccountInitializationentries with
address,name,num_accounts,account_size,resize_sizesandrent_top_up_lamports.
The v1 transaction initializes, funds and resizes each one, in order.fee_account_owner(field 19, required): owner of theto_mintfee account, which the v1
transaction opens withAssociatedTokenAccount::CreateIdempotent.
Changed
Transaction.valueallows up to 4096 bytes, up from 1232. Legacy and v0 transactions are still
limited to 1232.- Comments only:
- The swap instruction lists now cover v1.
- On a v1 new-currency buy paid with Core Mint,
swap_authoritymust be a random one-time account
other than the owner.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed.