diff --git a/chain/api/src/lib.rs b/chain/api/src/lib.rs index 3f25718632..77b0c20d2a 100644 --- a/chain/api/src/lib.rs +++ b/chain/api/src/lib.rs @@ -18,7 +18,7 @@ mod service; pub const FORCE_UPGRADE_PACKAGE: Dir = include_dir!("package"); pub const MAIN_FORCE_UPGRADE_BLOCK_NUMBER: BlockNumber = 17000000; -pub const HALLEY_FORCE_UPGRADE_BLOCK_NUMBER: BlockNumber = 520; +pub const HALLEY_FORCE_UPGRADE_BLOCK_NUMBER: BlockNumber = 300; /// XXX FIXME YSG FORCE_UPGRADE pub static FORCE_UPGRADE_BLOCK_MAP: Lazy> = Lazy::new(|| { let mut maps = BTreeMap::new(); diff --git a/cmd/db-exporter/src/force_deploy_output.rs b/cmd/db-exporter/src/force_deploy_output.rs index 9720df7c04..d2252579bd 100644 --- a/cmd/db-exporter/src/force_deploy_output.rs +++ b/cmd/db-exporter/src/force_deploy_output.rs @@ -61,15 +61,16 @@ pub fn force_deploy_output( eprintln!("network only support main, barnard, halley"); return Ok(()); } - let net = ChainNetwork::new_builtin(net); + let network = ChainNetwork::new_builtin(net); let db_storage = DBStorage::new(to_dir.join("starcoindb/db"), RocksdbConfig::default(), None)?; let storage = Arc::new(Storage::new(StorageInstance::new_cache_and_db_instance( CacheStorage::new(None), db_storage, ))?); - let (chain_info, _) = Genesis::init_and_check_storage(&net, storage.clone(), to_dir.as_ref())?; + let (chain_info, _) = + Genesis::init_and_check_storage(&network, storage.clone(), to_dir.as_ref())?; let _chain = BlockChain::new( - net.time_service(), + network.time_service(), chain_info.head().id(), storage.clone(), None, @@ -92,15 +93,19 @@ pub fn force_deploy_output( let seq_num = statedb.get_sequence_number(addr)?; // let time = net.time_service().now_secs() + DEFAULT_EXPIRATION_TIME; - let time = if net == ChainNetwork::from(BuiltinNetworkID::Main) { - // main block num 16912223 - 1710453679 - } else if net == ChainNetwork::from(BuiltinNetworkID::Barnard) { - // main block num 16912223 - 1710453679 - } else { - // halley block num 177 - 1712936669 + let time = match net { + BuiltinNetworkID::Main => { + // main block num 16912223 + 1710453679 + } + BuiltinNetworkID::Barnard => { + // main block num 16912223 + 1710453679 + } + _ => { + // halley block num 177 + 1712936669 + } }; println!("time {}", time); let txn = account.sign_txn(RawUserTransaction::new( @@ -111,7 +116,7 @@ pub fn force_deploy_output( 1, // net.time_service().now_secs() + DEFAULT_EXPIRATION_TIME, time, - net.chain_id(), + network.chain_id(), STC_TOKEN_CODE_STR.to_string(), )); let upgrade_strategy_path = diff --git a/config/src/genesis_config.rs b/config/src/genesis_config.rs index 161d8d256e..d4a9d8308f 100644 --- a/config/src/genesis_config.rs +++ b/config/src/genesis_config.rs @@ -830,7 +830,7 @@ pub static G_HALLEY_CONFIG: Lazy = Lazy::new(|| { GenesisConfig { genesis_block_parameter: GenesisBlockParameterConfig::Static(GenesisBlockParameter { parent_hash: HashValue::sha3_256_of(b"starcoin_halley"), - timestamp: 1712902820000, + timestamp: 1712999622000, difficulty: 100.into(), }), version: Version { major: 1 }, diff --git a/genesis/generated/halley/genesis b/genesis/generated/halley/genesis index 297b07cb1a..209e1f03e7 100644 Binary files a/genesis/generated/halley/genesis and b/genesis/generated/halley/genesis differ