From 0292a74fffd433ab411f616403bca7e2619580a1 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Tue, 17 Oct 2023 20:20:19 +0200 Subject: [PATCH] all: Bump XDR for soroban-pubnet release (#5079) Update XDR to [`bdb81c3710ecb12f0fcc23268b211eb237500019`](https://github.com/stellar/stellar-xdr/tree/bdb81c3710ecb12f0fcc23268b211eb237500019) --- .github/workflows/horizon.yml | 10 +- Makefile | 2 +- gxdr/xdr_generated.go | 685 +++++----- ingest/change_test.go | 36 +- ingest/ledger_change_reader_test.go | 8 +- ingest/stats_change_processor.go | 20 +- ingest/stats_change_processor_test.go | 6 +- protocols/horizon/operations/main.go | 14 +- services/horizon/internal/codes/main.go | 18 +- services/horizon/internal/codes/main_test.go | 5 +- services/horizon/internal/ingest/main_test.go | 2 +- .../ingest/processors/contract_data.go | 2 +- .../ingest/processors/effects_processor.go | 2 +- .../ingest/processors/operations_processor.go | 9 +- .../processors/operations_processor_test.go | 2 +- .../stats_ledger_transaction_processor.go | 6 +- services/horizon/internal/ingest/verify.go | 8 +- .../horizon/internal/ingest/verify_test.go | 6 +- .../internal/integration/contracts/Cargo.lock | 176 +-- .../internal/integration/contracts/Cargo.toml | 2 +- .../horizon/internal/integration/db_test.go | 12 +- ...n_test.go => extend_footprint_ttl_test.go} | 19 +- .../integration/invokehostfunction_test.go | 18 +- .../horizon/internal/integration/sac_test.go | 2 +- .../integration/testdata/soroban_add_u64.wasm | Bin 631 -> 631 bytes .../testdata/soroban_increment_contract.wasm | Bin 701 -> 701 bytes .../testdata/soroban_sac_test.wasm | Bin 1924 -> 1924 bytes .../internal/integration/txsub_test.go | 4 +- .../internal/resourceadapter/operations.go | 4 +- .../internal/test/integration/integration.go | 4 +- txnbuild/bump_footprint_expiration.go | 59 - txnbuild/extend_footprint_ttl.go | 59 + txnbuild/invoke_host_function_test.go | 2 +- txnbuild/operation.go | 4 +- xdr/Stellar-contract-config-setting.x | 80 +- xdr/Stellar-contract.x | 4 +- xdr/Stellar-internal.x | 7 + xdr/Stellar-ledger-entries.x | 18 +- xdr/Stellar-ledger.x | 28 +- xdr/Stellar-transaction.x | 58 +- xdr/ledger_close_meta.go | 43 +- xdr/ledger_entry.go | 4 +- xdr/ledger_key.go | 18 +- xdr/scval.go | 2 +- xdr/xdr_commit_generated.txt | 2 +- xdr/xdr_generated.go | 1142 ++++++++--------- 46 files changed, 1195 insertions(+), 1417 deletions(-) rename services/horizon/internal/integration/{bump_footprint_expiration_test.go => extend_footprint_ttl_test.go} (82%) delete mode 100644 txnbuild/bump_footprint_expiration.go create mode 100644 txnbuild/extend_footprint_ttl.go diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index 3fd687e31b..6139ad6806 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -33,11 +33,11 @@ jobs: env: HORIZON_INTEGRATION_TESTS_ENABLED: true HORIZON_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }} - PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 19.13.1-1481.3acf6dd26.focal - PROTOCOL_20_CORE_DOCKER_IMG: stellar/stellar-core:19.13.1-1481.3acf6dd26.focal - PROTOCOL_20_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:20.0.0-rc3-39 - PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.14.0-1500.5664eff4e.focal - PROTOCOL_19_CORE_DOCKER_IMG: stellar/stellar-core:19.14.0-1500.5664eff4e.focal + PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 19.14.1-1529.fcbbad4ce.focal + PROTOCOL_20_CORE_DOCKER_IMG: 2opremio/stellar-core:19.14.1-1529.fcbbad4ce.focal + PROTOCOL_20_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:20.0.0-rc4pubnet-42 + PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.12.0-1378.2109a168a.focal + PROTOCOL_19_CORE_DOCKER_IMG: stellar/stellar-core:19.12.0-1378.2109a168a.focal PGHOST: localhost PGPORT: 5432 PGUSER: postgres diff --git a/Makefile b/Makefile index 063a1a6eb0..4266730900 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ xdr/Stellar-internal.x \ xdr/Stellar-contract-config-setting.x XDRGEN_COMMIT=a231a92475ac6154c0c2f46dc503809823985060 -XDR_COMMIT=9ac02641139e6717924fdad716f6e958d0168491 +XDR_COMMIT=6a620d160aab22609c982d54578ff6a63bfcdc01 .PHONY: xdr xdr-clean xdr-update diff --git a/gxdr/xdr_generated.go b/gxdr/xdr_generated.go index d1b8635d15..2c20497952 100644 --- a/gxdr/xdr_generated.go +++ b/gxdr/xdr_generated.go @@ -205,7 +205,7 @@ const ( CONTRACT_DATA LedgerEntryType = 6 CONTRACT_CODE LedgerEntryType = 7 CONFIG_SETTING LedgerEntryType = 8 - EXPIRATION LedgerEntryType = 9 + TTL LedgerEntryType = 9 ) type Signer struct { @@ -645,10 +645,10 @@ type ContractCodeEntry struct { Code []byte } -type ExpirationEntry struct { - // Hash of the LedgerKey that is associated with this ExpirationEntry - KeyHash Hash - ExpirationLedgerSeq Uint32 +type TTLEntry struct { + // Hash of the LedgerKey that is associated with this TTLEntry + KeyHash Hash + LiveUntilLedgerSeq Uint32 } type LedgerEntryExtensionV1 struct { @@ -689,8 +689,8 @@ type XdrAnon_LedgerEntry_Data struct { // ContractCode() *ContractCodeEntry // CONFIG_SETTING: // ConfigSetting() *ConfigSettingEntry - // EXPIRATION: - // Expiration() *ExpirationEntry + // TTL: + // Ttl() *TTLEntry Type LedgerEntryType _u interface{} } @@ -726,8 +726,8 @@ type LedgerKey struct { // ContractCode() *XdrAnon_LedgerKey_ContractCode // CONFIG_SETTING: // ConfigSetting() *XdrAnon_LedgerKey_ConfigSetting - // EXPIRATION: - // Expiration() *XdrAnon_LedgerKey_Expiration + // TTL: + // Ttl() *XdrAnon_LedgerKey_Ttl Type LedgerEntryType _u interface{} } @@ -763,8 +763,8 @@ type XdrAnon_LedgerKey_ContractCode struct { type XdrAnon_LedgerKey_ConfigSetting struct { ConfigSettingID ConfigSettingID } -type XdrAnon_LedgerKey_Expiration struct { - // Hash of the LedgerKey that is associated with this ExpirationEntry +type XdrAnon_LedgerKey_Ttl struct { + // Hash of the LedgerKey that is associated with this TTLEntry KeyHash Hash } @@ -1274,21 +1274,8 @@ type LedgerCloseMetaV0 struct { } type LedgerCloseMetaV1 struct { - LedgerHeader LedgerHeaderHistoryEntry - TxSet GeneralizedTransactionSet - // NB: transactions are sorted in apply order here - // fees for all transactions are processed first - // followed by applying transactions - TxProcessing []TransactionResultMeta - // upgrades are applied last - UpgradesProcessing []UpgradeEntryMeta - // other misc information attached to the ledger close - ScpInfo []SCPHistoryEntry -} - -type LedgerCloseMetaV2 struct { - // We forgot to add an ExtensionPoint in v1 but at least - // we can add one now in v2. + // We forgot to add an ExtensionPoint in v0 but at least + // we can add one now in v1. Ext ExtensionPoint LedgerHeader LedgerHeaderHistoryEntry TxSet GeneralizedTransactionSet @@ -1303,9 +1290,9 @@ type LedgerCloseMetaV2 struct { // Size in bytes of BucketList, to support downstream // systems calculating storage fees correctly. TotalByteSizeOfBucketList Uint64 - // Expired temp keys that are being evicted at this ledger. + // Temp keys that are being evicted at this ledger. EvictedTemporaryLedgerKeys []LedgerKey - // Expired restorable ledger entries that are being + // Archived restorable ledger entries that are being // evicted at this ledger. EvictedPersistentLedgerEntries []LedgerEntry } @@ -1316,8 +1303,6 @@ type LedgerCloseMeta struct { // V0() *LedgerCloseMetaV0 // 1: // V1() *LedgerCloseMetaV1 - // 2: - // V2() *LedgerCloseMetaV2 V int32 _u interface{} } @@ -1663,7 +1648,7 @@ const ( LIQUIDITY_POOL_DEPOSIT OperationType = 22 LIQUIDITY_POOL_WITHDRAW OperationType = 23 INVOKE_HOST_FUNCTION OperationType = 24 - BUMP_FOOTPRINT_EXPIRATION OperationType = 25 + EXTEND_FOOTPRINT_TTL OperationType = 25 RESTORE_FOOTPRINT OperationType = 26 ) @@ -2187,20 +2172,20 @@ type InvokeHostFunctionOp struct { } /* -Bump the expiration ledger of the entries specified in the readOnly footprint +Extend the TTL of the entries specified in the readOnly footprint - so they'll expire at least ledgersToExpire ledgers from lcl. + so they will live at least extendTo ledgers from lcl. Threshold: med - Result: BumpFootprintExpirationResult + Result: ExtendFootprintTTLResult */ -type BumpFootprintExpirationOp struct { - Ext ExtensionPoint - LedgersToExpire Uint32 +type ExtendFootprintTTLOp struct { + Ext ExtensionPoint + ExtendTo Uint32 } /* -Restore the expired or evicted entries specified in the readWrite footprint. +Restore the archived entries specified in the readWrite footprint. Threshold: med Result: RestoreFootprintOp @@ -2269,8 +2254,8 @@ type XdrAnon_Operation_Body struct { // LiquidityPoolWithdrawOp() *LiquidityPoolWithdrawOp // INVOKE_HOST_FUNCTION: // InvokeHostFunctionOp() *InvokeHostFunctionOp - // BUMP_FOOTPRINT_EXPIRATION: - // BumpFootprintExpirationOp() *BumpFootprintExpirationOp + // EXTEND_FOOTPRINT_TTL: + // ExtendFootprintTTLOp() *ExtendFootprintTTLOp // RESTORE_FOOTPRINT: // RestoreFootprintOp() *RestoreFootprintOp Type OperationType @@ -2421,8 +2406,16 @@ type SorobanResources struct { type SorobanTransactionData struct { Ext ExtensionPoint Resources SorobanResources - // Portion of transaction `fee` allocated to refundable fees. - RefundableFee Int64 + // Amount of the transaction `fee` allocated to the Soroban resource fees. + // The fraction of `resourceFee` corresponding to `resources` specified + // above is *not* refundable (i.e. fees for instructions, ledger I/O), as + // well as fees for the transaction size. + // The remaining part of the fee is refundable and the charged value is + // based on the actual consumption of refundable resources (events, ledger + // rent bumps). + // The `inclusionFee` used for prioritization of the transaction is defined + // as `tx.fee - resourceFee`. + ResourceFee Int64 } // TransactionV0 is a transaction with the AccountID discriminant stripped off, @@ -3320,7 +3313,7 @@ const ( INVOKE_HOST_FUNCTION_MALFORMED InvokeHostFunctionResultCode = -1 INVOKE_HOST_FUNCTION_TRAPPED InvokeHostFunctionResultCode = -2 INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED InvokeHostFunctionResultCode = -3 - INVOKE_HOST_FUNCTION_ENTRY_EXPIRED InvokeHostFunctionResultCode = -4 + INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED InvokeHostFunctionResultCode = -4 INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE InvokeHostFunctionResultCode = -5 ) @@ -3328,30 +3321,30 @@ type InvokeHostFunctionResult struct { // The union discriminant Code selects among the following arms: // INVOKE_HOST_FUNCTION_SUCCESS: // Success() *Hash - // INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_EXPIRED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: + // INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: // void Code InvokeHostFunctionResultCode _u interface{} } -type BumpFootprintExpirationResultCode int32 +type ExtendFootprintTTLResultCode int32 const ( // codes considered as "success" for the operation - BUMP_FOOTPRINT_EXPIRATION_SUCCESS BumpFootprintExpirationResultCode = 0 + EXTEND_FOOTPRINT_TTL_SUCCESS ExtendFootprintTTLResultCode = 0 // codes considered as "failure" for the operation - BUMP_FOOTPRINT_EXPIRATION_MALFORMED BumpFootprintExpirationResultCode = -1 - BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED BumpFootprintExpirationResultCode = -2 - BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE BumpFootprintExpirationResultCode = -3 + EXTEND_FOOTPRINT_TTL_MALFORMED ExtendFootprintTTLResultCode = -1 + EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED ExtendFootprintTTLResultCode = -2 + EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE ExtendFootprintTTLResultCode = -3 ) -type BumpFootprintExpirationResult struct { +type ExtendFootprintTTLResult struct { // The union discriminant Code selects among the following arms: - // BUMP_FOOTPRINT_EXPIRATION_SUCCESS: + // EXTEND_FOOTPRINT_TTL_SUCCESS: // void - // BUMP_FOOTPRINT_EXPIRATION_MALFORMED, BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED, BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: + // EXTEND_FOOTPRINT_TTL_MALFORMED, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: // void - Code BumpFootprintExpirationResultCode + Code ExtendFootprintTTLResultCode _u interface{} } @@ -3457,8 +3450,8 @@ type XdrAnon_OperationResult_Tr struct { // LiquidityPoolWithdrawResult() *LiquidityPoolWithdrawResult // INVOKE_HOST_FUNCTION: // InvokeHostFunctionResult() *InvokeHostFunctionResult - // BUMP_FOOTPRINT_EXPIRATION: - // BumpFootprintExpirationResult() *BumpFootprintExpirationResult + // EXTEND_FOOTPRINT_TTL: + // ExtendFootprintTTLResult() *ExtendFootprintTTLResult // RESTORE_FOOTPRINT: // RestoreFootprintResult() *RestoreFootprintResult Type OperationType @@ -4050,15 +4043,15 @@ type Int256Parts struct { type ContractExecutableType int32 const ( - CONTRACT_EXECUTABLE_WASM ContractExecutableType = 0 - CONTRACT_EXECUTABLE_TOKEN ContractExecutableType = 1 + CONTRACT_EXECUTABLE_WASM ContractExecutableType = 0 + CONTRACT_EXECUTABLE_STELLAR_ASSET ContractExecutableType = 1 ) type ContractExecutable struct { // The union discriminant Type selects among the following arms: // CONTRACT_EXECUTABLE_WASM: // Wasm_hash() *Hash - // CONTRACT_EXECUTABLE_TOKEN: + // CONTRACT_EXECUTABLE_STELLAR_ASSET: // void Type ContractExecutableType _u interface{} @@ -4167,6 +4160,12 @@ type StoredTransactionSet struct { _u interface{} } +type StoredDebugTransactionSet struct { + TxSet StoredTransactionSet + LedgerSeq Uint32 + ScpValue StellarValue +} + type PersistedSCPStateV0 struct { ScpEnvelopes []SCPEnvelope QuorumSets []SCPQuorumSet @@ -4274,64 +4273,54 @@ type ContractCostType int32 const ( // Cost of running 1 wasm instruction WasmInsnExec ContractCostType = 0 - // Cost of growing wasm linear memory by 1 page - WasmMemAlloc ContractCostType = 1 - // Cost of allocating a chuck of host memory (in bytes) - HostMemAlloc ContractCostType = 2 - // Cost of copying a chuck of bytes into a pre-allocated host memory - HostMemCpy ContractCostType = 3 - // Cost of comparing two slices of host memory - HostMemCmp ContractCostType = 4 + // Cost of allocating a slice of memory (in bytes) + MemAlloc ContractCostType = 1 + // Cost of copying a slice of bytes into a pre-allocated memory + MemCpy ContractCostType = 2 + // Cost of comparing two slices of memory + MemCmp ContractCostType = 3 // Cost of a host function dispatch, not including the actual work done by // the function nor the cost of VM invocation machinary - DispatchHostFunction ContractCostType = 5 + DispatchHostFunction ContractCostType = 4 // Cost of visiting a host object from the host object storage. Exists to // make sure some baseline cost coverage, i.e. repeatly visiting objects // by the guest will always incur some charges. - VisitObject ContractCostType = 6 + VisitObject ContractCostType = 5 // Cost of serializing an xdr object to bytes - ValSer ContractCostType = 7 + ValSer ContractCostType = 6 // Cost of deserializing an xdr object from bytes - ValDeser ContractCostType = 8 + ValDeser ContractCostType = 7 // Cost of computing the sha256 hash from bytes - ComputeSha256Hash ContractCostType = 9 + ComputeSha256Hash ContractCostType = 8 // Cost of computing the ed25519 pubkey from bytes - ComputeEd25519PubKey ContractCostType = 10 - // Cost of accessing an entry in a Map. - MapEntry ContractCostType = 11 - // Cost of accessing an entry in a Vec - VecEntry ContractCostType = 12 + ComputeEd25519PubKey ContractCostType = 9 // Cost of verifying ed25519 signature of a payload. - VerifyEd25519Sig ContractCostType = 13 - // Cost of reading a slice of vm linear memory - VmMemRead ContractCostType = 14 - // Cost of writing to a slice of vm linear memory - VmMemWrite ContractCostType = 15 + VerifyEd25519Sig ContractCostType = 10 // Cost of instantiation a VM from wasm bytes code. - VmInstantiation ContractCostType = 16 + VmInstantiation ContractCostType = 11 // Cost of instantiation a VM from a cached state. - VmCachedInstantiation ContractCostType = 17 + VmCachedInstantiation ContractCostType = 12 // Cost of invoking a function on the VM. If the function is a host function, // additional cost will be covered by `DispatchHostFunction`. - InvokeVmFunction ContractCostType = 18 + InvokeVmFunction ContractCostType = 13 // Cost of computing a keccak256 hash from bytes. - ComputeKeccak256Hash ContractCostType = 19 - // Cost of computing an ECDSA secp256k1 pubkey from bytes. - ComputeEcdsaSecp256k1Key ContractCostType = 20 + ComputeKeccak256Hash ContractCostType = 14 // Cost of computing an ECDSA secp256k1 signature from bytes. - ComputeEcdsaSecp256k1Sig ContractCostType = 21 + ComputeEcdsaSecp256k1Sig ContractCostType = 15 // Cost of recovering an ECDSA secp256k1 key from a signature. - RecoverEcdsaSecp256k1Key ContractCostType = 22 + RecoverEcdsaSecp256k1Key ContractCostType = 16 // Cost of int256 addition (`+`) and subtraction (`-`) operations - Int256AddSub ContractCostType = 23 + Int256AddSub ContractCostType = 17 // Cost of int256 multiplication (`*`) operation - Int256Mul ContractCostType = 24 + Int256Mul ContractCostType = 18 // Cost of int256 division (`/`) operation - Int256Div ContractCostType = 25 + Int256Div ContractCostType = 19 // Cost of int256 power (`exp`) operation - Int256Pow ContractCostType = 26 + Int256Pow ContractCostType = 20 // Cost of int256 shift (`shl`, `shr`) operation - Int256Shift ContractCostType = 27 + Int256Shift ContractCostType = 21 + // Cost of drawing random bytes using a ChaCha20 PRNG + ChaCha20DrawBytes ContractCostType = 22 ) type ContractCostParamEntry struct { @@ -4341,15 +4330,15 @@ type ContractCostParamEntry struct { LinearTerm Int64 } -type StateExpirationSettings struct { - MaxEntryExpiration Uint32 - MinTempEntryExpiration Uint32 - MinPersistentEntryExpiration Uint32 +type StateArchivalSettings struct { + MaxEntryTTL Uint32 + MinTemporaryTTL Uint32 + MinPersistentTTL Uint32 // rent_fee = wfee_rate_average / rent_rate_denominator_for_type PersistentRentRateDenominator Int64 TempRentRateDenominator Int64 - // max number of entries that emit expiration meta in a single ledger - MaxEntriesToExpire Uint32 + // max number of entries that emit archival meta in a single ledger + MaxEntriesToArchive Uint32 // Number of snapshots to use when calculating average BucketList size BucketListSizeWindowSampleSize Uint32 // Maximum number of bytes that we scan for eviction per ledger @@ -4383,7 +4372,7 @@ const ( CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES ConfigSettingID = 7 CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES ConfigSettingID = 8 CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES ConfigSettingID = 9 - CONFIG_SETTING_STATE_EXPIRATION ConfigSettingID = 10 + CONFIG_SETTING_STATE_ARCHIVAL ConfigSettingID = 10 CONFIG_SETTING_CONTRACT_EXECUTION_LANES ConfigSettingID = 11 CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW ConfigSettingID = 12 CONFIG_SETTING_EVICTION_ITERATOR ConfigSettingID = 13 @@ -4411,8 +4400,8 @@ type ConfigSettingEntry struct { // ContractDataKeySizeBytes() *Uint32 // CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: // ContractDataEntrySizeBytes() *Uint32 - // CONFIG_SETTING_STATE_EXPIRATION: - // StateExpirationSettings() *StateExpirationSettings + // CONFIG_SETTING_STATE_ARCHIVAL: + // StateArchivalSettings() *StateArchivalSettings // CONFIG_SETTING_CONTRACT_EXECUTION_LANES: // ContractExecutionLanes() *ConfigSettingContractExecutionLanesV0 // CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: @@ -5497,7 +5486,7 @@ var _XdrNames_LedgerEntryType = map[int32]string{ int32(CONTRACT_DATA): "CONTRACT_DATA", int32(CONTRACT_CODE): "CONTRACT_CODE", int32(CONFIG_SETTING): "CONFIG_SETTING", - int32(EXPIRATION): "EXPIRATION", + int32(TTL): "TTL", } var _XdrValues_LedgerEntryType = map[string]int32{ "ACCOUNT": int32(ACCOUNT), @@ -5509,7 +5498,7 @@ var _XdrValues_LedgerEntryType = map[string]int32{ "CONTRACT_DATA": int32(CONTRACT_DATA), "CONTRACT_CODE": int32(CONTRACT_CODE), "CONFIG_SETTING": int32(CONFIG_SETTING), - "EXPIRATION": int32(EXPIRATION), + "TTL": int32(TTL), } func (LedgerEntryType) XdrEnumNames() map[int32]string { @@ -7950,20 +7939,20 @@ func (v *ContractCodeEntry) XdrRecurse(x XDR, name string) { } func XDR_ContractCodeEntry(v *ContractCodeEntry) *ContractCodeEntry { return v } -type XdrType_ExpirationEntry = *ExpirationEntry +type XdrType_TTLEntry = *TTLEntry -func (v *ExpirationEntry) XdrPointer() interface{} { return v } -func (ExpirationEntry) XdrTypeName() string { return "ExpirationEntry" } -func (v ExpirationEntry) XdrValue() interface{} { return v } -func (v *ExpirationEntry) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *ExpirationEntry) XdrRecurse(x XDR, name string) { +func (v *TTLEntry) XdrPointer() interface{} { return v } +func (TTLEntry) XdrTypeName() string { return "TTLEntry" } +func (v TTLEntry) XdrValue() interface{} { return v } +func (v *TTLEntry) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *TTLEntry) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } x.Marshal(x.Sprintf("%skeyHash", name), XDR_Hash(&v.KeyHash)) - x.Marshal(x.Sprintf("%sexpirationLedgerSeq", name), XDR_Uint32(&v.ExpirationLedgerSeq)) + x.Marshal(x.Sprintf("%sliveUntilLedgerSeq", name), XDR_Uint32(&v.LiveUntilLedgerSeq)) } -func XDR_ExpirationEntry(v *ExpirationEntry) *ExpirationEntry { return v } +func XDR_TTLEntry(v *TTLEntry) *TTLEntry { return v } var _XdrTags_XdrAnon_LedgerEntryExtensionV1_Ext = map[int32]bool{ XdrToI32(0): true, @@ -8048,7 +8037,7 @@ var _XdrTags_XdrAnon_LedgerEntry_Data = map[int32]bool{ XdrToI32(CONTRACT_DATA): true, XdrToI32(CONTRACT_CODE): true, XdrToI32(CONFIG_SETTING): true, - XdrToI32(EXPIRATION): true, + XdrToI32(TTL): true, } func (_ XdrAnon_LedgerEntry_Data) XdrValidTags() map[int32]bool { @@ -8189,24 +8178,24 @@ func (u *XdrAnon_LedgerEntry_Data) ConfigSetting() *ConfigSettingEntry { return nil } } -func (u *XdrAnon_LedgerEntry_Data) Expiration() *ExpirationEntry { +func (u *XdrAnon_LedgerEntry_Data) Ttl() *TTLEntry { switch u.Type { - case EXPIRATION: - if v, ok := u._u.(*ExpirationEntry); ok { + case TTL: + if v, ok := u._u.(*TTLEntry); ok { return v } else { - var zero ExpirationEntry + var zero TTLEntry u._u = &zero return &zero } default: - XdrPanic("XdrAnon_LedgerEntry_Data.Expiration accessed when Type == %v", u.Type) + XdrPanic("XdrAnon_LedgerEntry_Data.Ttl accessed when Type == %v", u.Type) return nil } } func (u XdrAnon_LedgerEntry_Data) XdrValid() bool { switch u.Type { - case ACCOUNT, TRUSTLINE, OFFER, DATA, CLAIMABLE_BALANCE, LIQUIDITY_POOL, CONTRACT_DATA, CONTRACT_CODE, CONFIG_SETTING, EXPIRATION: + case ACCOUNT, TRUSTLINE, OFFER, DATA, CLAIMABLE_BALANCE, LIQUIDITY_POOL, CONTRACT_DATA, CONTRACT_CODE, CONFIG_SETTING, TTL: return true } return false @@ -8237,8 +8226,8 @@ func (u *XdrAnon_LedgerEntry_Data) XdrUnionBody() XdrType { return XDR_ContractCodeEntry(u.ContractCode()) case CONFIG_SETTING: return XDR_ConfigSettingEntry(u.ConfigSetting()) - case EXPIRATION: - return XDR_ExpirationEntry(u.Expiration()) + case TTL: + return XDR_TTLEntry(u.Ttl()) } return nil } @@ -8262,8 +8251,8 @@ func (u *XdrAnon_LedgerEntry_Data) XdrUnionBodyName() string { return "ContractCode" case CONFIG_SETTING: return "ConfigSetting" - case EXPIRATION: - return "Expiration" + case TTL: + return "Ttl" } return "" } @@ -8307,8 +8296,8 @@ func (u *XdrAnon_LedgerEntry_Data) XdrRecurse(x XDR, name string) { case CONFIG_SETTING: x.Marshal(x.Sprintf("%sconfigSetting", name), XDR_ConfigSettingEntry(u.ConfigSetting())) return - case EXPIRATION: - x.Marshal(x.Sprintf("%sexpiration", name), XDR_ExpirationEntry(u.Expiration())) + case TTL: + x.Marshal(x.Sprintf("%sttl", name), XDR_TTLEntry(u.Ttl())) return } XdrPanic("invalid Type (%v) in XdrAnon_LedgerEntry_Data", u.Type) @@ -8553,21 +8542,19 @@ func XDR_XdrAnon_LedgerKey_ConfigSetting(v *XdrAnon_LedgerKey_ConfigSetting) *Xd return v } -type XdrType_XdrAnon_LedgerKey_Expiration = *XdrAnon_LedgerKey_Expiration +type XdrType_XdrAnon_LedgerKey_Ttl = *XdrAnon_LedgerKey_Ttl -func (v *XdrAnon_LedgerKey_Expiration) XdrPointer() interface{} { return v } -func (XdrAnon_LedgerKey_Expiration) XdrTypeName() string { return "XdrAnon_LedgerKey_Expiration" } -func (v XdrAnon_LedgerKey_Expiration) XdrValue() interface{} { return v } -func (v *XdrAnon_LedgerKey_Expiration) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *XdrAnon_LedgerKey_Expiration) XdrRecurse(x XDR, name string) { +func (v *XdrAnon_LedgerKey_Ttl) XdrPointer() interface{} { return v } +func (XdrAnon_LedgerKey_Ttl) XdrTypeName() string { return "XdrAnon_LedgerKey_Ttl" } +func (v XdrAnon_LedgerKey_Ttl) XdrValue() interface{} { return v } +func (v *XdrAnon_LedgerKey_Ttl) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *XdrAnon_LedgerKey_Ttl) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } x.Marshal(x.Sprintf("%skeyHash", name), XDR_Hash(&v.KeyHash)) } -func XDR_XdrAnon_LedgerKey_Expiration(v *XdrAnon_LedgerKey_Expiration) *XdrAnon_LedgerKey_Expiration { - return v -} +func XDR_XdrAnon_LedgerKey_Ttl(v *XdrAnon_LedgerKey_Ttl) *XdrAnon_LedgerKey_Ttl { return v } var _XdrTags_LedgerKey = map[int32]bool{ XdrToI32(ACCOUNT): true, @@ -8579,7 +8566,7 @@ var _XdrTags_LedgerKey = map[int32]bool{ XdrToI32(CONTRACT_DATA): true, XdrToI32(CONTRACT_CODE): true, XdrToI32(CONFIG_SETTING): true, - XdrToI32(EXPIRATION): true, + XdrToI32(TTL): true, } func (_ LedgerKey) XdrValidTags() map[int32]bool { @@ -8720,24 +8707,24 @@ func (u *LedgerKey) ConfigSetting() *XdrAnon_LedgerKey_ConfigSetting { return nil } } -func (u *LedgerKey) Expiration() *XdrAnon_LedgerKey_Expiration { +func (u *LedgerKey) Ttl() *XdrAnon_LedgerKey_Ttl { switch u.Type { - case EXPIRATION: - if v, ok := u._u.(*XdrAnon_LedgerKey_Expiration); ok { + case TTL: + if v, ok := u._u.(*XdrAnon_LedgerKey_Ttl); ok { return v } else { - var zero XdrAnon_LedgerKey_Expiration + var zero XdrAnon_LedgerKey_Ttl u._u = &zero return &zero } default: - XdrPanic("LedgerKey.Expiration accessed when Type == %v", u.Type) + XdrPanic("LedgerKey.Ttl accessed when Type == %v", u.Type) return nil } } func (u LedgerKey) XdrValid() bool { switch u.Type { - case ACCOUNT, TRUSTLINE, OFFER, DATA, CLAIMABLE_BALANCE, LIQUIDITY_POOL, CONTRACT_DATA, CONTRACT_CODE, CONFIG_SETTING, EXPIRATION: + case ACCOUNT, TRUSTLINE, OFFER, DATA, CLAIMABLE_BALANCE, LIQUIDITY_POOL, CONTRACT_DATA, CONTRACT_CODE, CONFIG_SETTING, TTL: return true } return false @@ -8768,8 +8755,8 @@ func (u *LedgerKey) XdrUnionBody() XdrType { return XDR_XdrAnon_LedgerKey_ContractCode(u.ContractCode()) case CONFIG_SETTING: return XDR_XdrAnon_LedgerKey_ConfigSetting(u.ConfigSetting()) - case EXPIRATION: - return XDR_XdrAnon_LedgerKey_Expiration(u.Expiration()) + case TTL: + return XDR_XdrAnon_LedgerKey_Ttl(u.Ttl()) } return nil } @@ -8793,8 +8780,8 @@ func (u *LedgerKey) XdrUnionBodyName() string { return "ContractCode" case CONFIG_SETTING: return "ConfigSetting" - case EXPIRATION: - return "Expiration" + case TTL: + return "Ttl" } return "" } @@ -8838,8 +8825,8 @@ func (u *LedgerKey) XdrRecurse(x XDR, name string) { case CONFIG_SETTING: x.Marshal(x.Sprintf("%sconfigSetting", name), XDR_XdrAnon_LedgerKey_ConfigSetting(u.ConfigSetting())) return - case EXPIRATION: - x.Marshal(x.Sprintf("%sexpiration", name), XDR_XdrAnon_LedgerKey_Expiration(u.Expiration())) + case TTL: + x.Marshal(x.Sprintf("%sttl", name), XDR_XdrAnon_LedgerKey_Ttl(u.Ttl())) return } XdrPanic("invalid Type (%v) in LedgerKey", u.Type) @@ -12355,24 +12342,6 @@ func (v *LedgerCloseMetaV0) XdrRecurse(x XDR, name string) { } func XDR_LedgerCloseMetaV0(v *LedgerCloseMetaV0) *LedgerCloseMetaV0 { return v } -type XdrType_LedgerCloseMetaV1 = *LedgerCloseMetaV1 - -func (v *LedgerCloseMetaV1) XdrPointer() interface{} { return v } -func (LedgerCloseMetaV1) XdrTypeName() string { return "LedgerCloseMetaV1" } -func (v LedgerCloseMetaV1) XdrValue() interface{} { return v } -func (v *LedgerCloseMetaV1) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *LedgerCloseMetaV1) XdrRecurse(x XDR, name string) { - if name != "" { - name = x.Sprintf("%s.", name) - } - x.Marshal(x.Sprintf("%sledgerHeader", name), XDR_LedgerHeaderHistoryEntry(&v.LedgerHeader)) - x.Marshal(x.Sprintf("%stxSet", name), XDR_GeneralizedTransactionSet(&v.TxSet)) - x.Marshal(x.Sprintf("%stxProcessing", name), (*_XdrVec_unbounded_TransactionResultMeta)(&v.TxProcessing)) - x.Marshal(x.Sprintf("%supgradesProcessing", name), (*_XdrVec_unbounded_UpgradeEntryMeta)(&v.UpgradesProcessing)) - x.Marshal(x.Sprintf("%sscpInfo", name), (*_XdrVec_unbounded_SCPHistoryEntry)(&v.ScpInfo)) -} -func XDR_LedgerCloseMetaV1(v *LedgerCloseMetaV1) *LedgerCloseMetaV1 { return v } - type _XdrVec_unbounded_LedgerKey []LedgerKey func (_XdrVec_unbounded_LedgerKey) XdrBound() uint32 { @@ -12487,13 +12456,13 @@ func (v *_XdrVec_unbounded_LedgerEntry) XdrPointer() interface{} { return func (v _XdrVec_unbounded_LedgerEntry) XdrValue() interface{} { return ([]LedgerEntry)(v) } func (v *_XdrVec_unbounded_LedgerEntry) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -type XdrType_LedgerCloseMetaV2 = *LedgerCloseMetaV2 +type XdrType_LedgerCloseMetaV1 = *LedgerCloseMetaV1 -func (v *LedgerCloseMetaV2) XdrPointer() interface{} { return v } -func (LedgerCloseMetaV2) XdrTypeName() string { return "LedgerCloseMetaV2" } -func (v LedgerCloseMetaV2) XdrValue() interface{} { return v } -func (v *LedgerCloseMetaV2) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *LedgerCloseMetaV2) XdrRecurse(x XDR, name string) { +func (v *LedgerCloseMetaV1) XdrPointer() interface{} { return v } +func (LedgerCloseMetaV1) XdrTypeName() string { return "LedgerCloseMetaV1" } +func (v LedgerCloseMetaV1) XdrValue() interface{} { return v } +func (v *LedgerCloseMetaV1) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *LedgerCloseMetaV1) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } @@ -12507,12 +12476,11 @@ func (v *LedgerCloseMetaV2) XdrRecurse(x XDR, name string) { x.Marshal(x.Sprintf("%sevictedTemporaryLedgerKeys", name), (*_XdrVec_unbounded_LedgerKey)(&v.EvictedTemporaryLedgerKeys)) x.Marshal(x.Sprintf("%sevictedPersistentLedgerEntries", name), (*_XdrVec_unbounded_LedgerEntry)(&v.EvictedPersistentLedgerEntries)) } -func XDR_LedgerCloseMetaV2(v *LedgerCloseMetaV2) *LedgerCloseMetaV2 { return v } +func XDR_LedgerCloseMetaV1(v *LedgerCloseMetaV1) *LedgerCloseMetaV1 { return v } var _XdrTags_LedgerCloseMeta = map[int32]bool{ XdrToI32(0): true, XdrToI32(1): true, - XdrToI32(2): true, } func (_ LedgerCloseMeta) XdrValidTags() map[int32]bool { @@ -12548,24 +12516,9 @@ func (u *LedgerCloseMeta) V1() *LedgerCloseMetaV1 { return nil } } -func (u *LedgerCloseMeta) V2() *LedgerCloseMetaV2 { - switch u.V { - case 2: - if v, ok := u._u.(*LedgerCloseMetaV2); ok { - return v - } else { - var zero LedgerCloseMetaV2 - u._u = &zero - return &zero - } - default: - XdrPanic("LedgerCloseMeta.V2 accessed when V == %v", u.V) - return nil - } -} func (u LedgerCloseMeta) XdrValid() bool { switch u.V { - case 0, 1, 2: + case 0, 1: return true } return false @@ -12582,8 +12535,6 @@ func (u *LedgerCloseMeta) XdrUnionBody() XdrType { return XDR_LedgerCloseMetaV0(u.V0()) case 1: return XDR_LedgerCloseMetaV1(u.V1()) - case 2: - return XDR_LedgerCloseMetaV2(u.V2()) } return nil } @@ -12593,8 +12544,6 @@ func (u *LedgerCloseMeta) XdrUnionBodyName() string { return "V0" case 1: return "V1" - case 2: - return "V2" } return "" } @@ -12617,9 +12566,6 @@ func (u *LedgerCloseMeta) XdrRecurse(x XDR, name string) { case 1: x.Marshal(x.Sprintf("%sv1", name), XDR_LedgerCloseMetaV1(u.V1())) return - case 2: - x.Marshal(x.Sprintf("%sv2", name), XDR_LedgerCloseMetaV2(u.V2())) - return } XdrPanic("invalid V (%v) in LedgerCloseMeta", u.V) } @@ -14418,7 +14364,7 @@ var _XdrNames_OperationType = map[int32]string{ int32(LIQUIDITY_POOL_DEPOSIT): "LIQUIDITY_POOL_DEPOSIT", int32(LIQUIDITY_POOL_WITHDRAW): "LIQUIDITY_POOL_WITHDRAW", int32(INVOKE_HOST_FUNCTION): "INVOKE_HOST_FUNCTION", - int32(BUMP_FOOTPRINT_EXPIRATION): "BUMP_FOOTPRINT_EXPIRATION", + int32(EXTEND_FOOTPRINT_TTL): "EXTEND_FOOTPRINT_TTL", int32(RESTORE_FOOTPRINT): "RESTORE_FOOTPRINT", } var _XdrValues_OperationType = map[string]int32{ @@ -14447,7 +14393,7 @@ var _XdrValues_OperationType = map[string]int32{ "LIQUIDITY_POOL_DEPOSIT": int32(LIQUIDITY_POOL_DEPOSIT), "LIQUIDITY_POOL_WITHDRAW": int32(LIQUIDITY_POOL_WITHDRAW), "INVOKE_HOST_FUNCTION": int32(INVOKE_HOST_FUNCTION), - "BUMP_FOOTPRINT_EXPIRATION": int32(BUMP_FOOTPRINT_EXPIRATION), + "EXTEND_FOOTPRINT_TTL": int32(EXTEND_FOOTPRINT_TTL), "RESTORE_FOOTPRINT": int32(RESTORE_FOOTPRINT), } @@ -16259,20 +16205,20 @@ func (v *InvokeHostFunctionOp) XdrRecurse(x XDR, name string) { } func XDR_InvokeHostFunctionOp(v *InvokeHostFunctionOp) *InvokeHostFunctionOp { return v } -type XdrType_BumpFootprintExpirationOp = *BumpFootprintExpirationOp +type XdrType_ExtendFootprintTTLOp = *ExtendFootprintTTLOp -func (v *BumpFootprintExpirationOp) XdrPointer() interface{} { return v } -func (BumpFootprintExpirationOp) XdrTypeName() string { return "BumpFootprintExpirationOp" } -func (v BumpFootprintExpirationOp) XdrValue() interface{} { return v } -func (v *BumpFootprintExpirationOp) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *BumpFootprintExpirationOp) XdrRecurse(x XDR, name string) { +func (v *ExtendFootprintTTLOp) XdrPointer() interface{} { return v } +func (ExtendFootprintTTLOp) XdrTypeName() string { return "ExtendFootprintTTLOp" } +func (v ExtendFootprintTTLOp) XdrValue() interface{} { return v } +func (v *ExtendFootprintTTLOp) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *ExtendFootprintTTLOp) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } x.Marshal(x.Sprintf("%sext", name), XDR_ExtensionPoint(&v.Ext)) - x.Marshal(x.Sprintf("%sledgersToExpire", name), XDR_Uint32(&v.LedgersToExpire)) + x.Marshal(x.Sprintf("%sextendTo", name), XDR_Uint32(&v.ExtendTo)) } -func XDR_BumpFootprintExpirationOp(v *BumpFootprintExpirationOp) *BumpFootprintExpirationOp { return v } +func XDR_ExtendFootprintTTLOp(v *ExtendFootprintTTLOp) *ExtendFootprintTTLOp { return v } type XdrType_RestoreFootprintOp = *RestoreFootprintOp @@ -16314,7 +16260,7 @@ var _XdrTags_XdrAnon_Operation_Body = map[int32]bool{ XdrToI32(LIQUIDITY_POOL_DEPOSIT): true, XdrToI32(LIQUIDITY_POOL_WITHDRAW): true, XdrToI32(INVOKE_HOST_FUNCTION): true, - XdrToI32(BUMP_FOOTPRINT_EXPIRATION): true, + XdrToI32(EXTEND_FOOTPRINT_TTL): true, XdrToI32(RESTORE_FOOTPRINT): true, } @@ -16666,18 +16612,18 @@ func (u *XdrAnon_Operation_Body) InvokeHostFunctionOp() *InvokeHostFunctionOp { return nil } } -func (u *XdrAnon_Operation_Body) BumpFootprintExpirationOp() *BumpFootprintExpirationOp { +func (u *XdrAnon_Operation_Body) ExtendFootprintTTLOp() *ExtendFootprintTTLOp { switch u.Type { - case BUMP_FOOTPRINT_EXPIRATION: - if v, ok := u._u.(*BumpFootprintExpirationOp); ok { + case EXTEND_FOOTPRINT_TTL: + if v, ok := u._u.(*ExtendFootprintTTLOp); ok { return v } else { - var zero BumpFootprintExpirationOp + var zero ExtendFootprintTTLOp u._u = &zero return &zero } default: - XdrPanic("XdrAnon_Operation_Body.BumpFootprintExpirationOp accessed when Type == %v", u.Type) + XdrPanic("XdrAnon_Operation_Body.ExtendFootprintTTLOp accessed when Type == %v", u.Type) return nil } } @@ -16698,7 +16644,7 @@ func (u *XdrAnon_Operation_Body) RestoreFootprintOp() *RestoreFootprintOp { } func (u XdrAnon_Operation_Body) XdrValid() bool { switch u.Type { - case CREATE_ACCOUNT, PAYMENT, PATH_PAYMENT_STRICT_RECEIVE, MANAGE_SELL_OFFER, CREATE_PASSIVE_SELL_OFFER, SET_OPTIONS, CHANGE_TRUST, ALLOW_TRUST, ACCOUNT_MERGE, INFLATION, MANAGE_DATA, BUMP_SEQUENCE, MANAGE_BUY_OFFER, PATH_PAYMENT_STRICT_SEND, CREATE_CLAIMABLE_BALANCE, CLAIM_CLAIMABLE_BALANCE, BEGIN_SPONSORING_FUTURE_RESERVES, END_SPONSORING_FUTURE_RESERVES, REVOKE_SPONSORSHIP, CLAWBACK, CLAWBACK_CLAIMABLE_BALANCE, SET_TRUST_LINE_FLAGS, LIQUIDITY_POOL_DEPOSIT, LIQUIDITY_POOL_WITHDRAW, INVOKE_HOST_FUNCTION, BUMP_FOOTPRINT_EXPIRATION, RESTORE_FOOTPRINT: + case CREATE_ACCOUNT, PAYMENT, PATH_PAYMENT_STRICT_RECEIVE, MANAGE_SELL_OFFER, CREATE_PASSIVE_SELL_OFFER, SET_OPTIONS, CHANGE_TRUST, ALLOW_TRUST, ACCOUNT_MERGE, INFLATION, MANAGE_DATA, BUMP_SEQUENCE, MANAGE_BUY_OFFER, PATH_PAYMENT_STRICT_SEND, CREATE_CLAIMABLE_BALANCE, CLAIM_CLAIMABLE_BALANCE, BEGIN_SPONSORING_FUTURE_RESERVES, END_SPONSORING_FUTURE_RESERVES, REVOKE_SPONSORSHIP, CLAWBACK, CLAWBACK_CLAIMABLE_BALANCE, SET_TRUST_LINE_FLAGS, LIQUIDITY_POOL_DEPOSIT, LIQUIDITY_POOL_WITHDRAW, INVOKE_HOST_FUNCTION, EXTEND_FOOTPRINT_TTL, RESTORE_FOOTPRINT: return true } return false @@ -16761,8 +16707,8 @@ func (u *XdrAnon_Operation_Body) XdrUnionBody() XdrType { return XDR_LiquidityPoolWithdrawOp(u.LiquidityPoolWithdrawOp()) case INVOKE_HOST_FUNCTION: return XDR_InvokeHostFunctionOp(u.InvokeHostFunctionOp()) - case BUMP_FOOTPRINT_EXPIRATION: - return XDR_BumpFootprintExpirationOp(u.BumpFootprintExpirationOp()) + case EXTEND_FOOTPRINT_TTL: + return XDR_ExtendFootprintTTLOp(u.ExtendFootprintTTLOp()) case RESTORE_FOOTPRINT: return XDR_RestoreFootprintOp(u.RestoreFootprintOp()) } @@ -16820,8 +16766,8 @@ func (u *XdrAnon_Operation_Body) XdrUnionBodyName() string { return "LiquidityPoolWithdrawOp" case INVOKE_HOST_FUNCTION: return "InvokeHostFunctionOp" - case BUMP_FOOTPRINT_EXPIRATION: - return "BumpFootprintExpirationOp" + case EXTEND_FOOTPRINT_TTL: + return "ExtendFootprintTTLOp" case RESTORE_FOOTPRINT: return "RestoreFootprintOp" } @@ -16913,8 +16859,8 @@ func (u *XdrAnon_Operation_Body) XdrRecurse(x XDR, name string) { case INVOKE_HOST_FUNCTION: x.Marshal(x.Sprintf("%sinvokeHostFunctionOp", name), XDR_InvokeHostFunctionOp(u.InvokeHostFunctionOp())) return - case BUMP_FOOTPRINT_EXPIRATION: - x.Marshal(x.Sprintf("%sbumpFootprintExpirationOp", name), XDR_BumpFootprintExpirationOp(u.BumpFootprintExpirationOp())) + case EXTEND_FOOTPRINT_TTL: + x.Marshal(x.Sprintf("%sextendFootprintTTLOp", name), XDR_ExtendFootprintTTLOp(u.ExtendFootprintTTLOp())) return case RESTORE_FOOTPRINT: x.Marshal(x.Sprintf("%srestoreFootprintOp", name), XDR_RestoreFootprintOp(u.RestoreFootprintOp())) @@ -17960,7 +17906,7 @@ func (v *SorobanTransactionData) XdrRecurse(x XDR, name string) { } x.Marshal(x.Sprintf("%sext", name), XDR_ExtensionPoint(&v.Ext)) x.Marshal(x.Sprintf("%sresources", name), XDR_SorobanResources(&v.Resources)) - x.Marshal(x.Sprintf("%srefundableFee", name), XDR_Int64(&v.RefundableFee)) + x.Marshal(x.Sprintf("%sresourceFee", name), XDR_Int64(&v.ResourceFee)) } func XDR_SorobanTransactionData(v *SorobanTransactionData) *SorobanTransactionData { return v } @@ -22563,7 +22509,7 @@ var _XdrNames_InvokeHostFunctionResultCode = map[int32]string{ int32(INVOKE_HOST_FUNCTION_MALFORMED): "INVOKE_HOST_FUNCTION_MALFORMED", int32(INVOKE_HOST_FUNCTION_TRAPPED): "INVOKE_HOST_FUNCTION_TRAPPED", int32(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED): "INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED", - int32(INVOKE_HOST_FUNCTION_ENTRY_EXPIRED): "INVOKE_HOST_FUNCTION_ENTRY_EXPIRED", + int32(INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED): "INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED", int32(INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE): "INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE", } var _XdrValues_InvokeHostFunctionResultCode = map[string]int32{ @@ -22571,7 +22517,7 @@ var _XdrValues_InvokeHostFunctionResultCode = map[string]int32{ "INVOKE_HOST_FUNCTION_MALFORMED": int32(INVOKE_HOST_FUNCTION_MALFORMED), "INVOKE_HOST_FUNCTION_TRAPPED": int32(INVOKE_HOST_FUNCTION_TRAPPED), "INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED": int32(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED), - "INVOKE_HOST_FUNCTION_ENTRY_EXPIRED": int32(INVOKE_HOST_FUNCTION_ENTRY_EXPIRED), + "INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED": int32(INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED), "INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE": int32(INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE), } @@ -22627,7 +22573,7 @@ var _XdrTags_InvokeHostFunctionResult = map[int32]bool{ XdrToI32(INVOKE_HOST_FUNCTION_MALFORMED): true, XdrToI32(INVOKE_HOST_FUNCTION_TRAPPED): true, XdrToI32(INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED): true, - XdrToI32(INVOKE_HOST_FUNCTION_ENTRY_EXPIRED): true, + XdrToI32(INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED): true, XdrToI32(INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE): true, } @@ -22653,7 +22599,7 @@ func (u *InvokeHostFunctionResult) Success() *Hash { } func (u InvokeHostFunctionResult) XdrValid() bool { switch u.Code { - case INVOKE_HOST_FUNCTION_SUCCESS, INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_EXPIRED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: + case INVOKE_HOST_FUNCTION_SUCCESS, INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: return true } return false @@ -22668,7 +22614,7 @@ func (u *InvokeHostFunctionResult) XdrUnionBody() XdrType { switch u.Code { case INVOKE_HOST_FUNCTION_SUCCESS: return XDR_Hash(u.Success()) - case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_EXPIRED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: + case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: return nil } return nil @@ -22677,7 +22623,7 @@ func (u *InvokeHostFunctionResult) XdrUnionBodyName() string { switch u.Code { case INVOKE_HOST_FUNCTION_SUCCESS: return "Success" - case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_EXPIRED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: + case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: return "" } return "" @@ -22698,141 +22644,135 @@ func (u *InvokeHostFunctionResult) XdrRecurse(x XDR, name string) { case INVOKE_HOST_FUNCTION_SUCCESS: x.Marshal(x.Sprintf("%ssuccess", name), XDR_Hash(u.Success())) return - case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_EXPIRED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: + case INVOKE_HOST_FUNCTION_MALFORMED, INVOKE_HOST_FUNCTION_TRAPPED, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: return } XdrPanic("invalid Code (%v) in InvokeHostFunctionResult", u.Code) } func XDR_InvokeHostFunctionResult(v *InvokeHostFunctionResult) *InvokeHostFunctionResult { return v } -var _XdrNames_BumpFootprintExpirationResultCode = map[int32]string{ - int32(BUMP_FOOTPRINT_EXPIRATION_SUCCESS): "BUMP_FOOTPRINT_EXPIRATION_SUCCESS", - int32(BUMP_FOOTPRINT_EXPIRATION_MALFORMED): "BUMP_FOOTPRINT_EXPIRATION_MALFORMED", - int32(BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED): "BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED", - int32(BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE): "BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE", +var _XdrNames_ExtendFootprintTTLResultCode = map[int32]string{ + int32(EXTEND_FOOTPRINT_TTL_SUCCESS): "EXTEND_FOOTPRINT_TTL_SUCCESS", + int32(EXTEND_FOOTPRINT_TTL_MALFORMED): "EXTEND_FOOTPRINT_TTL_MALFORMED", + int32(EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED): "EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED", + int32(EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE): "EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE", } -var _XdrValues_BumpFootprintExpirationResultCode = map[string]int32{ - "BUMP_FOOTPRINT_EXPIRATION_SUCCESS": int32(BUMP_FOOTPRINT_EXPIRATION_SUCCESS), - "BUMP_FOOTPRINT_EXPIRATION_MALFORMED": int32(BUMP_FOOTPRINT_EXPIRATION_MALFORMED), - "BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED": int32(BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED), - "BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE": int32(BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE), +var _XdrValues_ExtendFootprintTTLResultCode = map[string]int32{ + "EXTEND_FOOTPRINT_TTL_SUCCESS": int32(EXTEND_FOOTPRINT_TTL_SUCCESS), + "EXTEND_FOOTPRINT_TTL_MALFORMED": int32(EXTEND_FOOTPRINT_TTL_MALFORMED), + "EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED": int32(EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED), + "EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE": int32(EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE), } -func (BumpFootprintExpirationResultCode) XdrEnumNames() map[int32]string { - return _XdrNames_BumpFootprintExpirationResultCode +func (ExtendFootprintTTLResultCode) XdrEnumNames() map[int32]string { + return _XdrNames_ExtendFootprintTTLResultCode } -func (v BumpFootprintExpirationResultCode) String() string { - if s, ok := _XdrNames_BumpFootprintExpirationResultCode[int32(v)]; ok { +func (v ExtendFootprintTTLResultCode) String() string { + if s, ok := _XdrNames_ExtendFootprintTTLResultCode[int32(v)]; ok { return s } - return fmt.Sprintf("BumpFootprintExpirationResultCode#%d", v) + return fmt.Sprintf("ExtendFootprintTTLResultCode#%d", v) } -func (v *BumpFootprintExpirationResultCode) Scan(ss fmt.ScanState, _ rune) error { +func (v *ExtendFootprintTTLResultCode) Scan(ss fmt.ScanState, _ rune) error { if tok, err := ss.Token(true, XdrSymChar); err != nil { return err } else { stok := string(tok) - if val, ok := _XdrValues_BumpFootprintExpirationResultCode[stok]; ok { - *v = BumpFootprintExpirationResultCode(val) + if val, ok := _XdrValues_ExtendFootprintTTLResultCode[stok]; ok { + *v = ExtendFootprintTTLResultCode(val) return nil - } else if stok == "BumpFootprintExpirationResultCode" { + } else if stok == "ExtendFootprintTTLResultCode" { if n, err := fmt.Fscanf(ss, "#%d", (*int32)(v)); n == 1 && err == nil { return nil } } - return XdrError(fmt.Sprintf("%s is not a valid BumpFootprintExpirationResultCode.", stok)) + return XdrError(fmt.Sprintf("%s is not a valid ExtendFootprintTTLResultCode.", stok)) } } -func (v BumpFootprintExpirationResultCode) GetU32() uint32 { return uint32(v) } -func (v *BumpFootprintExpirationResultCode) SetU32(n uint32) { - *v = BumpFootprintExpirationResultCode(n) -} -func (v *BumpFootprintExpirationResultCode) XdrPointer() interface{} { return v } -func (BumpFootprintExpirationResultCode) XdrTypeName() string { - return "BumpFootprintExpirationResultCode" -} -func (v BumpFootprintExpirationResultCode) XdrValue() interface{} { return v } -func (v *BumpFootprintExpirationResultCode) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v ExtendFootprintTTLResultCode) GetU32() uint32 { return uint32(v) } +func (v *ExtendFootprintTTLResultCode) SetU32(n uint32) { *v = ExtendFootprintTTLResultCode(n) } +func (v *ExtendFootprintTTLResultCode) XdrPointer() interface{} { return v } +func (ExtendFootprintTTLResultCode) XdrTypeName() string { return "ExtendFootprintTTLResultCode" } +func (v ExtendFootprintTTLResultCode) XdrValue() interface{} { return v } +func (v *ExtendFootprintTTLResultCode) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -type XdrType_BumpFootprintExpirationResultCode = *BumpFootprintExpirationResultCode +type XdrType_ExtendFootprintTTLResultCode = *ExtendFootprintTTLResultCode -func XDR_BumpFootprintExpirationResultCode(v *BumpFootprintExpirationResultCode) *BumpFootprintExpirationResultCode { +func XDR_ExtendFootprintTTLResultCode(v *ExtendFootprintTTLResultCode) *ExtendFootprintTTLResultCode { return v } -var _XdrComments_BumpFootprintExpirationResultCode = map[int32]string{ - int32(BUMP_FOOTPRINT_EXPIRATION_SUCCESS): "codes considered as \"success\" for the operation", - int32(BUMP_FOOTPRINT_EXPIRATION_MALFORMED): "codes considered as \"failure\" for the operation", +var _XdrComments_ExtendFootprintTTLResultCode = map[int32]string{ + int32(EXTEND_FOOTPRINT_TTL_SUCCESS): "codes considered as \"success\" for the operation", + int32(EXTEND_FOOTPRINT_TTL_MALFORMED): "codes considered as \"failure\" for the operation", } -func (e BumpFootprintExpirationResultCode) XdrEnumComments() map[int32]string { - return _XdrComments_BumpFootprintExpirationResultCode +func (e ExtendFootprintTTLResultCode) XdrEnumComments() map[int32]string { + return _XdrComments_ExtendFootprintTTLResultCode } -var _XdrTags_BumpFootprintExpirationResult = map[int32]bool{ - XdrToI32(BUMP_FOOTPRINT_EXPIRATION_SUCCESS): true, - XdrToI32(BUMP_FOOTPRINT_EXPIRATION_MALFORMED): true, - XdrToI32(BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED): true, - XdrToI32(BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE): true, +var _XdrTags_ExtendFootprintTTLResult = map[int32]bool{ + XdrToI32(EXTEND_FOOTPRINT_TTL_SUCCESS): true, + XdrToI32(EXTEND_FOOTPRINT_TTL_MALFORMED): true, + XdrToI32(EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED): true, + XdrToI32(EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE): true, } -func (_ BumpFootprintExpirationResult) XdrValidTags() map[int32]bool { - return _XdrTags_BumpFootprintExpirationResult +func (_ ExtendFootprintTTLResult) XdrValidTags() map[int32]bool { + return _XdrTags_ExtendFootprintTTLResult } -func (u BumpFootprintExpirationResult) XdrValid() bool { +func (u ExtendFootprintTTLResult) XdrValid() bool { switch u.Code { - case BUMP_FOOTPRINT_EXPIRATION_SUCCESS, BUMP_FOOTPRINT_EXPIRATION_MALFORMED, BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED, BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: + case EXTEND_FOOTPRINT_TTL_SUCCESS, EXTEND_FOOTPRINT_TTL_MALFORMED, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: return true } return false } -func (u *BumpFootprintExpirationResult) XdrUnionTag() XdrNum32 { - return XDR_BumpFootprintExpirationResultCode(&u.Code) +func (u *ExtendFootprintTTLResult) XdrUnionTag() XdrNum32 { + return XDR_ExtendFootprintTTLResultCode(&u.Code) } -func (u *BumpFootprintExpirationResult) XdrUnionTagName() string { +func (u *ExtendFootprintTTLResult) XdrUnionTagName() string { return "Code" } -func (u *BumpFootprintExpirationResult) XdrUnionBody() XdrType { +func (u *ExtendFootprintTTLResult) XdrUnionBody() XdrType { switch u.Code { - case BUMP_FOOTPRINT_EXPIRATION_SUCCESS: + case EXTEND_FOOTPRINT_TTL_SUCCESS: return nil - case BUMP_FOOTPRINT_EXPIRATION_MALFORMED, BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED, BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: + case EXTEND_FOOTPRINT_TTL_MALFORMED, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: return nil } return nil } -func (u *BumpFootprintExpirationResult) XdrUnionBodyName() string { +func (u *ExtendFootprintTTLResult) XdrUnionBodyName() string { switch u.Code { - case BUMP_FOOTPRINT_EXPIRATION_SUCCESS: + case EXTEND_FOOTPRINT_TTL_SUCCESS: return "" - case BUMP_FOOTPRINT_EXPIRATION_MALFORMED, BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED, BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: + case EXTEND_FOOTPRINT_TTL_MALFORMED, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: return "" } return "" } -type XdrType_BumpFootprintExpirationResult = *BumpFootprintExpirationResult +type XdrType_ExtendFootprintTTLResult = *ExtendFootprintTTLResult -func (v *BumpFootprintExpirationResult) XdrPointer() interface{} { return v } -func (BumpFootprintExpirationResult) XdrTypeName() string { return "BumpFootprintExpirationResult" } -func (v BumpFootprintExpirationResult) XdrValue() interface{} { return v } -func (v *BumpFootprintExpirationResult) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (u *BumpFootprintExpirationResult) XdrRecurse(x XDR, name string) { +func (v *ExtendFootprintTTLResult) XdrPointer() interface{} { return v } +func (ExtendFootprintTTLResult) XdrTypeName() string { return "ExtendFootprintTTLResult" } +func (v ExtendFootprintTTLResult) XdrValue() interface{} { return v } +func (v *ExtendFootprintTTLResult) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (u *ExtendFootprintTTLResult) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } - XDR_BumpFootprintExpirationResultCode(&u.Code).XdrMarshal(x, x.Sprintf("%scode", name)) + XDR_ExtendFootprintTTLResultCode(&u.Code).XdrMarshal(x, x.Sprintf("%scode", name)) switch u.Code { - case BUMP_FOOTPRINT_EXPIRATION_SUCCESS: + case EXTEND_FOOTPRINT_TTL_SUCCESS: return - case BUMP_FOOTPRINT_EXPIRATION_MALFORMED, BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED, BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: + case EXTEND_FOOTPRINT_TTL_MALFORMED, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: return } - XdrPanic("invalid Code (%v) in BumpFootprintExpirationResult", u.Code) -} -func XDR_BumpFootprintExpirationResult(v *BumpFootprintExpirationResult) *BumpFootprintExpirationResult { - return v + XdrPanic("invalid Code (%v) in ExtendFootprintTTLResult", u.Code) } +func XDR_ExtendFootprintTTLResult(v *ExtendFootprintTTLResult) *ExtendFootprintTTLResult { return v } var _XdrNames_RestoreFootprintResultCode = map[int32]string{ int32(RESTORE_FOOTPRINT_SUCCESS): "RESTORE_FOOTPRINT_SUCCESS", @@ -23052,7 +22992,7 @@ var _XdrTags_XdrAnon_OperationResult_Tr = map[int32]bool{ XdrToI32(LIQUIDITY_POOL_DEPOSIT): true, XdrToI32(LIQUIDITY_POOL_WITHDRAW): true, XdrToI32(INVOKE_HOST_FUNCTION): true, - XdrToI32(BUMP_FOOTPRINT_EXPIRATION): true, + XdrToI32(EXTEND_FOOTPRINT_TTL): true, XdrToI32(RESTORE_FOOTPRINT): true, } @@ -23434,18 +23374,18 @@ func (u *XdrAnon_OperationResult_Tr) InvokeHostFunctionResult() *InvokeHostFunct return nil } } -func (u *XdrAnon_OperationResult_Tr) BumpFootprintExpirationResult() *BumpFootprintExpirationResult { +func (u *XdrAnon_OperationResult_Tr) ExtendFootprintTTLResult() *ExtendFootprintTTLResult { switch u.Type { - case BUMP_FOOTPRINT_EXPIRATION: - if v, ok := u._u.(*BumpFootprintExpirationResult); ok { + case EXTEND_FOOTPRINT_TTL: + if v, ok := u._u.(*ExtendFootprintTTLResult); ok { return v } else { - var zero BumpFootprintExpirationResult + var zero ExtendFootprintTTLResult u._u = &zero return &zero } default: - XdrPanic("XdrAnon_OperationResult_Tr.BumpFootprintExpirationResult accessed when Type == %v", u.Type) + XdrPanic("XdrAnon_OperationResult_Tr.ExtendFootprintTTLResult accessed when Type == %v", u.Type) return nil } } @@ -23466,7 +23406,7 @@ func (u *XdrAnon_OperationResult_Tr) RestoreFootprintResult() *RestoreFootprintR } func (u XdrAnon_OperationResult_Tr) XdrValid() bool { switch u.Type { - case CREATE_ACCOUNT, PAYMENT, PATH_PAYMENT_STRICT_RECEIVE, MANAGE_SELL_OFFER, CREATE_PASSIVE_SELL_OFFER, SET_OPTIONS, CHANGE_TRUST, ALLOW_TRUST, ACCOUNT_MERGE, INFLATION, MANAGE_DATA, BUMP_SEQUENCE, MANAGE_BUY_OFFER, PATH_PAYMENT_STRICT_SEND, CREATE_CLAIMABLE_BALANCE, CLAIM_CLAIMABLE_BALANCE, BEGIN_SPONSORING_FUTURE_RESERVES, END_SPONSORING_FUTURE_RESERVES, REVOKE_SPONSORSHIP, CLAWBACK, CLAWBACK_CLAIMABLE_BALANCE, SET_TRUST_LINE_FLAGS, LIQUIDITY_POOL_DEPOSIT, LIQUIDITY_POOL_WITHDRAW, INVOKE_HOST_FUNCTION, BUMP_FOOTPRINT_EXPIRATION, RESTORE_FOOTPRINT: + case CREATE_ACCOUNT, PAYMENT, PATH_PAYMENT_STRICT_RECEIVE, MANAGE_SELL_OFFER, CREATE_PASSIVE_SELL_OFFER, SET_OPTIONS, CHANGE_TRUST, ALLOW_TRUST, ACCOUNT_MERGE, INFLATION, MANAGE_DATA, BUMP_SEQUENCE, MANAGE_BUY_OFFER, PATH_PAYMENT_STRICT_SEND, CREATE_CLAIMABLE_BALANCE, CLAIM_CLAIMABLE_BALANCE, BEGIN_SPONSORING_FUTURE_RESERVES, END_SPONSORING_FUTURE_RESERVES, REVOKE_SPONSORSHIP, CLAWBACK, CLAWBACK_CLAIMABLE_BALANCE, SET_TRUST_LINE_FLAGS, LIQUIDITY_POOL_DEPOSIT, LIQUIDITY_POOL_WITHDRAW, INVOKE_HOST_FUNCTION, EXTEND_FOOTPRINT_TTL, RESTORE_FOOTPRINT: return true } return false @@ -23529,8 +23469,8 @@ func (u *XdrAnon_OperationResult_Tr) XdrUnionBody() XdrType { return XDR_LiquidityPoolWithdrawResult(u.LiquidityPoolWithdrawResult()) case INVOKE_HOST_FUNCTION: return XDR_InvokeHostFunctionResult(u.InvokeHostFunctionResult()) - case BUMP_FOOTPRINT_EXPIRATION: - return XDR_BumpFootprintExpirationResult(u.BumpFootprintExpirationResult()) + case EXTEND_FOOTPRINT_TTL: + return XDR_ExtendFootprintTTLResult(u.ExtendFootprintTTLResult()) case RESTORE_FOOTPRINT: return XDR_RestoreFootprintResult(u.RestoreFootprintResult()) } @@ -23588,8 +23528,8 @@ func (u *XdrAnon_OperationResult_Tr) XdrUnionBodyName() string { return "LiquidityPoolWithdrawResult" case INVOKE_HOST_FUNCTION: return "InvokeHostFunctionResult" - case BUMP_FOOTPRINT_EXPIRATION: - return "BumpFootprintExpirationResult" + case EXTEND_FOOTPRINT_TTL: + return "ExtendFootprintTTLResult" case RESTORE_FOOTPRINT: return "RestoreFootprintResult" } @@ -23683,8 +23623,8 @@ func (u *XdrAnon_OperationResult_Tr) XdrRecurse(x XDR, name string) { case INVOKE_HOST_FUNCTION: x.Marshal(x.Sprintf("%sinvokeHostFunctionResult", name), XDR_InvokeHostFunctionResult(u.InvokeHostFunctionResult())) return - case BUMP_FOOTPRINT_EXPIRATION: - x.Marshal(x.Sprintf("%sbumpFootprintExpirationResult", name), XDR_BumpFootprintExpirationResult(u.BumpFootprintExpirationResult())) + case EXTEND_FOOTPRINT_TTL: + x.Marshal(x.Sprintf("%sextendFootprintTTLResult", name), XDR_ExtendFootprintTTLResult(u.ExtendFootprintTTLResult())) return case RESTORE_FOOTPRINT: x.Marshal(x.Sprintf("%srestoreFootprintResult", name), XDR_RestoreFootprintResult(u.RestoreFootprintResult())) @@ -26988,12 +26928,12 @@ func (v *Int256Parts) XdrRecurse(x XDR, name string) { func XDR_Int256Parts(v *Int256Parts) *Int256Parts { return v } var _XdrNames_ContractExecutableType = map[int32]string{ - int32(CONTRACT_EXECUTABLE_WASM): "CONTRACT_EXECUTABLE_WASM", - int32(CONTRACT_EXECUTABLE_TOKEN): "CONTRACT_EXECUTABLE_TOKEN", + int32(CONTRACT_EXECUTABLE_WASM): "CONTRACT_EXECUTABLE_WASM", + int32(CONTRACT_EXECUTABLE_STELLAR_ASSET): "CONTRACT_EXECUTABLE_STELLAR_ASSET", } var _XdrValues_ContractExecutableType = map[string]int32{ - "CONTRACT_EXECUTABLE_WASM": int32(CONTRACT_EXECUTABLE_WASM), - "CONTRACT_EXECUTABLE_TOKEN": int32(CONTRACT_EXECUTABLE_TOKEN), + "CONTRACT_EXECUTABLE_WASM": int32(CONTRACT_EXECUTABLE_WASM), + "CONTRACT_EXECUTABLE_STELLAR_ASSET": int32(CONTRACT_EXECUTABLE_STELLAR_ASSET), } func (ContractExecutableType) XdrEnumNames() map[int32]string { @@ -27033,8 +26973,8 @@ type XdrType_ContractExecutableType = *ContractExecutableType func XDR_ContractExecutableType(v *ContractExecutableType) *ContractExecutableType { return v } var _XdrTags_ContractExecutable = map[int32]bool{ - XdrToI32(CONTRACT_EXECUTABLE_WASM): true, - XdrToI32(CONTRACT_EXECUTABLE_TOKEN): true, + XdrToI32(CONTRACT_EXECUTABLE_WASM): true, + XdrToI32(CONTRACT_EXECUTABLE_STELLAR_ASSET): true, } func (_ ContractExecutable) XdrValidTags() map[int32]bool { @@ -27057,7 +26997,7 @@ func (u *ContractExecutable) Wasm_hash() *Hash { } func (u ContractExecutable) XdrValid() bool { switch u.Type { - case CONTRACT_EXECUTABLE_WASM, CONTRACT_EXECUTABLE_TOKEN: + case CONTRACT_EXECUTABLE_WASM, CONTRACT_EXECUTABLE_STELLAR_ASSET: return true } return false @@ -27072,7 +27012,7 @@ func (u *ContractExecutable) XdrUnionBody() XdrType { switch u.Type { case CONTRACT_EXECUTABLE_WASM: return XDR_Hash(u.Wasm_hash()) - case CONTRACT_EXECUTABLE_TOKEN: + case CONTRACT_EXECUTABLE_STELLAR_ASSET: return nil } return nil @@ -27081,7 +27021,7 @@ func (u *ContractExecutable) XdrUnionBodyName() string { switch u.Type { case CONTRACT_EXECUTABLE_WASM: return "Wasm_hash" - case CONTRACT_EXECUTABLE_TOKEN: + case CONTRACT_EXECUTABLE_STELLAR_ASSET: return "" } return "" @@ -27102,7 +27042,7 @@ func (u *ContractExecutable) XdrRecurse(x XDR, name string) { case CONTRACT_EXECUTABLE_WASM: x.Marshal(x.Sprintf("%swasm_hash", name), XDR_Hash(u.Wasm_hash())) return - case CONTRACT_EXECUTABLE_TOKEN: + case CONTRACT_EXECUTABLE_STELLAR_ASSET: return } XdrPanic("invalid Type (%v) in ContractExecutable", u.Type) @@ -28158,6 +28098,22 @@ func (u *StoredTransactionSet) XdrRecurse(x XDR, name string) { } func XDR_StoredTransactionSet(v *StoredTransactionSet) *StoredTransactionSet { return v } +type XdrType_StoredDebugTransactionSet = *StoredDebugTransactionSet + +func (v *StoredDebugTransactionSet) XdrPointer() interface{} { return v } +func (StoredDebugTransactionSet) XdrTypeName() string { return "StoredDebugTransactionSet" } +func (v StoredDebugTransactionSet) XdrValue() interface{} { return v } +func (v *StoredDebugTransactionSet) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *StoredDebugTransactionSet) XdrRecurse(x XDR, name string) { + if name != "" { + name = x.Sprintf("%s.", name) + } + x.Marshal(x.Sprintf("%stxSet", name), XDR_StoredTransactionSet(&v.TxSet)) + x.Marshal(x.Sprintf("%sledgerSeq", name), XDR_Uint32(&v.LedgerSeq)) + x.Marshal(x.Sprintf("%sscpValue", name), XDR_StellarValue(&v.ScpValue)) +} +func XDR_StoredDebugTransactionSet(v *StoredDebugTransactionSet) *StoredDebugTransactionSet { return v } + type _XdrVec_unbounded_StoredTransactionSet []StoredTransactionSet func (_XdrVec_unbounded_StoredTransactionSet) XdrBound() uint32 { @@ -28469,26 +28425,20 @@ func XDR_ConfigSettingContractBandwidthV0(v *ConfigSettingContractBandwidthV0) * var _XdrNames_ContractCostType = map[int32]string{ int32(WasmInsnExec): "WasmInsnExec", - int32(WasmMemAlloc): "WasmMemAlloc", - int32(HostMemAlloc): "HostMemAlloc", - int32(HostMemCpy): "HostMemCpy", - int32(HostMemCmp): "HostMemCmp", + int32(MemAlloc): "MemAlloc", + int32(MemCpy): "MemCpy", + int32(MemCmp): "MemCmp", int32(DispatchHostFunction): "DispatchHostFunction", int32(VisitObject): "VisitObject", int32(ValSer): "ValSer", int32(ValDeser): "ValDeser", int32(ComputeSha256Hash): "ComputeSha256Hash", int32(ComputeEd25519PubKey): "ComputeEd25519PubKey", - int32(MapEntry): "MapEntry", - int32(VecEntry): "VecEntry", int32(VerifyEd25519Sig): "VerifyEd25519Sig", - int32(VmMemRead): "VmMemRead", - int32(VmMemWrite): "VmMemWrite", int32(VmInstantiation): "VmInstantiation", int32(VmCachedInstantiation): "VmCachedInstantiation", int32(InvokeVmFunction): "InvokeVmFunction", int32(ComputeKeccak256Hash): "ComputeKeccak256Hash", - int32(ComputeEcdsaSecp256k1Key): "ComputeEcdsaSecp256k1Key", int32(ComputeEcdsaSecp256k1Sig): "ComputeEcdsaSecp256k1Sig", int32(RecoverEcdsaSecp256k1Key): "RecoverEcdsaSecp256k1Key", int32(Int256AddSub): "Int256AddSub", @@ -28496,29 +28446,24 @@ var _XdrNames_ContractCostType = map[int32]string{ int32(Int256Div): "Int256Div", int32(Int256Pow): "Int256Pow", int32(Int256Shift): "Int256Shift", + int32(ChaCha20DrawBytes): "ChaCha20DrawBytes", } var _XdrValues_ContractCostType = map[string]int32{ "WasmInsnExec": int32(WasmInsnExec), - "WasmMemAlloc": int32(WasmMemAlloc), - "HostMemAlloc": int32(HostMemAlloc), - "HostMemCpy": int32(HostMemCpy), - "HostMemCmp": int32(HostMemCmp), + "MemAlloc": int32(MemAlloc), + "MemCpy": int32(MemCpy), + "MemCmp": int32(MemCmp), "DispatchHostFunction": int32(DispatchHostFunction), "VisitObject": int32(VisitObject), "ValSer": int32(ValSer), "ValDeser": int32(ValDeser), "ComputeSha256Hash": int32(ComputeSha256Hash), "ComputeEd25519PubKey": int32(ComputeEd25519PubKey), - "MapEntry": int32(MapEntry), - "VecEntry": int32(VecEntry), "VerifyEd25519Sig": int32(VerifyEd25519Sig), - "VmMemRead": int32(VmMemRead), - "VmMemWrite": int32(VmMemWrite), "VmInstantiation": int32(VmInstantiation), "VmCachedInstantiation": int32(VmCachedInstantiation), "InvokeVmFunction": int32(InvokeVmFunction), "ComputeKeccak256Hash": int32(ComputeKeccak256Hash), - "ComputeEcdsaSecp256k1Key": int32(ComputeEcdsaSecp256k1Key), "ComputeEcdsaSecp256k1Sig": int32(ComputeEcdsaSecp256k1Sig), "RecoverEcdsaSecp256k1Key": int32(RecoverEcdsaSecp256k1Key), "Int256AddSub": int32(Int256AddSub), @@ -28526,6 +28471,7 @@ var _XdrValues_ContractCostType = map[string]int32{ "Int256Div": int32(Int256Div), "Int256Pow": int32(Int256Pow), "Int256Shift": int32(Int256Shift), + "ChaCha20DrawBytes": int32(ChaCha20DrawBytes), } func (ContractCostType) XdrEnumNames() map[int32]string { @@ -28566,26 +28512,20 @@ func XDR_ContractCostType(v *ContractCostType) *ContractCostType { return v } var _XdrComments_ContractCostType = map[int32]string{ int32(WasmInsnExec): "Cost of running 1 wasm instruction", - int32(WasmMemAlloc): "Cost of growing wasm linear memory by 1 page", - int32(HostMemAlloc): "Cost of allocating a chuck of host memory (in bytes)", - int32(HostMemCpy): "Cost of copying a chuck of bytes into a pre-allocated host memory", - int32(HostMemCmp): "Cost of comparing two slices of host memory", + int32(MemAlloc): "Cost of allocating a slice of memory (in bytes)", + int32(MemCpy): "Cost of copying a slice of bytes into a pre-allocated memory", + int32(MemCmp): "Cost of comparing two slices of memory", int32(DispatchHostFunction): "Cost of a host function dispatch, not including the actual work done by the function nor the cost of VM invocation machinary", int32(VisitObject): "Cost of visiting a host object from the host object storage. Exists to make sure some baseline cost coverage, i.e. repeatly visiting objects by the guest will always incur some charges.", int32(ValSer): "Cost of serializing an xdr object to bytes", int32(ValDeser): "Cost of deserializing an xdr object from bytes", int32(ComputeSha256Hash): "Cost of computing the sha256 hash from bytes", int32(ComputeEd25519PubKey): "Cost of computing the ed25519 pubkey from bytes", - int32(MapEntry): "Cost of accessing an entry in a Map.", - int32(VecEntry): "Cost of accessing an entry in a Vec", int32(VerifyEd25519Sig): "Cost of verifying ed25519 signature of a payload.", - int32(VmMemRead): "Cost of reading a slice of vm linear memory", - int32(VmMemWrite): "Cost of writing to a slice of vm linear memory", int32(VmInstantiation): "Cost of instantiation a VM from wasm bytes code.", int32(VmCachedInstantiation): "Cost of instantiation a VM from a cached state.", int32(InvokeVmFunction): "Cost of invoking a function on the VM. If the function is a host function, additional cost will be covered by `DispatchHostFunction`.", int32(ComputeKeccak256Hash): "Cost of computing a keccak256 hash from bytes.", - int32(ComputeEcdsaSecp256k1Key): "Cost of computing an ECDSA secp256k1 pubkey from bytes.", int32(ComputeEcdsaSecp256k1Sig): "Cost of computing an ECDSA secp256k1 signature from bytes.", int32(RecoverEcdsaSecp256k1Key): "Cost of recovering an ECDSA secp256k1 key from a signature.", int32(Int256AddSub): "Cost of int256 addition (`+`) and subtraction (`-`) operations", @@ -28593,6 +28533,7 @@ var _XdrComments_ContractCostType = map[int32]string{ int32(Int256Div): "Cost of int256 division (`/`) operation", int32(Int256Pow): "Cost of int256 power (`exp`) operation", int32(Int256Shift): "Cost of int256 shift (`shl`, `shr`) operation", + int32(ChaCha20DrawBytes): "Cost of drawing random bytes using a ChaCha20 PRNG", } func (e ContractCostType) XdrEnumComments() map[int32]string { @@ -28615,27 +28556,27 @@ func (v *ContractCostParamEntry) XdrRecurse(x XDR, name string) { } func XDR_ContractCostParamEntry(v *ContractCostParamEntry) *ContractCostParamEntry { return v } -type XdrType_StateExpirationSettings = *StateExpirationSettings +type XdrType_StateArchivalSettings = *StateArchivalSettings -func (v *StateExpirationSettings) XdrPointer() interface{} { return v } -func (StateExpirationSettings) XdrTypeName() string { return "StateExpirationSettings" } -func (v StateExpirationSettings) XdrValue() interface{} { return v } -func (v *StateExpirationSettings) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } -func (v *StateExpirationSettings) XdrRecurse(x XDR, name string) { +func (v *StateArchivalSettings) XdrPointer() interface{} { return v } +func (StateArchivalSettings) XdrTypeName() string { return "StateArchivalSettings" } +func (v StateArchivalSettings) XdrValue() interface{} { return v } +func (v *StateArchivalSettings) XdrMarshal(x XDR, name string) { x.Marshal(name, v) } +func (v *StateArchivalSettings) XdrRecurse(x XDR, name string) { if name != "" { name = x.Sprintf("%s.", name) } - x.Marshal(x.Sprintf("%smaxEntryExpiration", name), XDR_Uint32(&v.MaxEntryExpiration)) - x.Marshal(x.Sprintf("%sminTempEntryExpiration", name), XDR_Uint32(&v.MinTempEntryExpiration)) - x.Marshal(x.Sprintf("%sminPersistentEntryExpiration", name), XDR_Uint32(&v.MinPersistentEntryExpiration)) + x.Marshal(x.Sprintf("%smaxEntryTTL", name), XDR_Uint32(&v.MaxEntryTTL)) + x.Marshal(x.Sprintf("%sminTemporaryTTL", name), XDR_Uint32(&v.MinTemporaryTTL)) + x.Marshal(x.Sprintf("%sminPersistentTTL", name), XDR_Uint32(&v.MinPersistentTTL)) x.Marshal(x.Sprintf("%spersistentRentRateDenominator", name), XDR_Int64(&v.PersistentRentRateDenominator)) x.Marshal(x.Sprintf("%stempRentRateDenominator", name), XDR_Int64(&v.TempRentRateDenominator)) - x.Marshal(x.Sprintf("%smaxEntriesToExpire", name), XDR_Uint32(&v.MaxEntriesToExpire)) + x.Marshal(x.Sprintf("%smaxEntriesToArchive", name), XDR_Uint32(&v.MaxEntriesToArchive)) x.Marshal(x.Sprintf("%sbucketListSizeWindowSampleSize", name), XDR_Uint32(&v.BucketListSizeWindowSampleSize)) x.Marshal(x.Sprintf("%sevictionScanSize", name), XDR_Uint64(&v.EvictionScanSize)) x.Marshal(x.Sprintf("%sstartingEvictionScanLevel", name), XDR_Uint32(&v.StartingEvictionScanLevel)) } -func XDR_StateExpirationSettings(v *StateExpirationSettings) *StateExpirationSettings { return v } +func XDR_StateArchivalSettings(v *StateArchivalSettings) *StateArchivalSettings { return v } type XdrType_EvictionIterator = *EvictionIterator @@ -28735,7 +28676,7 @@ var _XdrNames_ConfigSettingID = map[int32]string{ int32(CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES): "CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES", int32(CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES): "CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES", int32(CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES): "CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES", - int32(CONFIG_SETTING_STATE_EXPIRATION): "CONFIG_SETTING_STATE_EXPIRATION", + int32(CONFIG_SETTING_STATE_ARCHIVAL): "CONFIG_SETTING_STATE_ARCHIVAL", int32(CONFIG_SETTING_CONTRACT_EXECUTION_LANES): "CONFIG_SETTING_CONTRACT_EXECUTION_LANES", int32(CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW): "CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW", int32(CONFIG_SETTING_EVICTION_ITERATOR): "CONFIG_SETTING_EVICTION_ITERATOR", @@ -28751,7 +28692,7 @@ var _XdrValues_ConfigSettingID = map[string]int32{ "CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES": int32(CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES), "CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES": int32(CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES), "CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES": int32(CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES), - "CONFIG_SETTING_STATE_EXPIRATION": int32(CONFIG_SETTING_STATE_EXPIRATION), + "CONFIG_SETTING_STATE_ARCHIVAL": int32(CONFIG_SETTING_STATE_ARCHIVAL), "CONFIG_SETTING_CONTRACT_EXECUTION_LANES": int32(CONFIG_SETTING_CONTRACT_EXECUTION_LANES), "CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW": int32(CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW), "CONFIG_SETTING_EVICTION_ITERATOR": int32(CONFIG_SETTING_EVICTION_ITERATOR), @@ -28861,7 +28802,7 @@ var _XdrTags_ConfigSettingEntry = map[int32]bool{ XdrToI32(CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES): true, XdrToI32(CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES): true, XdrToI32(CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES): true, - XdrToI32(CONFIG_SETTING_STATE_EXPIRATION): true, + XdrToI32(CONFIG_SETTING_STATE_ARCHIVAL): true, XdrToI32(CONFIG_SETTING_CONTRACT_EXECUTION_LANES): true, XdrToI32(CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW): true, XdrToI32(CONFIG_SETTING_EVICTION_ITERATOR): true, @@ -29020,18 +28961,18 @@ func (u *ConfigSettingEntry) ContractDataEntrySizeBytes() *Uint32 { return nil } } -func (u *ConfigSettingEntry) StateExpirationSettings() *StateExpirationSettings { +func (u *ConfigSettingEntry) StateArchivalSettings() *StateArchivalSettings { switch u.ConfigSettingID { - case CONFIG_SETTING_STATE_EXPIRATION: - if v, ok := u._u.(*StateExpirationSettings); ok { + case CONFIG_SETTING_STATE_ARCHIVAL: + if v, ok := u._u.(*StateArchivalSettings); ok { return v } else { - var zero StateExpirationSettings + var zero StateArchivalSettings u._u = &zero return &zero } default: - XdrPanic("ConfigSettingEntry.StateExpirationSettings accessed when ConfigSettingID == %v", u.ConfigSettingID) + XdrPanic("ConfigSettingEntry.StateArchivalSettings accessed when ConfigSettingID == %v", u.ConfigSettingID) return nil } } @@ -29082,7 +29023,7 @@ func (u *ConfigSettingEntry) EvictionIterator() *EvictionIterator { } func (u ConfigSettingEntry) XdrValid() bool { switch u.ConfigSettingID { - case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES, CONFIG_SETTING_CONTRACT_COMPUTE_V0, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0, CONFIG_SETTING_CONTRACT_EVENTS_V0, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES, CONFIG_SETTING_STATE_EXPIRATION, CONFIG_SETTING_CONTRACT_EXECUTION_LANES, CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW, CONFIG_SETTING_EVICTION_ITERATOR: + case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES, CONFIG_SETTING_CONTRACT_COMPUTE_V0, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0, CONFIG_SETTING_CONTRACT_EVENTS_V0, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES, CONFIG_SETTING_STATE_ARCHIVAL, CONFIG_SETTING_CONTRACT_EXECUTION_LANES, CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW, CONFIG_SETTING_EVICTION_ITERATOR: return true } return false @@ -29115,8 +29056,8 @@ func (u *ConfigSettingEntry) XdrUnionBody() XdrType { return XDR_Uint32(u.ContractDataKeySizeBytes()) case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: return XDR_Uint32(u.ContractDataEntrySizeBytes()) - case CONFIG_SETTING_STATE_EXPIRATION: - return XDR_StateExpirationSettings(u.StateExpirationSettings()) + case CONFIG_SETTING_STATE_ARCHIVAL: + return XDR_StateArchivalSettings(u.StateArchivalSettings()) case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: return XDR_ConfigSettingContractExecutionLanesV0(u.ContractExecutionLanes()) case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: @@ -29148,8 +29089,8 @@ func (u *ConfigSettingEntry) XdrUnionBodyName() string { return "ContractDataKeySizeBytes" case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: return "ContractDataEntrySizeBytes" - case CONFIG_SETTING_STATE_EXPIRATION: - return "StateExpirationSettings" + case CONFIG_SETTING_STATE_ARCHIVAL: + return "StateArchivalSettings" case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: return "ContractExecutionLanes" case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: @@ -29202,8 +29143,8 @@ func (u *ConfigSettingEntry) XdrRecurse(x XDR, name string) { case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: x.Marshal(x.Sprintf("%scontractDataEntrySizeBytes", name), XDR_Uint32(u.ContractDataEntrySizeBytes())) return - case CONFIG_SETTING_STATE_EXPIRATION: - x.Marshal(x.Sprintf("%sstateExpirationSettings", name), XDR_StateExpirationSettings(u.StateExpirationSettings())) + case CONFIG_SETTING_STATE_ARCHIVAL: + x.Marshal(x.Sprintf("%sstateArchivalSettings", name), XDR_StateArchivalSettings(u.StateArchivalSettings())) return case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: x.Marshal(x.Sprintf("%scontractExecutionLanes", name), XDR_ConfigSettingContractExecutionLanesV0(u.ContractExecutionLanes())) diff --git a/ingest/change_test.go b/ingest/change_test.go index d8ae9492dc..03af4f2cb4 100644 --- a/ingest/change_test.go +++ b/ingest/change_test.go @@ -99,24 +99,24 @@ func TestSortChanges(t *testing.T) { Post: nil, }, { - Type: xdr.LedgerEntryTypeExpiration, + Type: xdr.LedgerEntryTypeTtl, Pre: &xdr.LedgerEntry{ LastModifiedLedgerSeq: 11, Data: xdr.LedgerEntryData{ - Type: xdr.LedgerEntryTypeExpiration, - Expiration: &xdr.ExpirationEntry{ - KeyHash: xdr.Hash{1}, - ExpirationLedgerSeq: 50, + Type: xdr.LedgerEntryTypeTtl, + Ttl: &xdr.TtlEntry{ + KeyHash: xdr.Hash{1}, + LiveUntilLedgerSeq: 50, }, }, }, Post: &xdr.LedgerEntry{ LastModifiedLedgerSeq: 11, Data: xdr.LedgerEntryData{ - Type: xdr.LedgerEntryTypeExpiration, - Expiration: &xdr.ExpirationEntry{ - KeyHash: xdr.Hash{1}, - ExpirationLedgerSeq: 100, + Type: xdr.LedgerEntryTypeTtl, + Ttl: &xdr.TtlEntry{ + KeyHash: xdr.Hash{1}, + LiveUntilLedgerSeq: 100, }, }, }, @@ -181,24 +181,24 @@ func TestSortChanges(t *testing.T) { }, { - Type: xdr.LedgerEntryTypeExpiration, + Type: xdr.LedgerEntryTypeTtl, Pre: &xdr.LedgerEntry{ LastModifiedLedgerSeq: 11, Data: xdr.LedgerEntryData{ - Type: xdr.LedgerEntryTypeExpiration, - Expiration: &xdr.ExpirationEntry{ - KeyHash: xdr.Hash{1}, - ExpirationLedgerSeq: 50, + Type: xdr.LedgerEntryTypeTtl, + Ttl: &xdr.TtlEntry{ + KeyHash: xdr.Hash{1}, + LiveUntilLedgerSeq: 50, }, }, }, Post: &xdr.LedgerEntry{ LastModifiedLedgerSeq: 11, Data: xdr.LedgerEntryData{ - Type: xdr.LedgerEntryTypeExpiration, - Expiration: &xdr.ExpirationEntry{ - KeyHash: xdr.Hash{1}, - ExpirationLedgerSeq: 100, + Type: xdr.LedgerEntryTypeTtl, + Ttl: &xdr.TtlEntry{ + KeyHash: xdr.Hash{1}, + LiveUntilLedgerSeq: 100, }, }, }, diff --git a/ingest/ledger_change_reader_test.go b/ingest/ledger_change_reader_test.go index dea3794cb5..0b077007e5 100644 --- a/ingest/ledger_change_reader_test.go +++ b/ingest/ledger_change_reader_test.go @@ -394,8 +394,8 @@ func TestLedgerChangeLedgerCloseMetaV2(t *testing.T) { ContractId: &contractID, } ledger := xdr.LedgerCloseMeta{ - V: 2, - V2: &xdr.LedgerCloseMetaV2{ + V: 1, + V1: &xdr.LedgerCloseMetaV1{ LedgerHeader: xdr.LedgerHeaderHistoryEntry{Header: xdr.LedgerHeader{LedgerVersion: 10}}, TxSet: xdr.GeneralizedTransactionSet{ V: 1, @@ -605,8 +605,8 @@ func TestLedgerChangeLedgerCloseMetaV2Empty(t *testing.T) { baseFee := xdr.Int64(100) ledger := xdr.LedgerCloseMeta{ - V: 2, - V2: &xdr.LedgerCloseMetaV2{ + V: 1, + V1: &xdr.LedgerCloseMetaV1{ LedgerHeader: xdr.LedgerHeaderHistoryEntry{Header: xdr.LedgerHeader{LedgerVersion: 10}}, TxSet: xdr.GeneralizedTransactionSet{ V: 1, diff --git a/ingest/stats_change_processor.go b/ingest/stats_change_processor.go index 01f33da466..43a82011cb 100644 --- a/ingest/stats_change_processor.go +++ b/ingest/stats_change_processor.go @@ -51,9 +51,9 @@ type StatsChangeProcessorResults struct { ConfigSettingsUpdated int64 ConfigSettingsRemoved int64 - ExpirationCreated int64 - ExpirationUpdated int64 - ExpirationRemoved int64 + TtlCreated int64 + TtlUpdated int64 + TtlRemoved int64 } func (p *StatsChangeProcessor) ProcessChange(ctx context.Context, change Change) error { @@ -139,14 +139,14 @@ func (p *StatsChangeProcessor) ProcessChange(ctx context.Context, change Change) case xdr.LedgerEntryChangeTypeLedgerEntryRemoved: p.results.ConfigSettingsRemoved++ } - case xdr.LedgerEntryTypeExpiration: + case xdr.LedgerEntryTypeTtl: switch change.LedgerEntryChangeType() { case xdr.LedgerEntryChangeTypeLedgerEntryCreated: - p.results.ExpirationCreated++ + p.results.TtlCreated++ case xdr.LedgerEntryChangeTypeLedgerEntryUpdated: - p.results.ExpirationUpdated++ + p.results.TtlUpdated++ case xdr.LedgerEntryChangeTypeLedgerEntryRemoved: - p.results.ExpirationRemoved++ + p.results.TtlRemoved++ } default: return fmt.Errorf("unsupported ledger entry type: %s", change.Type.String()) @@ -197,8 +197,8 @@ func (stats *StatsChangeProcessorResults) Map() map[string]interface{} { "stats_config_settings_updated": stats.ConfigSettingsUpdated, "stats_config_settings_removed": stats.ConfigSettingsRemoved, - "stats_expiration_created": stats.ExpirationCreated, - "stats_expiration_updated": stats.ExpirationUpdated, - "stats_expiration_removed": stats.ExpirationRemoved, + "stats_ttl_created": stats.TtlCreated, + "stats_ttl_updated": stats.TtlUpdated, + "stats_ttl_removed": stats.TtlRemoved, } } diff --git a/ingest/stats_change_processor_test.go b/ingest/stats_change_processor_test.go index fe14af56e3..95cb6f1a85 100644 --- a/ingest/stats_change_processor_test.go +++ b/ingest/stats_change_processor_test.go @@ -45,7 +45,7 @@ func TestStatsChangeProcessor(t *testing.T) { assert.Equal(t, int64(1), results.ContractDataCreated) assert.Equal(t, int64(1), results.ContractCodeCreated) assert.Equal(t, int64(1), results.ConfigSettingsCreated) - assert.Equal(t, int64(1), results.ExpirationCreated) + assert.Equal(t, int64(1), results.TtlCreated) assert.Equal(t, int64(1), results.AccountsUpdated) assert.Equal(t, int64(1), results.ClaimableBalancesUpdated) @@ -56,7 +56,7 @@ func TestStatsChangeProcessor(t *testing.T) { assert.Equal(t, int64(1), results.ContractDataUpdated) assert.Equal(t, int64(1), results.ContractCodeUpdated) assert.Equal(t, int64(1), results.ConfigSettingsUpdated) - assert.Equal(t, int64(1), results.ExpirationUpdated) + assert.Equal(t, int64(1), results.TtlUpdated) assert.Equal(t, int64(1), results.AccountsRemoved) assert.Equal(t, int64(1), results.ClaimableBalancesRemoved) @@ -67,7 +67,7 @@ func TestStatsChangeProcessor(t *testing.T) { assert.Equal(t, int64(1), results.ContractCodeRemoved) assert.Equal(t, int64(1), results.ContractDataRemoved) assert.Equal(t, int64(1), results.ConfigSettingsRemoved) - assert.Equal(t, int64(1), results.ExpirationRemoved) + assert.Equal(t, int64(1), results.TtlRemoved) assert.Equal(t, len(xdr.LedgerEntryTypeMap)*3, len(results.Map())) } diff --git a/protocols/horizon/operations/main.go b/protocols/horizon/operations/main.go index e56bbc3649..3e4af748b8 100644 --- a/protocols/horizon/operations/main.go +++ b/protocols/horizon/operations/main.go @@ -39,7 +39,7 @@ var TypeNames = map[xdr.OperationType]string{ xdr.OperationTypeLiquidityPoolDeposit: "liquidity_pool_deposit", xdr.OperationTypeLiquidityPoolWithdraw: "liquidity_pool_withdraw", xdr.OperationTypeInvokeHostFunction: "invoke_host_function", - xdr.OperationTypeBumpFootprintExpiration: "bump_footprint_expiration", + xdr.OperationTypeExtendFootprintTtl: "extend_footprint_ttl", xdr.OperationTypeRestoreFootprint: "restore_footprint", } @@ -373,11 +373,11 @@ type HostFunctionParameter struct { Type string `json:"type"` } -// BumpFootprintExpiration is the json resource representing a single BumpFootprintExpirationOp. -// The model for BumpFootprintExpiration assimilates BumpFootprintExpirationOp, but is simplified. -type BumpFootprintExpiration struct { +// ExtendFootprintTtl is the json resource representing a single ExtendFootprintTtlOp. +// The model for ExtendFootprintTtl assimilates ExtendFootprintTtlOp, but is simplified. +type ExtendFootprintTtl struct { Base - LedgersToExpire uint32 `json:"ledgers_to_expire"` + ExtendTo uint32 `json:"extend_to"` } // RestoreFootprint is the json resource representing a single RestoreFootprint. @@ -642,8 +642,8 @@ func UnmarshalOperation(operationTypeID int32, dataString []byte) (ops Operation return } ops = op - case xdr.OperationTypeBumpFootprintExpiration: - var op BumpFootprintExpiration + case xdr.OperationTypeExtendFootprintTtl: + var op ExtendFootprintTtl if err = json.Unmarshal(dataString, &op); err != nil { return } diff --git a/services/horizon/internal/codes/main.go b/services/horizon/internal/codes/main.go index d2574f2e22..5af63bed1a 100644 --- a/services/horizon/internal/codes/main.go +++ b/services/horizon/internal/codes/main.go @@ -502,20 +502,20 @@ func String(code interface{}) (string, error) { return "function_trapped", nil case xdr.InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded: return "resource_limit_exceeded", nil - case xdr.InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired: - return "entry_expired", nil + case xdr.InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived: + return "entry_archived", nil case xdr.InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee: return "insufficient_refundable_fee", nil } - case xdr.BumpFootprintExpirationResultCode: + case xdr.ExtendFootprintTtlResultCode: switch code { - case xdr.BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess: + case xdr.ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess: return OpSuccess, nil - case xdr.BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed: + case xdr.ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed: return OpMalformed, nil - case xdr.BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded: + case xdr.ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded: return "resource_limit_exceeded", nil - case xdr.BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee: + case xdr.ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee: return "insufficient_refundable_fee", nil } case xdr.RestoreFootprintResultCode: @@ -595,8 +595,8 @@ func ForOperationResult(opr xdr.OperationResult) (string, error) { ic = ir.MustLiquidityPoolWithdrawResult().Code case xdr.OperationTypeInvokeHostFunction: ic = ir.MustInvokeHostFunctionResult().Code - case xdr.OperationTypeBumpFootprintExpiration: - ic = ir.MustBumpFootprintExpirationResult().Code + case xdr.OperationTypeExtendFootprintTtl: + ic = ir.MustExtendFootprintTtlResult().Code case xdr.OperationTypeRestoreFootprint: ic = ir.MustRestoreFootprintResult().Code } diff --git a/services/horizon/internal/codes/main_test.go b/services/horizon/internal/codes/main_test.go index 51593b91c3..88c622440a 100644 --- a/services/horizon/internal/codes/main_test.go +++ b/services/horizon/internal/codes/main_test.go @@ -5,8 +5,9 @@ import ( "reflect" "testing" - "github.com/stellar/go/xdr" "github.com/stretchr/testify/assert" + + "github.com/stellar/go/xdr" ) func TestForOperationResultCoversForAllOpTypes(t *testing.T) { @@ -51,7 +52,7 @@ func TestForOperationResultCoversForAllOpTypes(t *testing.T) { xdr.OperationTypeLiquidityPoolDeposit: reflect.TypeOf(xdr.LiquidityPoolDepositResultCode(0)), xdr.OperationTypeLiquidityPoolWithdraw: reflect.TypeOf(xdr.LiquidityPoolWithdrawResultCode(0)), xdr.OperationTypeInvokeHostFunction: reflect.TypeOf(xdr.InvokeHostFunctionResultCode(0)), - xdr.OperationTypeBumpFootprintExpiration: reflect.TypeOf(xdr.BumpFootprintExpirationResultCode(0)), + xdr.OperationTypeExtendFootprintTtl: reflect.TypeOf(xdr.ExtendFootprintTtlResultCode(0)), xdr.OperationTypeRestoreFootprint: reflect.TypeOf(xdr.RestoreFootprintResultCode(0)), } // If this is not equal it means one or more result struct is missing in resultTypes map. diff --git a/services/horizon/internal/ingest/main_test.go b/services/horizon/internal/ingest/main_test.go index 3258db4899..55860eeaff 100644 --- a/services/horizon/internal/ingest/main_test.go +++ b/services/horizon/internal/ingest/main_test.go @@ -131,7 +131,7 @@ func TestStateMachineTransition(t *testing.T) { } historyQ.On("GetTx").Return(nil).Once() - historyQ.On("Begin", mock.AnythingOfType("*context.emptyCtx")).Return(errors.New("my error")).Once() + historyQ.On("Begin", mock.Anything).Return(errors.New("my error")).Once() historyQ.On("GetTx").Return(&sqlx.Tx{}).Once() assert.PanicsWithValue(t, "unexpected transaction", func() { diff --git a/services/horizon/internal/ingest/processors/contract_data.go b/services/horizon/internal/ingest/processors/contract_data.go index 08ac0484d0..dec9199747 100644 --- a/services/horizon/internal/ingest/processors/contract_data.go +++ b/services/horizon/internal/ingest/processors/contract_data.go @@ -437,7 +437,7 @@ func AssetToContractData(isNative bool, code, issuer string, contractID [32]byte Type: xdr.ScValTypeScvContractInstance, Instance: &xdr.ScContractInstance{ Executable: xdr.ContractExecutable{ - Type: xdr.ContractExecutableTypeContractExecutableToken, + Type: xdr.ContractExecutableTypeContractExecutableStellarAsset, }, Storage: storageMap, }, diff --git a/services/horizon/internal/ingest/processors/effects_processor.go b/services/horizon/internal/ingest/processors/effects_processor.go index b8f97836b9..34e9f9169a 100644 --- a/services/horizon/internal/ingest/processors/effects_processor.go +++ b/services/horizon/internal/ingest/processors/effects_processor.go @@ -150,7 +150,7 @@ func (operation *transactionOperationWrapper) ingestEffects(accountLoader *histo // For now, the only effects are related to the events themselves. // Possible add'l work: https://github.com/stellar/go/issues/4585 err = wrapper.addInvokeHostFunctionEffects(filterEvents(diagnosticEvents)) - case xdr.OperationTypeBumpFootprintExpiration, xdr.OperationTypeRestoreFootprint: + case xdr.OperationTypeExtendFootprintTtl, xdr.OperationTypeRestoreFootprint: // do not produce effects for these operations as horizon only provides // limited visibility into soroban operations default: diff --git a/services/horizon/internal/ingest/processors/operations_processor.go b/services/horizon/internal/ingest/processors/operations_processor.go index c8ae1a9585..b9a23229d5 100644 --- a/services/horizon/internal/ingest/processors/operations_processor.go +++ b/services/horizon/internal/ingest/processors/operations_processor.go @@ -5,6 +5,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/guregu/null" "github.com/stellar/go/amount" @@ -715,9 +716,9 @@ func (operation *transactionOperationWrapper) Details() (map[string]interface{}, default: panic(fmt.Errorf("unknown host function type: %s", op.HostFunction.Type)) } - case xdr.OperationTypeBumpFootprintExpiration: - op := operation.operation.Body.MustBumpFootprintExpirationOp() - details["ledgers_to_expire"] = op.LedgersToExpire + case xdr.OperationTypeExtendFootprintTtl: + op := operation.operation.Body.MustExtendFootprintTtlOp() + details["extend_to"] = op.ExtendTo case xdr.OperationTypeRestoreFootprint: default: panic(fmt.Errorf("unknown operation type: %s", operation.OperationType())) @@ -1013,7 +1014,7 @@ func (operation *transactionOperationWrapper) Participants() ([]xdr.AccountId, e // the only direct participant is the source_account case xdr.OperationTypeInvokeHostFunction: // the only direct participant is the source_account - case xdr.OperationTypeBumpFootprintExpiration: + case xdr.OperationTypeExtendFootprintTtl: // the only direct participant is the source_account case xdr.OperationTypeRestoreFootprint: // the only direct participant is the source_account diff --git a/services/horizon/internal/ingest/processors/operations_processor_test.go b/services/horizon/internal/ingest/processors/operations_processor_test.go index 83ef1636a8..4b5fb376cd 100644 --- a/services/horizon/internal/ingest/processors/operations_processor_test.go +++ b/services/horizon/internal/ingest/processors/operations_processor_test.go @@ -209,7 +209,7 @@ func (s *OperationsProcessorTestSuiteLedger) TestOperationTypeInvokeHostFunction }, }, Executable: xdr.ContractExecutable{ - Type: xdr.ContractExecutableTypeContractExecutableToken, + Type: xdr.ContractExecutableTypeContractExecutableStellarAsset, }, }, }, diff --git a/services/horizon/internal/ingest/processors/stats_ledger_transaction_processor.go b/services/horizon/internal/ingest/processors/stats_ledger_transaction_processor.go index 8fa886ab52..83188e02f8 100644 --- a/services/horizon/internal/ingest/processors/stats_ledger_transaction_processor.go +++ b/services/horizon/internal/ingest/processors/stats_ledger_transaction_processor.go @@ -55,7 +55,7 @@ type StatsLedgerTransactionProcessorResults struct { OperationsLiquidityPoolDeposit int64 OperationsLiquidityPoolWithdraw int64 OperationsInvokeHostFunction int64 - OperationsBumpFootprintExpiration int64 + OperationsExtendFootprintTtl int64 OperationsRestoreFootprint int64 } @@ -129,8 +129,8 @@ func (p *StatsLedgerTransactionProcessor) ProcessTransaction(lcm xdr.LedgerClose p.results.OperationsLiquidityPoolWithdraw++ case xdr.OperationTypeInvokeHostFunction: p.results.OperationsInvokeHostFunction++ - case xdr.OperationTypeBumpFootprintExpiration: - p.results.OperationsBumpFootprintExpiration++ + case xdr.OperationTypeExtendFootprintTtl: + p.results.OperationsExtendFootprintTtl++ case xdr.OperationTypeRestoreFootprint: p.results.OperationsRestoreFootprint++ default: diff --git a/services/horizon/internal/ingest/verify.go b/services/horizon/internal/ingest/verify.go index ddacbb43c0..c7d6c8f0d6 100644 --- a/services/horizon/internal/ingest/verify.go +++ b/services/horizon/internal/ingest/verify.go @@ -242,13 +242,13 @@ func (s *system) verifyState(verifyAgainstLatestCheckpoint bool) error { return errors.Wrap(err, "Error running assetStats.AddContractData") } totalByType["contract_data"]++ - case xdr.LedgerEntryTypeExpiration: - // we don't store expiration entries in the db, + case xdr.LedgerEntryTypeTtl: + // we don't store ttl entries in the db, // so there is nothing to verify in that case. if err = verifier.Write(entry); err != nil { return err } - totalByType["expiration"]++ + totalByType["ttl"]++ default: return errors.New("GetLedgerEntries return unexpected type") } @@ -322,7 +322,7 @@ func (s *system) verifyState(verifyAgainstLatestCheckpoint bool) error { err = verifier.Verify( countAccounts + countData + countOffers + countTrustLines + countClaimableBalances + - countLiquidityPools + int(totalByType["contract_data"]) + int(totalByType["expiration"]), + countLiquidityPools + int(totalByType["contract_data"]) + int(totalByType["ttl"]), ) if err != nil { return errors.Wrap(err, "verifier.Verify failed") diff --git a/services/horizon/internal/ingest/verify_test.go b/services/horizon/internal/ingest/verify_test.go index 1fbb6b8f8c..dbff198de4 100644 --- a/services/horizon/internal/ingest/verify_test.go +++ b/services/horizon/internal/ingest/verify_test.go @@ -174,14 +174,14 @@ func genContractCode(tt *test.T, gen randxdr.Generator) xdr.LedgerEntryChange { return change } -func genExpiration(tt *test.T, gen randxdr.Generator) xdr.LedgerEntryChange { +func genTTL(tt *test.T, gen randxdr.Generator) xdr.LedgerEntryChange { change := xdr.LedgerEntryChange{} shape := &gxdr.LedgerEntryChange{} gen.Next( shape, []randxdr.Preset{ {randxdr.FieldEquals("type"), randxdr.SetU32(gxdr.LEDGER_ENTRY_CREATED.GetU32())}, - {randxdr.FieldEquals("created.data.type"), randxdr.SetU32(gxdr.EXPIRATION.GetU32())}, + {randxdr.FieldEquals("created.data.type"), randxdr.SetU32(gxdr.TTL.GetU32())}, }, ) tt.Assert.NoError(gxdr.Convert(shape, &change)) @@ -346,7 +346,7 @@ func TestStateVerifier(t *testing.T) { genAccountData(tt, gen), genContractCode(tt, gen), genConfigSetting(tt, gen), - genExpiration(tt, gen), + genTTL(tt, gen), ) changes = append(changes, genAssetContractMetadata(tt, gen)...) } diff --git a/services/horizon/internal/integration/contracts/Cargo.lock b/services/horizon/internal/integration/contracts/Cargo.lock index ec405876da..417d3ff74f 100644 --- a/services/horizon/internal/integration/contracts/Cargo.lock +++ b/services/horizon/internal/integration/contracts/Cargo.lock @@ -34,9 +34,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "a2e1373abdaa212b704512ec2bd8b26bd0b7d5c3f70117411a5d9a451383c859" dependencies = [ "derive_arbitrary", ] @@ -82,9 +82,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -103,9 +103,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytes-lit" @@ -136,9 +136,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.28" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -181,9 +181,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core", @@ -203,9 +203,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f34ba9a9bcb8645379e9de8cb3ecfcf4d1c85ba66d90deb3259206fa5aa193b" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ "quote", "syn", @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -286,10 +286,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -338,9 +339,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", "signature", @@ -368,9 +369,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct", "crypto-bigint", @@ -409,9 +410,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "fnv" @@ -468,9 +469,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "hex" @@ -532,12 +533,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "serde", ] @@ -596,15 +597,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "log" @@ -614,9 +615,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.2" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "miniz_oxide" @@ -640,9 +641,9 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ "proc-macro2", "quote", @@ -661,18 +662,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -705,6 +706,12 @@ version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -713,9 +720,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", "syn", @@ -723,9 +730,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -816,24 +823,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", @@ -842,9 +849,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -857,11 +864,11 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -882,9 +889,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -913,14 +920,14 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "soroban-env-common" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8c63bff68a15d79aca3a705ee6916a68db57b7e6#8c63bff68a15d79aca3a705ee6916a68db57b7e6" +source = "git+https://github.com/stellar/rs-soroban-env?rev=91f44778389490ad863d61a8a90ac9875ba6d8fd#91f44778389490ad863d61a8a90ac9875ba6d8fd" dependencies = [ "arbitrary", "crate-git-revision", @@ -937,7 +944,7 @@ dependencies = [ [[package]] name = "soroban-env-guest" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8c63bff68a15d79aca3a705ee6916a68db57b7e6#8c63bff68a15d79aca3a705ee6916a68db57b7e6" +source = "git+https://github.com/stellar/rs-soroban-env?rev=91f44778389490ad863d61a8a90ac9875ba6d8fd#91f44778389490ad863d61a8a90ac9875ba6d8fd" dependencies = [ "soroban-env-common", "static_assertions", @@ -946,7 +953,7 @@ dependencies = [ [[package]] name = "soroban-env-host" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8c63bff68a15d79aca3a705ee6916a68db57b7e6#8c63bff68a15d79aca3a705ee6916a68db57b7e6" +source = "git+https://github.com/stellar/rs-soroban-env?rev=91f44778389490ad863d61a8a90ac9875ba6d8fd#91f44778389490ad863d61a8a90ac9875ba6d8fd" dependencies = [ "backtrace", "ed25519-dalek", @@ -969,7 +976,7 @@ dependencies = [ [[package]] name = "soroban-env-macros" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8c63bff68a15d79aca3a705ee6916a68db57b7e6#8c63bff68a15d79aca3a705ee6916a68db57b7e6" +source = "git+https://github.com/stellar/rs-soroban-env?rev=91f44778389490ad863d61a8a90ac9875ba6d8fd#91f44778389490ad863d61a8a90ac9875ba6d8fd" dependencies = [ "itertools", "proc-macro2", @@ -990,7 +997,7 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0992413f9b05e5bfb1f872bce99e89d9129b2e61#0992413f9b05e5bfb1f872bce99e89d9129b2e61" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=729ed3ac5fe8600a3245d5816eadd3c95ab2eb54#729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" dependencies = [ "serde", "serde_json", @@ -1002,7 +1009,7 @@ dependencies = [ [[package]] name = "soroban-native-sdk-macros" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-env?rev=8c63bff68a15d79aca3a705ee6916a68db57b7e6#8c63bff68a15d79aca3a705ee6916a68db57b7e6" +source = "git+https://github.com/stellar/rs-soroban-env?rev=91f44778389490ad863d61a8a90ac9875ba6d8fd#91f44778389490ad863d61a8a90ac9875ba6d8fd" dependencies = [ "itertools", "proc-macro2", @@ -1020,7 +1027,7 @@ dependencies = [ [[package]] name = "soroban-sdk" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0992413f9b05e5bfb1f872bce99e89d9129b2e61#0992413f9b05e5bfb1f872bce99e89d9129b2e61" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=729ed3ac5fe8600a3245d5816eadd3c95ab2eb54#729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" dependencies = [ "arbitrary", "bytes-lit", @@ -1037,7 +1044,7 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0992413f9b05e5bfb1f872bce99e89d9129b2e61#0992413f9b05e5bfb1f872bce99e89d9129b2e61" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=729ed3ac5fe8600a3245d5816eadd3c95ab2eb54#729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" dependencies = [ "crate-git-revision", "darling", @@ -1056,7 +1063,7 @@ dependencies = [ [[package]] name = "soroban-spec" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0992413f9b05e5bfb1f872bce99e89d9129b2e61#0992413f9b05e5bfb1f872bce99e89d9129b2e61" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=729ed3ac5fe8600a3245d5816eadd3c95ab2eb54#729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" dependencies = [ "base64 0.13.1", "stellar-xdr", @@ -1067,7 +1074,7 @@ dependencies = [ [[package]] name = "soroban-spec-rust" version = "20.0.0-rc2" -source = "git+https://github.com/stellar/rs-soroban-sdk?rev=0992413f9b05e5bfb1f872bce99e89d9129b2e61#0992413f9b05e5bfb1f872bce99e89d9129b2e61" +source = "git+https://github.com/stellar/rs-soroban-sdk?rev=729ed3ac5fe8600a3245d5816eadd3c95ab2eb54#729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" dependencies = [ "prettyplease", "proc-macro2", @@ -1132,7 +1139,7 @@ dependencies = [ [[package]] name = "stellar-xdr" version = "20.0.0-rc1" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=d5ce0c9e7aa83461773a6e81662067f35d39e4c1#d5ce0c9e7aa83461773a6e81662067f35d39e4c1" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=9c97e4fa909a0b6455547a4f4a95800696b2a69a#9c97e4fa909a0b6455547a4f4a95800696b2a69a" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1156,9 +1163,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.29" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -1167,18 +1174,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", @@ -1187,12 +1194,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -1200,30 +1208,30 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" diff --git a/services/horizon/internal/integration/contracts/Cargo.toml b/services/horizon/internal/integration/contracts/Cargo.toml index 1c65ebeb4d..f7e3b81aed 100644 --- a/services/horizon/internal/integration/contracts/Cargo.toml +++ b/services/horizon/internal/integration/contracts/Cargo.toml @@ -24,4 +24,4 @@ lto = true [workspace.dependencies.soroban-sdk] version = "20.0.0-rc2" git = "https://github.com/stellar/rs-soroban-sdk" -rev = "0992413f9b05e5bfb1f872bce99e89d9129b2e61" +rev = "729ed3ac5fe8600a3245d5816eadd3c95ab2eb54" diff --git a/services/horizon/internal/integration/db_test.go b/services/horizon/internal/integration/db_test.go index 2d48e1deb8..f54ae04568 100644 --- a/services/horizon/internal/integration/db_test.go +++ b/services/horizon/internal/integration/db_test.go @@ -167,18 +167,18 @@ func submitSorobanOps(itest *integration.Test, tt *assert.Assertions) (submitted installContractOp := assembleInstallContractCodeOp(itest.CurrentTest(), itest.Master().Address(), add_u64_contract) itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), installContractOp) - bumpFootprintExpirationOp := &txnbuild.BumpFootprintExpiration{ - LedgersToExpire: 100, - SourceAccount: itest.Master().Address(), + extendFootprintTtlOp := &txnbuild.ExtendFootprintTtl{ + ExtendTo: 100, + SourceAccount: itest.Master().Address(), } - itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), bumpFootprintExpirationOp) + itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), extendFootprintTtlOp) restoreFootprintOp := &txnbuild.RestoreFootprint{ SourceAccount: itest.Master().Address(), } txResp := itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), restoreFootprintOp) - return []txnbuild.Operation{installContractOp, bumpFootprintExpirationOp, restoreFootprintOp}, txResp.Ledger + return []txnbuild.Operation{installContractOp, extendFootprintTtlOp, restoreFootprintOp}, txResp.Ledger } func submitSponsorshipOps(itest *integration.Test, tt *assert.Assertions) (submittedOperations []txnbuild.Operation, lastLedger int32) { @@ -441,7 +441,7 @@ func initializeDBIntegrationTest(t *testing.T) (*integration.Test, int32) { submitters = append(submitters, submitSorobanOps) } else { delete(allOpTypes, xdr.OperationTypeInvokeHostFunction) - delete(allOpTypes, xdr.OperationTypeBumpFootprintExpiration) + delete(allOpTypes, xdr.OperationTypeExtendFootprintTtl) delete(allOpTypes, xdr.OperationTypeRestoreFootprint) } diff --git a/services/horizon/internal/integration/bump_footprint_expiration_test.go b/services/horizon/internal/integration/extend_footprint_ttl_test.go similarity index 82% rename from services/horizon/internal/integration/bump_footprint_expiration_test.go rename to services/horizon/internal/integration/extend_footprint_ttl_test.go index 314dc26d40..a9de3b5f69 100644 --- a/services/horizon/internal/integration/bump_footprint_expiration_test.go +++ b/services/horizon/internal/integration/extend_footprint_ttl_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestBumpFootPrintExpiration(t *testing.T) { +func TestExtendFootprintTtl(t *testing.T) { if integration.GetCoreMaxSupportedProtocol() < 20 { t.Skip("This test run does not support less than Protocol 20") } @@ -30,7 +30,7 @@ func TestBumpFootPrintExpiration(t *testing.T) { installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), add_u64_contract) preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - tx := itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx := itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) _, err = itest.Client().TransactionDetail(tx.Hash) require.NoError(t, err) @@ -40,29 +40,30 @@ func TestBumpFootPrintExpiration(t *testing.T) { }) require.NoError(t, err) - bumpFootPrint := txnbuild.BumpFootprintExpiration{ - LedgersToExpire: 10000, - SourceAccount: "", + bumpFootPrint := txnbuild.ExtendFootprintTtl{ + ExtendTo: 10000, + SourceAccount: "", Ext: xdr.TransactionExt{ V: 1, SorobanData: &xdr.SorobanTransactionData{ + Ext: xdr.ExtensionPoint{}, Resources: xdr.SorobanResources{ Footprint: xdr.LedgerFootprint{ ReadOnly: preFlightOp.Ext.SorobanData.Resources.Footprint.ReadWrite, ReadWrite: nil, }, }, - RefundableFee: 0, + ResourceFee: 0, }, }, } bumpFootPrint, minFee = itest.PreflightBumpFootprintExpiration(&sourceAccount, bumpFootPrint) - tx = itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &bumpFootPrint) + tx = itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &bumpFootPrint) ops, err := itest.Client().Operations(horizonclient.OperationRequest{ForTransaction: tx.Hash}) require.NoError(t, err) require.Len(t, ops.Embedded.Records, 1) - op := ops.Embedded.Records[0].(operations.BumpFootprintExpiration) - require.Equal(t, uint32(10000), op.LedgersToExpire) + op := ops.Embedded.Records[0].(operations.ExtendFootprintTtl) + require.Equal(t, uint32(10000), op.ExtendTo) } diff --git a/services/horizon/internal/integration/invokehostfunction_test.go b/services/horizon/internal/integration/invokehostfunction_test.go index 54fd2fba1f..275f0de23b 100644 --- a/services/horizon/internal/integration/invokehostfunction_test.go +++ b/services/horizon/internal/integration/invokehostfunction_test.go @@ -42,7 +42,7 @@ func TestContractInvokeHostFunctionInstallContract(t *testing.T) { installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), add_u64_contract) preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - tx := itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx := itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) clientTx, err := itest.Client().TransactionDetail(tx.Hash) require.NoError(t, err) @@ -93,12 +93,12 @@ func TestContractInvokeHostFunctionCreateContractByAddress(t *testing.T) { // Install the contract installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), add_u64_contract) preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) // Create the contract createContractOp := assembleCreateContractOp(t, itest.Master().Address(), add_u64_contract, "a1", itest.GetPassPhrase()) preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *createContractOp) - tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) clientTx, err := itest.Client().TransactionDetail(tx.Hash) @@ -147,12 +147,12 @@ func TestContractInvokeHostFunctionInvokeStatelessContractFn(t *testing.T) { // Install the contract installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), add_u64_contract) preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) // Create the contract createContractOp := assembleCreateContractOp(t, itest.Master().Address(), add_u64_contract, "a1", itest.GetPassPhrase()) preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *createContractOp) - tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) // contract has been deployed, now invoke a simple 'add' fn on the contract @@ -191,7 +191,7 @@ func TestContractInvokeHostFunctionInvokeStatelessContractFn(t *testing.T) { } preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *invokeHostFunctionOp) - tx, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) clientTx, err := itest.Client().TransactionDetail(tx.Hash) @@ -257,13 +257,13 @@ func TestContractInvokeHostFunctionInvokeStatefulContractFn(t *testing.T) { installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), increment_contract) preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + itest.MustSubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) // Create the contract createContractOp := assembleCreateContractOp(t, itest.Master().Address(), increment_contract, "a1", itest.GetPassPhrase()) preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *createContractOp) - tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) // contract has been deployed, now invoke a simple 'add' fn on the contract @@ -287,7 +287,7 @@ func TestContractInvokeHostFunctionInvokeStatefulContractFn(t *testing.T) { } preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *invokeHostFunctionOp) - tx, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) clientTx, err := itest.Client().TransactionDetail(tx.Hash) diff --git a/services/horizon/internal/integration/sac_test.go b/services/horizon/internal/integration/sac_test.go index 18a167969a..06bca5a86d 100644 --- a/services/horizon/internal/integration/sac_test.go +++ b/services/horizon/internal/integration/sac_test.go @@ -894,7 +894,7 @@ func createSAC(itest *integration.Test, sourceAccount string, asset xdr.Asset) * FromAsset: &asset, }, Executable: xdr.ContractExecutable{ - Type: xdr.ContractExecutableTypeContractExecutableToken, + Type: xdr.ContractExecutableTypeContractExecutableStellarAsset, WasmHash: nil, }, }, diff --git a/services/horizon/internal/integration/testdata/soroban_add_u64.wasm b/services/horizon/internal/integration/testdata/soroban_add_u64.wasm index d8707674daa77dd316b9e6e83461a27278c61213..9aac34ea654e19ee731b56ced4e60fd08bd60c89 100755 GIT binary patch delta 69 zcmey)@||VFG{(u=Og@vRGRiZ$Oy0_s Zim8R6S!!ZRigB`~X=0L5YLcl50{{U~6o>!- delta 95 zcmey)@||VFG)8$j!Q}kBlA^@qlGMDi+|-i9G6Mz(5CKw_lbM(_7>y=tGbw8tSXvsH t7#gQpCK;HfnkJ15Fi4iTqa*;)L=B8{D)Cl u)7;21HN`kF*)%QH!py)R(b&kuG{w}y&@44ECB-<|(ljy2C^gB{gaH6beHz37 delta 69 zcmdnXx|ems7RJe%Omd8tlRcO;7>yMehnqr)o mY?_v8VP;^EXl!I+nqq2UXqK9ol46`}X_}a1l$vB}!T3C-bvwFd9v^U{}^Ou(UKXF*HuIOfoP{ mHBCxOGEB2DH%dxQwX{sNuuQQuG_p)GN;NZN*!+@}jS&EfI2FPG diff --git a/services/horizon/internal/integration/txsub_test.go b/services/horizon/internal/integration/txsub_test.go index 90266768ee..2f6b98e905 100644 --- a/services/horizon/internal/integration/txsub_test.go +++ b/services/horizon/internal/integration/txsub_test.go @@ -75,7 +75,7 @@ func TestTxSubLimitsBodySize(t *testing.T) { installContractOp := assembleInstallContractCodeOp(t, itest.Master().Address(), "soroban_sac_test.wasm") preFlightOp, minFee := itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - _, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + _, err = itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) assert.EqualError( t, err, "horizon error: \"Transaction Malformed\" - check horizon.Error.Problem for more information", @@ -88,7 +88,7 @@ func TestTxSubLimitsBodySize(t *testing.T) { installContractOp = assembleInstallContractCodeOp(t, itest.Master().Address(), "soroban_add_u64.wasm") preFlightOp, minFee = itest.PreflightHostFunctions(&sourceAccount, *installContractOp) - tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee, &preFlightOp) + tx, err := itest.SubmitOperationsWithFee(&sourceAccount, itest.Master(), minFee+txnbuild.MinBaseFee, &preFlightOp) require.NoError(t, err) require.True(t, tx.Successful) } diff --git a/services/horizon/internal/resourceadapter/operations.go b/services/horizon/internal/resourceadapter/operations.go index fdd083782c..2f995fb395 100644 --- a/services/horizon/internal/resourceadapter/operations.go +++ b/services/horizon/internal/resourceadapter/operations.go @@ -150,8 +150,8 @@ func NewOperation( e := operations.InvokeHostFunction{Base: base} err = operationRow.UnmarshalDetails(&e) result = e - case xdr.OperationTypeBumpFootprintExpiration: - e := operations.BumpFootprintExpiration{Base: base} + case xdr.OperationTypeExtendFootprintTtl: + e := operations.ExtendFootprintTtl{Base: base} err = operationRow.UnmarshalDetails(&e) result = e case xdr.OperationTypeRestoreFootprint: diff --git a/services/horizon/internal/test/integration/integration.go b/services/horizon/internal/test/integration/integration.go index 9ef5798487..7c06a187dd 100644 --- a/services/horizon/internal/test/integration/integration.go +++ b/services/horizon/internal/test/integration/integration.go @@ -701,8 +701,8 @@ func (i *Test) syncWithSorobanRPC(ledgerToWaitFor uint32) { } func (i *Test) PreflightBumpFootprintExpiration( - sourceAccount txnbuild.Account, bumpFootprint txnbuild.BumpFootprintExpiration, -) (txnbuild.BumpFootprintExpiration, int64) { + sourceAccount txnbuild.Account, bumpFootprint txnbuild.ExtendFootprintTtl, +) (txnbuild.ExtendFootprintTtl, int64) { result, transactionData := i.simulateTransaction(sourceAccount, &bumpFootprint) bumpFootprint.Ext = xdr.TransactionExt{ V: 1, diff --git a/txnbuild/bump_footprint_expiration.go b/txnbuild/bump_footprint_expiration.go deleted file mode 100644 index 169c3068af..0000000000 --- a/txnbuild/bump_footprint_expiration.go +++ /dev/null @@ -1,59 +0,0 @@ -package txnbuild - -import ( - "github.com/stellar/go/support/errors" - "github.com/stellar/go/xdr" -) - -type BumpFootprintExpiration struct { - LedgersToExpire uint32 - SourceAccount string - Ext xdr.TransactionExt -} - -func (f *BumpFootprintExpiration) BuildXDR() (xdr.Operation, error) { - xdrOp := xdr.BumpFootprintExpirationOp{ - Ext: xdr.ExtensionPoint{ - V: 0, - }, - LedgersToExpire: xdr.Uint32(f.LedgersToExpire), - } - - body, err := xdr.NewOperationBody(xdr.OperationTypeBumpFootprintExpiration, xdrOp) - if err != nil { - return xdr.Operation{}, errors.Wrap(err, "failed to build XDR Operation") - } - - op := xdr.Operation{Body: body} - - SetOpSourceAccount(&op, f.SourceAccount) - return op, nil -} - -func (f *BumpFootprintExpiration) FromXDR(xdrOp xdr.Operation) error { - result, ok := xdrOp.Body.GetBumpFootprintExpirationOp() - if !ok { - return errors.New("error parsing invoke host function operation from xdr") - } - f.SourceAccount = accountFromXDR(xdrOp.SourceAccount) - f.LedgersToExpire = uint32(result.LedgersToExpire) - return nil -} - -func (f *BumpFootprintExpiration) Validate() error { - if f.SourceAccount != "" { - _, err := xdr.AddressToMuxedAccount(f.SourceAccount) - if err != nil { - return NewValidationError("SourceAccount", err.Error()) - } - } - return nil -} - -func (f *BumpFootprintExpiration) GetSourceAccount() string { - return f.SourceAccount -} - -func (f *BumpFootprintExpiration) BuildTransactionExt() (xdr.TransactionExt, error) { - return f.Ext, nil -} diff --git a/txnbuild/extend_footprint_ttl.go b/txnbuild/extend_footprint_ttl.go new file mode 100644 index 0000000000..f28dee6e15 --- /dev/null +++ b/txnbuild/extend_footprint_ttl.go @@ -0,0 +1,59 @@ +package txnbuild + +import ( + "github.com/stellar/go/support/errors" + "github.com/stellar/go/xdr" +) + +type ExtendFootprintTtl struct { + ExtendTo uint32 + SourceAccount string + Ext xdr.TransactionExt +} + +func (f *ExtendFootprintTtl) BuildXDR() (xdr.Operation, error) { + xdrOp := xdr.ExtendFootprintTtlOp{ + Ext: xdr.ExtensionPoint{ + V: 0, + }, + ExtendTo: xdr.Uint32(f.ExtendTo), + } + + body, err := xdr.NewOperationBody(xdr.OperationTypeExtendFootprintTtl, xdrOp) + if err != nil { + return xdr.Operation{}, errors.Wrap(err, "failed to build XDR Operation") + } + + op := xdr.Operation{Body: body} + + SetOpSourceAccount(&op, f.SourceAccount) + return op, nil +} + +func (f *ExtendFootprintTtl) FromXDR(xdrOp xdr.Operation) error { + result, ok := xdrOp.Body.GetExtendFootprintTtlOp() + if !ok { + return errors.New("error parsing invoke host function operation from xdr") + } + f.SourceAccount = accountFromXDR(xdrOp.SourceAccount) + f.ExtendTo = uint32(result.ExtendTo) + return nil +} + +func (f *ExtendFootprintTtl) Validate() error { + if f.SourceAccount != "" { + _, err := xdr.AddressToMuxedAccount(f.SourceAccount) + if err != nil { + return NewValidationError("SourceAccount", err.Error()) + } + } + return nil +} + +func (f *ExtendFootprintTtl) GetSourceAccount() string { + return f.SourceAccount +} + +func (f *ExtendFootprintTtl) BuildTransactionExt() (xdr.TransactionExt, error) { + return f.Ext, nil +} diff --git a/txnbuild/invoke_host_function_test.go b/txnbuild/invoke_host_function_test.go index 25c6d177ea..8fd5e6e48e 100644 --- a/txnbuild/invoke_host_function_test.go +++ b/txnbuild/invoke_host_function_test.go @@ -143,7 +143,7 @@ func TestInvokeHostFunctionRoundTrip(t *testing.T) { ReadBytes: 0, WriteBytes: 0, }, - RefundableFee: 1, + ResourceFee: 1, Ext: xdr.ExtensionPoint{ V: 0, }, diff --git a/txnbuild/operation.go b/txnbuild/operation.go index 8182ada8a8..a436271592 100644 --- a/txnbuild/operation.go +++ b/txnbuild/operation.go @@ -78,8 +78,8 @@ func operationFromXDR(xdrOp xdr.Operation) (Operation, error) { newOp = &LiquidityPoolWithdraw{} case xdr.OperationTypeInvokeHostFunction: newOp = &InvokeHostFunction{} - case xdr.OperationTypeBumpFootprintExpiration: - newOp = &BumpFootprintExpiration{} + case xdr.OperationTypeExtendFootprintTtl: + newOp = &ExtendFootprintTtl{} case xdr.OperationTypeRestoreFootprint: newOp = &RestoreFootprint{} default: diff --git a/xdr/Stellar-contract-config-setting.x b/xdr/Stellar-contract-config-setting.x index 9512f0c4d6..b187a18c5a 100644 --- a/xdr/Stellar-contract-config-setting.x +++ b/xdr/Stellar-contract-config-setting.x @@ -92,64 +92,54 @@ struct ConfigSettingContractBandwidthV0 enum ContractCostType { // Cost of running 1 wasm instruction WasmInsnExec = 0, - // Cost of growing wasm linear memory by 1 page - WasmMemAlloc = 1, - // Cost of allocating a chuck of host memory (in bytes) - HostMemAlloc = 2, - // Cost of copying a chuck of bytes into a pre-allocated host memory - HostMemCpy = 3, - // Cost of comparing two slices of host memory - HostMemCmp = 4, + // Cost of allocating a slice of memory (in bytes) + MemAlloc = 1, + // Cost of copying a slice of bytes into a pre-allocated memory + MemCpy = 2, + // Cost of comparing two slices of memory + MemCmp = 3, // Cost of a host function dispatch, not including the actual work done by // the function nor the cost of VM invocation machinary - DispatchHostFunction = 5, + DispatchHostFunction = 4, // Cost of visiting a host object from the host object storage. Exists to // make sure some baseline cost coverage, i.e. repeatly visiting objects // by the guest will always incur some charges. - VisitObject = 6, + VisitObject = 5, // Cost of serializing an xdr object to bytes - ValSer = 7, + ValSer = 6, // Cost of deserializing an xdr object from bytes - ValDeser = 8, + ValDeser = 7, // Cost of computing the sha256 hash from bytes - ComputeSha256Hash = 9, + ComputeSha256Hash = 8, // Cost of computing the ed25519 pubkey from bytes - ComputeEd25519PubKey = 10, - // Cost of accessing an entry in a Map. - MapEntry = 11, - // Cost of accessing an entry in a Vec - VecEntry = 12, + ComputeEd25519PubKey = 9, // Cost of verifying ed25519 signature of a payload. - VerifyEd25519Sig = 13, - // Cost of reading a slice of vm linear memory - VmMemRead = 14, - // Cost of writing to a slice of vm linear memory - VmMemWrite = 15, + VerifyEd25519Sig = 10, // Cost of instantiation a VM from wasm bytes code. - VmInstantiation = 16, + VmInstantiation = 11, // Cost of instantiation a VM from a cached state. - VmCachedInstantiation = 17, + VmCachedInstantiation = 12, // Cost of invoking a function on the VM. If the function is a host function, // additional cost will be covered by `DispatchHostFunction`. - InvokeVmFunction = 18, + InvokeVmFunction = 13, // Cost of computing a keccak256 hash from bytes. - ComputeKeccak256Hash = 19, - // Cost of computing an ECDSA secp256k1 pubkey from bytes. - ComputeEcdsaSecp256k1Key = 20, + ComputeKeccak256Hash = 14, // Cost of computing an ECDSA secp256k1 signature from bytes. - ComputeEcdsaSecp256k1Sig = 21, + ComputeEcdsaSecp256k1Sig = 15, // Cost of recovering an ECDSA secp256k1 key from a signature. - RecoverEcdsaSecp256k1Key = 22, + RecoverEcdsaSecp256k1Key = 16, // Cost of int256 addition (`+`) and subtraction (`-`) operations - Int256AddSub = 23, + Int256AddSub = 17, // Cost of int256 multiplication (`*`) operation - Int256Mul = 24, + Int256Mul = 18, // Cost of int256 division (`/`) operation - Int256Div = 25, + Int256Div = 19, // Cost of int256 power (`exp`) operation - Int256Pow = 26, + Int256Pow = 20, // Cost of int256 shift (`shl`, `shr`) operation - Int256Shift = 27 + Int256Shift = 21, + // Cost of drawing random bytes using a ChaCha20 PRNG + ChaCha20DrawBytes = 22 }; struct ContractCostParamEntry { @@ -160,17 +150,17 @@ struct ContractCostParamEntry { int64 linearTerm; }; -struct StateExpirationSettings { - uint32 maxEntryExpiration; - uint32 minTempEntryExpiration; - uint32 minPersistentEntryExpiration; +struct StateArchivalSettings { + uint32 maxEntryTTL; + uint32 minTemporaryTTL; + uint32 minPersistentTTL; // rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator; - // max number of entries that emit expiration meta in a single ledger - uint32 maxEntriesToExpire; + // max number of entries that emit archival meta in a single ledger + uint32 maxEntriesToArchive; // Number of snapshots to use when calculating average BucketList size uint32 bucketListSizeWindowSampleSize; @@ -206,7 +196,7 @@ enum ConfigSettingID CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, - CONFIG_SETTING_STATE_EXPIRATION = 10, + CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13 @@ -234,8 +224,8 @@ case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; -case CONFIG_SETTING_STATE_EXPIRATION: - StateExpirationSettings stateExpirationSettings; +case CONFIG_SETTING_STATE_ARCHIVAL: + StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: diff --git a/xdr/Stellar-contract.x b/xdr/Stellar-contract.x index 7c7469c7e8..511300562e 100644 --- a/xdr/Stellar-contract.x +++ b/xdr/Stellar-contract.x @@ -165,14 +165,14 @@ struct Int256Parts { enum ContractExecutableType { CONTRACT_EXECUTABLE_WASM = 0, - CONTRACT_EXECUTABLE_TOKEN = 1 + CONTRACT_EXECUTABLE_STELLAR_ASSET = 1 }; union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; -case CONTRACT_EXECUTABLE_TOKEN: +case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; diff --git a/xdr/Stellar-internal.x b/xdr/Stellar-internal.x index 73684db7ac..02f1b81e8e 100644 --- a/xdr/Stellar-internal.x +++ b/xdr/Stellar-internal.x @@ -17,6 +17,13 @@ case 1: GeneralizedTransactionSet generalizedTxSet; }; +struct StoredDebugTransactionSet +{ + StoredTransactionSet txSet; + uint32 ledgerSeq; + StellarValue scpValue; +}; + struct PersistedSCPStateV0 { SCPEnvelope scpEnvelopes<>; diff --git a/xdr/Stellar-ledger-entries.x b/xdr/Stellar-ledger-entries.x index f066484001..8a8784e2bb 100644 --- a/xdr/Stellar-ledger-entries.x +++ b/xdr/Stellar-ledger-entries.x @@ -101,7 +101,7 @@ enum LedgerEntryType CONTRACT_DATA = 6, CONTRACT_CODE = 7, CONFIG_SETTING = 8, - EXPIRATION = 9 + TTL = 9 }; struct Signer @@ -515,10 +515,10 @@ struct ContractCodeEntry { opaque code<>; }; -struct ExpirationEntry { - // Hash of the LedgerKey that is associated with this ExpirationEntry +struct TTLEntry { + // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; - uint32 expirationLedgerSeq; + uint32 liveUntilLedgerSeq; }; struct LedgerEntryExtensionV1 @@ -557,8 +557,8 @@ struct LedgerEntry ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; - case EXPIRATION: - ExpirationEntry expiration; + case TTL: + TTLEntry ttl; } data; @@ -630,12 +630,12 @@ case CONFIG_SETTING: { ConfigSettingID configSettingID; } configSetting; -case EXPIRATION: +case TTL: struct { - // Hash of the LedgerKey that is associated with this ExpirationEntry + // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; - } expiration; + } ttl; }; // list of all envelope types used in the application diff --git a/xdr/Stellar-ledger.x b/xdr/Stellar-ledger.x index a1bbac4b64..b18a3a0d57 100644 --- a/xdr/Stellar-ledger.x +++ b/xdr/Stellar-ledger.x @@ -486,26 +486,8 @@ struct LedgerCloseMetaV0 struct LedgerCloseMetaV1 { - LedgerHeaderHistoryEntry ledgerHeader; - - GeneralizedTransactionSet txSet; - - // NB: transactions are sorted in apply order here - // fees for all transactions are processed first - // followed by applying transactions - TransactionResultMeta txProcessing<>; - - // upgrades are applied last - UpgradeEntryMeta upgradesProcessing<>; - - // other misc information attached to the ledger close - SCPHistoryEntry scpInfo<>; -}; - -struct LedgerCloseMetaV2 -{ - // We forgot to add an ExtensionPoint in v1 but at least - // we can add one now in v2. + // We forgot to add an ExtensionPoint in v0 but at least + // we can add one now in v1. ExtensionPoint ext; LedgerHeaderHistoryEntry ledgerHeader; @@ -527,10 +509,10 @@ struct LedgerCloseMetaV2 // systems calculating storage fees correctly. uint64 totalByteSizeOfBucketList; - // Expired temp keys that are being evicted at this ledger. + // Temp keys that are being evicted at this ledger. LedgerKey evictedTemporaryLedgerKeys<>; - // Expired restorable ledger entries that are being + // Archived restorable ledger entries that are being // evicted at this ledger. LedgerEntry evictedPersistentLedgerEntries<>; }; @@ -541,7 +523,5 @@ case 0: LedgerCloseMetaV0 v0; case 1: LedgerCloseMetaV1 v1; -case 2: - LedgerCloseMetaV2 v2; }; } diff --git a/xdr/Stellar-transaction.x b/xdr/Stellar-transaction.x index 2e3c22b318..c7f0f5e276 100644 --- a/xdr/Stellar-transaction.x +++ b/xdr/Stellar-transaction.x @@ -63,7 +63,7 @@ enum OperationType LIQUIDITY_POOL_DEPOSIT = 22, LIQUIDITY_POOL_WITHDRAW = 23, INVOKE_HOST_FUNCTION = 24, - BUMP_FOOTPRINT_EXPIRATION = 25, + EXTEND_FOOTPRINT_TTL = 25, RESTORE_FOOTPRINT = 26 }; @@ -585,19 +585,19 @@ struct InvokeHostFunctionOp SorobanAuthorizationEntry auth<>; }; -/* Bump the expiration ledger of the entries specified in the readOnly footprint - so they'll expire at least ledgersToExpire ledgers from lcl. +/* Extend the TTL of the entries specified in the readOnly footprint + so they will live at least extendTo ledgers from lcl. Threshold: med - Result: BumpFootprintExpirationResult + Result: ExtendFootprintTTLResult */ -struct BumpFootprintExpirationOp +struct ExtendFootprintTTLOp { ExtensionPoint ext; - uint32 ledgersToExpire; + uint32 extendTo; }; -/* Restore the expired or evicted entries specified in the readWrite footprint. +/* Restore the archived entries specified in the readWrite footprint. Threshold: med Result: RestoreFootprintOp @@ -667,8 +667,8 @@ struct Operation LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; - case BUMP_FOOTPRINT_EXPIRATION: - BumpFootprintExpirationOp bumpFootprintExpirationOp; + case EXTEND_FOOTPRINT_TTL: + ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } @@ -821,8 +821,16 @@ struct SorobanTransactionData { ExtensionPoint ext; SorobanResources resources; - // Portion of transaction `fee` allocated to refundable fees. - int64 refundableFee; + // Amount of the transaction `fee` allocated to the Soroban resource fees. + // The fraction of `resourceFee` corresponding to `resources` specified + // above is *not* refundable (i.e. fees for instructions, ledger I/O), as + // well as fees for the transaction size. + // The remaining part of the fee is refundable and the charged value is + // based on the actual consumption of refundable resources (events, ledger + // rent bumps). + // The `inclusionFee` used for prioritization of the transaction is defined + // as `tx.fee - resourceFee`. + int64 resourceFee; }; // TransactionV0 is a transaction with the AccountID discriminant stripped off, @@ -1789,7 +1797,7 @@ enum InvokeHostFunctionResultCode INVOKE_HOST_FUNCTION_MALFORMED = -1, INVOKE_HOST_FUNCTION_TRAPPED = -2, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3, - INVOKE_HOST_FUNCTION_ENTRY_EXPIRED = -4, + INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED = -4, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5 }; @@ -1800,29 +1808,29 @@ case INVOKE_HOST_FUNCTION_SUCCESS: case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: -case INVOKE_HOST_FUNCTION_ENTRY_EXPIRED: +case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; -enum BumpFootprintExpirationResultCode +enum ExtendFootprintTTLResultCode { // codes considered as "success" for the operation - BUMP_FOOTPRINT_EXPIRATION_SUCCESS = 0, + EXTEND_FOOTPRINT_TTL_SUCCESS = 0, // codes considered as "failure" for the operation - BUMP_FOOTPRINT_EXPIRATION_MALFORMED = -1, - BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED = -2, - BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE = -3 + EXTEND_FOOTPRINT_TTL_MALFORMED = -1, + EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED = -2, + EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE = -3 }; -union BumpFootprintExpirationResult switch (BumpFootprintExpirationResultCode code) +union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { -case BUMP_FOOTPRINT_EXPIRATION_SUCCESS: +case EXTEND_FOOTPRINT_TTL_SUCCESS: void; -case BUMP_FOOTPRINT_EXPIRATION_MALFORMED: -case BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED: -case BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: +case EXTEND_FOOTPRINT_TTL_MALFORMED: +case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: +case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; @@ -1915,8 +1923,8 @@ case opINNER: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; - case BUMP_FOOTPRINT_EXPIRATION: - BumpFootprintExpirationResult bumpFootprintExpirationResult; + case EXTEND_FOOTPRINT_TTL: + ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } diff --git a/xdr/ledger_close_meta.go b/xdr/ledger_close_meta.go index c2b352b613..2290f3bee1 100644 --- a/xdr/ledger_close_meta.go +++ b/xdr/ledger_close_meta.go @@ -10,8 +10,6 @@ func (l LedgerCloseMeta) LedgerHeaderHistoryEntry() LedgerHeaderHistoryEntry { return l.MustV0().LedgerHeader case 1: return l.MustV1().LedgerHeader - case 2: - return l.MustV2().LedgerHeader default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -43,8 +41,7 @@ func (l LedgerCloseMeta) CountTransactions() int { return len(l.MustV0().TxProcessing) case 1: return len(l.MustV1().TxProcessing) - case 2: - return len(l.MustV2().TxProcessing) + default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -54,15 +51,9 @@ func (l LedgerCloseMeta) TransactionEnvelopes() []TransactionEnvelope { switch l.V { case 0: return l.MustV0().TxSet.Txs - case 1, 2: + case 1: var envelopes = make([]TransactionEnvelope, 0, l.CountTransactions()) - var phases []TransactionPhase - if l.V == 1 { - phases = l.MustV1().TxSet.V1TxSet.Phases - } else { - phases = l.MustV2().TxSet.V1TxSet.Phases - } - for _, phase := range phases { + for _, phase := range l.MustV1().TxSet.V1TxSet.Phases { for _, component := range *phase.V0Components { envelopes = append(envelopes, component.TxsMaybeDiscountedFee.Txs...) } @@ -80,8 +71,6 @@ func (l LedgerCloseMeta) TransactionHash(i int) Hash { return l.MustV0().TxProcessing[i].Result.TransactionHash case 1: return l.MustV1().TxProcessing[i].Result.TransactionHash - case 2: - return l.MustV2().TxProcessing[i].Result.TransactionHash default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -94,8 +83,6 @@ func (l LedgerCloseMeta) TransactionResultPair(i int) TransactionResultPair { return l.MustV0().TxProcessing[i].Result case 1: return l.MustV1().TxProcessing[i].Result - case 2: - return l.MustV2().TxProcessing[i].Result default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -108,8 +95,6 @@ func (l LedgerCloseMeta) FeeProcessing(i int) LedgerEntryChanges { return l.MustV0().TxProcessing[i].FeeProcessing case 1: return l.MustV1().TxProcessing[i].FeeProcessing - case 2: - return l.MustV2().TxProcessing[i].FeeProcessing default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -121,12 +106,10 @@ func (l LedgerCloseMeta) TxApplyProcessing(i int) TransactionMeta { case 0: return l.MustV0().TxProcessing[i].TxApplyProcessing case 1: - return l.MustV1().TxProcessing[i].TxApplyProcessing - case 2: - if l.MustV2().TxProcessing[i].TxApplyProcessing.V != 3 { - panic("TransactionResult unavailable because LedgerCloseMeta.V = 2 and TransactionMeta.V != 3") + if l.MustV1().TxProcessing[i].TxApplyProcessing.V != 3 { + panic("TransactionResult unavailable because LedgerCloseMeta.V = 1 and TransactionMeta.V != 3") } - return l.MustV2().TxProcessing[i].TxApplyProcessing + return l.MustV1().TxProcessing[i].TxApplyProcessing default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -139,8 +122,6 @@ func (l LedgerCloseMeta) UpgradesProcessing() []UpgradeEntryMeta { return l.MustV0().UpgradesProcessing case 1: return l.MustV1().UpgradesProcessing - case 2: - return l.MustV2().UpgradesProcessing default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -150,10 +131,10 @@ func (l LedgerCloseMeta) UpgradesProcessing() []UpgradeEntryMeta { // temporary ledger entries that have been evicted in this ledger. func (l LedgerCloseMeta) EvictedTemporaryLedgerKeys() ([]LedgerKey, error) { switch l.V { - case 0, 1: + case 0: return nil, nil - case 2: - return l.MustV2().EvictedTemporaryLedgerKeys, nil + case 1: + return l.MustV1().EvictedTemporaryLedgerKeys, nil default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } @@ -163,10 +144,10 @@ func (l LedgerCloseMeta) EvictedTemporaryLedgerKeys() ([]LedgerKey, error) { // which have been evicted in this ledger. func (l LedgerCloseMeta) EvictedPersistentLedgerEntries() ([]LedgerEntry, error) { switch l.V { - case 0, 1: + case 0: return nil, nil - case 2: - return l.MustV2().EvictedPersistentLedgerEntries, nil + case 1: + return l.MustV1().EvictedPersistentLedgerEntries, nil default: panic(fmt.Sprintf("Unsupported LedgerCloseMeta.V: %d", l.V)) } diff --git a/xdr/ledger_entry.go b/xdr/ledger_entry.go index 8df379bffe..c04defb693 100644 --- a/xdr/ledger_entry.go +++ b/xdr/ledger_entry.go @@ -173,8 +173,8 @@ func (data *LedgerEntryData) LedgerKey() (LedgerKey, error) { if err := key.SetConfigSetting(data.ConfigSetting.ConfigSettingId); err != nil { return key, err } - case LedgerEntryTypeExpiration: - if err := key.SetExpiration(data.Expiration.KeyHash); err != nil { + case LedgerEntryTypeTtl: + if err := key.SetTtl(data.Ttl.KeyHash); err != nil { return key, err } default: diff --git a/xdr/ledger_key.go b/xdr/ledger_key.go index df4d01e9fc..88ba800cf2 100644 --- a/xdr/ledger_key.go +++ b/xdr/ledger_key.go @@ -53,9 +53,9 @@ func (key *LedgerKey) Equals(other LedgerKey) bool { l := key.MustClaimableBalance() r := other.MustClaimableBalance() return l.BalanceId.MustV0() == r.BalanceId.MustV0() - case LedgerEntryTypeExpiration: - l := key.MustExpiration() - r := other.MustExpiration() + case LedgerEntryTypeTtl: + l := key.MustTtl() + r := other.MustTtl() return l.KeyHash == r.KeyHash default: panic(fmt.Errorf("unknown ledger key type: %v", key.Type)) @@ -188,13 +188,13 @@ func (key *LedgerKey) SetConfigSetting(configSettingID ConfigSettingId) error { return nil } -// SetExpiration mutates `key` such that it represents the identity of an +// SetTtl mutates `key` such that it represents the identity of an // expiration entry. -func (key *LedgerKey) SetExpiration(keyHash Hash) error { - data := LedgerKeyExpiration{ +func (key *LedgerKey) SetTtl(keyHash Hash) error { + data := LedgerKeyTtl{ KeyHash: keyHash, } - nkey, err := NewLedgerKey(LedgerEntryTypeExpiration, data) + nkey, err := NewLedgerKey(LedgerEntryTypeTtl, data) if err != nil { return err } @@ -259,8 +259,8 @@ func (e *EncodingBuffer) ledgerKeyCompressEncodeTo(key LedgerKey) error { return err case LedgerEntryTypeConfigSetting: return key.ConfigSetting.ConfigSettingId.EncodeTo(e.encoder) - case LedgerEntryTypeExpiration: - return key.Expiration.KeyHash.EncodeTo(e.encoder) + case LedgerEntryTypeTtl: + return key.Ttl.KeyHash.EncodeTo(e.encoder) default: panic("Unknown type") } diff --git a/xdr/scval.go b/xdr/scval.go index 559941c27a..4648a6ab82 100644 --- a/xdr/scval.go +++ b/xdr/scval.go @@ -34,7 +34,7 @@ func (s ContractExecutable) Equals(o ContractExecutable) bool { return false } switch s.Type { - case ContractExecutableTypeContractExecutableToken: + case ContractExecutableTypeContractExecutableStellarAsset: return true case ContractExecutableTypeContractExecutableWasm: return s.MustWasmHash().Equals(o.MustWasmHash()) diff --git a/xdr/xdr_commit_generated.txt b/xdr/xdr_commit_generated.txt index c5e549e9c1..3c6d18d90d 100644 --- a/xdr/xdr_commit_generated.txt +++ b/xdr/xdr_commit_generated.txt @@ -1 +1 @@ -9ac02641139e6717924fdad716f6e958d0168491 \ No newline at end of file +6a620d160aab22609c982d54578ff6a63bfcdc01 \ No newline at end of file diff --git a/xdr/xdr_generated.go b/xdr/xdr_generated.go index db8fcf56aa..f4f59553cc 100644 --- a/xdr/xdr_generated.go +++ b/xdr/xdr_generated.go @@ -32,16 +32,16 @@ import ( // XdrFilesSHA256 is the SHA256 hashes of source files. var XdrFilesSHA256 = map[string]string{ "xdr/Stellar-SCP.x": "8f32b04d008f8bc33b8843d075e69837231a673691ee41d8b821ca229a6e802a", - "xdr/Stellar-contract-config-setting.x": "fd8709d1bcc36a90a1f7b1fd8cb4407f7733bec5ca06494cac9b6a99b942ef99", + "xdr/Stellar-contract-config-setting.x": "e466c4dfae1d5d181afbd990b91f26c5d8ed84a7fa987875f8d643cf97e34a77", "xdr/Stellar-contract-env-meta.x": "928a30de814ee589bc1d2aadd8dd81c39f71b7e6f430f56974505ccb1f49654b", "xdr/Stellar-contract-meta.x": "f01532c11ca044e19d9f9f16fe373e9af64835da473be556b9a807ee3319ae0d", "xdr/Stellar-contract-spec.x": "c7ffa21d2e91afb8e666b33524d307955426ff553a486d670c29217ed9888d49", - "xdr/Stellar-contract.x": "234d2adf0c9bdf7c42ea64a2650884d8e36ed31cd1cbe13fb8d12b335fb4e5c3", - "xdr/Stellar-internal.x": "368706dd6e2efafd16a8f63daf3374845b791d097b15c502aa7653a412b68b68", - "xdr/Stellar-ledger-entries.x": "73b467bce654c5b19d0fba24008c9ccae77b439320a4c9eef9128e1818fdd76d", - "xdr/Stellar-ledger.x": "247d1b486d546f5c37f3d8a719b195e3331106302bcdc54cd1f52a6f94a9a7ed", + "xdr/Stellar-contract.x": "7f665e4103e146a88fcdabce879aaaacd3bf9283feb194cc47ff986264c1e315", + "xdr/Stellar-internal.x": "227835866c1b2122d1eaf28839ba85ea7289d1cb681dda4ca619c2da3d71fe00", + "xdr/Stellar-ledger-entries.x": "4f8f2324f567a40065f54f696ea1428740f043ea4154f5986d9f499ad00ac333", + "xdr/Stellar-ledger.x": "2c842f3fe6e269498af5467f849cf6818554e90babc845f34c87cda471298d0f", "xdr/Stellar-overlay.x": "de3957c58b96ae07968b3d3aebea84f83603e95322d1fa336360e13e3aba737a", - "xdr/Stellar-transaction.x": "ce8194511afb4cbb165921c720d057381bcd4829999027d42753c11d5dcaa7f8", + "xdr/Stellar-transaction.x": "c5dd8507bc84e10b67bf3bc74c8f716a660b425814b015025c6f6b6f20cb70e7", "xdr/Stellar-types.x": "6e3b13f0d3e360b09fa5e2b0e55d43f4d974a769df66afb34e8aecbb329d3f15", } @@ -2768,7 +2768,7 @@ var _ xdrType = (*ThresholdIndexes)(nil) // CONTRACT_DATA = 6, // CONTRACT_CODE = 7, // CONFIG_SETTING = 8, -// EXPIRATION = 9 +// TTL = 9 // }; type LedgerEntryType int32 @@ -2782,7 +2782,7 @@ const ( LedgerEntryTypeContractData LedgerEntryType = 6 LedgerEntryTypeContractCode LedgerEntryType = 7 LedgerEntryTypeConfigSetting LedgerEntryType = 8 - LedgerEntryTypeExpiration LedgerEntryType = 9 + LedgerEntryTypeTtl LedgerEntryType = 9 ) var ledgerEntryTypeMap = map[int32]string{ @@ -2795,7 +2795,7 @@ var ledgerEntryTypeMap = map[int32]string{ 6: "LedgerEntryTypeContractData", 7: "LedgerEntryTypeContractCode", 8: "LedgerEntryTypeConfigSetting", - 9: "LedgerEntryTypeExpiration", + 9: "LedgerEntryTypeTtl", } // ValidEnum validates a proposed value for this enum. Implements @@ -8028,36 +8028,36 @@ func (s ContractCodeEntry) xdrType() {} var _ xdrType = (*ContractCodeEntry)(nil) -// ExpirationEntry is an XDR Struct defines as: +// TtlEntry is an XDR Struct defines as: // -// struct ExpirationEntry { -// // Hash of the LedgerKey that is associated with this ExpirationEntry +// struct TTLEntry { +// // Hash of the LedgerKey that is associated with this TTLEntry // Hash keyHash; -// uint32 expirationLedgerSeq; +// uint32 liveUntilLedgerSeq; // }; -type ExpirationEntry struct { - KeyHash Hash - ExpirationLedgerSeq Uint32 +type TtlEntry struct { + KeyHash Hash + LiveUntilLedgerSeq Uint32 } // EncodeTo encodes this value using the Encoder. -func (s *ExpirationEntry) EncodeTo(e *xdr.Encoder) error { +func (s *TtlEntry) EncodeTo(e *xdr.Encoder) error { var err error if err = s.KeyHash.EncodeTo(e); err != nil { return err } - if err = s.ExpirationLedgerSeq.EncodeTo(e); err != nil { + if err = s.LiveUntilLedgerSeq.EncodeTo(e); err != nil { return err } return nil } -var _ decoderFrom = (*ExpirationEntry)(nil) +var _ decoderFrom = (*TtlEntry)(nil) // DecodeFrom decodes this value using the Decoder. -func (s *ExpirationEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (s *TtlEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding ExpirationEntry: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding TtlEntry: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error @@ -8067,7 +8067,7 @@ func (s *ExpirationEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) if err != nil { return n, fmt.Errorf("decoding Hash: %w", err) } - nTmp, err = s.ExpirationLedgerSeq.DecodeFrom(d, maxDepth) + nTmp, err = s.LiveUntilLedgerSeq.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) @@ -8076,7 +8076,7 @@ func (s *ExpirationEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) } // MarshalBinary implements encoding.BinaryMarshaler. -func (s ExpirationEntry) MarshalBinary() ([]byte, error) { +func (s TtlEntry) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -8084,7 +8084,7 @@ func (s ExpirationEntry) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *ExpirationEntry) UnmarshalBinary(inp []byte) error { +func (s *TtlEntry) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -8092,15 +8092,15 @@ func (s *ExpirationEntry) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*ExpirationEntry)(nil) - _ encoding.BinaryUnmarshaler = (*ExpirationEntry)(nil) + _ encoding.BinaryMarshaler = (*TtlEntry)(nil) + _ encoding.BinaryUnmarshaler = (*TtlEntry)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s ExpirationEntry) xdrType() {} +func (s TtlEntry) xdrType() {} -var _ xdrType = (*ExpirationEntry)(nil) +var _ xdrType = (*TtlEntry)(nil) // LedgerEntryExtensionV1Ext is an XDR NestedUnion defines as: // @@ -8320,8 +8320,8 @@ var _ xdrType = (*LedgerEntryExtensionV1)(nil) // ContractCodeEntry contractCode; // case CONFIG_SETTING: // ConfigSettingEntry configSetting; -// case EXPIRATION: -// ExpirationEntry expiration; +// case TTL: +// TTLEntry ttl; // } type LedgerEntryData struct { Type LedgerEntryType @@ -8334,7 +8334,7 @@ type LedgerEntryData struct { ContractData *ContractDataEntry ContractCode *ContractCodeEntry ConfigSetting *ConfigSettingEntry - Expiration *ExpirationEntry + Ttl *TtlEntry } // SwitchFieldName returns the field name in which this union's @@ -8365,8 +8365,8 @@ func (u LedgerEntryData) ArmForSwitch(sw int32) (string, bool) { return "ContractCode", true case LedgerEntryTypeConfigSetting: return "ConfigSetting", true - case LedgerEntryTypeExpiration: - return "Expiration", true + case LedgerEntryTypeTtl: + return "Ttl", true } return "-", false } @@ -8438,13 +8438,13 @@ func NewLedgerEntryData(aType LedgerEntryType, value interface{}) (result Ledger return } result.ConfigSetting = &tv - case LedgerEntryTypeExpiration: - tv, ok := value.(ExpirationEntry) + case LedgerEntryTypeTtl: + tv, ok := value.(TtlEntry) if !ok { - err = errors.New("invalid value, must be ExpirationEntry") + err = errors.New("invalid value, must be TtlEntry") return } - result.Expiration = &tv + result.Ttl = &tv } return } @@ -8674,25 +8674,25 @@ func (u LedgerEntryData) GetConfigSetting() (result ConfigSettingEntry, ok bool) return } -// MustExpiration retrieves the Expiration value from the union, +// MustTtl retrieves the Ttl value from the union, // panicing if the value is not set. -func (u LedgerEntryData) MustExpiration() ExpirationEntry { - val, ok := u.GetExpiration() +func (u LedgerEntryData) MustTtl() TtlEntry { + val, ok := u.GetTtl() if !ok { - panic("arm Expiration is not set") + panic("arm Ttl is not set") } return val } -// GetExpiration retrieves the Expiration value from the union, +// GetTtl retrieves the Ttl value from the union, // returning ok if the union's switch indicated the value is valid. -func (u LedgerEntryData) GetExpiration() (result ExpirationEntry, ok bool) { +func (u LedgerEntryData) GetTtl() (result TtlEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) - if armName == "Expiration" { - result = *u.Expiration + if armName == "Ttl" { + result = *u.Ttl ok = true } @@ -8751,8 +8751,8 @@ func (u LedgerEntryData) EncodeTo(e *xdr.Encoder) error { return err } return nil - case LedgerEntryTypeExpiration: - if err = (*u.Expiration).EncodeTo(e); err != nil { + case LedgerEntryTypeTtl: + if err = (*u.Ttl).EncodeTo(e); err != nil { return err } return nil @@ -8848,12 +8848,12 @@ func (u *LedgerEntryData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) return n, fmt.Errorf("decoding ConfigSettingEntry: %w", err) } return n, nil - case LedgerEntryTypeExpiration: - u.Expiration = new(ExpirationEntry) - nTmp, err = (*u.Expiration).DecodeFrom(d, maxDepth) + case LedgerEntryTypeTtl: + u.Ttl = new(TtlEntry) + nTmp, err = (*u.Ttl).DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding ExpirationEntry: %w", err) + return n, fmt.Errorf("decoding TtlEntry: %w", err) } return n, nil } @@ -9064,8 +9064,8 @@ var _ xdrType = (*LedgerEntryExt)(nil) // ContractCodeEntry contractCode; // case CONFIG_SETTING: // ConfigSettingEntry configSetting; -// case EXPIRATION: -// ExpirationEntry expiration; +// case TTL: +// TTLEntry ttl; // } // data; // @@ -9781,19 +9781,19 @@ func (s LedgerKeyConfigSetting) xdrType() {} var _ xdrType = (*LedgerKeyConfigSetting)(nil) -// LedgerKeyExpiration is an XDR NestedStruct defines as: +// LedgerKeyTtl is an XDR NestedStruct defines as: // // struct // { -// // Hash of the LedgerKey that is associated with this ExpirationEntry +// // Hash of the LedgerKey that is associated with this TTLEntry // Hash keyHash; // } -type LedgerKeyExpiration struct { +type LedgerKeyTtl struct { KeyHash Hash } // EncodeTo encodes this value using the Encoder. -func (s *LedgerKeyExpiration) EncodeTo(e *xdr.Encoder) error { +func (s *LedgerKeyTtl) EncodeTo(e *xdr.Encoder) error { var err error if err = s.KeyHash.EncodeTo(e); err != nil { return err @@ -9801,12 +9801,12 @@ func (s *LedgerKeyExpiration) EncodeTo(e *xdr.Encoder) error { return nil } -var _ decoderFrom = (*LedgerKeyExpiration)(nil) +var _ decoderFrom = (*LedgerKeyTtl)(nil) // DecodeFrom decodes this value using the Decoder. -func (s *LedgerKeyExpiration) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (s *LedgerKeyTtl) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding LedgerKeyExpiration: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding LedgerKeyTtl: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error @@ -9820,7 +9820,7 @@ func (s *LedgerKeyExpiration) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, er } // MarshalBinary implements encoding.BinaryMarshaler. -func (s LedgerKeyExpiration) MarshalBinary() ([]byte, error) { +func (s LedgerKeyTtl) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -9828,7 +9828,7 @@ func (s LedgerKeyExpiration) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *LedgerKeyExpiration) UnmarshalBinary(inp []byte) error { +func (s *LedgerKeyTtl) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -9836,15 +9836,15 @@ func (s *LedgerKeyExpiration) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*LedgerKeyExpiration)(nil) - _ encoding.BinaryUnmarshaler = (*LedgerKeyExpiration)(nil) + _ encoding.BinaryMarshaler = (*LedgerKeyTtl)(nil) + _ encoding.BinaryUnmarshaler = (*LedgerKeyTtl)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s LedgerKeyExpiration) xdrType() {} +func (s LedgerKeyTtl) xdrType() {} -var _ xdrType = (*LedgerKeyExpiration)(nil) +var _ xdrType = (*LedgerKeyTtl)(nil) // LedgerKey is an XDR Union defines as: // @@ -9905,12 +9905,12 @@ var _ xdrType = (*LedgerKeyExpiration)(nil) // { // ConfigSettingID configSettingID; // } configSetting; -// case EXPIRATION: +// case TTL: // struct // { -// // Hash of the LedgerKey that is associated with this ExpirationEntry +// // Hash of the LedgerKey that is associated with this TTLEntry // Hash keyHash; -// } expiration; +// } ttl; // }; type LedgerKey struct { Type LedgerEntryType @@ -9923,7 +9923,7 @@ type LedgerKey struct { ContractData *LedgerKeyContractData ContractCode *LedgerKeyContractCode ConfigSetting *LedgerKeyConfigSetting - Expiration *LedgerKeyExpiration + Ttl *LedgerKeyTtl } // SwitchFieldName returns the field name in which this union's @@ -9954,8 +9954,8 @@ func (u LedgerKey) ArmForSwitch(sw int32) (string, bool) { return "ContractCode", true case LedgerEntryTypeConfigSetting: return "ConfigSetting", true - case LedgerEntryTypeExpiration: - return "Expiration", true + case LedgerEntryTypeTtl: + return "Ttl", true } return "-", false } @@ -10027,13 +10027,13 @@ func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, e return } result.ConfigSetting = &tv - case LedgerEntryTypeExpiration: - tv, ok := value.(LedgerKeyExpiration) + case LedgerEntryTypeTtl: + tv, ok := value.(LedgerKeyTtl) if !ok { - err = errors.New("invalid value, must be LedgerKeyExpiration") + err = errors.New("invalid value, must be LedgerKeyTtl") return } - result.Expiration = &tv + result.Ttl = &tv } return } @@ -10263,25 +10263,25 @@ func (u LedgerKey) GetConfigSetting() (result LedgerKeyConfigSetting, ok bool) { return } -// MustExpiration retrieves the Expiration value from the union, +// MustTtl retrieves the Ttl value from the union, // panicing if the value is not set. -func (u LedgerKey) MustExpiration() LedgerKeyExpiration { - val, ok := u.GetExpiration() +func (u LedgerKey) MustTtl() LedgerKeyTtl { + val, ok := u.GetTtl() if !ok { - panic("arm Expiration is not set") + panic("arm Ttl is not set") } return val } -// GetExpiration retrieves the Expiration value from the union, +// GetTtl retrieves the Ttl value from the union, // returning ok if the union's switch indicated the value is valid. -func (u LedgerKey) GetExpiration() (result LedgerKeyExpiration, ok bool) { +func (u LedgerKey) GetTtl() (result LedgerKeyTtl, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) - if armName == "Expiration" { - result = *u.Expiration + if armName == "Ttl" { + result = *u.Ttl ok = true } @@ -10340,8 +10340,8 @@ func (u LedgerKey) EncodeTo(e *xdr.Encoder) error { return err } return nil - case LedgerEntryTypeExpiration: - if err = (*u.Expiration).EncodeTo(e); err != nil { + case LedgerEntryTypeTtl: + if err = (*u.Ttl).EncodeTo(e); err != nil { return err } return nil @@ -10437,12 +10437,12 @@ func (u *LedgerKey) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { return n, fmt.Errorf("decoding LedgerKeyConfigSetting: %w", err) } return n, nil - case LedgerEntryTypeExpiration: - u.Expiration = new(LedgerKeyExpiration) - nTmp, err = (*u.Expiration).DecodeFrom(d, maxDepth) + case LedgerEntryTypeTtl: + u.Ttl = new(LedgerKeyTtl) + nTmp, err = (*u.Ttl).DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding LedgerKeyExpiration: %w", err) + return n, fmt.Errorf("decoding LedgerKeyTtl: %w", err) } return n, nil } @@ -17133,170 +17133,8 @@ var _ xdrType = (*LedgerCloseMetaV0)(nil) // // struct LedgerCloseMetaV1 // { -// LedgerHeaderHistoryEntry ledgerHeader; -// -// GeneralizedTransactionSet txSet; -// -// // NB: transactions are sorted in apply order here -// // fees for all transactions are processed first -// // followed by applying transactions -// TransactionResultMeta txProcessing<>; -// -// // upgrades are applied last -// UpgradeEntryMeta upgradesProcessing<>; -// -// // other misc information attached to the ledger close -// SCPHistoryEntry scpInfo<>; -// }; -type LedgerCloseMetaV1 struct { - LedgerHeader LedgerHeaderHistoryEntry - TxSet GeneralizedTransactionSet - TxProcessing []TransactionResultMeta - UpgradesProcessing []UpgradeEntryMeta - ScpInfo []ScpHistoryEntry -} - -// EncodeTo encodes this value using the Encoder. -func (s *LedgerCloseMetaV1) EncodeTo(e *xdr.Encoder) error { - var err error - if err = s.LedgerHeader.EncodeTo(e); err != nil { - return err - } - if err = s.TxSet.EncodeTo(e); err != nil { - return err - } - if _, err = e.EncodeUint(uint32(len(s.TxProcessing))); err != nil { - return err - } - for i := 0; i < len(s.TxProcessing); i++ { - if err = s.TxProcessing[i].EncodeTo(e); err != nil { - return err - } - } - if _, err = e.EncodeUint(uint32(len(s.UpgradesProcessing))); err != nil { - return err - } - for i := 0; i < len(s.UpgradesProcessing); i++ { - if err = s.UpgradesProcessing[i].EncodeTo(e); err != nil { - return err - } - } - if _, err = e.EncodeUint(uint32(len(s.ScpInfo))); err != nil { - return err - } - for i := 0; i < len(s.ScpInfo); i++ { - if err = s.ScpInfo[i].EncodeTo(e); err != nil { - return err - } - } - return nil -} - -var _ decoderFrom = (*LedgerCloseMetaV1)(nil) - -// DecodeFrom decodes this value using the Decoder. -func (s *LedgerCloseMetaV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { - if maxDepth == 0 { - return 0, fmt.Errorf("decoding LedgerCloseMetaV1: %w", ErrMaxDecodingDepthReached) - } - maxDepth -= 1 - var err error - var n, nTmp int - nTmp, err = s.LedgerHeader.DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding LedgerHeaderHistoryEntry: %w", err) - } - nTmp, err = s.TxSet.DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding GeneralizedTransactionSet: %w", err) - } - var l uint32 - l, nTmp, err = d.DecodeUint() - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding TransactionResultMeta: %w", err) - } - s.TxProcessing = nil - if l > 0 { - s.TxProcessing = make([]TransactionResultMeta, l) - for i := uint32(0); i < l; i++ { - nTmp, err = s.TxProcessing[i].DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding TransactionResultMeta: %w", err) - } - } - } - l, nTmp, err = d.DecodeUint() - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding UpgradeEntryMeta: %w", err) - } - s.UpgradesProcessing = nil - if l > 0 { - s.UpgradesProcessing = make([]UpgradeEntryMeta, l) - for i := uint32(0); i < l; i++ { - nTmp, err = s.UpgradesProcessing[i].DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding UpgradeEntryMeta: %w", err) - } - } - } - l, nTmp, err = d.DecodeUint() - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding ScpHistoryEntry: %w", err) - } - s.ScpInfo = nil - if l > 0 { - s.ScpInfo = make([]ScpHistoryEntry, l) - for i := uint32(0); i < l; i++ { - nTmp, err = s.ScpInfo[i].DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding ScpHistoryEntry: %w", err) - } - } - } - return n, nil -} - -// MarshalBinary implements encoding.BinaryMarshaler. -func (s LedgerCloseMetaV1) MarshalBinary() ([]byte, error) { - b := bytes.Buffer{} - e := xdr.NewEncoder(&b) - err := s.EncodeTo(e) - return b.Bytes(), err -} - -// UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *LedgerCloseMetaV1) UnmarshalBinary(inp []byte) error { - r := bytes.NewReader(inp) - d := xdr.NewDecoder(r) - _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) - return err -} - -var ( - _ encoding.BinaryMarshaler = (*LedgerCloseMetaV1)(nil) - _ encoding.BinaryUnmarshaler = (*LedgerCloseMetaV1)(nil) -) - -// xdrType signals that this type is an type representing -// representing XDR values defined by this package. -func (s LedgerCloseMetaV1) xdrType() {} - -var _ xdrType = (*LedgerCloseMetaV1)(nil) - -// LedgerCloseMetaV2 is an XDR Struct defines as: -// -// struct LedgerCloseMetaV2 -// { -// // We forgot to add an ExtensionPoint in v1 but at least -// // we can add one now in v2. +// // We forgot to add an ExtensionPoint in v0 but at least +// // we can add one now in v1. // ExtensionPoint ext; // // LedgerHeaderHistoryEntry ledgerHeader; @@ -17318,14 +17156,14 @@ var _ xdrType = (*LedgerCloseMetaV1)(nil) // // systems calculating storage fees correctly. // uint64 totalByteSizeOfBucketList; // -// // Expired temp keys that are being evicted at this ledger. +// // Temp keys that are being evicted at this ledger. // LedgerKey evictedTemporaryLedgerKeys<>; // -// // Expired restorable ledger entries that are being +// // Archived restorable ledger entries that are being // // evicted at this ledger. // LedgerEntry evictedPersistentLedgerEntries<>; // }; -type LedgerCloseMetaV2 struct { +type LedgerCloseMetaV1 struct { Ext ExtensionPoint LedgerHeader LedgerHeaderHistoryEntry TxSet GeneralizedTransactionSet @@ -17338,7 +17176,7 @@ type LedgerCloseMetaV2 struct { } // EncodeTo encodes this value using the Encoder. -func (s *LedgerCloseMetaV2) EncodeTo(e *xdr.Encoder) error { +func (s *LedgerCloseMetaV1) EncodeTo(e *xdr.Encoder) error { var err error if err = s.Ext.EncodeTo(e); err != nil { return err @@ -17395,12 +17233,12 @@ func (s *LedgerCloseMetaV2) EncodeTo(e *xdr.Encoder) error { return nil } -var _ decoderFrom = (*LedgerCloseMetaV2)(nil) +var _ decoderFrom = (*LedgerCloseMetaV1)(nil) // DecodeFrom decodes this value using the Decoder. -func (s *LedgerCloseMetaV2) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (s *LedgerCloseMetaV1) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding LedgerCloseMetaV2: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding LedgerCloseMetaV1: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error @@ -17510,7 +17348,7 @@ func (s *LedgerCloseMetaV2) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, erro } // MarshalBinary implements encoding.BinaryMarshaler. -func (s LedgerCloseMetaV2) MarshalBinary() ([]byte, error) { +func (s LedgerCloseMetaV1) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -17518,7 +17356,7 @@ func (s LedgerCloseMetaV2) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *LedgerCloseMetaV2) UnmarshalBinary(inp []byte) error { +func (s *LedgerCloseMetaV1) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -17526,15 +17364,15 @@ func (s *LedgerCloseMetaV2) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*LedgerCloseMetaV2)(nil) - _ encoding.BinaryUnmarshaler = (*LedgerCloseMetaV2)(nil) + _ encoding.BinaryMarshaler = (*LedgerCloseMetaV1)(nil) + _ encoding.BinaryUnmarshaler = (*LedgerCloseMetaV1)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s LedgerCloseMetaV2) xdrType() {} +func (s LedgerCloseMetaV1) xdrType() {} -var _ xdrType = (*LedgerCloseMetaV2)(nil) +var _ xdrType = (*LedgerCloseMetaV1)(nil) // LedgerCloseMeta is an XDR Union defines as: // @@ -17544,14 +17382,11 @@ var _ xdrType = (*LedgerCloseMetaV2)(nil) // LedgerCloseMetaV0 v0; // case 1: // LedgerCloseMetaV1 v1; -// case 2: -// LedgerCloseMetaV2 v2; // }; type LedgerCloseMeta struct { V int32 V0 *LedgerCloseMetaV0 V1 *LedgerCloseMetaV1 - V2 *LedgerCloseMetaV2 } // SwitchFieldName returns the field name in which this union's @@ -17568,8 +17403,6 @@ func (u LedgerCloseMeta) ArmForSwitch(sw int32) (string, bool) { return "V0", true case 1: return "V1", true - case 2: - return "V2", true } return "-", false } @@ -17592,13 +17425,6 @@ func NewLedgerCloseMeta(v int32, value interface{}) (result LedgerCloseMeta, err return } result.V1 = &tv - case 2: - tv, ok := value.(LedgerCloseMetaV2) - if !ok { - err = errors.New("invalid value, must be LedgerCloseMetaV2") - return - } - result.V2 = &tv } return } @@ -17653,31 +17479,6 @@ func (u LedgerCloseMeta) GetV1() (result LedgerCloseMetaV1, ok bool) { return } -// MustV2 retrieves the V2 value from the union, -// panicing if the value is not set. -func (u LedgerCloseMeta) MustV2() LedgerCloseMetaV2 { - val, ok := u.GetV2() - - if !ok { - panic("arm V2 is not set") - } - - return val -} - -// GetV2 retrieves the V2 value from the union, -// returning ok if the union's switch indicated the value is valid. -func (u LedgerCloseMeta) GetV2() (result LedgerCloseMetaV2, ok bool) { - armName, _ := u.ArmForSwitch(int32(u.V)) - - if armName == "V2" { - result = *u.V2 - ok = true - } - - return -} - // EncodeTo encodes this value using the Encoder. func (u LedgerCloseMeta) EncodeTo(e *xdr.Encoder) error { var err error @@ -17695,11 +17496,6 @@ func (u LedgerCloseMeta) EncodeTo(e *xdr.Encoder) error { return err } return nil - case 2: - if err = (*u.V2).EncodeTo(e); err != nil { - return err - } - return nil } return fmt.Errorf("V (int32) switch value '%d' is not valid for union LedgerCloseMeta", u.V) } @@ -17736,14 +17532,6 @@ func (u *LedgerCloseMeta) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) return n, fmt.Errorf("decoding LedgerCloseMetaV1: %w", err) } return n, nil - case 2: - u.V2 = new(LedgerCloseMetaV2) - nTmp, err = (*u.V2).DecodeFrom(d, maxDepth) - n += nTmp - if err != nil { - return n, fmt.Errorf("decoding LedgerCloseMetaV2: %w", err) - } - return n, nil } return n, fmt.Errorf("union LedgerCloseMeta has invalid V (int32) switch value '%d'", u.V) } @@ -22379,7 +22167,7 @@ var _ xdrType = (*DecoratedSignature)(nil) // LIQUIDITY_POOL_DEPOSIT = 22, // LIQUIDITY_POOL_WITHDRAW = 23, // INVOKE_HOST_FUNCTION = 24, -// BUMP_FOOTPRINT_EXPIRATION = 25, +// EXTEND_FOOTPRINT_TTL = 25, // RESTORE_FOOTPRINT = 26 // }; type OperationType int32 @@ -22410,7 +22198,7 @@ const ( OperationTypeLiquidityPoolDeposit OperationType = 22 OperationTypeLiquidityPoolWithdraw OperationType = 23 OperationTypeInvokeHostFunction OperationType = 24 - OperationTypeBumpFootprintExpiration OperationType = 25 + OperationTypeExtendFootprintTtl OperationType = 25 OperationTypeRestoreFootprint OperationType = 26 ) @@ -22440,7 +22228,7 @@ var operationTypeMap = map[int32]string{ 22: "OperationTypeLiquidityPoolDeposit", 23: "OperationTypeLiquidityPoolWithdraw", 24: "OperationTypeInvokeHostFunction", - 25: "OperationTypeBumpFootprintExpiration", + 25: "OperationTypeExtendFootprintTtl", 26: "OperationTypeRestoreFootprint", } @@ -26857,36 +26645,36 @@ func (s InvokeHostFunctionOp) xdrType() {} var _ xdrType = (*InvokeHostFunctionOp)(nil) -// BumpFootprintExpirationOp is an XDR Struct defines as: +// ExtendFootprintTtlOp is an XDR Struct defines as: // -// struct BumpFootprintExpirationOp +// struct ExtendFootprintTTLOp // { // ExtensionPoint ext; -// uint32 ledgersToExpire; +// uint32 extendTo; // }; -type BumpFootprintExpirationOp struct { - Ext ExtensionPoint - LedgersToExpire Uint32 +type ExtendFootprintTtlOp struct { + Ext ExtensionPoint + ExtendTo Uint32 } // EncodeTo encodes this value using the Encoder. -func (s *BumpFootprintExpirationOp) EncodeTo(e *xdr.Encoder) error { +func (s *ExtendFootprintTtlOp) EncodeTo(e *xdr.Encoder) error { var err error if err = s.Ext.EncodeTo(e); err != nil { return err } - if err = s.LedgersToExpire.EncodeTo(e); err != nil { + if err = s.ExtendTo.EncodeTo(e); err != nil { return err } return nil } -var _ decoderFrom = (*BumpFootprintExpirationOp)(nil) +var _ decoderFrom = (*ExtendFootprintTtlOp)(nil) // DecodeFrom decodes this value using the Decoder. -func (s *BumpFootprintExpirationOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (s *ExtendFootprintTtlOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding BumpFootprintExpirationOp: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding ExtendFootprintTtlOp: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error @@ -26896,7 +26684,7 @@ func (s *BumpFootprintExpirationOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (i if err != nil { return n, fmt.Errorf("decoding ExtensionPoint: %w", err) } - nTmp, err = s.LedgersToExpire.DecodeFrom(d, maxDepth) + nTmp, err = s.ExtendTo.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) @@ -26905,7 +26693,7 @@ func (s *BumpFootprintExpirationOp) DecodeFrom(d *xdr.Decoder, maxDepth uint) (i } // MarshalBinary implements encoding.BinaryMarshaler. -func (s BumpFootprintExpirationOp) MarshalBinary() ([]byte, error) { +func (s ExtendFootprintTtlOp) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -26913,7 +26701,7 @@ func (s BumpFootprintExpirationOp) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *BumpFootprintExpirationOp) UnmarshalBinary(inp []byte) error { +func (s *ExtendFootprintTtlOp) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -26921,15 +26709,15 @@ func (s *BumpFootprintExpirationOp) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*BumpFootprintExpirationOp)(nil) - _ encoding.BinaryUnmarshaler = (*BumpFootprintExpirationOp)(nil) + _ encoding.BinaryMarshaler = (*ExtendFootprintTtlOp)(nil) + _ encoding.BinaryUnmarshaler = (*ExtendFootprintTtlOp)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s BumpFootprintExpirationOp) xdrType() {} +func (s ExtendFootprintTtlOp) xdrType() {} -var _ xdrType = (*BumpFootprintExpirationOp)(nil) +var _ xdrType = (*ExtendFootprintTtlOp)(nil) // RestoreFootprintOp is an XDR Struct defines as: // @@ -27049,8 +26837,8 @@ var _ xdrType = (*RestoreFootprintOp)(nil) // LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; // case INVOKE_HOST_FUNCTION: // InvokeHostFunctionOp invokeHostFunctionOp; -// case BUMP_FOOTPRINT_EXPIRATION: -// BumpFootprintExpirationOp bumpFootprintExpirationOp; +// case EXTEND_FOOTPRINT_TTL: +// ExtendFootprintTTLOp extendFootprintTTLOp; // case RESTORE_FOOTPRINT: // RestoreFootprintOp restoreFootprintOp; // } @@ -27079,7 +26867,7 @@ type OperationBody struct { LiquidityPoolDepositOp *LiquidityPoolDepositOp LiquidityPoolWithdrawOp *LiquidityPoolWithdrawOp InvokeHostFunctionOp *InvokeHostFunctionOp - BumpFootprintExpirationOp *BumpFootprintExpirationOp + ExtendFootprintTtlOp *ExtendFootprintTtlOp RestoreFootprintOp *RestoreFootprintOp } @@ -27143,8 +26931,8 @@ func (u OperationBody) ArmForSwitch(sw int32) (string, bool) { return "LiquidityPoolWithdrawOp", true case OperationTypeInvokeHostFunction: return "InvokeHostFunctionOp", true - case OperationTypeBumpFootprintExpiration: - return "BumpFootprintExpirationOp", true + case OperationTypeExtendFootprintTtl: + return "ExtendFootprintTtlOp", true case OperationTypeRestoreFootprint: return "RestoreFootprintOp", true } @@ -27320,13 +27108,13 @@ func NewOperationBody(aType OperationType, value interface{}) (result OperationB return } result.InvokeHostFunctionOp = &tv - case OperationTypeBumpFootprintExpiration: - tv, ok := value.(BumpFootprintExpirationOp) + case OperationTypeExtendFootprintTtl: + tv, ok := value.(ExtendFootprintTtlOp) if !ok { - err = errors.New("invalid value, must be BumpFootprintExpirationOp") + err = errors.New("invalid value, must be ExtendFootprintTtlOp") return } - result.BumpFootprintExpirationOp = &tv + result.ExtendFootprintTtlOp = &tv case OperationTypeRestoreFootprint: tv, ok := value.(RestoreFootprintOp) if !ok { @@ -27913,25 +27701,25 @@ func (u OperationBody) GetInvokeHostFunctionOp() (result InvokeHostFunctionOp, o return } -// MustBumpFootprintExpirationOp retrieves the BumpFootprintExpirationOp value from the union, +// MustExtendFootprintTtlOp retrieves the ExtendFootprintTtlOp value from the union, // panicing if the value is not set. -func (u OperationBody) MustBumpFootprintExpirationOp() BumpFootprintExpirationOp { - val, ok := u.GetBumpFootprintExpirationOp() +func (u OperationBody) MustExtendFootprintTtlOp() ExtendFootprintTtlOp { + val, ok := u.GetExtendFootprintTtlOp() if !ok { - panic("arm BumpFootprintExpirationOp is not set") + panic("arm ExtendFootprintTtlOp is not set") } return val } -// GetBumpFootprintExpirationOp retrieves the BumpFootprintExpirationOp value from the union, +// GetExtendFootprintTtlOp retrieves the ExtendFootprintTtlOp value from the union, // returning ok if the union's switch indicated the value is valid. -func (u OperationBody) GetBumpFootprintExpirationOp() (result BumpFootprintExpirationOp, ok bool) { +func (u OperationBody) GetExtendFootprintTtlOp() (result ExtendFootprintTtlOp, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) - if armName == "BumpFootprintExpirationOp" { - result = *u.BumpFootprintExpirationOp + if armName == "ExtendFootprintTtlOp" { + result = *u.ExtendFootprintTtlOp ok = true } @@ -28091,8 +27879,8 @@ func (u OperationBody) EncodeTo(e *xdr.Encoder) error { return err } return nil - case OperationTypeBumpFootprintExpiration: - if err = (*u.BumpFootprintExpirationOp).EncodeTo(e); err != nil { + case OperationTypeExtendFootprintTtl: + if err = (*u.ExtendFootprintTtlOp).EncodeTo(e); err != nil { return err } return nil @@ -28311,12 +28099,12 @@ func (u *OperationBody) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { return n, fmt.Errorf("decoding InvokeHostFunctionOp: %w", err) } return n, nil - case OperationTypeBumpFootprintExpiration: - u.BumpFootprintExpirationOp = new(BumpFootprintExpirationOp) - nTmp, err = (*u.BumpFootprintExpirationOp).DecodeFrom(d, maxDepth) + case OperationTypeExtendFootprintTtl: + u.ExtendFootprintTtlOp = new(ExtendFootprintTtlOp) + nTmp, err = (*u.ExtendFootprintTtlOp).DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding BumpFootprintExpirationOp: %w", err) + return n, fmt.Errorf("decoding ExtendFootprintTtlOp: %w", err) } return n, nil case OperationTypeRestoreFootprint: @@ -28419,8 +28207,8 @@ var _ xdrType = (*OperationBody)(nil) // LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; // case INVOKE_HOST_FUNCTION: // InvokeHostFunctionOp invokeHostFunctionOp; -// case BUMP_FOOTPRINT_EXPIRATION: -// BumpFootprintExpirationOp bumpFootprintExpirationOp; +// case EXTEND_FOOTPRINT_TTL: +// ExtendFootprintTTLOp extendFootprintTTLOp; // case RESTORE_FOOTPRINT: // RestoreFootprintOp restoreFootprintOp; // } @@ -30423,13 +30211,21 @@ var _ xdrType = (*SorobanResources)(nil) // { // ExtensionPoint ext; // SorobanResources resources; -// // Portion of transaction `fee` allocated to refundable fees. -// int64 refundableFee; +// // Amount of the transaction `fee` allocated to the Soroban resource fees. +// // The fraction of `resourceFee` corresponding to `resources` specified +// // above is *not* refundable (i.e. fees for instructions, ledger I/O), as +// // well as fees for the transaction size. +// // The remaining part of the fee is refundable and the charged value is +// // based on the actual consumption of refundable resources (events, ledger +// // rent bumps). +// // The `inclusionFee` used for prioritization of the transaction is defined +// // as `tx.fee - resourceFee`. +// int64 resourceFee; // }; type SorobanTransactionData struct { - Ext ExtensionPoint - Resources SorobanResources - RefundableFee Int64 + Ext ExtensionPoint + Resources SorobanResources + ResourceFee Int64 } // EncodeTo encodes this value using the Encoder. @@ -30441,7 +30237,7 @@ func (s *SorobanTransactionData) EncodeTo(e *xdr.Encoder) error { if err = s.Resources.EncodeTo(e); err != nil { return err } - if err = s.RefundableFee.EncodeTo(e); err != nil { + if err = s.ResourceFee.EncodeTo(e); err != nil { return err } return nil @@ -30467,7 +30263,7 @@ func (s *SorobanTransactionData) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, if err != nil { return n, fmt.Errorf("decoding SorobanResources: %w", err) } - nTmp, err = s.RefundableFee.DecodeFrom(d, maxDepth) + nTmp, err = s.ResourceFee.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Int64: %w", err) @@ -40345,7 +40141,7 @@ var _ xdrType = (*LiquidityPoolWithdrawResult)(nil) // INVOKE_HOST_FUNCTION_MALFORMED = -1, // INVOKE_HOST_FUNCTION_TRAPPED = -2, // INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3, -// INVOKE_HOST_FUNCTION_ENTRY_EXPIRED = -4, +// INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED = -4, // INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5 // }; type InvokeHostFunctionResultCode int32 @@ -40355,7 +40151,7 @@ const ( InvokeHostFunctionResultCodeInvokeHostFunctionMalformed InvokeHostFunctionResultCode = -1 InvokeHostFunctionResultCodeInvokeHostFunctionTrapped InvokeHostFunctionResultCode = -2 InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded InvokeHostFunctionResultCode = -3 - InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired InvokeHostFunctionResultCode = -4 + InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived InvokeHostFunctionResultCode = -4 InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee InvokeHostFunctionResultCode = -5 ) @@ -40364,7 +40160,7 @@ var invokeHostFunctionResultCodeMap = map[int32]string{ -1: "InvokeHostFunctionResultCodeInvokeHostFunctionMalformed", -2: "InvokeHostFunctionResultCodeInvokeHostFunctionTrapped", -3: "InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded", - -4: "InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired", + -4: "InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived", -5: "InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee", } @@ -40445,7 +40241,7 @@ var _ xdrType = (*InvokeHostFunctionResultCode)(nil) // case INVOKE_HOST_FUNCTION_MALFORMED: // case INVOKE_HOST_FUNCTION_TRAPPED: // case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: -// case INVOKE_HOST_FUNCTION_ENTRY_EXPIRED: +// case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: // case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: // void; // }; @@ -40472,7 +40268,7 @@ func (u InvokeHostFunctionResult) ArmForSwitch(sw int32) (string, bool) { return "", true case InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded: return "", true - case InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired: + case InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived: return "", true case InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee: return "", true @@ -40497,7 +40293,7 @@ func NewInvokeHostFunctionResult(code InvokeHostFunctionResultCode, value interf // void case InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded: // void - case InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired: + case InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived: // void case InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee: // void @@ -40551,7 +40347,7 @@ func (u InvokeHostFunctionResult) EncodeTo(e *xdr.Encoder) error { case InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded: // Void return nil - case InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired: + case InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived: // Void return nil case InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee: @@ -40594,7 +40390,7 @@ func (u *InvokeHostFunctionResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (in case InvokeHostFunctionResultCodeInvokeHostFunctionResourceLimitExceeded: // Void return n, nil - case InvokeHostFunctionResultCodeInvokeHostFunctionEntryExpired: + case InvokeHostFunctionResultCodeInvokeHostFunctionEntryArchived: // Void return n, nil case InvokeHostFunctionResultCodeInvokeHostFunctionInsufficientRefundableFee: @@ -40631,77 +40427,77 @@ func (s InvokeHostFunctionResult) xdrType() {} var _ xdrType = (*InvokeHostFunctionResult)(nil) -// BumpFootprintExpirationResultCode is an XDR Enum defines as: +// ExtendFootprintTtlResultCode is an XDR Enum defines as: // -// enum BumpFootprintExpirationResultCode +// enum ExtendFootprintTTLResultCode // { // // codes considered as "success" for the operation -// BUMP_FOOTPRINT_EXPIRATION_SUCCESS = 0, +// EXTEND_FOOTPRINT_TTL_SUCCESS = 0, // // // codes considered as "failure" for the operation -// BUMP_FOOTPRINT_EXPIRATION_MALFORMED = -1, -// BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED = -2, -// BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE = -3 +// EXTEND_FOOTPRINT_TTL_MALFORMED = -1, +// EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED = -2, +// EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE = -3 // }; -type BumpFootprintExpirationResultCode int32 +type ExtendFootprintTtlResultCode int32 const ( - BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess BumpFootprintExpirationResultCode = 0 - BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed BumpFootprintExpirationResultCode = -1 - BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded BumpFootprintExpirationResultCode = -2 - BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee BumpFootprintExpirationResultCode = -3 + ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess ExtendFootprintTtlResultCode = 0 + ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed ExtendFootprintTtlResultCode = -1 + ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded ExtendFootprintTtlResultCode = -2 + ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee ExtendFootprintTtlResultCode = -3 ) -var bumpFootprintExpirationResultCodeMap = map[int32]string{ - 0: "BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess", - -1: "BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed", - -2: "BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded", - -3: "BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee", +var extendFootprintTtlResultCodeMap = map[int32]string{ + 0: "ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess", + -1: "ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed", + -2: "ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded", + -3: "ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee", } // ValidEnum validates a proposed value for this enum. Implements -// the Enum interface for BumpFootprintExpirationResultCode -func (e BumpFootprintExpirationResultCode) ValidEnum(v int32) bool { - _, ok := bumpFootprintExpirationResultCodeMap[v] +// the Enum interface for ExtendFootprintTtlResultCode +func (e ExtendFootprintTtlResultCode) ValidEnum(v int32) bool { + _, ok := extendFootprintTtlResultCodeMap[v] return ok } // String returns the name of `e` -func (e BumpFootprintExpirationResultCode) String() string { - name, _ := bumpFootprintExpirationResultCodeMap[int32(e)] +func (e ExtendFootprintTtlResultCode) String() string { + name, _ := extendFootprintTtlResultCodeMap[int32(e)] return name } // EncodeTo encodes this value using the Encoder. -func (e BumpFootprintExpirationResultCode) EncodeTo(enc *xdr.Encoder) error { - if _, ok := bumpFootprintExpirationResultCodeMap[int32(e)]; !ok { - return fmt.Errorf("'%d' is not a valid BumpFootprintExpirationResultCode enum value", e) +func (e ExtendFootprintTtlResultCode) EncodeTo(enc *xdr.Encoder) error { + if _, ok := extendFootprintTtlResultCodeMap[int32(e)]; !ok { + return fmt.Errorf("'%d' is not a valid ExtendFootprintTtlResultCode enum value", e) } _, err := enc.EncodeInt(int32(e)) return err } -var _ decoderFrom = (*BumpFootprintExpirationResultCode)(nil) +var _ decoderFrom = (*ExtendFootprintTtlResultCode)(nil) // DecodeFrom decodes this value using the Decoder. -func (e *BumpFootprintExpirationResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (e *ExtendFootprintTtlResultCode) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding BumpFootprintExpirationResultCode: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding ExtendFootprintTtlResultCode: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 v, n, err := d.DecodeInt() if err != nil { - return n, fmt.Errorf("decoding BumpFootprintExpirationResultCode: %w", err) + return n, fmt.Errorf("decoding ExtendFootprintTtlResultCode: %w", err) } - if _, ok := bumpFootprintExpirationResultCodeMap[v]; !ok { - return n, fmt.Errorf("'%d' is not a valid BumpFootprintExpirationResultCode enum value", v) + if _, ok := extendFootprintTtlResultCodeMap[v]; !ok { + return n, fmt.Errorf("'%d' is not a valid ExtendFootprintTtlResultCode enum value", v) } - *e = BumpFootprintExpirationResultCode(v) + *e = ExtendFootprintTtlResultCode(v) return n, nil } // MarshalBinary implements encoding.BinaryMarshaler. -func (s BumpFootprintExpirationResultCode) MarshalBinary() ([]byte, error) { +func (s ExtendFootprintTtlResultCode) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -40709,7 +40505,7 @@ func (s BumpFootprintExpirationResultCode) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *BumpFootprintExpirationResultCode) UnmarshalBinary(inp []byte) error { +func (s *ExtendFootprintTtlResultCode) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -40717,98 +40513,98 @@ func (s *BumpFootprintExpirationResultCode) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*BumpFootprintExpirationResultCode)(nil) - _ encoding.BinaryUnmarshaler = (*BumpFootprintExpirationResultCode)(nil) + _ encoding.BinaryMarshaler = (*ExtendFootprintTtlResultCode)(nil) + _ encoding.BinaryUnmarshaler = (*ExtendFootprintTtlResultCode)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s BumpFootprintExpirationResultCode) xdrType() {} +func (s ExtendFootprintTtlResultCode) xdrType() {} -var _ xdrType = (*BumpFootprintExpirationResultCode)(nil) +var _ xdrType = (*ExtendFootprintTtlResultCode)(nil) -// BumpFootprintExpirationResult is an XDR Union defines as: +// ExtendFootprintTtlResult is an XDR Union defines as: // -// union BumpFootprintExpirationResult switch (BumpFootprintExpirationResultCode code) +// union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) // { -// case BUMP_FOOTPRINT_EXPIRATION_SUCCESS: +// case EXTEND_FOOTPRINT_TTL_SUCCESS: // void; -// case BUMP_FOOTPRINT_EXPIRATION_MALFORMED: -// case BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED: -// case BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE: +// case EXTEND_FOOTPRINT_TTL_MALFORMED: +// case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: +// case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: // void; // }; -type BumpFootprintExpirationResult struct { - Code BumpFootprintExpirationResultCode +type ExtendFootprintTtlResult struct { + Code ExtendFootprintTtlResultCode } // SwitchFieldName returns the field name in which this union's // discriminant is stored -func (u BumpFootprintExpirationResult) SwitchFieldName() string { +func (u ExtendFootprintTtlResult) SwitchFieldName() string { return "Code" } // ArmForSwitch returns which field name should be used for storing -// the value for an instance of BumpFootprintExpirationResult -func (u BumpFootprintExpirationResult) ArmForSwitch(sw int32) (string, bool) { - switch BumpFootprintExpirationResultCode(sw) { - case BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess: +// the value for an instance of ExtendFootprintTtlResult +func (u ExtendFootprintTtlResult) ArmForSwitch(sw int32) (string, bool) { + switch ExtendFootprintTtlResultCode(sw) { + case ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess: return "", true - case BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed: + case ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed: return "", true - case BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded: + case ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded: return "", true - case BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee: + case ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee: return "", true } return "-", false } -// NewBumpFootprintExpirationResult creates a new BumpFootprintExpirationResult. -func NewBumpFootprintExpirationResult(code BumpFootprintExpirationResultCode, value interface{}) (result BumpFootprintExpirationResult, err error) { +// NewExtendFootprintTtlResult creates a new ExtendFootprintTtlResult. +func NewExtendFootprintTtlResult(code ExtendFootprintTtlResultCode, value interface{}) (result ExtendFootprintTtlResult, err error) { result.Code = code - switch BumpFootprintExpirationResultCode(code) { - case BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess: + switch ExtendFootprintTtlResultCode(code) { + case ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess: // void - case BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed: + case ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed: // void - case BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded: + case ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded: // void - case BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee: + case ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee: // void } return } // EncodeTo encodes this value using the Encoder. -func (u BumpFootprintExpirationResult) EncodeTo(e *xdr.Encoder) error { +func (u ExtendFootprintTtlResult) EncodeTo(e *xdr.Encoder) error { var err error if err = u.Code.EncodeTo(e); err != nil { return err } - switch BumpFootprintExpirationResultCode(u.Code) { - case BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess: + switch ExtendFootprintTtlResultCode(u.Code) { + case ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess: // Void return nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed: + case ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed: // Void return nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded: + case ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded: // Void return nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee: + case ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee: // Void return nil } - return fmt.Errorf("Code (BumpFootprintExpirationResultCode) switch value '%d' is not valid for union BumpFootprintExpirationResult", u.Code) + return fmt.Errorf("Code (ExtendFootprintTtlResultCode) switch value '%d' is not valid for union ExtendFootprintTtlResult", u.Code) } -var _ decoderFrom = (*BumpFootprintExpirationResult)(nil) +var _ decoderFrom = (*ExtendFootprintTtlResult)(nil) // DecodeFrom decodes this value using the Decoder. -func (u *BumpFootprintExpirationResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (u *ExtendFootprintTtlResult) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding BumpFootprintExpirationResult: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding ExtendFootprintTtlResult: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error @@ -40816,27 +40612,27 @@ func (u *BumpFootprintExpirationResult) DecodeFrom(d *xdr.Decoder, maxDepth uint nTmp, err = u.Code.DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding BumpFootprintExpirationResultCode: %w", err) + return n, fmt.Errorf("decoding ExtendFootprintTtlResultCode: %w", err) } - switch BumpFootprintExpirationResultCode(u.Code) { - case BumpFootprintExpirationResultCodeBumpFootprintExpirationSuccess: + switch ExtendFootprintTtlResultCode(u.Code) { + case ExtendFootprintTtlResultCodeExtendFootprintTtlSuccess: // Void return n, nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationMalformed: + case ExtendFootprintTtlResultCodeExtendFootprintTtlMalformed: // Void return n, nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationResourceLimitExceeded: + case ExtendFootprintTtlResultCodeExtendFootprintTtlResourceLimitExceeded: // Void return n, nil - case BumpFootprintExpirationResultCodeBumpFootprintExpirationInsufficientRefundableFee: + case ExtendFootprintTtlResultCodeExtendFootprintTtlInsufficientRefundableFee: // Void return n, nil } - return n, fmt.Errorf("union BumpFootprintExpirationResult has invalid Code (BumpFootprintExpirationResultCode) switch value '%d'", u.Code) + return n, fmt.Errorf("union ExtendFootprintTtlResult has invalid Code (ExtendFootprintTtlResultCode) switch value '%d'", u.Code) } // MarshalBinary implements encoding.BinaryMarshaler. -func (s BumpFootprintExpirationResult) MarshalBinary() ([]byte, error) { +func (s ExtendFootprintTtlResult) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -40844,7 +40640,7 @@ func (s BumpFootprintExpirationResult) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *BumpFootprintExpirationResult) UnmarshalBinary(inp []byte) error { +func (s *ExtendFootprintTtlResult) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -40852,15 +40648,15 @@ func (s *BumpFootprintExpirationResult) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*BumpFootprintExpirationResult)(nil) - _ encoding.BinaryUnmarshaler = (*BumpFootprintExpirationResult)(nil) + _ encoding.BinaryMarshaler = (*ExtendFootprintTtlResult)(nil) + _ encoding.BinaryUnmarshaler = (*ExtendFootprintTtlResult)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s BumpFootprintExpirationResult) xdrType() {} +func (s ExtendFootprintTtlResult) xdrType() {} -var _ xdrType = (*BumpFootprintExpirationResult)(nil) +var _ xdrType = (*ExtendFootprintTtlResult)(nil) // RestoreFootprintResultCode is an XDR Enum defines as: // @@ -41250,8 +41046,8 @@ var _ xdrType = (*OperationResultCode)(nil) // LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; // case INVOKE_HOST_FUNCTION: // InvokeHostFunctionResult invokeHostFunctionResult; -// case BUMP_FOOTPRINT_EXPIRATION: -// BumpFootprintExpirationResult bumpFootprintExpirationResult; +// case EXTEND_FOOTPRINT_TTL: +// ExtendFootprintTTLResult extendFootprintTTLResult; // case RESTORE_FOOTPRINT: // RestoreFootprintResult restoreFootprintResult; // } @@ -41282,7 +41078,7 @@ type OperationResultTr struct { LiquidityPoolDepositResult *LiquidityPoolDepositResult LiquidityPoolWithdrawResult *LiquidityPoolWithdrawResult InvokeHostFunctionResult *InvokeHostFunctionResult - BumpFootprintExpirationResult *BumpFootprintExpirationResult + ExtendFootprintTtlResult *ExtendFootprintTtlResult RestoreFootprintResult *RestoreFootprintResult } @@ -41346,8 +41142,8 @@ func (u OperationResultTr) ArmForSwitch(sw int32) (string, bool) { return "LiquidityPoolWithdrawResult", true case OperationTypeInvokeHostFunction: return "InvokeHostFunctionResult", true - case OperationTypeBumpFootprintExpiration: - return "BumpFootprintExpirationResult", true + case OperationTypeExtendFootprintTtl: + return "ExtendFootprintTtlResult", true case OperationTypeRestoreFootprint: return "RestoreFootprintResult", true } @@ -41533,13 +41329,13 @@ func NewOperationResultTr(aType OperationType, value interface{}) (result Operat return } result.InvokeHostFunctionResult = &tv - case OperationTypeBumpFootprintExpiration: - tv, ok := value.(BumpFootprintExpirationResult) + case OperationTypeExtendFootprintTtl: + tv, ok := value.(ExtendFootprintTtlResult) if !ok { - err = errors.New("invalid value, must be BumpFootprintExpirationResult") + err = errors.New("invalid value, must be ExtendFootprintTtlResult") return } - result.BumpFootprintExpirationResult = &tv + result.ExtendFootprintTtlResult = &tv case OperationTypeRestoreFootprint: tv, ok := value.(RestoreFootprintResult) if !ok { @@ -42176,25 +41972,25 @@ func (u OperationResultTr) GetInvokeHostFunctionResult() (result InvokeHostFunct return } -// MustBumpFootprintExpirationResult retrieves the BumpFootprintExpirationResult value from the union, +// MustExtendFootprintTtlResult retrieves the ExtendFootprintTtlResult value from the union, // panicing if the value is not set. -func (u OperationResultTr) MustBumpFootprintExpirationResult() BumpFootprintExpirationResult { - val, ok := u.GetBumpFootprintExpirationResult() +func (u OperationResultTr) MustExtendFootprintTtlResult() ExtendFootprintTtlResult { + val, ok := u.GetExtendFootprintTtlResult() if !ok { - panic("arm BumpFootprintExpirationResult is not set") + panic("arm ExtendFootprintTtlResult is not set") } return val } -// GetBumpFootprintExpirationResult retrieves the BumpFootprintExpirationResult value from the union, +// GetExtendFootprintTtlResult retrieves the ExtendFootprintTtlResult value from the union, // returning ok if the union's switch indicated the value is valid. -func (u OperationResultTr) GetBumpFootprintExpirationResult() (result BumpFootprintExpirationResult, ok bool) { +func (u OperationResultTr) GetExtendFootprintTtlResult() (result ExtendFootprintTtlResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) - if armName == "BumpFootprintExpirationResult" { - result = *u.BumpFootprintExpirationResult + if armName == "ExtendFootprintTtlResult" { + result = *u.ExtendFootprintTtlResult ok = true } @@ -42358,8 +42154,8 @@ func (u OperationResultTr) EncodeTo(e *xdr.Encoder) error { return err } return nil - case OperationTypeBumpFootprintExpiration: - if err = (*u.BumpFootprintExpirationResult).EncodeTo(e); err != nil { + case OperationTypeExtendFootprintTtl: + if err = (*u.ExtendFootprintTtlResult).EncodeTo(e); err != nil { return err } return nil @@ -42588,12 +42384,12 @@ func (u *OperationResultTr) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, erro return n, fmt.Errorf("decoding InvokeHostFunctionResult: %w", err) } return n, nil - case OperationTypeBumpFootprintExpiration: - u.BumpFootprintExpirationResult = new(BumpFootprintExpirationResult) - nTmp, err = (*u.BumpFootprintExpirationResult).DecodeFrom(d, maxDepth) + case OperationTypeExtendFootprintTtl: + u.ExtendFootprintTtlResult = new(ExtendFootprintTtlResult) + nTmp, err = (*u.ExtendFootprintTtlResult).DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding BumpFootprintExpirationResult: %w", err) + return n, fmt.Errorf("decoding ExtendFootprintTtlResult: %w", err) } return n, nil case OperationTypeRestoreFootprint: @@ -42692,8 +42488,8 @@ var _ xdrType = (*OperationResultTr)(nil) // LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; // case INVOKE_HOST_FUNCTION: // InvokeHostFunctionResult invokeHostFunctionResult; -// case BUMP_FOOTPRINT_EXPIRATION: -// BumpFootprintExpirationResult bumpFootprintExpirationResult; +// case EXTEND_FOOTPRINT_TTL: +// ExtendFootprintTTLResult extendFootprintTTLResult; // case RESTORE_FOOTPRINT: // RestoreFootprintResult restoreFootprintResult; // } @@ -51028,18 +50824,18 @@ var _ xdrType = (*Int256Parts)(nil) // enum ContractExecutableType // { // CONTRACT_EXECUTABLE_WASM = 0, -// CONTRACT_EXECUTABLE_TOKEN = 1 +// CONTRACT_EXECUTABLE_STELLAR_ASSET = 1 // }; type ContractExecutableType int32 const ( - ContractExecutableTypeContractExecutableWasm ContractExecutableType = 0 - ContractExecutableTypeContractExecutableToken ContractExecutableType = 1 + ContractExecutableTypeContractExecutableWasm ContractExecutableType = 0 + ContractExecutableTypeContractExecutableStellarAsset ContractExecutableType = 1 ) var contractExecutableTypeMap = map[int32]string{ 0: "ContractExecutableTypeContractExecutableWasm", - 1: "ContractExecutableTypeContractExecutableToken", + 1: "ContractExecutableTypeContractExecutableStellarAsset", } // ValidEnum validates a proposed value for this enum. Implements @@ -51116,7 +50912,7 @@ var _ xdrType = (*ContractExecutableType)(nil) // { // case CONTRACT_EXECUTABLE_WASM: // Hash wasm_hash; -// case CONTRACT_EXECUTABLE_TOKEN: +// case CONTRACT_EXECUTABLE_STELLAR_ASSET: // void; // }; type ContractExecutable struct { @@ -51136,7 +50932,7 @@ func (u ContractExecutable) ArmForSwitch(sw int32) (string, bool) { switch ContractExecutableType(sw) { case ContractExecutableTypeContractExecutableWasm: return "WasmHash", true - case ContractExecutableTypeContractExecutableToken: + case ContractExecutableTypeContractExecutableStellarAsset: return "", true } return "-", false @@ -51153,7 +50949,7 @@ func NewContractExecutable(aType ContractExecutableType, value interface{}) (res return } result.WasmHash = &tv - case ContractExecutableTypeContractExecutableToken: + case ContractExecutableTypeContractExecutableStellarAsset: // void } return @@ -51196,7 +50992,7 @@ func (u ContractExecutable) EncodeTo(e *xdr.Encoder) error { return err } return nil - case ContractExecutableTypeContractExecutableToken: + case ContractExecutableTypeContractExecutableStellarAsset: // Void return nil } @@ -51227,7 +51023,7 @@ func (u *ContractExecutable) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, err return n, fmt.Errorf("decoding Hash: %w", err) } return n, nil - case ContractExecutableTypeContractExecutableToken: + case ContractExecutableTypeContractExecutableStellarAsset: // Void return n, nil } @@ -53451,6 +53247,90 @@ func (s StoredTransactionSet) xdrType() {} var _ xdrType = (*StoredTransactionSet)(nil) +// StoredDebugTransactionSet is an XDR Struct defines as: +// +// struct StoredDebugTransactionSet +// { +// StoredTransactionSet txSet; +// uint32 ledgerSeq; +// StellarValue scpValue; +// }; +type StoredDebugTransactionSet struct { + TxSet StoredTransactionSet + LedgerSeq Uint32 + ScpValue StellarValue +} + +// EncodeTo encodes this value using the Encoder. +func (s *StoredDebugTransactionSet) EncodeTo(e *xdr.Encoder) error { + var err error + if err = s.TxSet.EncodeTo(e); err != nil { + return err + } + if err = s.LedgerSeq.EncodeTo(e); err != nil { + return err + } + if err = s.ScpValue.EncodeTo(e); err != nil { + return err + } + return nil +} + +var _ decoderFrom = (*StoredDebugTransactionSet)(nil) + +// DecodeFrom decodes this value using the Decoder. +func (s *StoredDebugTransactionSet) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { + if maxDepth == 0 { + return 0, fmt.Errorf("decoding StoredDebugTransactionSet: %w", ErrMaxDecodingDepthReached) + } + maxDepth -= 1 + var err error + var n, nTmp int + nTmp, err = s.TxSet.DecodeFrom(d, maxDepth) + n += nTmp + if err != nil { + return n, fmt.Errorf("decoding StoredTransactionSet: %w", err) + } + nTmp, err = s.LedgerSeq.DecodeFrom(d, maxDepth) + n += nTmp + if err != nil { + return n, fmt.Errorf("decoding Uint32: %w", err) + } + nTmp, err = s.ScpValue.DecodeFrom(d, maxDepth) + n += nTmp + if err != nil { + return n, fmt.Errorf("decoding StellarValue: %w", err) + } + return n, nil +} + +// MarshalBinary implements encoding.BinaryMarshaler. +func (s StoredDebugTransactionSet) MarshalBinary() ([]byte, error) { + b := bytes.Buffer{} + e := xdr.NewEncoder(&b) + err := s.EncodeTo(e) + return b.Bytes(), err +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler. +func (s *StoredDebugTransactionSet) UnmarshalBinary(inp []byte) error { + r := bytes.NewReader(inp) + d := xdr.NewDecoder(r) + _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) + return err +} + +var ( + _ encoding.BinaryMarshaler = (*StoredDebugTransactionSet)(nil) + _ encoding.BinaryUnmarshaler = (*StoredDebugTransactionSet)(nil) +) + +// xdrType signals that this type is an type representing +// representing XDR values defined by this package. +func (s StoredDebugTransactionSet) xdrType() {} + +var _ xdrType = (*StoredDebugTransactionSet)(nil) + // PersistedScpStateV0 is an XDR Struct defines as: // // struct PersistedSCPStateV0 @@ -54500,127 +54380,107 @@ var _ xdrType = (*ConfigSettingContractBandwidthV0)(nil) // enum ContractCostType { // // Cost of running 1 wasm instruction // WasmInsnExec = 0, -// // Cost of growing wasm linear memory by 1 page -// WasmMemAlloc = 1, -// // Cost of allocating a chuck of host memory (in bytes) -// HostMemAlloc = 2, -// // Cost of copying a chuck of bytes into a pre-allocated host memory -// HostMemCpy = 3, -// // Cost of comparing two slices of host memory -// HostMemCmp = 4, +// // Cost of allocating a slice of memory (in bytes) +// MemAlloc = 1, +// // Cost of copying a slice of bytes into a pre-allocated memory +// MemCpy = 2, +// // Cost of comparing two slices of memory +// MemCmp = 3, // // Cost of a host function dispatch, not including the actual work done by // // the function nor the cost of VM invocation machinary -// DispatchHostFunction = 5, +// DispatchHostFunction = 4, // // Cost of visiting a host object from the host object storage. Exists to // // make sure some baseline cost coverage, i.e. repeatly visiting objects // // by the guest will always incur some charges. -// VisitObject = 6, +// VisitObject = 5, // // Cost of serializing an xdr object to bytes -// ValSer = 7, +// ValSer = 6, // // Cost of deserializing an xdr object from bytes -// ValDeser = 8, +// ValDeser = 7, // // Cost of computing the sha256 hash from bytes -// ComputeSha256Hash = 9, +// ComputeSha256Hash = 8, // // Cost of computing the ed25519 pubkey from bytes -// ComputeEd25519PubKey = 10, -// // Cost of accessing an entry in a Map. -// MapEntry = 11, -// // Cost of accessing an entry in a Vec -// VecEntry = 12, +// ComputeEd25519PubKey = 9, // // Cost of verifying ed25519 signature of a payload. -// VerifyEd25519Sig = 13, -// // Cost of reading a slice of vm linear memory -// VmMemRead = 14, -// // Cost of writing to a slice of vm linear memory -// VmMemWrite = 15, +// VerifyEd25519Sig = 10, // // Cost of instantiation a VM from wasm bytes code. -// VmInstantiation = 16, +// VmInstantiation = 11, // // Cost of instantiation a VM from a cached state. -// VmCachedInstantiation = 17, +// VmCachedInstantiation = 12, // // Cost of invoking a function on the VM. If the function is a host function, // // additional cost will be covered by `DispatchHostFunction`. -// InvokeVmFunction = 18, +// InvokeVmFunction = 13, // // Cost of computing a keccak256 hash from bytes. -// ComputeKeccak256Hash = 19, -// // Cost of computing an ECDSA secp256k1 pubkey from bytes. -// ComputeEcdsaSecp256k1Key = 20, +// ComputeKeccak256Hash = 14, // // Cost of computing an ECDSA secp256k1 signature from bytes. -// ComputeEcdsaSecp256k1Sig = 21, +// ComputeEcdsaSecp256k1Sig = 15, // // Cost of recovering an ECDSA secp256k1 key from a signature. -// RecoverEcdsaSecp256k1Key = 22, +// RecoverEcdsaSecp256k1Key = 16, // // Cost of int256 addition (`+`) and subtraction (`-`) operations -// Int256AddSub = 23, +// Int256AddSub = 17, // // Cost of int256 multiplication (`*`) operation -// Int256Mul = 24, +// Int256Mul = 18, // // Cost of int256 division (`/`) operation -// Int256Div = 25, +// Int256Div = 19, // // Cost of int256 power (`exp`) operation -// Int256Pow = 26, +// Int256Pow = 20, // // Cost of int256 shift (`shl`, `shr`) operation -// Int256Shift = 27 +// Int256Shift = 21, +// // Cost of drawing random bytes using a ChaCha20 PRNG +// ChaCha20DrawBytes = 22 // }; type ContractCostType int32 const ( ContractCostTypeWasmInsnExec ContractCostType = 0 - ContractCostTypeWasmMemAlloc ContractCostType = 1 - ContractCostTypeHostMemAlloc ContractCostType = 2 - ContractCostTypeHostMemCpy ContractCostType = 3 - ContractCostTypeHostMemCmp ContractCostType = 4 - ContractCostTypeDispatchHostFunction ContractCostType = 5 - ContractCostTypeVisitObject ContractCostType = 6 - ContractCostTypeValSer ContractCostType = 7 - ContractCostTypeValDeser ContractCostType = 8 - ContractCostTypeComputeSha256Hash ContractCostType = 9 - ContractCostTypeComputeEd25519PubKey ContractCostType = 10 - ContractCostTypeMapEntry ContractCostType = 11 - ContractCostTypeVecEntry ContractCostType = 12 - ContractCostTypeVerifyEd25519Sig ContractCostType = 13 - ContractCostTypeVmMemRead ContractCostType = 14 - ContractCostTypeVmMemWrite ContractCostType = 15 - ContractCostTypeVmInstantiation ContractCostType = 16 - ContractCostTypeVmCachedInstantiation ContractCostType = 17 - ContractCostTypeInvokeVmFunction ContractCostType = 18 - ContractCostTypeComputeKeccak256Hash ContractCostType = 19 - ContractCostTypeComputeEcdsaSecp256k1Key ContractCostType = 20 - ContractCostTypeComputeEcdsaSecp256k1Sig ContractCostType = 21 - ContractCostTypeRecoverEcdsaSecp256k1Key ContractCostType = 22 - ContractCostTypeInt256AddSub ContractCostType = 23 - ContractCostTypeInt256Mul ContractCostType = 24 - ContractCostTypeInt256Div ContractCostType = 25 - ContractCostTypeInt256Pow ContractCostType = 26 - ContractCostTypeInt256Shift ContractCostType = 27 + ContractCostTypeMemAlloc ContractCostType = 1 + ContractCostTypeMemCpy ContractCostType = 2 + ContractCostTypeMemCmp ContractCostType = 3 + ContractCostTypeDispatchHostFunction ContractCostType = 4 + ContractCostTypeVisitObject ContractCostType = 5 + ContractCostTypeValSer ContractCostType = 6 + ContractCostTypeValDeser ContractCostType = 7 + ContractCostTypeComputeSha256Hash ContractCostType = 8 + ContractCostTypeComputeEd25519PubKey ContractCostType = 9 + ContractCostTypeVerifyEd25519Sig ContractCostType = 10 + ContractCostTypeVmInstantiation ContractCostType = 11 + ContractCostTypeVmCachedInstantiation ContractCostType = 12 + ContractCostTypeInvokeVmFunction ContractCostType = 13 + ContractCostTypeComputeKeccak256Hash ContractCostType = 14 + ContractCostTypeComputeEcdsaSecp256k1Sig ContractCostType = 15 + ContractCostTypeRecoverEcdsaSecp256k1Key ContractCostType = 16 + ContractCostTypeInt256AddSub ContractCostType = 17 + ContractCostTypeInt256Mul ContractCostType = 18 + ContractCostTypeInt256Div ContractCostType = 19 + ContractCostTypeInt256Pow ContractCostType = 20 + ContractCostTypeInt256Shift ContractCostType = 21 + ContractCostTypeChaCha20DrawBytes ContractCostType = 22 ) var contractCostTypeMap = map[int32]string{ 0: "ContractCostTypeWasmInsnExec", - 1: "ContractCostTypeWasmMemAlloc", - 2: "ContractCostTypeHostMemAlloc", - 3: "ContractCostTypeHostMemCpy", - 4: "ContractCostTypeHostMemCmp", - 5: "ContractCostTypeDispatchHostFunction", - 6: "ContractCostTypeVisitObject", - 7: "ContractCostTypeValSer", - 8: "ContractCostTypeValDeser", - 9: "ContractCostTypeComputeSha256Hash", - 10: "ContractCostTypeComputeEd25519PubKey", - 11: "ContractCostTypeMapEntry", - 12: "ContractCostTypeVecEntry", - 13: "ContractCostTypeVerifyEd25519Sig", - 14: "ContractCostTypeVmMemRead", - 15: "ContractCostTypeVmMemWrite", - 16: "ContractCostTypeVmInstantiation", - 17: "ContractCostTypeVmCachedInstantiation", - 18: "ContractCostTypeInvokeVmFunction", - 19: "ContractCostTypeComputeKeccak256Hash", - 20: "ContractCostTypeComputeEcdsaSecp256k1Key", - 21: "ContractCostTypeComputeEcdsaSecp256k1Sig", - 22: "ContractCostTypeRecoverEcdsaSecp256k1Key", - 23: "ContractCostTypeInt256AddSub", - 24: "ContractCostTypeInt256Mul", - 25: "ContractCostTypeInt256Div", - 26: "ContractCostTypeInt256Pow", - 27: "ContractCostTypeInt256Shift", + 1: "ContractCostTypeMemAlloc", + 2: "ContractCostTypeMemCpy", + 3: "ContractCostTypeMemCmp", + 4: "ContractCostTypeDispatchHostFunction", + 5: "ContractCostTypeVisitObject", + 6: "ContractCostTypeValSer", + 7: "ContractCostTypeValDeser", + 8: "ContractCostTypeComputeSha256Hash", + 9: "ContractCostTypeComputeEd25519PubKey", + 10: "ContractCostTypeVerifyEd25519Sig", + 11: "ContractCostTypeVmInstantiation", + 12: "ContractCostTypeVmCachedInstantiation", + 13: "ContractCostTypeInvokeVmFunction", + 14: "ContractCostTypeComputeKeccak256Hash", + 15: "ContractCostTypeComputeEcdsaSecp256k1Sig", + 16: "ContractCostTypeRecoverEcdsaSecp256k1Key", + 17: "ContractCostTypeInt256AddSub", + 18: "ContractCostTypeInt256Mul", + 19: "ContractCostTypeInt256Div", + 20: "ContractCostTypeInt256Pow", + 21: "ContractCostTypeInt256Shift", + 22: "ContractCostTypeChaCha20DrawBytes", } // ValidEnum validates a proposed value for this enum. Implements @@ -54776,19 +54636,19 @@ func (s ContractCostParamEntry) xdrType() {} var _ xdrType = (*ContractCostParamEntry)(nil) -// StateExpirationSettings is an XDR Struct defines as: +// StateArchivalSettings is an XDR Struct defines as: // -// struct StateExpirationSettings { -// uint32 maxEntryExpiration; -// uint32 minTempEntryExpiration; -// uint32 minPersistentEntryExpiration; +// struct StateArchivalSettings { +// uint32 maxEntryTTL; +// uint32 minTemporaryTTL; +// uint32 minPersistentTTL; // // // rent_fee = wfee_rate_average / rent_rate_denominator_for_type // int64 persistentRentRateDenominator; // int64 tempRentRateDenominator; // -// // max number of entries that emit expiration meta in a single ledger -// uint32 maxEntriesToExpire; +// // max number of entries that emit archival meta in a single ledger +// uint32 maxEntriesToArchive; // // // Number of snapshots to use when calculating average BucketList size // uint32 bucketListSizeWindowSampleSize; @@ -54799,28 +54659,28 @@ var _ xdrType = (*ContractCostParamEntry)(nil) // // Lowest BucketList level to be scanned to evict entries // uint32 startingEvictionScanLevel; // }; -type StateExpirationSettings struct { - MaxEntryExpiration Uint32 - MinTempEntryExpiration Uint32 - MinPersistentEntryExpiration Uint32 +type StateArchivalSettings struct { + MaxEntryTtl Uint32 + MinTemporaryTtl Uint32 + MinPersistentTtl Uint32 PersistentRentRateDenominator Int64 TempRentRateDenominator Int64 - MaxEntriesToExpire Uint32 + MaxEntriesToArchive Uint32 BucketListSizeWindowSampleSize Uint32 EvictionScanSize Uint64 StartingEvictionScanLevel Uint32 } // EncodeTo encodes this value using the Encoder. -func (s *StateExpirationSettings) EncodeTo(e *xdr.Encoder) error { +func (s *StateArchivalSettings) EncodeTo(e *xdr.Encoder) error { var err error - if err = s.MaxEntryExpiration.EncodeTo(e); err != nil { + if err = s.MaxEntryTtl.EncodeTo(e); err != nil { return err } - if err = s.MinTempEntryExpiration.EncodeTo(e); err != nil { + if err = s.MinTemporaryTtl.EncodeTo(e); err != nil { return err } - if err = s.MinPersistentEntryExpiration.EncodeTo(e); err != nil { + if err = s.MinPersistentTtl.EncodeTo(e); err != nil { return err } if err = s.PersistentRentRateDenominator.EncodeTo(e); err != nil { @@ -54829,7 +54689,7 @@ func (s *StateExpirationSettings) EncodeTo(e *xdr.Encoder) error { if err = s.TempRentRateDenominator.EncodeTo(e); err != nil { return err } - if err = s.MaxEntriesToExpire.EncodeTo(e); err != nil { + if err = s.MaxEntriesToArchive.EncodeTo(e); err != nil { return err } if err = s.BucketListSizeWindowSampleSize.EncodeTo(e); err != nil { @@ -54844,27 +54704,27 @@ func (s *StateExpirationSettings) EncodeTo(e *xdr.Encoder) error { return nil } -var _ decoderFrom = (*StateExpirationSettings)(nil) +var _ decoderFrom = (*StateArchivalSettings)(nil) // DecodeFrom decodes this value using the Decoder. -func (s *StateExpirationSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { +func (s *StateArchivalSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, error) { if maxDepth == 0 { - return 0, fmt.Errorf("decoding StateExpirationSettings: %w", ErrMaxDecodingDepthReached) + return 0, fmt.Errorf("decoding StateArchivalSettings: %w", ErrMaxDecodingDepthReached) } maxDepth -= 1 var err error var n, nTmp int - nTmp, err = s.MaxEntryExpiration.DecodeFrom(d, maxDepth) + nTmp, err = s.MaxEntryTtl.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) } - nTmp, err = s.MinTempEntryExpiration.DecodeFrom(d, maxDepth) + nTmp, err = s.MinTemporaryTtl.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) } - nTmp, err = s.MinPersistentEntryExpiration.DecodeFrom(d, maxDepth) + nTmp, err = s.MinPersistentTtl.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) @@ -54879,7 +54739,7 @@ func (s *StateExpirationSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int if err != nil { return n, fmt.Errorf("decoding Int64: %w", err) } - nTmp, err = s.MaxEntriesToExpire.DecodeFrom(d, maxDepth) + nTmp, err = s.MaxEntriesToArchive.DecodeFrom(d, maxDepth) n += nTmp if err != nil { return n, fmt.Errorf("decoding Uint32: %w", err) @@ -54903,7 +54763,7 @@ func (s *StateExpirationSettings) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int } // MarshalBinary implements encoding.BinaryMarshaler. -func (s StateExpirationSettings) MarshalBinary() ([]byte, error) { +func (s StateArchivalSettings) MarshalBinary() ([]byte, error) { b := bytes.Buffer{} e := xdr.NewEncoder(&b) err := s.EncodeTo(e) @@ -54911,7 +54771,7 @@ func (s StateExpirationSettings) MarshalBinary() ([]byte, error) { } // UnmarshalBinary implements encoding.BinaryUnmarshaler. -func (s *StateExpirationSettings) UnmarshalBinary(inp []byte) error { +func (s *StateArchivalSettings) UnmarshalBinary(inp []byte) error { r := bytes.NewReader(inp) d := xdr.NewDecoder(r) _, err := s.DecodeFrom(d, xdr.DecodeDefaultMaxDepth) @@ -54919,15 +54779,15 @@ func (s *StateExpirationSettings) UnmarshalBinary(inp []byte) error { } var ( - _ encoding.BinaryMarshaler = (*StateExpirationSettings)(nil) - _ encoding.BinaryUnmarshaler = (*StateExpirationSettings)(nil) + _ encoding.BinaryMarshaler = (*StateArchivalSettings)(nil) + _ encoding.BinaryUnmarshaler = (*StateArchivalSettings)(nil) ) // xdrType signals that this type is an type representing // representing XDR values defined by this package. -func (s StateExpirationSettings) xdrType() {} +func (s StateArchivalSettings) xdrType() {} -var _ xdrType = (*StateExpirationSettings)(nil) +var _ xdrType = (*StateArchivalSettings)(nil) // EvictionIterator is an XDR Struct defines as: // @@ -55115,7 +54975,7 @@ var _ xdrType = (*ContractCostParams)(nil) // CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, // CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, // CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, -// CONFIG_SETTING_STATE_EXPIRATION = 10, +// CONFIG_SETTING_STATE_ARCHIVAL = 10, // CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, // CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12, // CONFIG_SETTING_EVICTION_ITERATOR = 13 @@ -55133,7 +54993,7 @@ const ( ConfigSettingIdConfigSettingContractCostParamsMemoryBytes ConfigSettingId = 7 ConfigSettingIdConfigSettingContractDataKeySizeBytes ConfigSettingId = 8 ConfigSettingIdConfigSettingContractDataEntrySizeBytes ConfigSettingId = 9 - ConfigSettingIdConfigSettingStateExpiration ConfigSettingId = 10 + ConfigSettingIdConfigSettingStateArchival ConfigSettingId = 10 ConfigSettingIdConfigSettingContractExecutionLanes ConfigSettingId = 11 ConfigSettingIdConfigSettingBucketlistSizeWindow ConfigSettingId = 12 ConfigSettingIdConfigSettingEvictionIterator ConfigSettingId = 13 @@ -55150,7 +55010,7 @@ var configSettingIdMap = map[int32]string{ 7: "ConfigSettingIdConfigSettingContractCostParamsMemoryBytes", 8: "ConfigSettingIdConfigSettingContractDataKeySizeBytes", 9: "ConfigSettingIdConfigSettingContractDataEntrySizeBytes", - 10: "ConfigSettingIdConfigSettingStateExpiration", + 10: "ConfigSettingIdConfigSettingStateArchival", 11: "ConfigSettingIdConfigSettingContractExecutionLanes", 12: "ConfigSettingIdConfigSettingBucketlistSizeWindow", 13: "ConfigSettingIdConfigSettingEvictionIterator", @@ -55248,8 +55108,8 @@ var _ xdrType = (*ConfigSettingId)(nil) // uint32 contractDataKeySizeBytes; // case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: // uint32 contractDataEntrySizeBytes; -// case CONFIG_SETTING_STATE_EXPIRATION: -// StateExpirationSettings stateExpirationSettings; +// case CONFIG_SETTING_STATE_ARCHIVAL: +// StateArchivalSettings stateArchivalSettings; // case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: // ConfigSettingContractExecutionLanesV0 contractExecutionLanes; // case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: @@ -55269,7 +55129,7 @@ type ConfigSettingEntry struct { ContractCostParamsMemBytes *ContractCostParams ContractDataKeySizeBytes *Uint32 ContractDataEntrySizeBytes *Uint32 - StateExpirationSettings *StateExpirationSettings + StateArchivalSettings *StateArchivalSettings ContractExecutionLanes *ConfigSettingContractExecutionLanesV0 BucketListSizeWindow *[]Uint64 EvictionIterator *EvictionIterator @@ -55305,8 +55165,8 @@ func (u ConfigSettingEntry) ArmForSwitch(sw int32) (string, bool) { return "ContractDataKeySizeBytes", true case ConfigSettingIdConfigSettingContractDataEntrySizeBytes: return "ContractDataEntrySizeBytes", true - case ConfigSettingIdConfigSettingStateExpiration: - return "StateExpirationSettings", true + case ConfigSettingIdConfigSettingStateArchival: + return "StateArchivalSettings", true case ConfigSettingIdConfigSettingContractExecutionLanes: return "ContractExecutionLanes", true case ConfigSettingIdConfigSettingBucketlistSizeWindow: @@ -55391,13 +55251,13 @@ func NewConfigSettingEntry(configSettingId ConfigSettingId, value interface{}) ( return } result.ContractDataEntrySizeBytes = &tv - case ConfigSettingIdConfigSettingStateExpiration: - tv, ok := value.(StateExpirationSettings) + case ConfigSettingIdConfigSettingStateArchival: + tv, ok := value.(StateArchivalSettings) if !ok { - err = errors.New("invalid value, must be StateExpirationSettings") + err = errors.New("invalid value, must be StateArchivalSettings") return } - result.StateExpirationSettings = &tv + result.StateArchivalSettings = &tv case ConfigSettingIdConfigSettingContractExecutionLanes: tv, ok := value.(ConfigSettingContractExecutionLanesV0) if !ok { @@ -55673,25 +55533,25 @@ func (u ConfigSettingEntry) GetContractDataEntrySizeBytes() (result Uint32, ok b return } -// MustStateExpirationSettings retrieves the StateExpirationSettings value from the union, +// MustStateArchivalSettings retrieves the StateArchivalSettings value from the union, // panicing if the value is not set. -func (u ConfigSettingEntry) MustStateExpirationSettings() StateExpirationSettings { - val, ok := u.GetStateExpirationSettings() +func (u ConfigSettingEntry) MustStateArchivalSettings() StateArchivalSettings { + val, ok := u.GetStateArchivalSettings() if !ok { - panic("arm StateExpirationSettings is not set") + panic("arm StateArchivalSettings is not set") } return val } -// GetStateExpirationSettings retrieves the StateExpirationSettings value from the union, +// GetStateArchivalSettings retrieves the StateArchivalSettings value from the union, // returning ok if the union's switch indicated the value is valid. -func (u ConfigSettingEntry) GetStateExpirationSettings() (result StateExpirationSettings, ok bool) { +func (u ConfigSettingEntry) GetStateArchivalSettings() (result StateArchivalSettings, ok bool) { armName, _ := u.ArmForSwitch(int32(u.ConfigSettingId)) - if armName == "StateExpirationSettings" { - result = *u.StateExpirationSettings + if armName == "StateArchivalSettings" { + result = *u.StateArchivalSettings ok = true } @@ -55830,8 +55690,8 @@ func (u ConfigSettingEntry) EncodeTo(e *xdr.Encoder) error { return err } return nil - case ConfigSettingIdConfigSettingStateExpiration: - if err = (*u.StateExpirationSettings).EncodeTo(e); err != nil { + case ConfigSettingIdConfigSettingStateArchival: + if err = (*u.StateArchivalSettings).EncodeTo(e); err != nil { return err } return nil @@ -55955,12 +55815,12 @@ func (u *ConfigSettingEntry) DecodeFrom(d *xdr.Decoder, maxDepth uint) (int, err return n, fmt.Errorf("decoding Uint32: %w", err) } return n, nil - case ConfigSettingIdConfigSettingStateExpiration: - u.StateExpirationSettings = new(StateExpirationSettings) - nTmp, err = (*u.StateExpirationSettings).DecodeFrom(d, maxDepth) + case ConfigSettingIdConfigSettingStateArchival: + u.StateArchivalSettings = new(StateArchivalSettings) + nTmp, err = (*u.StateArchivalSettings).DecodeFrom(d, maxDepth) n += nTmp if err != nil { - return n, fmt.Errorf("decoding StateExpirationSettings: %w", err) + return n, fmt.Errorf("decoding StateArchivalSettings: %w", err) } return n, nil case ConfigSettingIdConfigSettingContractExecutionLanes: