diff --git a/aptos-move/framework/aptos-framework/doc/staking_config.md b/aptos-move/framework/aptos-framework/doc/staking_config.md index 16c8ccb4d0a2b..27f42fd19ba69 100644 --- a/aptos-move/framework/aptos-framework/doc/staking_config.md +++ b/aptos-move/framework/aptos-framework/doc/staking_config.md @@ -914,8 +914,9 @@ Can only be called as part of the Aptos governance proposal process established new_voting_power_increase_limit: u64, ) acquires StakingConfig { system_addresses::assert_aptos_framework(aptos_framework); + //TODO(bowu): revert the limit back to 50 assert!( - new_voting_power_increase_limit > 0 && new_voting_power_increase_limit <= 50, + new_voting_power_increase_limit > 0 && new_voting_power_increase_limit <= 50*1_000_000_000, error::invalid_argument(EINVALID_VOTING_POWER_INCREASE_LIMIT), ); diff --git a/movement-migration/post-migration/Move.toml b/movement-migration/post-migration/Move.toml new file mode 100644 index 0000000000000..0ee9d14849f8d --- /dev/null +++ b/movement-migration/post-migration/Move.toml @@ -0,0 +1,11 @@ +[package] +name = "post-migration" +version = "0.0.0" + +[addresses] +admin = "0x1" + +[dependencies.AptosFramework] +git = "https://github.com/movementlabsxyz/aptos-core.git" +rev = "l1-migration" +subdir = "aptos-move/framework/aptos-framework" \ No newline at end of file diff --git a/movement-migration/post-migration/scripts/reset.move b/movement-migration/post-migration/scripts/reset.move new file mode 100644 index 0000000000000..381cfa2b30e2e --- /dev/null +++ b/movement-migration/post-migration/scripts/reset.move @@ -0,0 +1,14 @@ +script { + use aptos_framework::aptos_governance; + use aptos_framework::block; + use aptos_framework::staking_config; + + fun main(core_resources: &signer) { + let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0000000000000000000000000000000000000000000000000000000000000001); + block::update_epoch_interval_microsecs(&core_signer, 7_200_000_000); // 200 secs + // Minimual stake is set to 10M Move, This can only be done when the validator has sufficient stake, Otherwise, they be be removed + // staking_config::update_required_stake(&core_signer, 1_000_000_000_000_000, 100_000_000_000_000_000); + staking_config::update_voting_power_increase_limit(&core_signer, 50); + aptos_governance::force_end_epoch(&core_signer); + } +} diff --git a/movement-migration/reset_limits.sh b/movement-migration/reset_limits.sh new file mode 100755 index 0000000000000..32542e1366e29 --- /dev/null +++ b/movement-migration/reset_limits.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# RUN THIS AFTER L1 MIGRATION IS COMPLETE AND WE HAVE ACUALLY HAVE THE STAKE + +# Parse command line arguments +PRIVATE_KEY_FILE="" +URL="" + +while getopts "k:u:" opt; do + case $opt in + k) + PRIVATE_KEY_FILE="$OPTARG" + ;; + u) + URL="$OPTARG" + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + exit 1 + ;; + esac +done + +# Check if required parameters are provided +if [ -z "$PRIVATE_KEY_FILE" ] || [ -z "$URL" ]; then + echo "Error: Both -k (private key file) and -u (URL) parameters are required." + echo "Usage: $0 -k -u " + exit 1 +fi + +cargo run -p movement move run-script --script-path movement-migration/post-migration/scripts/reset.move --sender-account 0xa550c18 --private-key-file "$PRIVATE_KEY_FILE" --url "$URL" --assume-yes diff --git a/movement-migration/update_reconfiguration/sources/change_epoch_duration.move b/movement-migration/update_reconfiguration/sources/change_epoch_duration.move index 4d631eaa32ff9..3c6091e83208d 100644 --- a/movement-migration/update_reconfiguration/sources/change_epoch_duration.move +++ b/movement-migration/update_reconfiguration/sources/change_epoch_duration.move @@ -4,6 +4,6 @@ script { fun main(core_resources: &signer) { let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0000000000000000000000000000000000000000000000000000000000000001); - block::update_epoch_interval_microsecs(&core_signer, 7_200_000_000); // 2hrs + block::update_epoch_interval_microsecs(&core_signer, 200_000_000); // 200 secs } } diff --git a/tools/l1-migration/local-node-configs/validator_node.yaml b/tools/l1-migration/local-node-configs/validator_node.yaml index c4762aec9560c..4a7642cfc4549 100644 --- a/tools/l1-migration/local-node-configs/validator_node.yaml +++ b/tools/l1-migration/local-node-configs/validator_node.yaml @@ -3,6 +3,7 @@ base: role: validator waypoint: from_file: /Users/bowu/data/.maptos/waypoint.txt # update to your path +randomness_override_seq_num: 999999999 consensus: safety_rules: service: