Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aptos-move/framework/aptos-framework/doc/staking_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,9 @@ Can only be called as part of the Aptos governance proposal process established
new_voting_power_increase_limit: u64,
) <b>acquires</b> <a href="staking_config.md#0x1_staking_config_StakingConfig">StakingConfig</a> {
<a href="system_addresses.md#0x1_system_addresses_assert_aptos_framework">system_addresses::assert_aptos_framework</a>(aptos_framework);
//TODO(bowu): revert the limit back <b>to</b> 50
<b>assert</b>!(
new_voting_power_increase_limit &gt; 0 && new_voting_power_increase_limit &lt;= 50,
new_voting_power_increase_limit &gt; 0 && new_voting_power_increase_limit &lt;= 50*1_000_000_000,
<a href="../../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_invalid_argument">error::invalid_argument</a>(<a href="staking_config.md#0x1_staking_config_EINVALID_VOTING_POWER_INCREASE_LIMIT">EINVALID_VOTING_POWER_INCREASE_LIMIT</a>),
);

Expand Down
11 changes: 11 additions & 0 deletions movement-migration/post-migration/Move.toml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 14 additions & 0 deletions movement-migration/post-migration/scripts/reset.move
Original file line number Diff line number Diff line change
@@ -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);
}
}
34 changes: 34 additions & 0 deletions movement-migration/reset_limits.sh
Original file line number Diff line number Diff line change
@@ -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 <private_key_file> -u <url>"
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
1 change: 1 addition & 0 deletions tools/l1-migration/local-node-configs/validator_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading