├── .github └── workflows │ └── main.yml ├── gentx ├── Alexzender.json └── B-Harvest.json ├── gentx_checker.js └── README.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | pull_request: 4 | branches: [ "master" ] 5 | 6 | # Allows you to run this workflow manually from the Actions tab 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 14 | - uses: actions/checkout@v3 15 | 16 | - name: Setup Node.js environment 17 | uses: actions/setup-node@v3.4.1 18 | with: 19 | node-version: 14.18.1 20 | 21 | - id: files 22 | name: Check gentx 23 | uses: jitterbit/get-changed-files@v1 24 | with: 25 | format: 'json' 26 | - run: | 27 | readarray -t added_modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')" 28 | if [[ ${#added_modified_files[@]} > 1 ]]; then 29 | echo "More than one file found" 30 | exit 1 31 | fi 32 | for added_modified_file in ${added_modified_files[@]}; do 33 | node gentx_checker.js ${added_modified_file} 34 | done 35 | -------------------------------------------------------------------------------- /gentx/Alexzender.json: -------------------------------------------------------------------------------- 1 | {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Alexzender","identity":"0200AB142827A508","website":"https://t.me/alexzender777","security_contact":"","details":"Validator Haqq"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.050000000000000000"},"min_self_delegation":"1","delegator_address":"haqq1rdcf8gtfhytu83majv5yr6snr0gyegsd2k54ev","validator_address":"haqqvaloper1rdcf8gtfhytu83majv5yr6snr0gyegsdx5cmad","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"zYINcz0fluj6G6xJbK5fTs8djAM21MzUsRc0uM2xQ5k="},"value":{"denom":"aISLM","amount":"10000000000000000000"}}],"memo":"07c859352f30daf8c960f49ddd884500ae13e4d7@178.18.245.30:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"Al1XnZVWj6Plk89D/b62pj7YQaEMXGwR6zUJm31E4UKN"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["Xk7G1hFizQ1UNmWnHiVBz8FDArGYDHEPvLsl5w3cUaNEpj+oqFN+qxWw98FXFUz/56FXpRXqQqIdCVB2ermnJAE="]} 2 | -------------------------------------------------------------------------------- /gentx/B-Harvest.json: -------------------------------------------------------------------------------- 1 | {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"B-Harvest","identity":"8957C5091FBF4192","website":"https://bharvest.io","security_contact":"contact@bharvest.io","details":"Provides secure validation services for dPoS networks"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.050000000000000000"},"min_self_delegation":"1","delegator_address":"haqq1wltpda6tkrl8satfjmkef49fxntgtsgkwej73k","validator_address":"haqqvaloper1wltpda6tkrl8satfjmkef49fxntgtsgkzm7s4h","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"wu4NeGYF7bRGqapOYGyd03LUtyjs0CKpTwjPxMvRe4U="},"value":{"denom":"aISLM","amount":"10000000000000000000"}}],"memo":"bb0cfd3b7cbc236ab09a59a9108ef512dfad5b24@10.10.10.170:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AwWxt3bGLfYEw3GstEY99JJeO2Pn6POTop22mb6jDT2r"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["WDy3k2NFiNKqaxhWkpqQnuWL+/FdtItp59hpwx5P/NgBmNBxUVR39wrkzdLF3iRuh+brpWsDSC09rl5Jo8fyzwE="]} 2 | -------------------------------------------------------------------------------- /gentx_checker.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | class GentxChecker { 4 | constructor(gentx) { 5 | this._validator_data = gentx.body.messages[0]; 6 | } 7 | 8 | isHealthyDelegatorAddress() { 9 | return this._validator_data.delegator_address.startsWith('haqq'); 10 | } 11 | 12 | isHealthyValidatorAddress() { 13 | return this._validator_data.validator_address.startsWith('haqq'); 14 | } 15 | 16 | isHealthyAmount() { 17 | return parseInt(this._validator_data.value.amount) / 10000000000000000000 === 1.0; 18 | } 19 | 20 | isHealthyDenom() { 21 | return this._validator_data.value['denom'] === 'aISLM' 22 | } 23 | } 24 | 25 | let rawData = fs.readFileSync(process.argv[2]); 26 | let gentx_json = JSON.parse(rawData); 27 | 28 | const gentxChecker = new GentxChecker(gentx_json) 29 | const str_errors = [] 30 | 31 | if (!gentxChecker.isHealthyDelegatorAddress()) 32 | str_errors.push('Incorrect delegator address.'); 33 | if (!gentxChecker.isHealthyValidatorAddress()) 34 | str_errors.push('Incorrect validator address.'); 35 | if (!gentxChecker.isHealthyAmount()) 36 | str_errors.push('Incorrect amount.'); 37 | if (!gentxChecker.isHealthyDenom()) 38 | str_errors.push('Incorrect denom.'); 39 | 40 | console.log(str_errors.length === 0 ? 'No errors found' : str_errors.join('\n')) 41 | process.exit(str_errors.length === 0 ? 0 : 1) 42 | Footer 43 | © 2022 GitHub, Inc. 44 | Footer navigation 45 | Terms 46 | Privacy 47 | Security 48 | Statu 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # haqq-net-konkurs 2 | # testnet Haqq 3 |

