diff --git a/Cargo.lock b/Cargo.lock index e632a3c085..29be5b2bca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12068,6 +12068,7 @@ dependencies = [ "serde_json", "starcoin-abi-decoder", "starcoin-accumulator", + "starcoin-cached-packages", "starcoin-chain-api", "starcoin-config", "starcoin-crypto", diff --git a/cmd/starcoin/src/state/get_cmd.rs b/cmd/starcoin/src/state/get_cmd.rs index 9a39957c3a..a71f4644c8 100644 --- a/cmd/starcoin/src/state/get_cmd.rs +++ b/cmd/starcoin/src/state/get_cmd.rs @@ -21,7 +21,7 @@ use starcoin_vm_types::language_storage::{ModuleId, StructTag}; #[clap(name = "get")] pub enum GetOpt { Code { - #[clap(help = "module id like: 0x1::Account")] + #[clap(help = "module id like: 0x1::account")] module_id: StrView, #[clap(long, short = 'n')] /// Get state at a special block height. @@ -30,7 +30,7 @@ pub enum GetOpt { Resource { #[clap(help = "account address")] address: AccountAddress, - #[clap(help = "resource struct tag,", default_value = "0x1::Account::Account")] + #[clap(help = "resource struct tag,", default_value = "0x1::account::Account")] resource_type: StrView, #[clap(long, short = 'n')] /// Get state at a special block height. diff --git a/genesis/generated/barnard/genesis b/genesis/generated/barnard/genesis index ed58c8f07a..3ac93c32ad 100644 Binary files a/genesis/generated/barnard/genesis and b/genesis/generated/barnard/genesis differ diff --git a/genesis/generated/halley/genesis b/genesis/generated/halley/genesis index acf2e6afad..edac779d28 100644 Binary files a/genesis/generated/halley/genesis and b/genesis/generated/halley/genesis differ diff --git a/genesis/generated/main/genesis b/genesis/generated/main/genesis index 2928e569ad..3e1cdf380c 100644 Binary files a/genesis/generated/main/genesis and b/genesis/generated/main/genesis differ diff --git a/genesis/generated/proxima/genesis b/genesis/generated/proxima/genesis index 8e551a9a1c..dcb27acdc3 100644 Binary files a/genesis/generated/proxima/genesis and b/genesis/generated/proxima/genesis differ diff --git a/genesis/generated/vega/genesis b/genesis/generated/vega/genesis index 0b29a6420b..699759b1ea 100644 Binary files a/genesis/generated/vega/genesis and b/genesis/generated/vega/genesis differ diff --git a/test-helper/src/txpool.rs b/test-helper/src/txpool.rs index 26ea89d8f9..1b58cb0b31 100644 --- a/test-helper/src/txpool.rs +++ b/test-helper/src/txpool.rs @@ -73,7 +73,7 @@ pub async fn start_txpool_with_miner( } //registry.register::().await.unwrap(); let pool_actor = registry.register::().await.unwrap(); - Delay::new(Duration::from_millis(300)).await; + Delay::new(Duration::from_millis(1000)).await; let txpool_service = registry.get_shared::().await.unwrap(); ( diff --git a/vm/compiler/src/lib.rs b/vm/compiler/src/lib.rs index caae2cd986..39e5bdf1ce 100644 --- a/vm/compiler/src/lib.rs +++ b/vm/compiler/src/lib.rs @@ -54,8 +54,15 @@ pub fn starcoin_framework_named_addresses() -> BTreeMap Resu // force move to rebuild all packages, so that we can use compile_driver to generate the full compiled program. let mut build_config = move_arg.build_config; build_config.force_recompilation = true; - build_config.compiler_config.known_attributes = - starcoin_framework::extended_checks::get_all_attribute_names().clone(); + build_config + .compiler_config + .known_attributes + .clone_from(starcoin_framework::extended_checks::get_all_attribute_names()); let resolved_graph = build_config .clone() .resolution_graph_for_package(&rerooted_path, &mut std::io::stdout())?; diff --git a/vm/starcoin-transactional-test-harness/Cargo.toml b/vm/starcoin-transactional-test-harness/Cargo.toml index c6b3a44b0a..19230c0ae2 100644 --- a/vm/starcoin-transactional-test-harness/Cargo.toml +++ b/vm/starcoin-transactional-test-harness/Cargo.toml @@ -62,10 +62,11 @@ starcoin-vm-runtime = { workspace = true } starcoin-vm-types = { workspace = true } starcoin-gas-meter = { workspace = true } starcoin-gas-schedule = { workspace = true } -starcoin-framework = { workspace = true } stdlib = { workspace = true } starcoin-dag = { workspace = true } bytes = { workspace = true } +starcoin-framework = { workspace = true } +starcoin-cached-packages = { workspace = true } [dev-dependencies] datatest-stable = { workspace = true } diff --git a/vm/starcoin-transactional-test-harness/src/lib.rs b/vm/starcoin-transactional-test-harness/src/lib.rs index 75f21879de..df96775dc9 100644 --- a/vm/starcoin-transactional-test-harness/src/lib.rs +++ b/vm/starcoin-transactional-test-harness/src/lib.rs @@ -37,7 +37,6 @@ use starcoin_config::{genesis_key_pair, BuiltinNetworkID}; use starcoin_crypto::hash::PlainCryptoHash; use starcoin_crypto::HashValue; use starcoin_dev::playground::call_contract; -use starcoin_framework::extended_checks; use starcoin_gas_meter::StarcoinGasParameters; use starcoin_gas_schedule::FromOnChainGasSchedule; use starcoin_rpc_api::types::{ @@ -81,7 +80,7 @@ use std::io::{Read, Write}; use std::path::PathBuf; use std::sync::Mutex; use std::{collections::BTreeMap, convert::TryInto, path::Path, str::FromStr}; -use stdlib::{starcoin_framework_named_addresses, stdlib_files}; +use stdlib::starcoin_framework_named_addresses; use tempfile::{NamedTempFile, TempDir}; pub mod context; @@ -1072,8 +1071,7 @@ impl<'a> MoveTestAdapter<'a> for StarcoinTestAdapter<'a> { } fn known_attributes(&self) -> &BTreeSet { - // KnownAttribute::get_all_attribute_names() - extended_checks::get_all_attribute_names() + starcoin_framework::extended_checks::get_all_attribute_names() } fn init( @@ -1506,7 +1504,9 @@ pub fn print_help(task_name: Option) -> Result<()> { //TODO(simon): construct PackagePaths properly pub static G_PRECOMPILED_STARCOIN_FRAMEWORK: Lazy<(FullyCompiledProgram, Vec)> = Lazy::new(|| { - let sources = stdlib_files(); + let sources = starcoin_cached_packages::head_release_bundle() + .files() + .unwrap(); let package_paths = vec![PackagePaths { name: None, paths: sources, @@ -1515,8 +1515,8 @@ pub static G_PRECOMPILED_STARCOIN_FRAMEWORK: Lazy<(FullyCompiledProgram, Vec