diff --git a/vm/types/src/on_chain_config/gas_schedule.rs b/vm/types/src/on_chain_config/gas_schedule.rs index 8643e44010..669b9dbb56 100644 --- a/vm/types/src/on_chain_config/gas_schedule.rs +++ b/vm/types/src/on_chain_config/gas_schedule.rs @@ -15,8 +15,6 @@ use std::collections::BTreeMap; const GAS_SCHEDULE_MODULE_NAME: &str = "GasSchedule"; pub static G_GAS_SCHEDULE_IDENTIFIER: Lazy = Lazy::new(|| Identifier::new(GAS_SCHEDULE_MODULE_NAME).unwrap()); -pub static G_GAS_SCHEDULE_INITIALIZE: Lazy = - Lazy::new(|| Identifier::new("initialize").unwrap()); pub static G_GAS_SCHEDULE_GAS_SCHEDULE: Lazy = Lazy::new(|| Identifier::new("gas_schedule").unwrap()); diff --git a/vm/types/src/on_chain_config/mod.rs b/vm/types/src/on_chain_config/mod.rs index 35c00f59e4..774525f3b2 100644 --- a/vm/types/src/on_chain_config/mod.rs +++ b/vm/types/src/on_chain_config/mod.rs @@ -32,7 +32,6 @@ pub use self::{ native_gas_schedule_v2, native_gas_schedule_v3, native_gas_schedule_v4, txn_gas_schedule_test, txn_gas_schedule_v1, txn_gas_schedule_v2, txn_gas_schedule_v3, GasSchedule, G_GAS_SCHEDULE_GAS_SCHEDULE, G_GAS_SCHEDULE_IDENTIFIER, - G_GAS_SCHEDULE_INITIALIZE, }, genesis_gas_schedule::{ instruction_table_v1, instruction_table_v2, native_table_v1, native_table_v2, diff --git a/vm/vm-runtime/src/starcoin_vm.rs b/vm/vm-runtime/src/starcoin_vm.rs index 48a3088938..909a656557 100644 --- a/vm/vm-runtime/src/starcoin_vm.rs +++ b/vm/vm-runtime/src/starcoin_vm.rs @@ -179,7 +179,7 @@ impl StarcoinVM { < StdlibVersion::Version(VMCONFIG_UPGRADE_VERSION_MARK) { debug!( - "stdlib version: {}, fetch vmconfig from onchain resource", + "stdlib version: {}, fetch VMConfig from onchain resource", stdlib_version ); let gas_cost_table = VMConfig::fetch_config(&remote_storage)? @@ -187,13 +187,13 @@ impl StarcoinVM { .gas_schedule; ( Some(GasSchedule::from(&gas_cost_table)), - "gas schedule from gensis", + "gas schedule from VMConfig", ) } else if stdlib_version >= StdlibVersion::Version(VMCONFIG_UPGRADE_VERSION_MARK) && stdlib_version < StdlibVersion::Version(GAS_SCHEDULE_UPGRADE_VERSION_MARK) { debug!( - "stdlib version: {}, fetch vmconfig from onchain module", + "stdlib version: {}, fetch VMConfig from onchain module", stdlib_version ); let instruction_schedule = { @@ -253,11 +253,11 @@ impl StarcoinVM { }; ( Some(GasSchedule::from(&cost_table)), - "gas schedule from vm config", + "gas schedule from VMConfig", ) } else { debug!( - "stdlib version: {}, fetch gas schedule from onchain module", + "stdlib version: {}, fetch schedule from onchain module GasSchedule", stdlib_version ); let gas_schedule = { @@ -275,11 +275,11 @@ impl StarcoinVM { )? .pop() .ok_or_else(|| { - anyhow::anyhow!("Expect 0x1::GasSchedule::initialize() return value") + anyhow::anyhow!("Expect 0x1::GasSchedule::gas_schedule() return value") })?; bcs_ext::from_bytes::(&data)? }; - (Some(gas_schedule), "gas schedule from gas schedule in move") + (Some(gas_schedule), "gas schedule from GasSchedule") }; #[cfg(feature = "print_gas_info")] match self.gas_schedule.as_ref() {