diff --git a/Cargo.lock b/Cargo.lock index 141cf80da4..0c034d2619 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9754,8 +9754,8 @@ dependencies = [ [[package]] name = "starcoin-framework" -version = "11.0.0" -source = "git+https://github.com/starcoinorg/starcoin-framework?rev=345a3900a0064dc57a9560235bc72c12f03448b1#345a3900a0064dc57a9560235bc72c12f03448b1" +version = "13.0.0" +source = "git+https://github.com/starcoinorg/starcoin-framework?rev=975539d8bcad6210b443a5f26685bd2e0d14263f#975539d8bcad6210b443a5f26685bd2e0d14263f" dependencies = [ "anyhow", "include_dir", diff --git a/Cargo.toml b/Cargo.toml index d401d1340d..ffe2b623c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -451,7 +451,7 @@ starcoin-crypto = { git = "https://github.com/starcoinorg/starcoin-crypto", rev starcoin-decrypt = { path = "commons/decrypt" } starcoin-dev = { path = "vm/dev" } starcoin-executor = { path = "executor" } -starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "345a3900a0064dc57a9560235bc72c12f03448b1" } +starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "975539d8bcad6210b443a5f26685bd2e0d14263f" } starcoin-genesis = { path = "genesis" } starcoin-logger = { path = "commons/logger" } starcoin-metrics = { path = "commons/metrics" } diff --git a/executor/tests/module_upgrade_test.rs b/executor/tests/module_upgrade_test.rs index c9d4e949b6..e8bc8c4318 100644 --- a/executor/tests/module_upgrade_test.rs +++ b/executor/tests/module_upgrade_test.rs @@ -18,7 +18,9 @@ use starcoin_vm_types::account_config::{association_address, core_code_address, use starcoin_vm_types::account_config::{genesis_address, stc_type_tag}; use starcoin_vm_types::genesis_config::{ChainId, StdlibVersion}; use starcoin_vm_types::move_resource::MoveResource; -use starcoin_vm_types::on_chain_config::{MoveLanguageVersion, TransactionPublishOption, Version}; +use starcoin_vm_types::on_chain_config::{ + FlexiDagConfig, MoveLanguageVersion, TransactionPublishOption, Version, +}; use starcoin_vm_types::on_chain_resource::LinearWithdrawCapability; use starcoin_vm_types::state_store::state_key::StateKey; use starcoin_vm_types::token::stc::G_STC_TOKEN_CODE; @@ -28,7 +30,8 @@ use std::fs::File; use std::io::Read; use stdlib::{load_upgrade_package, StdlibCompat, G_STDLIB_VERSIONS}; use test_helper::dao::{ - dao_vote_test, execute_script_on_chain_config, on_chain_config_type_tag, vote_language_version, + dao_vote_test, execute_script_on_chain_config, on_chain_config_type_tag, vote_flexi_dag_config, + vote_language_version, }; use test_helper::executor::*; use test_helper::starcoin_dao; @@ -113,7 +116,7 @@ fn test_init_script() -> Result<()> { } #[stest::test] -fn test_upgrade_stdlib_with_incremental_package() -> Result<()> { +fn test_stdlib_upgrade_with_incremental_package() -> Result<()> { let alice = Account::new(); let mut genesis_config = BuiltinNetworkID::Test.genesis_config().clone(); genesis_config.stdlib_version = StdlibVersion::Version(1); @@ -196,6 +199,7 @@ fn test_stdlib_upgrade() -> Result<()> { let alice = Account::new(); for new_version in stdlib_versions.into_iter().skip(1) { + debug!("=== upgrading {current_version} to {new_version}"); // if upgrade from 7 to later, we need to update language version to 3. if let StdlibVersion::Version(7) = current_version { dao_vote_test( @@ -235,6 +239,18 @@ fn test_stdlib_upgrade() -> Result<()> { )?; proposal_id += 1; } + if let StdlibVersion::Version(13) = current_version { + dao_vote_test( + &alice, + &chain_state, + &net, + vote_flexi_dag_config(&net, 1234567890u64), + on_chain_config_type_tag(FlexiDagConfig::type_tag()), + execute_script_on_chain_config(&net, FlexiDagConfig::type_tag(), proposal_id), + proposal_id, + )?; + proposal_id += 1; + } verify_version_state(current_version, &chain_state)?; let dao_action_type_tag = new_version.upgrade_module_type_tag(); let package = match load_upgrade_package(current_version, new_version)? { @@ -244,6 +260,7 @@ fn test_stdlib_upgrade() -> Result<()> { "{:?} is same as {:?}, continue", current_version, new_version ); + ext_execute_after_upgrade(new_version, &net, &chain_state)?; continue; } }; @@ -458,6 +475,12 @@ fn ext_execute_after_upgrade( "expect 0x1::GenesisNFT::GenesisNFTInfo in global storage, but go none." ); } + StdlibVersion::Version(12) => { + let version_resource = chain_state.get_on_chain_config::()?; + assert!(version_resource.is_some()); + let version = version_resource.unwrap(); + assert_eq!(version.major, 6, "expect language version is 6"); + } // this is old daospace-v12 starcoin-framework, // https://github.com/starcoinorg/starcoin-framework/releases/tag/daospace-v12 @@ -695,6 +718,15 @@ where "expect LinearWithdrawCapability exist at association_address" ); } + StdlibVersion::Version(13) => { + let config = chain_state.get_on_chain_config::()?; + assert!(config.is_some()); + assert_eq!( + config.unwrap().effective_height, + 1234567890, + "expect dag effective height is 1234567890" + ); + } _ => { //do nothing. } diff --git a/genesis/generated/halley/genesis b/genesis/generated/halley/genesis index 0b31f956ca..2c97105716 100644 Binary files a/genesis/generated/halley/genesis and b/genesis/generated/halley/genesis differ diff --git a/genesis/src/lib.rs b/genesis/src/lib.rs index 83e915f4f5..73153a287f 100644 --- a/genesis/src/lib.rs +++ b/genesis/src/lib.rs @@ -381,7 +381,7 @@ impl Genesis { pub fn init_storage_for_test( net: &ChainNetwork, ) -> Result<(Arc, ChainInfo, Genesis, BlockDAG)> { - debug!("init storage by genesis for test."); + debug!("init storage by genesis for test. {net:?}"); let storage = Arc::new(Storage::new(StorageInstance::new_cache_instance())?); let genesis = Genesis::load_or_build(net)?; let dag = BlockDAG::create_for_testing()?; diff --git a/test-helper/src/dao.rs b/test-helper/src/dao.rs index f443106ca3..1c66721066 100644 --- a/test-helper/src/dao.rs +++ b/test-helper/src/dao.rs @@ -413,6 +413,21 @@ pub fn vote_language_version(_net: &ChainNetwork, lang_version: u64) -> ScriptFu ) } +pub fn vote_flexi_dag_config(_net: &ChainNetwork, effective_height: u64) -> ScriptFunction { + ScriptFunction::new( + ModuleId::new( + core_code_address(), + Identifier::new("OnChainConfigScripts").unwrap(), + ), + Identifier::new("propose_update_flexi_dag_effective_height").unwrap(), + vec![], + vec![ + bcs_ext::to_bytes(&effective_height).unwrap(), + bcs_ext::to_bytes(&0u64).unwrap(), + ], + ) +} + /// execute on chain config scripts pub fn execute_script_on_chain_config( _net: &ChainNetwork, diff --git a/vm/starcoin-transactional-test-harness/src/lib.rs b/vm/starcoin-transactional-test-harness/src/lib.rs index 24988e144e..633f35d797 100644 --- a/vm/starcoin-transactional-test-harness/src/lib.rs +++ b/vm/starcoin-transactional-test-harness/src/lib.rs @@ -816,10 +816,11 @@ impl<'a> StarcoinTestAdapter<'a> { number: Option, uncles: Option, ) -> Result<(Option, Option)> { + // use BlockMetadataV2 instead of BlockMetaData since stdlib version(13) let last_blockmeta = self .context .storage - .get_resource::(genesis_address())?; + .get_resource::(genesis_address())?; let height = number .or_else(|| last_blockmeta.as_ref().map(|b| b.number + 1)) diff --git a/vm/stdlib/compiled/13/12-13/stdlib.blob b/vm/stdlib/compiled/13/12-13/stdlib.blob new file mode 100644 index 0000000000..1e9519997a Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib.blob differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/000_BitOperators.mv b/vm/stdlib/compiled/13/12-13/stdlib/000_BitOperators.mv new file mode 100644 index 0000000000..5def61d413 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/000_BitOperators.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/001_Debug.mv b/vm/stdlib/compiled/13/12-13/stdlib/001_Debug.mv new file mode 100644 index 0000000000..06446cdf8f Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/001_Debug.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/002_EmptyScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/002_EmptyScripts.mv new file mode 100644 index 0000000000..1f874d057c Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/002_EmptyScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/003_FromBCS.mv b/vm/stdlib/compiled/13/12-13/stdlib/003_FromBCS.mv new file mode 100644 index 0000000000..6291eb75bc Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/003_FromBCS.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/004_MintScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/004_MintScripts.mv new file mode 100644 index 0000000000..e0d82f1a77 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/004_MintScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/005_SIP_2.mv b/vm/stdlib/compiled/13/12-13/stdlib/005_SIP_2.mv new file mode 100644 index 0000000000..b495fd3d33 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/005_SIP_2.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/006_SIP_3.mv b/vm/stdlib/compiled/13/12-13/stdlib/006_SIP_3.mv new file mode 100644 index 0000000000..3885df5848 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/006_SIP_3.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/007_SignedInteger64.mv b/vm/stdlib/compiled/13/12-13/stdlib/007_SignedInteger64.mv new file mode 100644 index 0000000000..e3b62651c1 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/007_SignedInteger64.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/008_Vector.mv b/vm/stdlib/compiled/13/12-13/stdlib/008_Vector.mv new file mode 100644 index 0000000000..fca0c13f9f Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/008_Vector.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/009_Errors.mv b/vm/stdlib/compiled/13/12-13/stdlib/009_Errors.mv new file mode 100644 index 0000000000..8d51430c07 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/009_Errors.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/010_ACL.mv b/vm/stdlib/compiled/13/12-13/stdlib/010_ACL.mv new file mode 100644 index 0000000000..773134f2ee Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/010_ACL.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/011_Signer.mv b/vm/stdlib/compiled/13/12-13/stdlib/011_Signer.mv new file mode 100644 index 0000000000..a84a73d58a Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/011_Signer.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/012_Math.mv b/vm/stdlib/compiled/13/12-13/stdlib/012_Math.mv new file mode 100644 index 0000000000..034dad6d3e Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/012_Math.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/013_Option.mv b/vm/stdlib/compiled/13/12-13/stdlib/013_Option.mv new file mode 100644 index 0000000000..340a58f50f Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/013_Option.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/014_BCS.mv b/vm/stdlib/compiled/13/12-13/stdlib/014_BCS.mv new file mode 100644 index 0000000000..d66fd29767 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/014_BCS.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/015_Event.mv b/vm/stdlib/compiled/13/12-13/stdlib/015_Event.mv new file mode 100644 index 0000000000..a4b3a1b812 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/015_Event.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/016_Token.mv b/vm/stdlib/compiled/13/12-13/stdlib/016_Token.mv new file mode 100644 index 0000000000..4217dbb830 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/016_Token.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/017_CoreAddresses.mv b/vm/stdlib/compiled/13/12-13/stdlib/017_CoreAddresses.mv new file mode 100644 index 0000000000..8977cc4410 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/017_CoreAddresses.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/018_Timestamp.mv b/vm/stdlib/compiled/13/12-13/stdlib/018_Timestamp.mv new file mode 100644 index 0000000000..815d990752 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/018_Timestamp.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/019_Config.mv b/vm/stdlib/compiled/13/12-13/stdlib/019_Config.mv new file mode 100644 index 0000000000..5107abbab8 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/019_Config.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/020_ChainId.mv b/vm/stdlib/compiled/13/12-13/stdlib/020_ChainId.mv new file mode 100644 index 0000000000..fb643fe958 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/020_ChainId.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/021_VMConfig.mv b/vm/stdlib/compiled/13/12-13/stdlib/021_VMConfig.mv new file mode 100644 index 0000000000..d4a4038b71 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/021_VMConfig.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/022_Version.mv b/vm/stdlib/compiled/13/12-13/stdlib/022_Version.mv new file mode 100644 index 0000000000..e08ee09a6e Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/022_Version.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/023_PackageTxnManager.mv b/vm/stdlib/compiled/13/12-13/stdlib/023_PackageTxnManager.mv new file mode 100644 index 0000000000..75e05951e0 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/023_PackageTxnManager.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/024_Treasury.mv b/vm/stdlib/compiled/13/12-13/stdlib/024_Treasury.mv new file mode 100644 index 0000000000..588181223e Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/024_Treasury.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/025_Dao.mv b/vm/stdlib/compiled/13/12-13/stdlib/025_Dao.mv new file mode 100644 index 0000000000..6f6bedf1cb Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/025_Dao.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/026_UpgradeModuleDaoProposal.mv b/vm/stdlib/compiled/13/12-13/stdlib/026_UpgradeModuleDaoProposal.mv new file mode 100644 index 0000000000..083a94d1c5 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/026_UpgradeModuleDaoProposal.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/027_TransactionTimeoutConfig.mv b/vm/stdlib/compiled/13/12-13/stdlib/027_TransactionTimeoutConfig.mv new file mode 100644 index 0000000000..f54deb348e Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/027_TransactionTimeoutConfig.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/028_TransactionPublishOption.mv b/vm/stdlib/compiled/13/12-13/stdlib/028_TransactionPublishOption.mv new file mode 100644 index 0000000000..814bd5aed1 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/028_TransactionPublishOption.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/029_RewardConfig.mv b/vm/stdlib/compiled/13/12-13/stdlib/029_RewardConfig.mv new file mode 100644 index 0000000000..9114706079 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/029_RewardConfig.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/030_OnChainConfigDao.mv b/vm/stdlib/compiled/13/12-13/stdlib/030_OnChainConfigDao.mv new file mode 100644 index 0000000000..cccbe13038 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/030_OnChainConfigDao.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/031_ModifyDaoConfigProposal.mv b/vm/stdlib/compiled/13/12-13/stdlib/031_ModifyDaoConfigProposal.mv new file mode 100644 index 0000000000..390caae299 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/031_ModifyDaoConfigProposal.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/032_ConsensusConfig.mv b/vm/stdlib/compiled/13/12-13/stdlib/032_ConsensusConfig.mv new file mode 100644 index 0000000000..0baf06dc64 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/032_ConsensusConfig.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/033_STC.mv b/vm/stdlib/compiled/13/12-13/stdlib/033_STC.mv new file mode 100644 index 0000000000..b462ed908f Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/033_STC.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/034_TransactionFee.mv b/vm/stdlib/compiled/13/12-13/stdlib/034_TransactionFee.mv new file mode 100644 index 0000000000..f209ddeb58 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/034_TransactionFee.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/035_Hash.mv b/vm/stdlib/compiled/13/12-13/stdlib/035_Hash.mv new file mode 100644 index 0000000000..67a4a8bf03 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/035_Hash.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/036_Authenticator.mv b/vm/stdlib/compiled/13/12-13/stdlib/036_Authenticator.mv new file mode 100644 index 0000000000..c5a74c5072 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/036_Authenticator.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/037_Account.mv b/vm/stdlib/compiled/13/12-13/stdlib/037_Account.mv new file mode 100644 index 0000000000..1a3465588c Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/037_Account.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/038_AccountScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/038_AccountScripts.mv new file mode 100644 index 0000000000..3ea86f9cde Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/038_AccountScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/039_Arith.mv b/vm/stdlib/compiled/13/12-13/stdlib/039_Arith.mv new file mode 100644 index 0000000000..61d6433fab Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/039_Arith.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/040_Ring.mv b/vm/stdlib/compiled/13/12-13/stdlib/040_Ring.mv new file mode 100644 index 0000000000..870e433ee9 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/040_Ring.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/041_Block.mv b/vm/stdlib/compiled/13/12-13/stdlib/041_Block.mv new file mode 100644 index 0000000000..e72b98b179 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/041_Block.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/042_TreasuryWithdrawDaoProposal.mv b/vm/stdlib/compiled/13/12-13/stdlib/042_TreasuryWithdrawDaoProposal.mv new file mode 100644 index 0000000000..9b09f0d009 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/042_TreasuryWithdrawDaoProposal.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/043_BlockReward.mv b/vm/stdlib/compiled/13/12-13/stdlib/043_BlockReward.mv new file mode 100644 index 0000000000..f2b272971c Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/043_BlockReward.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/044_Collection.mv b/vm/stdlib/compiled/13/12-13/stdlib/044_Collection.mv new file mode 100644 index 0000000000..306c01fc8c Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/044_Collection.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/045_Collection2.mv b/vm/stdlib/compiled/13/12-13/stdlib/045_Collection2.mv new file mode 100644 index 0000000000..ab314639e1 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/045_Collection2.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/046_Compare.mv b/vm/stdlib/compiled/13/12-13/stdlib/046_Compare.mv new file mode 100644 index 0000000000..e3e7ef4a6a Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/046_Compare.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/047_ConsensusStrategy.mv b/vm/stdlib/compiled/13/12-13/stdlib/047_ConsensusStrategy.mv new file mode 100644 index 0000000000..911f9d5d76 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/047_ConsensusStrategy.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/048_DaoVoteScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/048_DaoVoteScripts.mv new file mode 100644 index 0000000000..1ad7b59e76 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/048_DaoVoteScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/049_DummyToken.mv b/vm/stdlib/compiled/13/12-13/stdlib/049_DummyToken.mv new file mode 100644 index 0000000000..27c9e6f5a2 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/049_DummyToken.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/050_DummyTokenScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/050_DummyTokenScripts.mv new file mode 100644 index 0000000000..cc64f15f0b Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/050_DummyTokenScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/051_EVMAddress.mv b/vm/stdlib/compiled/13/12-13/stdlib/051_EVMAddress.mv new file mode 100644 index 0000000000..9cb4ecebac Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/051_EVMAddress.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/052_TypeInfo.mv b/vm/stdlib/compiled/13/12-13/stdlib/052_TypeInfo.mv new file mode 100644 index 0000000000..1be6ae9259 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/052_TypeInfo.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/053_GenesisSignerCapability.mv b/vm/stdlib/compiled/13/12-13/stdlib/053_GenesisSignerCapability.mv new file mode 100644 index 0000000000..0b2013c145 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/053_GenesisSignerCapability.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/054_Oracle.mv b/vm/stdlib/compiled/13/12-13/stdlib/054_Oracle.mv new file mode 100644 index 0000000000..348476de27 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/054_Oracle.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/055_PriceOracle.mv b/vm/stdlib/compiled/13/12-13/stdlib/055_PriceOracle.mv new file mode 100644 index 0000000000..b8584e7754 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/055_PriceOracle.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/056_EasyGas.mv b/vm/stdlib/compiled/13/12-13/stdlib/056_EasyGas.mv new file mode 100644 index 0000000000..9194df2cea Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/056_EasyGas.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/057_TransferScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/057_TransferScripts.mv new file mode 100644 index 0000000000..5a5eaf7940 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/057_TransferScripts.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/058_EasyGasScript.mv b/vm/stdlib/compiled/13/12-13/stdlib/058_EasyGasScript.mv new file mode 100644 index 0000000000..16d8f1836f Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/058_EasyGasScript.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/059_Epoch.mv b/vm/stdlib/compiled/13/12-13/stdlib/059_Epoch.mv new file mode 100644 index 0000000000..2aa602ac28 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/059_Epoch.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/060_EventUtil.mv b/vm/stdlib/compiled/13/12-13/stdlib/060_EventUtil.mv new file mode 100644 index 0000000000..bbbc6f34f8 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/060_EventUtil.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/061_FixedPoint32.mv b/vm/stdlib/compiled/13/12-13/stdlib/061_FixedPoint32.mv new file mode 100644 index 0000000000..2ecc1abb82 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/061_FixedPoint32.mv differ diff --git a/vm/stdlib/compiled/13/12-13/stdlib/062_FlexiDagConfig.mv b/vm/stdlib/compiled/13/12-13/stdlib/062_FlexiDagConfig.mv new file mode 100644 index 0000000000..243f8a06b1 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/062_FlexiDagConfig.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/062_GasSchedule.mv b/vm/stdlib/compiled/13/12-13/stdlib/063_GasSchedule.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/062_GasSchedule.mv rename to vm/stdlib/compiled/13/12-13/stdlib/063_GasSchedule.mv diff --git a/vm/stdlib/compiled/latest/stdlib/063_STCUSDOracle.mv b/vm/stdlib/compiled/13/12-13/stdlib/064_STCUSDOracle.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/063_STCUSDOracle.mv rename to vm/stdlib/compiled/13/12-13/stdlib/064_STCUSDOracle.mv diff --git a/vm/stdlib/compiled/latest/stdlib/064_Offer.mv b/vm/stdlib/compiled/13/12-13/stdlib/065_Offer.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/064_Offer.mv rename to vm/stdlib/compiled/13/12-13/stdlib/065_Offer.mv diff --git a/vm/stdlib/compiled/latest/stdlib/065_NFT.mv b/vm/stdlib/compiled/13/12-13/stdlib/066_NFT.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/065_NFT.mv rename to vm/stdlib/compiled/13/12-13/stdlib/066_NFT.mv diff --git a/vm/stdlib/compiled/latest/stdlib/066_LanguageVersion.mv b/vm/stdlib/compiled/13/12-13/stdlib/067_LanguageVersion.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/066_LanguageVersion.mv rename to vm/stdlib/compiled/13/12-13/stdlib/067_LanguageVersion.mv diff --git a/vm/stdlib/compiled/latest/stdlib/067_MerkleProof.mv b/vm/stdlib/compiled/13/12-13/stdlib/068_MerkleProof.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/067_MerkleProof.mv rename to vm/stdlib/compiled/13/12-13/stdlib/068_MerkleProof.mv diff --git a/vm/stdlib/compiled/latest/stdlib/068_MerkleNFTDistributor.mv b/vm/stdlib/compiled/13/12-13/stdlib/069_MerkleNFTDistributor.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/068_MerkleNFTDistributor.mv rename to vm/stdlib/compiled/13/12-13/stdlib/069_MerkleNFTDistributor.mv diff --git a/vm/stdlib/compiled/latest/stdlib/069_IdentifierNFT.mv b/vm/stdlib/compiled/13/12-13/stdlib/070_IdentifierNFT.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/069_IdentifierNFT.mv rename to vm/stdlib/compiled/13/12-13/stdlib/070_IdentifierNFT.mv diff --git a/vm/stdlib/compiled/latest/stdlib/070_GenesisNFT.mv b/vm/stdlib/compiled/13/12-13/stdlib/071_GenesisNFT.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/070_GenesisNFT.mv rename to vm/stdlib/compiled/13/12-13/stdlib/071_GenesisNFT.mv diff --git a/vm/stdlib/compiled/13/12-13/stdlib/072_StdlibUpgradeScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/072_StdlibUpgradeScripts.mv new file mode 100644 index 0000000000..cebf13e904 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/072_StdlibUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/072_Genesis.mv b/vm/stdlib/compiled/13/12-13/stdlib/073_Genesis.mv similarity index 81% rename from vm/stdlib/compiled/latest/stdlib/072_Genesis.mv rename to vm/stdlib/compiled/13/12-13/stdlib/073_Genesis.mv index 78701566bc..97508566d0 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/072_Genesis.mv and b/vm/stdlib/compiled/13/12-13/stdlib/073_Genesis.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/073_GenesisNFTScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/074_GenesisNFTScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/073_GenesisNFTScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/074_GenesisNFTScripts.mv diff --git a/vm/stdlib/compiled/latest/stdlib/074_IdentifierNFTScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/075_IdentifierNFTScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/074_IdentifierNFTScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/075_IdentifierNFTScripts.mv diff --git a/vm/stdlib/compiled/latest/stdlib/075_MintDaoProposal.mv b/vm/stdlib/compiled/13/12-13/stdlib/076_MintDaoProposal.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/075_MintDaoProposal.mv rename to vm/stdlib/compiled/13/12-13/stdlib/076_MintDaoProposal.mv diff --git a/vm/stdlib/compiled/latest/stdlib/076_ModuleUpgradeScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/077_ModuleUpgradeScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/076_ModuleUpgradeScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/077_ModuleUpgradeScripts.mv diff --git a/vm/stdlib/compiled/latest/stdlib/077_NFTGallery.mv b/vm/stdlib/compiled/13/12-13/stdlib/078_NFTGallery.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/077_NFTGallery.mv rename to vm/stdlib/compiled/13/12-13/stdlib/078_NFTGallery.mv diff --git a/vm/stdlib/compiled/latest/stdlib/078_NFTGalleryScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/079_NFTGalleryScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/078_NFTGalleryScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/079_NFTGalleryScripts.mv diff --git a/vm/stdlib/compiled/13/12-13/stdlib/080_OnChainConfigScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/080_OnChainConfigScripts.mv new file mode 100644 index 0000000000..8d847cdf25 Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/080_OnChainConfigScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/080_PriceOracleAggregator.mv b/vm/stdlib/compiled/13/12-13/stdlib/081_PriceOracleAggregator.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/080_PriceOracleAggregator.mv rename to vm/stdlib/compiled/13/12-13/stdlib/081_PriceOracleAggregator.mv diff --git a/vm/stdlib/compiled/latest/stdlib/081_PriceOracleScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/082_PriceOracleScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/081_PriceOracleScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/082_PriceOracleScripts.mv diff --git a/vm/stdlib/compiled/latest/stdlib/082_Secp256k1.mv b/vm/stdlib/compiled/13/12-13/stdlib/083_Secp256k1.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/082_Secp256k1.mv rename to vm/stdlib/compiled/13/12-13/stdlib/083_Secp256k1.mv diff --git a/vm/stdlib/compiled/latest/stdlib/083_Signature.mv b/vm/stdlib/compiled/13/12-13/stdlib/084_Signature.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/083_Signature.mv rename to vm/stdlib/compiled/13/12-13/stdlib/084_Signature.mv diff --git a/vm/stdlib/compiled/latest/stdlib/084_SharedEd25519PublicKey.mv b/vm/stdlib/compiled/13/12-13/stdlib/085_SharedEd25519PublicKey.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/084_SharedEd25519PublicKey.mv rename to vm/stdlib/compiled/13/12-13/stdlib/085_SharedEd25519PublicKey.mv diff --git a/vm/stdlib/compiled/latest/stdlib/085_SimpleMap.mv b/vm/stdlib/compiled/13/12-13/stdlib/086_SimpleMap.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/085_SimpleMap.mv rename to vm/stdlib/compiled/13/12-13/stdlib/086_SimpleMap.mv diff --git a/vm/stdlib/compiled/latest/stdlib/086_StructuredHash.mv b/vm/stdlib/compiled/13/12-13/stdlib/087_StructuredHash.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/086_StructuredHash.mv rename to vm/stdlib/compiled/13/12-13/stdlib/087_StructuredHash.mv diff --git a/vm/stdlib/compiled/latest/stdlib/087_StarcoinVerifier.mv b/vm/stdlib/compiled/13/12-13/stdlib/088_StarcoinVerifier.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/087_StarcoinVerifier.mv rename to vm/stdlib/compiled/13/12-13/stdlib/088_StarcoinVerifier.mv diff --git a/vm/stdlib/compiled/latest/stdlib/088_String.mv b/vm/stdlib/compiled/13/12-13/stdlib/089_String.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/088_String.mv rename to vm/stdlib/compiled/13/12-13/stdlib/089_String.mv diff --git a/vm/stdlib/compiled/latest/stdlib/089_Table.mv b/vm/stdlib/compiled/13/12-13/stdlib/090_Table.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/089_Table.mv rename to vm/stdlib/compiled/13/12-13/stdlib/090_Table.mv diff --git a/vm/stdlib/compiled/latest/stdlib/090_TransactionTimeout.mv b/vm/stdlib/compiled/13/12-13/stdlib/091_TransactionTimeout.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/090_TransactionTimeout.mv rename to vm/stdlib/compiled/13/12-13/stdlib/091_TransactionTimeout.mv diff --git a/vm/stdlib/compiled/13/12-13/stdlib/092_TransactionManager.mv b/vm/stdlib/compiled/13/12-13/stdlib/092_TransactionManager.mv new file mode 100644 index 0000000000..799c306a8a Binary files /dev/null and b/vm/stdlib/compiled/13/12-13/stdlib/092_TransactionManager.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/092_TreasuryScripts.mv b/vm/stdlib/compiled/13/12-13/stdlib/093_TreasuryScripts.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/092_TreasuryScripts.mv rename to vm/stdlib/compiled/13/12-13/stdlib/093_TreasuryScripts.mv diff --git a/vm/stdlib/compiled/latest/stdlib/093_U256.mv b/vm/stdlib/compiled/13/12-13/stdlib/094_U256.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/093_U256.mv rename to vm/stdlib/compiled/13/12-13/stdlib/094_U256.mv diff --git a/vm/stdlib/compiled/latest/stdlib/094_YieldFarming.mv b/vm/stdlib/compiled/13/12-13/stdlib/095_YieldFarming.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/094_YieldFarming.mv rename to vm/stdlib/compiled/13/12-13/stdlib/095_YieldFarming.mv diff --git a/vm/stdlib/compiled/latest/stdlib/095_YieldFarmingV2.mv b/vm/stdlib/compiled/13/12-13/stdlib/096_YieldFarmingV2.mv similarity index 100% rename from vm/stdlib/compiled/latest/stdlib/095_YieldFarmingV2.mv rename to vm/stdlib/compiled/13/12-13/stdlib/096_YieldFarmingV2.mv diff --git a/vm/stdlib/compiled/13/stdlib/000_BitOperators.mv b/vm/stdlib/compiled/13/stdlib/000_BitOperators.mv new file mode 100644 index 0000000000..5def61d413 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/000_BitOperators.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/001_Debug.mv b/vm/stdlib/compiled/13/stdlib/001_Debug.mv new file mode 100644 index 0000000000..06446cdf8f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/001_Debug.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/002_EmptyScripts.mv b/vm/stdlib/compiled/13/stdlib/002_EmptyScripts.mv new file mode 100644 index 0000000000..1f874d057c Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/002_EmptyScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/003_FromBCS.mv b/vm/stdlib/compiled/13/stdlib/003_FromBCS.mv new file mode 100644 index 0000000000..6291eb75bc Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/003_FromBCS.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/004_MintScripts.mv b/vm/stdlib/compiled/13/stdlib/004_MintScripts.mv new file mode 100644 index 0000000000..e0d82f1a77 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/004_MintScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/005_SIP_2.mv b/vm/stdlib/compiled/13/stdlib/005_SIP_2.mv new file mode 100644 index 0000000000..b495fd3d33 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/005_SIP_2.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/006_SIP_3.mv b/vm/stdlib/compiled/13/stdlib/006_SIP_3.mv new file mode 100644 index 0000000000..3885df5848 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/006_SIP_3.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/007_SignedInteger64.mv b/vm/stdlib/compiled/13/stdlib/007_SignedInteger64.mv new file mode 100644 index 0000000000..e3b62651c1 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/007_SignedInteger64.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/008_Vector.mv b/vm/stdlib/compiled/13/stdlib/008_Vector.mv new file mode 100644 index 0000000000..fca0c13f9f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/008_Vector.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/009_Errors.mv b/vm/stdlib/compiled/13/stdlib/009_Errors.mv new file mode 100644 index 0000000000..8d51430c07 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/009_Errors.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/010_ACL.mv b/vm/stdlib/compiled/13/stdlib/010_ACL.mv new file mode 100644 index 0000000000..773134f2ee Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/010_ACL.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/011_Signer.mv b/vm/stdlib/compiled/13/stdlib/011_Signer.mv new file mode 100644 index 0000000000..a84a73d58a Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/011_Signer.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/012_Math.mv b/vm/stdlib/compiled/13/stdlib/012_Math.mv new file mode 100644 index 0000000000..034dad6d3e Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/012_Math.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/013_Option.mv b/vm/stdlib/compiled/13/stdlib/013_Option.mv new file mode 100644 index 0000000000..340a58f50f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/013_Option.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/014_BCS.mv b/vm/stdlib/compiled/13/stdlib/014_BCS.mv new file mode 100644 index 0000000000..d66fd29767 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/014_BCS.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/015_Event.mv b/vm/stdlib/compiled/13/stdlib/015_Event.mv new file mode 100644 index 0000000000..a4b3a1b812 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/015_Event.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/016_Token.mv b/vm/stdlib/compiled/13/stdlib/016_Token.mv new file mode 100644 index 0000000000..4217dbb830 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/016_Token.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/017_CoreAddresses.mv b/vm/stdlib/compiled/13/stdlib/017_CoreAddresses.mv new file mode 100644 index 0000000000..8977cc4410 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/017_CoreAddresses.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/018_Timestamp.mv b/vm/stdlib/compiled/13/stdlib/018_Timestamp.mv new file mode 100644 index 0000000000..815d990752 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/018_Timestamp.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/019_Config.mv b/vm/stdlib/compiled/13/stdlib/019_Config.mv new file mode 100644 index 0000000000..5107abbab8 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/019_Config.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/020_ChainId.mv b/vm/stdlib/compiled/13/stdlib/020_ChainId.mv new file mode 100644 index 0000000000..fb643fe958 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/020_ChainId.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/021_VMConfig.mv b/vm/stdlib/compiled/13/stdlib/021_VMConfig.mv new file mode 100644 index 0000000000..d4a4038b71 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/021_VMConfig.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/022_Version.mv b/vm/stdlib/compiled/13/stdlib/022_Version.mv new file mode 100644 index 0000000000..e08ee09a6e Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/022_Version.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/023_PackageTxnManager.mv b/vm/stdlib/compiled/13/stdlib/023_PackageTxnManager.mv new file mode 100644 index 0000000000..75e05951e0 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/023_PackageTxnManager.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/024_Treasury.mv b/vm/stdlib/compiled/13/stdlib/024_Treasury.mv new file mode 100644 index 0000000000..588181223e Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/024_Treasury.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/025_Dao.mv b/vm/stdlib/compiled/13/stdlib/025_Dao.mv new file mode 100644 index 0000000000..6f6bedf1cb Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/025_Dao.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/026_UpgradeModuleDaoProposal.mv b/vm/stdlib/compiled/13/stdlib/026_UpgradeModuleDaoProposal.mv new file mode 100644 index 0000000000..083a94d1c5 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/026_UpgradeModuleDaoProposal.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/027_TransactionTimeoutConfig.mv b/vm/stdlib/compiled/13/stdlib/027_TransactionTimeoutConfig.mv new file mode 100644 index 0000000000..f54deb348e Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/027_TransactionTimeoutConfig.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/028_TransactionPublishOption.mv b/vm/stdlib/compiled/13/stdlib/028_TransactionPublishOption.mv new file mode 100644 index 0000000000..814bd5aed1 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/028_TransactionPublishOption.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/029_RewardConfig.mv b/vm/stdlib/compiled/13/stdlib/029_RewardConfig.mv new file mode 100644 index 0000000000..9114706079 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/029_RewardConfig.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/030_OnChainConfigDao.mv b/vm/stdlib/compiled/13/stdlib/030_OnChainConfigDao.mv new file mode 100644 index 0000000000..cccbe13038 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/030_OnChainConfigDao.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/031_ModifyDaoConfigProposal.mv b/vm/stdlib/compiled/13/stdlib/031_ModifyDaoConfigProposal.mv new file mode 100644 index 0000000000..390caae299 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/031_ModifyDaoConfigProposal.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/032_ConsensusConfig.mv b/vm/stdlib/compiled/13/stdlib/032_ConsensusConfig.mv new file mode 100644 index 0000000000..0baf06dc64 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/032_ConsensusConfig.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/033_STC.mv b/vm/stdlib/compiled/13/stdlib/033_STC.mv new file mode 100644 index 0000000000..b462ed908f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/033_STC.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/034_TransactionFee.mv b/vm/stdlib/compiled/13/stdlib/034_TransactionFee.mv new file mode 100644 index 0000000000..f209ddeb58 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/034_TransactionFee.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/035_Hash.mv b/vm/stdlib/compiled/13/stdlib/035_Hash.mv new file mode 100644 index 0000000000..67a4a8bf03 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/035_Hash.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/036_Authenticator.mv b/vm/stdlib/compiled/13/stdlib/036_Authenticator.mv new file mode 100644 index 0000000000..c5a74c5072 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/036_Authenticator.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/037_Account.mv b/vm/stdlib/compiled/13/stdlib/037_Account.mv new file mode 100644 index 0000000000..1a3465588c Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/037_Account.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/038_AccountScripts.mv b/vm/stdlib/compiled/13/stdlib/038_AccountScripts.mv new file mode 100644 index 0000000000..3ea86f9cde Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/038_AccountScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/039_Arith.mv b/vm/stdlib/compiled/13/stdlib/039_Arith.mv new file mode 100644 index 0000000000..61d6433fab Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/039_Arith.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/040_Ring.mv b/vm/stdlib/compiled/13/stdlib/040_Ring.mv new file mode 100644 index 0000000000..870e433ee9 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/040_Ring.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/041_Block.mv b/vm/stdlib/compiled/13/stdlib/041_Block.mv new file mode 100644 index 0000000000..e72b98b179 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/041_Block.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/042_TreasuryWithdrawDaoProposal.mv b/vm/stdlib/compiled/13/stdlib/042_TreasuryWithdrawDaoProposal.mv new file mode 100644 index 0000000000..9b09f0d009 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/042_TreasuryWithdrawDaoProposal.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/043_BlockReward.mv b/vm/stdlib/compiled/13/stdlib/043_BlockReward.mv new file mode 100644 index 0000000000..f2b272971c Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/043_BlockReward.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/044_Collection.mv b/vm/stdlib/compiled/13/stdlib/044_Collection.mv new file mode 100644 index 0000000000..306c01fc8c Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/044_Collection.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/045_Collection2.mv b/vm/stdlib/compiled/13/stdlib/045_Collection2.mv new file mode 100644 index 0000000000..ab314639e1 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/045_Collection2.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/046_Compare.mv b/vm/stdlib/compiled/13/stdlib/046_Compare.mv new file mode 100644 index 0000000000..e3e7ef4a6a Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/046_Compare.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/047_ConsensusStrategy.mv b/vm/stdlib/compiled/13/stdlib/047_ConsensusStrategy.mv new file mode 100644 index 0000000000..911f9d5d76 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/047_ConsensusStrategy.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/048_DaoVoteScripts.mv b/vm/stdlib/compiled/13/stdlib/048_DaoVoteScripts.mv new file mode 100644 index 0000000000..1ad7b59e76 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/048_DaoVoteScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/049_DummyToken.mv b/vm/stdlib/compiled/13/stdlib/049_DummyToken.mv new file mode 100644 index 0000000000..27c9e6f5a2 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/049_DummyToken.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/050_DummyTokenScripts.mv b/vm/stdlib/compiled/13/stdlib/050_DummyTokenScripts.mv new file mode 100644 index 0000000000..cc64f15f0b Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/050_DummyTokenScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/051_EVMAddress.mv b/vm/stdlib/compiled/13/stdlib/051_EVMAddress.mv new file mode 100644 index 0000000000..9cb4ecebac Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/051_EVMAddress.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/052_TypeInfo.mv b/vm/stdlib/compiled/13/stdlib/052_TypeInfo.mv new file mode 100644 index 0000000000..1be6ae9259 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/052_TypeInfo.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/053_GenesisSignerCapability.mv b/vm/stdlib/compiled/13/stdlib/053_GenesisSignerCapability.mv new file mode 100644 index 0000000000..0b2013c145 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/053_GenesisSignerCapability.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/054_Oracle.mv b/vm/stdlib/compiled/13/stdlib/054_Oracle.mv new file mode 100644 index 0000000000..348476de27 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/054_Oracle.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/055_PriceOracle.mv b/vm/stdlib/compiled/13/stdlib/055_PriceOracle.mv new file mode 100644 index 0000000000..b8584e7754 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/055_PriceOracle.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/056_EasyGas.mv b/vm/stdlib/compiled/13/stdlib/056_EasyGas.mv new file mode 100644 index 0000000000..9194df2cea Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/056_EasyGas.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/057_TransferScripts.mv b/vm/stdlib/compiled/13/stdlib/057_TransferScripts.mv new file mode 100644 index 0000000000..5a5eaf7940 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/057_TransferScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/058_EasyGasScript.mv b/vm/stdlib/compiled/13/stdlib/058_EasyGasScript.mv new file mode 100644 index 0000000000..16d8f1836f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/058_EasyGasScript.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/059_Epoch.mv b/vm/stdlib/compiled/13/stdlib/059_Epoch.mv new file mode 100644 index 0000000000..2aa602ac28 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/059_Epoch.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/060_EventUtil.mv b/vm/stdlib/compiled/13/stdlib/060_EventUtil.mv new file mode 100644 index 0000000000..bbbc6f34f8 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/060_EventUtil.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/061_FixedPoint32.mv b/vm/stdlib/compiled/13/stdlib/061_FixedPoint32.mv new file mode 100644 index 0000000000..2ecc1abb82 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/061_FixedPoint32.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/062_FlexiDagConfig.mv b/vm/stdlib/compiled/13/stdlib/062_FlexiDagConfig.mv new file mode 100644 index 0000000000..243f8a06b1 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/062_FlexiDagConfig.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/063_GasSchedule.mv b/vm/stdlib/compiled/13/stdlib/063_GasSchedule.mv new file mode 100644 index 0000000000..a88bc854cb Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/063_GasSchedule.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/064_STCUSDOracle.mv b/vm/stdlib/compiled/13/stdlib/064_STCUSDOracle.mv new file mode 100644 index 0000000000..2a49c59909 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/064_STCUSDOracle.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/065_Offer.mv b/vm/stdlib/compiled/13/stdlib/065_Offer.mv new file mode 100644 index 0000000000..297fc8eb9b Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/065_Offer.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/066_NFT.mv b/vm/stdlib/compiled/13/stdlib/066_NFT.mv new file mode 100644 index 0000000000..cf97fbd3cd Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/066_NFT.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/067_LanguageVersion.mv b/vm/stdlib/compiled/13/stdlib/067_LanguageVersion.mv new file mode 100644 index 0000000000..0c130d7222 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/067_LanguageVersion.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/068_MerkleProof.mv b/vm/stdlib/compiled/13/stdlib/068_MerkleProof.mv new file mode 100644 index 0000000000..27c43e894a Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/068_MerkleProof.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/069_MerkleNFTDistributor.mv b/vm/stdlib/compiled/13/stdlib/069_MerkleNFTDistributor.mv new file mode 100644 index 0000000000..bb8c651a7e Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/069_MerkleNFTDistributor.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/070_IdentifierNFT.mv b/vm/stdlib/compiled/13/stdlib/070_IdentifierNFT.mv new file mode 100644 index 0000000000..44d5f27272 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/070_IdentifierNFT.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/071_GenesisNFT.mv b/vm/stdlib/compiled/13/stdlib/071_GenesisNFT.mv new file mode 100644 index 0000000000..803cfbad57 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/071_GenesisNFT.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/072_StdlibUpgradeScripts.mv b/vm/stdlib/compiled/13/stdlib/072_StdlibUpgradeScripts.mv new file mode 100644 index 0000000000..cebf13e904 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/072_StdlibUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/073_Genesis.mv b/vm/stdlib/compiled/13/stdlib/073_Genesis.mv new file mode 100644 index 0000000000..97508566d0 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/073_Genesis.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/074_GenesisNFTScripts.mv b/vm/stdlib/compiled/13/stdlib/074_GenesisNFTScripts.mv new file mode 100644 index 0000000000..fe06059a19 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/074_GenesisNFTScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/075_IdentifierNFTScripts.mv b/vm/stdlib/compiled/13/stdlib/075_IdentifierNFTScripts.mv new file mode 100644 index 0000000000..f495cd7670 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/075_IdentifierNFTScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/076_MintDaoProposal.mv b/vm/stdlib/compiled/13/stdlib/076_MintDaoProposal.mv new file mode 100644 index 0000000000..2f4e07a5c9 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/076_MintDaoProposal.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/077_ModuleUpgradeScripts.mv b/vm/stdlib/compiled/13/stdlib/077_ModuleUpgradeScripts.mv new file mode 100644 index 0000000000..f2d215e295 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/077_ModuleUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/078_NFTGallery.mv b/vm/stdlib/compiled/13/stdlib/078_NFTGallery.mv new file mode 100644 index 0000000000..bda70d9e15 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/078_NFTGallery.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/079_NFTGalleryScripts.mv b/vm/stdlib/compiled/13/stdlib/079_NFTGalleryScripts.mv new file mode 100644 index 0000000000..e9736e40d3 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/079_NFTGalleryScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/080_OnChainConfigScripts.mv b/vm/stdlib/compiled/13/stdlib/080_OnChainConfigScripts.mv new file mode 100644 index 0000000000..8d847cdf25 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/080_OnChainConfigScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/081_PriceOracleAggregator.mv b/vm/stdlib/compiled/13/stdlib/081_PriceOracleAggregator.mv new file mode 100644 index 0000000000..51dc465f66 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/081_PriceOracleAggregator.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/082_PriceOracleScripts.mv b/vm/stdlib/compiled/13/stdlib/082_PriceOracleScripts.mv new file mode 100644 index 0000000000..9fc3054e32 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/082_PriceOracleScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/083_Secp256k1.mv b/vm/stdlib/compiled/13/stdlib/083_Secp256k1.mv new file mode 100644 index 0000000000..5f0dd612f4 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/083_Secp256k1.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/084_Signature.mv b/vm/stdlib/compiled/13/stdlib/084_Signature.mv new file mode 100644 index 0000000000..e37f2baf06 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/084_Signature.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/085_SharedEd25519PublicKey.mv b/vm/stdlib/compiled/13/stdlib/085_SharedEd25519PublicKey.mv new file mode 100644 index 0000000000..aa92ddbcab Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/085_SharedEd25519PublicKey.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/086_SimpleMap.mv b/vm/stdlib/compiled/13/stdlib/086_SimpleMap.mv new file mode 100644 index 0000000000..0effeda9fd Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/086_SimpleMap.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/087_StructuredHash.mv b/vm/stdlib/compiled/13/stdlib/087_StructuredHash.mv new file mode 100644 index 0000000000..41c8858866 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/087_StructuredHash.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/088_StarcoinVerifier.mv b/vm/stdlib/compiled/13/stdlib/088_StarcoinVerifier.mv new file mode 100644 index 0000000000..684d44fe58 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/088_StarcoinVerifier.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/089_String.mv b/vm/stdlib/compiled/13/stdlib/089_String.mv new file mode 100644 index 0000000000..4b51f43735 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/089_String.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/090_Table.mv b/vm/stdlib/compiled/13/stdlib/090_Table.mv new file mode 100644 index 0000000000..297bb011c4 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/090_Table.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/091_TransactionTimeout.mv b/vm/stdlib/compiled/13/stdlib/091_TransactionTimeout.mv new file mode 100644 index 0000000000..0e53dcbf46 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/091_TransactionTimeout.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/092_TransactionManager.mv b/vm/stdlib/compiled/13/stdlib/092_TransactionManager.mv new file mode 100644 index 0000000000..799c306a8a Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/092_TransactionManager.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/093_TreasuryScripts.mv b/vm/stdlib/compiled/13/stdlib/093_TreasuryScripts.mv new file mode 100644 index 0000000000..23b7501a57 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/093_TreasuryScripts.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/094_U256.mv b/vm/stdlib/compiled/13/stdlib/094_U256.mv new file mode 100644 index 0000000000..5114e77f7f Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/094_U256.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/095_YieldFarming.mv b/vm/stdlib/compiled/13/stdlib/095_YieldFarming.mv new file mode 100644 index 0000000000..5095009085 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/095_YieldFarming.mv differ diff --git a/vm/stdlib/compiled/13/stdlib/096_YieldFarmingV2.mv b/vm/stdlib/compiled/13/stdlib/096_YieldFarmingV2.mv new file mode 100644 index 0000000000..e0e4f01ae5 Binary files /dev/null and b/vm/stdlib/compiled/13/stdlib/096_YieldFarmingV2.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/041_Block.mv b/vm/stdlib/compiled/latest/stdlib/041_Block.mv index d07b44aeb4..e72b98b179 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/041_Block.mv and b/vm/stdlib/compiled/latest/stdlib/041_Block.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/062_FlexiDagConfig.mv b/vm/stdlib/compiled/latest/stdlib/062_FlexiDagConfig.mv new file mode 100644 index 0000000000..243f8a06b1 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/062_FlexiDagConfig.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/063_GasSchedule.mv b/vm/stdlib/compiled/latest/stdlib/063_GasSchedule.mv new file mode 100644 index 0000000000..a88bc854cb Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/063_GasSchedule.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/064_STCUSDOracle.mv b/vm/stdlib/compiled/latest/stdlib/064_STCUSDOracle.mv new file mode 100644 index 0000000000..2a49c59909 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/064_STCUSDOracle.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/065_Offer.mv b/vm/stdlib/compiled/latest/stdlib/065_Offer.mv new file mode 100644 index 0000000000..297fc8eb9b Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/065_Offer.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/066_NFT.mv b/vm/stdlib/compiled/latest/stdlib/066_NFT.mv new file mode 100644 index 0000000000..cf97fbd3cd Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/066_NFT.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/067_LanguageVersion.mv b/vm/stdlib/compiled/latest/stdlib/067_LanguageVersion.mv new file mode 100644 index 0000000000..0c130d7222 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/067_LanguageVersion.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/068_MerkleProof.mv b/vm/stdlib/compiled/latest/stdlib/068_MerkleProof.mv new file mode 100644 index 0000000000..27c43e894a Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/068_MerkleProof.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/069_MerkleNFTDistributor.mv b/vm/stdlib/compiled/latest/stdlib/069_MerkleNFTDistributor.mv new file mode 100644 index 0000000000..bb8c651a7e Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/069_MerkleNFTDistributor.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/070_IdentifierNFT.mv b/vm/stdlib/compiled/latest/stdlib/070_IdentifierNFT.mv new file mode 100644 index 0000000000..44d5f27272 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/070_IdentifierNFT.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/071_GenesisNFT.mv b/vm/stdlib/compiled/latest/stdlib/071_GenesisNFT.mv new file mode 100644 index 0000000000..803cfbad57 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/071_GenesisNFT.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/071_StdlibUpgradeScripts.mv b/vm/stdlib/compiled/latest/stdlib/071_StdlibUpgradeScripts.mv deleted file mode 100644 index b53e7f3f3f..0000000000 Binary files a/vm/stdlib/compiled/latest/stdlib/071_StdlibUpgradeScripts.mv and /dev/null differ diff --git a/vm/stdlib/compiled/latest/stdlib/072_StdlibUpgradeScripts.mv b/vm/stdlib/compiled/latest/stdlib/072_StdlibUpgradeScripts.mv new file mode 100644 index 0000000000..cebf13e904 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/072_StdlibUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/073_Genesis.mv b/vm/stdlib/compiled/latest/stdlib/073_Genesis.mv new file mode 100644 index 0000000000..97508566d0 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/073_Genesis.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/074_GenesisNFTScripts.mv b/vm/stdlib/compiled/latest/stdlib/074_GenesisNFTScripts.mv new file mode 100644 index 0000000000..fe06059a19 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/074_GenesisNFTScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/075_IdentifierNFTScripts.mv b/vm/stdlib/compiled/latest/stdlib/075_IdentifierNFTScripts.mv new file mode 100644 index 0000000000..f495cd7670 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/075_IdentifierNFTScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/076_MintDaoProposal.mv b/vm/stdlib/compiled/latest/stdlib/076_MintDaoProposal.mv new file mode 100644 index 0000000000..2f4e07a5c9 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/076_MintDaoProposal.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/077_ModuleUpgradeScripts.mv b/vm/stdlib/compiled/latest/stdlib/077_ModuleUpgradeScripts.mv new file mode 100644 index 0000000000..f2d215e295 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/077_ModuleUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/078_NFTGallery.mv b/vm/stdlib/compiled/latest/stdlib/078_NFTGallery.mv new file mode 100644 index 0000000000..bda70d9e15 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/078_NFTGallery.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/079_NFTGalleryScripts.mv b/vm/stdlib/compiled/latest/stdlib/079_NFTGalleryScripts.mv new file mode 100644 index 0000000000..e9736e40d3 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/079_NFTGalleryScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/079_OnChainConfigScripts.mv b/vm/stdlib/compiled/latest/stdlib/079_OnChainConfigScripts.mv deleted file mode 100644 index 0f740c0f6d..0000000000 Binary files a/vm/stdlib/compiled/latest/stdlib/079_OnChainConfigScripts.mv and /dev/null differ diff --git a/vm/stdlib/compiled/latest/stdlib/080_OnChainConfigScripts.mv b/vm/stdlib/compiled/latest/stdlib/080_OnChainConfigScripts.mv new file mode 100644 index 0000000000..8d847cdf25 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/080_OnChainConfigScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/081_PriceOracleAggregator.mv b/vm/stdlib/compiled/latest/stdlib/081_PriceOracleAggregator.mv new file mode 100644 index 0000000000..51dc465f66 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/081_PriceOracleAggregator.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/082_PriceOracleScripts.mv b/vm/stdlib/compiled/latest/stdlib/082_PriceOracleScripts.mv new file mode 100644 index 0000000000..9fc3054e32 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/082_PriceOracleScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/083_Secp256k1.mv b/vm/stdlib/compiled/latest/stdlib/083_Secp256k1.mv new file mode 100644 index 0000000000..5f0dd612f4 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/083_Secp256k1.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/084_Signature.mv b/vm/stdlib/compiled/latest/stdlib/084_Signature.mv new file mode 100644 index 0000000000..e37f2baf06 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/084_Signature.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/085_SharedEd25519PublicKey.mv b/vm/stdlib/compiled/latest/stdlib/085_SharedEd25519PublicKey.mv new file mode 100644 index 0000000000..aa92ddbcab Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/085_SharedEd25519PublicKey.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/086_SimpleMap.mv b/vm/stdlib/compiled/latest/stdlib/086_SimpleMap.mv new file mode 100644 index 0000000000..0effeda9fd Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/086_SimpleMap.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/087_StructuredHash.mv b/vm/stdlib/compiled/latest/stdlib/087_StructuredHash.mv new file mode 100644 index 0000000000..41c8858866 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/087_StructuredHash.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/088_StarcoinVerifier.mv b/vm/stdlib/compiled/latest/stdlib/088_StarcoinVerifier.mv new file mode 100644 index 0000000000..684d44fe58 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/088_StarcoinVerifier.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/089_String.mv b/vm/stdlib/compiled/latest/stdlib/089_String.mv new file mode 100644 index 0000000000..4b51f43735 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/089_String.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/090_Table.mv b/vm/stdlib/compiled/latest/stdlib/090_Table.mv new file mode 100644 index 0000000000..297bb011c4 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/090_Table.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/091_TransactionManager.mv b/vm/stdlib/compiled/latest/stdlib/091_TransactionManager.mv deleted file mode 100644 index 178931119d..0000000000 Binary files a/vm/stdlib/compiled/latest/stdlib/091_TransactionManager.mv and /dev/null differ diff --git a/vm/stdlib/compiled/latest/stdlib/091_TransactionTimeout.mv b/vm/stdlib/compiled/latest/stdlib/091_TransactionTimeout.mv new file mode 100644 index 0000000000..0e53dcbf46 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/091_TransactionTimeout.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/092_TransactionManager.mv b/vm/stdlib/compiled/latest/stdlib/092_TransactionManager.mv new file mode 100644 index 0000000000..799c306a8a Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/092_TransactionManager.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/093_TreasuryScripts.mv b/vm/stdlib/compiled/latest/stdlib/093_TreasuryScripts.mv new file mode 100644 index 0000000000..23b7501a57 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/093_TreasuryScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/094_U256.mv b/vm/stdlib/compiled/latest/stdlib/094_U256.mv new file mode 100644 index 0000000000..5114e77f7f Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/094_U256.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/095_YieldFarming.mv b/vm/stdlib/compiled/latest/stdlib/095_YieldFarming.mv new file mode 100644 index 0000000000..5095009085 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/095_YieldFarming.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/096_YieldFarmingV2.mv b/vm/stdlib/compiled/latest/stdlib/096_YieldFarmingV2.mv new file mode 100644 index 0000000000..e0e4f01ae5 Binary files /dev/null and b/vm/stdlib/compiled/latest/stdlib/096_YieldFarmingV2.mv differ diff --git a/vm/stdlib/tests/package_init_script.rs b/vm/stdlib/tests/package_init_script.rs index 3021071ca3..8c914f23b9 100644 --- a/vm/stdlib/tests/package_init_script.rs +++ b/vm/stdlib/tests/package_init_script.rs @@ -16,6 +16,7 @@ fn test_package_init_function() -> Result<()> { "./compiled/10/9-10/stdlib.blob", "./compiled/11/10-11/stdlib.blob", "./compiled/12/11-12/stdlib.blob", + "./compiled/13/12-13/stdlib.blob", ]; let init_strs = [ @@ -30,8 +31,9 @@ fn test_package_init_function() -> Result<()> { "", "", "0x00000000000000000000000000000001::StdlibUpgradeScripts::upgrade_from_v11_to_v12", + "0x00000000000000000000000000000001::StdlibUpgradeScripts::upgrade_from_v12_to_v13", ]; - for (i, version) in (2..=12).collect::>().into_iter().enumerate() { + for (i, version) in (2..=13).collect::>().into_iter().enumerate() { let package_file = format!("{}/{}-{}/stdlib.blob", version, version - 1, version); let package = COMPILED_MOVE_CODE_DIR .get_file(package_file) diff --git a/vm/types/src/account_config/constants/chain.rs b/vm/types/src/account_config/constants/chain.rs index fe0442c13d..4183b2956a 100644 --- a/vm/types/src/account_config/constants/chain.rs +++ b/vm/types/src/account_config/constants/chain.rs @@ -37,6 +37,8 @@ pub static G_TRANSACTION_MANAGER_MODULE: Lazy = Lazy::new(|| { pub static G_PROLOGUE_NAME: Lazy = Lazy::new(|| Identifier::new("prologue").unwrap()); pub static G_BLOCK_PROLOGUE_NAME: Lazy = Lazy::new(|| Identifier::new("block_prologue").unwrap()); +pub static G_BLOCK_PROLOGUE_V2_NAME: Lazy = + Lazy::new(|| Identifier::new("block_prologue_v2").unwrap()); pub static G_EPILOGUE_NAME: Lazy = Lazy::new(|| Identifier::new("epilogue").unwrap()); pub static G_EPILOGUE_V2_NAME: Lazy = Lazy::new(|| Identifier::new("epilogue_v2").unwrap()); diff --git a/vm/types/src/on_chain_config/flexi_dag_config.rs b/vm/types/src/on_chain_config/flexi_dag_config.rs new file mode 100644 index 0000000000..0ab18b0d0a --- /dev/null +++ b/vm/types/src/on_chain_config/flexi_dag_config.rs @@ -0,0 +1,31 @@ +// Copyright (c) The Starcoin Contributors +// SPDX-License-Identifier: Apache-2.0 + +use crate::on_chain_config::OnChainConfig; +use move_core_types::identifier::Identifier; +use move_core_types::language_storage::{StructTag, TypeTag, CORE_CODE_ADDRESS}; +use serde::{Deserialize, Serialize}; + +const MV_FLEXI_DAG_CONFIG_MODULE_NAME: &str = "FlexiDagConfig"; +const MV_FLEXI_DAG_CONFIG_STRUCT_NAME: &str = "FlexiDagConfig"; + +#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, Hash, PartialEq, PartialOrd, Ord)] +pub struct FlexiDagConfig { + pub effective_height: u64, +} + +impl OnChainConfig for FlexiDagConfig { + const MODULE_IDENTIFIER: &'static str = MV_FLEXI_DAG_CONFIG_MODULE_NAME; + const CONF_IDENTIFIER: &'static str = MV_FLEXI_DAG_CONFIG_STRUCT_NAME; +} + +impl FlexiDagConfig { + pub fn type_tag() -> TypeTag { + TypeTag::Struct(Box::new(StructTag { + address: CORE_CODE_ADDRESS, + module: Identifier::new(MV_FLEXI_DAG_CONFIG_MODULE_NAME).unwrap(), + name: Identifier::new(MV_FLEXI_DAG_CONFIG_STRUCT_NAME).unwrap(), + type_params: vec![], + })) + } +} diff --git a/vm/types/src/on_chain_config/mod.rs b/vm/types/src/on_chain_config/mod.rs index 774525f3b2..334b23a901 100644 --- a/vm/types/src/on_chain_config/mod.rs +++ b/vm/types/src/on_chain_config/mod.rs @@ -18,6 +18,7 @@ use std::{collections::HashMap, sync::Arc}; mod consensus_config; mod dao_config; +mod flexi_dag_config; mod gas_schedule; mod genesis_gas_schedule; mod move_lang_version; @@ -27,6 +28,7 @@ mod vm_config; pub use self::{ consensus_config::{consensus_config_type_tag, ConsensusConfig, G_CONSENSUS_CONFIG_IDENTIFIER}, dao_config::DaoConfig, + flexi_dag_config::*, gas_schedule::{ instruction_gas_schedule_v1, instruction_gas_schedule_v2, native_gas_schedule_v1, native_gas_schedule_v2, native_gas_schedule_v3, native_gas_schedule_v4, diff --git a/vm/types/src/on_chain_resource/block_metadata.rs b/vm/types/src/on_chain_resource/block_metadata.rs index 69bd01c3d7..c542110770 100644 --- a/vm/types/src/on_chain_resource/block_metadata.rs +++ b/vm/types/src/on_chain_resource/block_metadata.rs @@ -25,3 +25,23 @@ impl MoveResource for BlockMetadata { const MODULE_NAME: &'static str = "Block"; const STRUCT_NAME: &'static str = "BlockMetadata"; } + +/// On chain resource BlockMetadata mapping for FlexiDag block +#[derive(Debug, Serialize, Deserialize)] +pub struct BlockMetadataV2 { + // number of the current block + pub number: u64, + // Hash of the parent block. + pub parent_hash: HashValue, + // Author of the current block. + pub author: AccountAddress, + pub uncles: u64, + pub parents_hash: Vec, + // Handle where events with the time of new blocks are emitted + pub new_block_events: EventHandle, +} + +impl MoveResource for BlockMetadataV2 { + const MODULE_NAME: &'static str = "Block"; + const STRUCT_NAME: &'static str = "BlockMetadataV2"; +} diff --git a/vm/types/src/on_chain_resource/mod.rs b/vm/types/src/on_chain_resource/mod.rs index a537109a76..2bbca7e469 100644 --- a/vm/types/src/on_chain_resource/mod.rs +++ b/vm/types/src/on_chain_resource/mod.rs @@ -8,7 +8,7 @@ mod global_time; pub mod nft; mod treasury; -pub use block_metadata::BlockMetadata; +pub use block_metadata::{BlockMetadata, BlockMetadataV2}; pub use epoch::{Epoch, EpochData, EpochInfo}; pub use global_time::GlobalTimeOnChain; pub use treasury::{LinearWithdrawCapability, Treasury}; diff --git a/vm/types/src/state_view.rs b/vm/types/src/state_view.rs index 09ee20f4e5..64a1d784f7 100644 --- a/vm/types/src/state_view.rs +++ b/vm/types/src/state_view.rs @@ -20,7 +20,7 @@ use crate::{ on_chain_config::{GlobalTimeOnChain, OnChainConfig}, on_chain_resource::{ dao::{Proposal, ProposalAction}, - BlockMetadata, Epoch, EpochData, EpochInfo, Treasury, + BlockMetadata, BlockMetadataV2, Epoch, EpochData, EpochInfo, Treasury, }, sips::SIP, }; @@ -167,6 +167,11 @@ pub trait StateReaderExt: StateView { .ok_or_else(|| format_err!("BlockMetadata resource should exist at genesis address. ")) } + // Get latest BlockMetadataV2 on chain, since stdlib version(13) + fn get_block_metadata_v2(&self) -> Result> { + self.get_resource::(genesis_address()) + } + fn get_code(&self, module_id: ModuleId) -> Result>> { self.get_state_value(&StateKey::AccessPath(AccessPath::from(&module_id))) } diff --git a/vm/vm-runtime/src/starcoin_vm.rs b/vm/vm-runtime/src/starcoin_vm.rs index c9402e5f51..fc7536d374 100644 --- a/vm/vm-runtime/src/starcoin_vm.rs +++ b/vm/vm-runtime/src/starcoin_vm.rs @@ -50,7 +50,7 @@ use starcoin_vm_types::genesis_config::StdlibVersion; use starcoin_vm_types::identifier::IdentStr; use starcoin_vm_types::language_storage::ModuleId; use starcoin_vm_types::on_chain_config::{ - GasSchedule, MoveLanguageVersion, G_GAS_CONSTANTS_IDENTIFIER, + FlexiDagConfig, GasSchedule, MoveLanguageVersion, G_GAS_CONSTANTS_IDENTIFIER, G_INSTRUCTION_SCHEDULE_IDENTIFIER, G_NATIVE_SCHEDULE_IDENTIFIER, G_VM_CONFIG_IDENTIFIER, }; use starcoin_vm_types::state_store::state_key::StateKey; @@ -87,6 +87,7 @@ pub struct StarcoinVM { native_params: NativeGasParameters, gas_params: Option, gas_schedule: Option, + flexi_dag_config: Option, #[cfg(feature = "metrics")] metrics: Option, } @@ -94,6 +95,7 @@ pub struct StarcoinVM { /// marking of stdlib version which includes vmconfig upgrades. const VMCONFIG_UPGRADE_VERSION_MARK: u64 = 10; const GAS_SCHEDULE_UPGRADE_VERSION_MARK: u64 = 12; +const FLEXI_DAG_UPGRADE_VERSION_MARK: u64 = 13; impl StarcoinVM { #[cfg(feature = "metrics")] @@ -110,6 +112,7 @@ impl StarcoinVM { native_params, gas_params: Some(gas_params), gas_schedule: None, + flexi_dag_config: None, metrics, } } @@ -127,6 +130,7 @@ impl StarcoinVM { native_params, gas_params: Some(gas_params), gas_schedule: None, + flexi_dag_config: None, } } @@ -271,6 +275,13 @@ impl StarcoinVM { let gas_schedule = GasSchedule::fetch_config(&remote_storage)?; (gas_schedule, "gas schedule from GasSchedule") }; + if stdlib_version >= StdlibVersion::Version(FLEXI_DAG_UPGRADE_VERSION_MARK) { + self.flexi_dag_config = FlexiDagConfig::fetch_config(&remote_storage)?; + debug!( + "stdlib version: {}, fetch flexi_dag_config {:?} from FlexiDagConfig module", + stdlib_version, self.flexi_dag_config, + ); + } #[cfg(feature = "print_gas_info")] match self.gas_schedule.as_ref() { None => { @@ -516,11 +527,15 @@ impl StarcoinVM { package_address: AccountAddress, ) -> Result { let chain_id = remote_cache.get_chain_id()?; - let block_meta = remote_cache.get_block_metadata()?; + let block_number = if let Some(v2) = remote_cache.get_block_metadata_v2()? { + v2.number + } else { + remote_cache.get_block_metadata()?.number + }; // from mainnet after 8015088 and barnard after 8311392, we disable enforce upgrade if package_address == genesis_address() - || (chain_id.is_main() && block_meta.number < 8015088) - || (chain_id.is_barnard() && block_meta.number < 8311392) + || (chain_id.is_main() && block_number < 8015088) + || (chain_id.is_barnard() && block_number < 8311392) { let two_phase_upgrade_v2_path = access_path_for_two_phase_upgrade_v2(package_address); if let Some(data) = @@ -854,6 +869,7 @@ impl StarcoinVM { ) -> Result { #[cfg(testing)] info!("process_block_meta begin"); + let stdlib_version = self.version.clone().map(|v| v.into_stdlib_version()); let txn_sender = account_config::genesis_address(); // always use 0 gas for system. let max_gas_amount: Gas = 0.into(); @@ -872,7 +888,8 @@ impl StarcoinVM { chain_id, parent_gas_used, ) = block_metadata.into_inner(); - let args = serialize_values(&vec![ + let mut function_name = &account_config::G_BLOCK_PROLOGUE_NAME; + let mut args_vec = vec![ MoveValue::Signer(txn_sender), MoveValue::vector_u8(parent_id.to_vec()), MoveValue::U64(timestamp), @@ -885,13 +902,20 @@ impl StarcoinVM { MoveValue::U64(number), MoveValue::U8(chain_id.id()), MoveValue::U64(parent_gas_used), - ]); + ]; + if let Some(version) = stdlib_version { + if version >= StdlibVersion::Version(FLEXI_DAG_UPGRADE_VERSION_MARK) { + args_vec.push(MoveValue::vector_u8(Vec::new())); + function_name = &account_config::G_BLOCK_PROLOGUE_V2_NAME; + } + } + let args = serialize_values(&args_vec); let mut session: SessionAdapter<_> = self.move_vm.new_session(storage, session_id).into(); session .as_mut() .execute_function_bypass_visibility( &account_config::G_TRANSACTION_MANAGER_MODULE, - &account_config::G_BLOCK_PROLOGUE_NAME, + function_name, vec![], args, &mut gas_meter,