Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion Stellar-contract-config-setting.x
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
%#include "xdr/Stellar-types.h"

namespace stellar {

typedef opaque EncodedLedgerKey<>;

// General “Soroban execution lane” settings
struct ConfigSettingContractExecutionLanesV0
{
Expand Down Expand Up @@ -343,6 +346,24 @@ struct ConfigSettingSCPTiming {
uint32 ballotTimeoutIncrementMilliseconds;
};

struct FrozenLedgerKeys {
EncodedLedgerKey keys<>;
};

struct FrozenLedgerKeysDelta {
EncodedLedgerKey keysToFreeze<>;
EncodedLedgerKey keysToUnfreeze<>;
};

struct FreezeBypassTxs {
Hash txHashes<>;
};

struct FreezeBypassTxsDelta {
Hash addTxs<>;
Hash removeTxs<>;
};

// limits the ContractCostParams size to 20kB
const CONTRACT_COST_COUNT_LIMIT = 1024;

Expand All @@ -367,7 +388,11 @@ enum ConfigSettingID
CONFIG_SETTING_EVICTION_ITERATOR = 13,
CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14,
CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15,
CONFIG_SETTING_SCP_TIMING = 16
CONFIG_SETTING_SCP_TIMING = 16,
CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17,
CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18,
CONFIG_SETTING_FREEZE_BYPASS_TXS = 19,
CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20
};

union ConfigSettingEntry switch (ConfigSettingID configSettingID)
Expand Down Expand Up @@ -406,5 +431,13 @@ case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0:
ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt;
case CONFIG_SETTING_SCP_TIMING:
ConfigSettingSCPTiming contractSCPTiming;
case CONFIG_SETTING_FROZEN_LEDGER_KEYS:
FrozenLedgerKeys frozenLedgerKeys;
case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA:
FrozenLedgerKeysDelta frozenLedgerKeysDelta;
case CONFIG_SETTING_FREEZE_BYPASS_TXS:
FreezeBypassTxs freezeBypassTxs;
case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA:
FreezeBypassTxsDelta freezeBypassTxsDelta;
};
}
19 changes: 15 additions & 4 deletions Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,8 @@ enum ClaimClaimableBalanceResultCode
CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2,
CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3,
CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4,
CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5
CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5,
CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN = -6
};

union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code)
Expand All @@ -1609,6 +1610,7 @@ case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM:
case CLAIM_CLAIMABLE_BALANCE_LINE_FULL:
case CLAIM_CLAIMABLE_BALANCE_NO_TRUST:
case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED:
case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN:
void;
};

Expand Down Expand Up @@ -1778,7 +1780,9 @@ enum LiquidityPoolDepositResultCode
LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't
// have sufficient limit
LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds
LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7 // pool reserves are full
LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7, // pool reserves are full
LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN = -8 // trustline for one of the
// assets is frozen
};

union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code)
Expand All @@ -1792,6 +1796,7 @@ case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED:
case LIQUIDITY_POOL_DEPOSIT_LINE_FULL:
case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE:
case LIQUIDITY_POOL_DEPOSIT_POOL_FULL:
case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN:
void;
};

Expand All @@ -1810,7 +1815,9 @@ enum LiquidityPoolWithdrawResultCode
// pool share
LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one
// of the assets
LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough
LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5, // didn't withdraw enough
LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN = -6 // trustline for one of the
// assets is frozen
};

union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code)
Expand All @@ -1822,6 +1829,7 @@ case LIQUIDITY_POOL_WITHDRAW_NO_TRUST:
case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED:
case LIQUIDITY_POOL_WITHDRAW_LINE_FULL:
case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM:
case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN:
void;
};

Expand Down Expand Up @@ -1999,7 +2007,8 @@ enum TransactionResultCode
txBAD_SPONSORSHIP = -14, // sponsorship not confirmed
txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met
txMALFORMED = -16, // precondition is invalid
txSOROBAN_INVALID = -17 // soroban-specific preconditions were not met
txSOROBAN_INVALID = -17, // soroban-specific preconditions were not met
txFROZEN_KEY_ACCESSED = -18 // a 'frozen' ledger key is accessed by any operation
};

// InnerTransactionResult must be binary compatible with TransactionResult
Expand Down Expand Up @@ -2031,6 +2040,7 @@ struct InnerTransactionResult
case txBAD_MIN_SEQ_AGE_OR_GAP:
case txMALFORMED:
case txSOROBAN_INVALID:
case txFROZEN_KEY_ACCESSED:
void;
}
result;
Expand Down Expand Up @@ -2078,6 +2088,7 @@ struct TransactionResult
case txBAD_MIN_SEQ_AGE_OR_GAP:
case txMALFORMED:
case txSOROBAN_INVALID:
case txFROZEN_KEY_ACCESSED:
void;
}
result;
Expand Down