From 71f9556a721b3dc9df0fa4eedd1ad3f15baf7066 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 19 Jan 2023 15:26:10 +0100 Subject: [PATCH] chore: remove `ActionCreationConfig` et al. `ActionCreationConfigView` is still around for the RPC format but inside the transaction runtime logic we now use `RuntimeFeesConfig::action_fees` which stores these fees by parameter. The same goes for `DataReceiptCreationConfig` and `AccessKeyCreationConfig`. These have been obsolete since #8100 I just forgot to delete them. --- core/primitives-core/src/runtime/fees.rs | 64 ------------------------ 1 file changed, 64 deletions(-) diff --git a/core/primitives-core/src/runtime/fees.rs b/core/primitives-core/src/runtime/fees.rs index 8432ea059e7..bd6b0b865f6 100644 --- a/core/primitives-core/src/runtime/fees.rs +++ b/core/primitives-core/src/runtime/fees.rs @@ -60,70 +60,6 @@ pub struct RuntimeFeesConfig { pub pessimistic_gas_price_inflation_ratio: Rational, } -/// Describes the cost of creating a data receipt, `DataReceipt`. -#[derive(Debug, Serialize, Deserialize, Clone, Hash, PartialEq, Eq)] -pub struct DataReceiptCreationConfig { - /// Base cost of creating a data receipt. - /// Both `send` and `exec` costs are burned when a new receipt has input dependencies. The gas - /// is charged for each input dependency. The dependencies are specified when a receipt is - /// created using `promise_then` and `promise_batch_then`. - /// NOTE: Any receipt with output dependencies will produce data receipts. Even if it fails. - /// Even if the last action is not a function call (in case of success it will return empty - /// value). - pub base_cost: Fee, - /// Additional cost per byte sent. - /// Both `send` and `exec` costs are burned when a function call finishes execution and returns - /// `N` bytes of data to every output dependency. For each output dependency the cost is - /// `(send(sir) + exec()) * N`. - pub cost_per_byte: Fee, -} - -/// Describes the cost of creating a specific action, `Action`. Includes all variants. -#[derive(Debug, Serialize, Deserialize, Clone, Hash, PartialEq, Eq)] -pub struct ActionCreationConfig { - /// Base cost of creating an account. - pub create_account_cost: Fee, - - /// Base cost of deploying a contract. - pub deploy_contract_cost: Fee, - /// Cost per byte of deploying a contract. - pub deploy_contract_cost_per_byte: Fee, - - /// Base cost of calling a function. - pub function_call_cost: Fee, - /// Cost per byte of method name and arguments of calling a function. - pub function_call_cost_per_byte: Fee, - - /// Base cost of making a transfer. - pub transfer_cost: Fee, - - /// Base cost of staking. - pub stake_cost: Fee, - - /// Base cost of adding a key. - pub add_key_cost: AccessKeyCreationConfig, - - /// Base cost of deleting a key. - pub delete_key_cost: Fee, - - /// Base cost of deleting an account. - pub delete_account_cost: Fee, - - /// Base cost of a delegate action - pub delegate_cost: Fee, -} - -/// Describes the cost of creating an access key. -#[derive(Debug, Serialize, Deserialize, Clone, Hash, PartialEq, Eq)] -pub struct AccessKeyCreationConfig { - /// Base cost of creating a full access access-key. - pub full_access_cost: Fee, - /// Base cost of creating an access-key restricted to specific functions. - pub function_call_cost: Fee, - /// Cost per byte of method_names of creating a restricted access-key. - pub function_call_cost_per_byte: Fee, -} - /// Describes cost of storage per block #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct StorageUsageConfig {