-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
genesis: accounts & txs #303
Changes from 5 commits
26863ed
1c9fc68
9100bd2
f482d29
d976d8a
c94aae4
15707da
70595fe
de970ba
5f24dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1 @@ | ||||||||||
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"iliyanbachiyski","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.420699000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper1wrns6kdtxql3rstkk7mx8f4v49tal3dz3fhaze","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"71KqC7VMlbLvY2Q+2T95EtLEM0QmcmgOLmScGwkVb0Q="},"value":{"denom":"ueve","amount":"10000000000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AyugAVonfqGYfIHmp9eggfNElnA5ziEns/eOTvSYAQb/"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["EZantVCNUpgJFghROltmVrbm9StUsfhKx/avMsJxWslzKungNvzZfBjA0k/rfm8iLrH2Quse+6ZNjiMbVdd0Wg=="]} | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix invalid commission rate configuration The commission rate (0.420699) exceeds the specified max_rate (0.2), which would cause the validator creation to fail. Apply this fix: - "rate":"0.420699000000000000","max_rate":"0.200000000000000000"
+ "rate":"0.200000000000000000","max_rate":"0.200000000000000000" 📝 Committable suggestion
Suggested change
Add missing delegator address The delegator_address field is empty, which is required for creating a validator. The delegator address should match the account address from genesis.json: - "delegator_address":""
+ "delegator_address":"eve1wrns6kdtxql3rstkk7mx8f4v49tal3dzsptfr7" 📝 Committable suggestion
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"vladimirtrifonov","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.069420000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper18r27aslqyuk3wsmaqqq9l4lyd6c0dach5vet82","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"NpFYcaTifPwiYVaUC6xCa9fDCpp2qbc1I2hg7m4PKmo="},"value":{"denom":"ueve","amount":"10000000000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ato5x5j4N2ZohrVFlhuTMVmnxUdWMqB3STBV3QhOhTgR"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["Q+YODL55yAigOjAE1ShBEw0F79yPaeSOKaB9pe5cdXBDHBlSzkr9NjUyrKN+mapX2crXz8WbqkHy1Oisr3O+MA=="]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix critical configuration issues in validator setup There are several critical issues in the validator configuration:
Please update the configuration with:
🧰 Tools🪛 Gitleaks (8.21.2)1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) 1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) 🪛 checkov (3.2.312)[HIGH] 1-2: IBM Cloud IAM Key (CKV_SECRET_7) 💡 Codebase verification Based on the gathered information, I can now provide a final response: The delegation amount is significantly higher than the recommended amount The gentx amount of 10,000,000,000,000 ueve (10M EVE) is much higher than the recommended amount from the genesis instructions, which specifies using 1,000,000 ueve for self-delegation. Other gentx files show the same high amount, but this appears to be incorrect as:
Please adjust your delegation amount to 1,000,000 ueve as specified in the genesis instructions. 🔗 Analysis chainVerify the delegation amount against network parameters The delegation amount of 10,000,000,000,000 ueve needs verification against network parameters to ensure it doesn't exceed maximum allowed stake or total supply. Let me gather more information about the network parameters and other gentx files to make a complete assessment. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check genesis file for total supply and other validator's delegation amounts
# Find and check genesis.json file
fd -t f "genesis.json" -x cat {} | jq -r '.app_state.bank.supply[] | select(.denom=="ueve") | .amount'
# Check other gentx files for delegation amounts
fd -t f "gentx-*.json" -x jq -r '.body.messages[0].value.amount' {}
Length of output: 226 Script: #!/bin/bash
# Check all gentx files in the directory for their delegation amounts
find . -name "gentx-*.json" -exec cat {} \; | jq -r '.body.messages[0].value.amount'
# Check if there are any network parameter files that might define staking limits
fd -t f "config.toml|app.toml|params.toml" --exec cat {}
# Look for any documentation files that might contain network parameters
fd -t f "README.md|NETWORK.md|PARAMETERS.md" --exec cat {}
Length of output: 5179 🧰 Tools🪛 Gitleaks (8.21.2)1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) 1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) 🪛 checkov (3.2.312)[HIGH] 1-2: IBM Cloud IAM Key (CKV_SECRET_7) Check failure Code scanning / devskim A token or key was found in source code. If this represents a secret, it should be moved somewhere else. Error test
Do not store tokens or keys in source code.
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1 @@ | ||||||
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"lol","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.420699000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper18p4wl3hss9e9wv264yklyjp700kn8uazdxjj9r","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"KvRZdsJqIckq7eqZDZwejabRtqGuaClVAa2zXsjB9Zk="},"value":{"denom":"ueve","amount":"10000000000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/TFoIoCHY57GSzKLKRfq2XwbNujwGmvzXacyIAia4Ab"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["5JOyVCB6br30KDW+uIZaV2pgqFlR+fC5425F9NwUQPwEDpwEtUHYRRBIEOn+BXzDSLx767y2wnL3niLheiPekA=="]} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security concerns in validator configuration Several security-related issues need to be addressed:
Consider providing this information to enhance transparency and security of your validator. 🧰 Tools🪛 Gitleaks (8.21.2)1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) Critical: Invalid commission rate configuration The commission rate (0.420699) exceeds the maximum rate (0.200000), which will cause the transaction to fail. The commission rate must be less than or equal to the maximum rate. -"rate":"0.420699000000000000","max_rate":"0.200000000000000000"
+"rate":"0.200000000000000000","max_rate":"0.200000000000000000" 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Gitleaks (8.21.2)1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) Check failure Code scanning / devskim A token or key was found in source code. If this represents a secret, it should be moved somewhere else. Error test
Do not store tokens or keys in source code.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix duplicate account numbers
Both new accounts are assigned the same account_number "1", which could lead to transaction ordering issues and state conflicts. Each account should have a unique account number.
Suggested fix:
📝 Committable suggestion