使用 Aptos-core 源代码
git clone <https://github.com/aptos-labs/aptos-core.git>cd aptos-core./scripts/dev_setup.shsource ~/.cargo/envexport WORKSPACE=testnet export USERNAME=alice mkdir ~/$WORKSPACE💡 安装APTOS CLI 在继续之前,请安装Aptos CLI 0.3.1: https://aptos.dev/cli-tools/aptos-cli-tool/install-aptos-cliaptos genesis generate-keys --output-dir ~/$WORKSPACE/keyscd ~/$WORKSPACE aptos genesis set-validator-configuration \\ --local-repository-dir ~/$WORKSPACE \\ --username $USERNAME \\ --owner-public-identity-file ~/$WORKSPACE/keys/public-keys.yaml \\ --validator-host <Validator Node IP / DNS address>:<Port> \\ --full-node-host <Full Node IP / DNS address>:<Port> \\ --stake-amount 100000000000000 # for example, with IP: aptos genesis set-validator-configuration \\ --local-repository-dir ~/$WORKSPACE \\ --username $USERNAME \\ --owner-public-identity-file ~/$WORKSPACE/keys/public-keys.yaml \\ --validator-host 35.232.235.205:6180 \\ --full-node-host 34.135.169.144:6182 \\ --stake-amount 100000000000000 # For example, with DNS: aptos genesis set-validator-configuration \\ --local-repository-dir ~/$WORKSPACE \\ --username $USERNAME \\ --owner-public-identity-file ~/$WORKSPACE/keys/public-keys.yaml \\ --validator-host bot.aptosdev.com:6180 \\ --full-node-host fn.bot.aptosdev.com:6182 \\ --stake-amount 100000000000000aptos genesis generate-layout-template --output-file ~/$WORKSPACE/layout.yamlroot_key: "D04470F43AB6AEAA4EB616B72128881EEF77346F2075FFE68E14BA7DEBD8095E" users: ["<username you specified from previous step>"] chain_id: 43 allow_new_validators: false epoch_duration_secs: 7200 is_test: true min_stake: 100000000000000 min_voting_threshold: 100000000000000 max_stake: 100000000000000000 recurring_lockup_duration_secs: 86400 required_proposer_stake: 100000000000000 rewards_apy_percentage: 10 voting_duration_secs: 43200 voting_power_increase_limit: 20cd ~/aptos-core cargo run --package framework -- release cp head.mrb ~/$WORKSPACE/framework.mrbaptos genesis generate-genesis --local-repository-dir ~/$WORKSPACE --output-dir ~/$WORKSPACEmkdir ~/$WORKSPACE/config cp docker/compose/aptos-node/validator.yaml ~/$WORKSPACE/config/validator.yaml cp docker/compose/aptos-node/fullnode.yaml ~/$WORKSPACE/config/fullnode.yaml
Last updated