How to activate the staking #237
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds/updates some scripts and describes how to activate staking from a node loaded with the Movement DB.
If one or several steps have already been applied to your node, skip them.
The staking activation procedure is:
It uses the Aptos CLI built from the l1-migration branch. It is accessible in the Path.
The commands are executed in the root directory of the repo.
The default profile has been configured with the core resource signer.
The validator profile has been configured with the validator node identity.
1 Update features
Build and execute the feature update script.
2 Update the framework
Change all script with main function signature and framework_signer var with the code:
The default generated code is wrong. For the 3 and 4 script set the address to @0x3 and @0x4.
Replace the vX.XX with the version generated.
3 Activate Epoch and update its duration
Get the current epoch with
CURRENT_EPOCH= $( curl http://localhost:8080/v1 )
Get current TS:
With the move2 framework upgrade just done, the
--bytecode-version 6parameter shouldn't be necessary. I didn't test.Example for 200 seconds.
After this Tx execution, the epoch should change every 200s.
Activate staking
The profile
treasury-ownershould be init with the account that will fill the staking treasury.TREASURY_AMOUNT contains the amount of treasury to deposit in the GGP.
This is an example with the values of the Aptos mainnet
After this Tx execution, the registered validators should receive rewards.
Some utilities function to verify.
Verify the staking config:
Set declared validators:
See reward config
See if the GGP initialization has been done correctly
Treasury balance
Get the validator stake pool.
or
Get rewards distribution events:
Get validator stake configuration
Add stake
Withdraw stake