🟢 Instructions for those who do not transfer node to another server

4 | 5 | Update binary haqqd to v1.0.3 6 | ```bash 7 | cd $HOME/haqq && \ 8 | git fetch && \ 9 | git checkout v1.0.3 && \ 10 | make install && \ 11 | haqqd version --long | head 12 | 13 | name: haqq 14 | server_name: haqqd 15 | version: '"1.0.3"' 16 | commit: 58215364d5be4c9ab2b17b2a80cf89f10f6de38a 17 | ... 18 | ``` 19 | 20 | 21 | Remove old genesis and download genesis.json to your server in .haqqd folder 22 | ```bash 23 | rm -rf $HOME/.haqqd/config/genesis.json && cd $HOME/.haqqd/config/ && wget https://raw.githubusercontent.com/haqq-network/validators-contest/master/genesis.json 24 | ``` 25 | 26 | Check genesis.json 27 | ```bash 28 | sha256sum $HOME/.haqqd/config/genesis.json 29 | 8c79dda3c8f0b2b9c0f5e770136fd6044ea1a062c9272d17665cb31464a371f7 30 | ``` 31 | 32 | Create a service file 33 | ```bash 34 | sudo tee /etc/systemd/system/haqqd.service > /dev/null <🔴 Instructions for those who transfer the node to another server 71 | 72 | If you want to move to another server - make sure you have saved the `mnemonic` and `priv_validator_key.json` from the server where you did the gentx 73 | 74 | Update packages and install required packages 75 | ```bash 76 | sudo apt update && sudo apt upgrade -y && \ 77 | sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y 78 | ``` 79 | 80 | Install Go 1.18.3 81 | ```bash 82 | wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz; \ 83 | rm -rv /usr/local/go; \ 84 | tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz && \ 85 | rm -v go1.18.3.linux-amd64.tar.gz && \ 86 | echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \ 87 | source ~/.bash_profile && \ 88 | go version > /dev/null 89 | ``` 90 | 91 | Install binary project 92 | ```bash 93 | cd $HOME && git clone https://github.com/haqq-network/haqq && \ 94 | cd haqq && \ 95 | git checkout v1.0.3 && \ 96 | make install && \ 97 | haqqd version --long | head 98 | 99 | name: haqq 100 | server_name: haqqd 101 | version: '"1.0.3"' 102 | commit: 58215364d5be4c9ab2b17b2a80cf89f10f6de38a 103 | ... 104 | ``` 105 | 106 | Also init your node 107 | ```bash 108 | haqqd init --chain-id haqq_54211-2 && \ 109 | haqqd config chain-id haqq_54211-2 110 | ``` 111 | 112 | Recover your wallet 113 | ```bash 114 | haqqd keys add --recover 115 | ``` 116 | 117 | 📥 Upload the saved `priv_validator_key.json` to your server. The path should look like this `/.haqqd/config/priv_validator_key.json` 118 | 119 | Remove old genesis.json and download genesis.json to your server in .haqqd folder 120 | ```bash 121 | rm -rf $HOME/.haqqd/config/genesis.json && cd $HOME/.haqqd/config/ && wget https://raw.githubusercontent.com/haqq-network/validators-contest/master/genesis.json 122 | ``` 123 | 124 | Check genesis.json 125 | ```bash 126 | sha256sum $HOME/.haqqd/config/genesis.json 127 | 8c79dda3c8f0b2b9c0f5e770136fd6044ea1a062c9272d17665cb31464a371f7 128 | ``` 129 | 130 | Create a service file 131 | ```bash 132 | sudo tee /etc/systemd/system/haqqd.service > /dev/null <