Mainnet AWS AMI - QuarkChain/pyquarkchain GitHub Wiki
Mainnet AWS AMI:
AMI name: QuarkChain_Mainnet_Cluster_AMI
AMI ID: ami-0750b30fd2b17b65c
Region: Oregon
Step 1: Launch the AWS instance and open the port 38291 and 38391.
Step 2: If you use external mining machines, please open the JSON_RPC_HOST.
vim pyquarkchain/mainnet/singularity/cluster_config_template.json
Change "JSON_RPC_HOST": "127.0.0.1" to your external mining machine IP or "0.0.0.0"
Noted that "0.0.0.0" is open for any addresses. If a user wants to turn it on, the user should be responsible for the access control of the service, such as preventing it being used by the public via a firewall.
Step 3: Set the coinbase address.
export PYTHONPATH=/home/ubuntu/pyquarkchain
python3 pyquarkchain/quarkchain/tools/miner_address.py
You can use git diff to check the results.
git diff
Step 4: (Optional) If you want to get the data quickly without validating the blocks, you can download a snapshot of the database from the QuarkChain Storage Box. A snapshot is taken and uploaded by the QuarkChain team every month. Once you start your cluster using the downloaded database, your cluster only needs to sync the blocks mined since the latest monthly snapshot.
Obtain the Storage Box password from the QuarkChain team via Telegram or Discord. The following commands will prompt for the password:
curl --fail --location --retry 3 --user 'u446960-sub3' --output VERSION 'https://u446960-sub3.your-storagebox.de/VERSION-PY'
fileName=$(tr -d '\r\n' < VERSION)
curl --fail --location --retry 3 --continue-at - --user 'u446960-sub3' --output data.tar.gz "https://u446960-sub3.your-storagebox.de/$fileName"
Step5: Launch the mainnet cluster using the following command
cd pyquarkchain
python3 quarkchain/cluster/cluster.py --cluster_config $(pwd -P)/mainnet/singularity/cluster_config_template.json
Mainnet mining configuration
| Chains | Hash Algorithm | Target Block Time |
|---|---|---|
| Root Chain | Ethash with Guardian | 60 seconds |
| 6 shards | Ethash | 10 seconds |
| 2 shards | Qkchash | 10 seconds |
For specifying shards in external_miner.py (-s or --shards)
| Chain | Shard | Hash Algo | Parameter for external_miner.py |
|---|---|---|---|
| 0 | 0 | Ethash | 1 |
| 1 | 0 | Ethash | 65537 |
| 2 | 0 | Ethash | 131073 |
| 3 | 0 | Ethash | 196609 |
| 4 | 0 | Ethash | 262145 |
| 5 | 0 | Ethash | 327681 |
| 6 | 0 | Qkchash | 393217 |
| 7 | 0 | Qkchash | 458753 |
GPU mining shard ID
Instructions for Ethash GPU mining
| Chain | Shard | Hash Algo | Parameter for Ethminer shard ID |
|---|---|---|---|
| 0 | 0 | Ethash | 1 |
| 1 | 0 | Ethash | 10001 |
| 2 | 0 | Ethash | 20001 |
| 3 | 0 | Ethash | 30001 |
| 4 | 0 | Ethash | 40001 |
| 5 | 0 | Ethash | 50001 |