This tutorial will use our AWS 1-click Deployment image to start and create the latest Cronos PoS Chain 1-Click Node for both Mainnet and Testnet
CAUTION We do not recommend directly running validator on Mainnet by 1-Click deployment. Please use it with caution! Because the 1-click deployment is not running with TMKMS and your tendermint validator key is in plain text /chain/.chain-maind/config/priv_validator_key.json. You may consider running validator with tmkms on AWS nitro-enclave
Step 1. AWS Account Creation
You will first need to create an AWS account. This will require providing your credit card information to AWS and you may be subject to getting charged when you create a virtual machine. More details on account creation, check this link.
Please read AWS free trial page to see if you are eligible for the free-tier.
Step 2. Common Setup
Step 2-0. Go to EC2 page and change the region
Sign in to your AWS account and go to EC2 Dashboard and change to your favourite region. Click "Launch Instance"
Step 2-1. Search for Cronos POS Chain 1-Click Node on AWS Marketplace
Search for "Cronos POS Chain 1-Click Node" in Choose an Amazon Machine Image (AMI) section. Select "Cronos POS Chain 1-Click Node" from the search results.
Step 2-2. Choose an instance type
By default, it will choose the recommended instance type (m5a.large) for you. But you can choose another instance type based on Mainnet/Testnet requirements.
Step 2-3. Configure instance details
Step 2-4. Add Storage
Follow the default setting with 125 Throughput (MB/s)
Step 2-5. Add Tags
Create Tag if needed
Step 2-6. Configure Security Group
By default, the image creates a new security group for you allowing ssh, p2p, rpc, and rest ports. You can remove the default opened rules or add more rules for example: grpc(9090), node_exporter(9100), prometheus (26660), etc.
Step 2-7. Review Instance Launch
Click "Launch" once you finish the review
You can either create a new key pair or import a key pair. Follow this instruction
Step 2-8. Connect to your instance
Once the deployment is completed, you can connect to your instance via SSH.
$sshubuntu@PUBLIC_IP-iYOUR_KEY.pem
AfterwardAfterwards, go to the chain directory, and you will find all the essential binaries for setting up your node:
You may also enable (Optional)STATE-SYNC. Your node will download data related to the head or near the head of the chain and verify the data. This leads to drastically shorter times for joining a network for validator. For validator, It will be amazingly fast to sync the near head of the chain and join the network.
CAUTION Blocks before state-sync trust height will NOT be queryable. If you want to run a full node or a validator with complete blockchain data; It is not suggested to use state-sync.
...Doyouwanttoenablestate-sync? (Y/N): YState-syncrequirethelatestversionofbinarytostate-syncfromthelatestblock.The binary does not exist or the version does not match the target version. Download the target version binary from github release.
💾Downloadingcrypto-org-chain-mainnet-1binary%Total%Received%XferdAverageSpeedTimeTimeTimeCurrentDloadUploadTotalSpentLeftSpeed1006441006440061920--:--:----:--:----:--:--619210013.7M10013.7M0043.6M0--:--:----:--:----:--:--43.6M
Clean up the old blockchain data (if any)
...Resetchain-maindandremovedataifany❗️Enter (Y/N) to confirm to delete any old data: YStoppingchain-maindservice3:18PMINFRemovedallblockchainhistorydir=/chain/.chain-maind/data3:18PM INF Generated private validator file keyFile=/chain/.chain-maind/config/priv_validator_key.json stateFile=/chain/.chain-maind/data/priv_validator_state.json
❗️/chain/.chain-maind/config/priv_validator_key.jsonalreadyexists!Doyouwanttooverrideoldkey? (Y/N): YA new priv_validator_key.json with pubkey: open /chain/.chain-maind/config/priv_validator_key.json: no such file or directory
💡 Please make sure you have a backup of /chain/.chain-maind/config/priv_validator_key.json in case of unexpected accidents!
The consensus public key information could be found in /chain/.chain-maind/config/priv_validator_key.json
Backup your old /chain/.chain-maind/config/priv_validator_key.json if you ever created.
❗️/chain/.chain-maind/config/priv_validator_key.jsonalreadyexists!Doyouwanttooverrideoldkey? (Y/N): YA new priv_validator_key.json with pubkey: open /chain/.chain-maind/config/priv_validator_key.json: no such file or directory
💡 Please make sure you have a backup of /chain/.chain-maind/config/priv_validator_key.json in case of unexpected accidents!
The script will also ask you to fill in the moniker value which is a human-readable display name for tendermint p2p. p2p gossip will allow you to connect with more nodes (data sources).