Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change metadata fee config to only account for contract events. #127

Merged
merged 1 commit into from
Jul 26, 2023
Merged
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
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