Skip to content

Commit

Permalink
Change metadata fee config to only account for contract events. (#127)
Browse files Browse the repository at this point in the history
Also renamed a couple tx-size related fields for clarity.
  • Loading branch information
dmkozh authored Jul 26, 2023
1 parent 54fb7c5 commit e72168f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Stellar-contract-config-setting.x
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,26 @@ struct ConfigSettingContractHistoricalDataV0
};

// Meta data (pushed to downstream systems) settings for contracts.
struct ConfigSettingContractMetaDataV0
struct ConfigSettingContractEventsV0
{
// Maximum size of extended meta data produced by a transaction
uint32 txMaxExtendedMetaDataSizeBytes;
// Fee for generating 1KB of extended meta data
int64 feeExtendedMetaData1KB;
// Maximum size of events that a contract call can emit.
uint32 txMaxContractEventsSizeBytes;
// Fee for generating 1KB of contract events.
int64 feeContractEvents1KB;
};

// Bandwidth related data settings for contracts
// Bandwidth related data settings for contracts.
// We consider bandwidth to only be consumed by the transaction envelopes, hence
// this concerns only transaction sizes.
struct ConfigSettingContractBandwidthV0
{
// Maximum size in bytes to propagate per ledger
uint32 ledgerMaxPropagateSizeBytes;
// Maximum sum of all transaction sizes in the ledger in bytes
uint32 ledgerMaxTxsSizeBytes;
// Maximum size in bytes for a transaction
uint32 txMaxSizeBytes;

// Fee for propagating 1KB of data
int64 feePropagateData1KB;
// Fee for 1 KB of transaction size
int64 feeTxSize1KB;
};

enum ContractCostType {
Expand Down Expand Up @@ -217,7 +219,7 @@ case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0:
case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0:
ConfigSettingContractHistoricalDataV0 contractHistoricalData;
case CONFIG_SETTING_CONTRACT_META_DATA_V0:
ConfigSettingContractMetaDataV0 contractMetaData;
ConfigSettingContractEventsV0 contractEvents;
case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0:
ConfigSettingContractBandwidthV0 contractBandwidth;
case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS:
Expand Down

0 comments on commit e72168f

Please sign in to comment.