Skip to content
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

Merged
merged 10 commits into from
Dec 6, 2024
Merged

genesis: accounts & txs #303

merged 10 commits into from
Dec 6, 2024

Conversation

failfmi
Copy link
Contributor

@failfmi failfmi commented Dec 5, 2024

Summary by CodeRabbit

  • New Features

    • Introduced six new accounts with balances in the application.
    • Updated the total supply for the ueve denomination.
    • Added multiple transactions for creating validators on the Cosmos blockchain.
  • Bug Fixes

    • Ensured the integrity of the JSON structure with no alterations to other sections.

Copy link
Contributor

coderabbitai bot commented Dec 5, 2024

Walkthrough

The pull request introduces modifications to the genesis.json file and adds new transaction JSON files for the eved application. In genesis.json, six new accounts with specified balances are added, and the total supply of the ueve denomination is updated. Additionally, multiple new transaction files for creating validators are introduced, detailing various parameters related to the validators' setup, including commission rates and staking information.

Changes

File Path Change Summary
networks/testnets/raspi/genesis.json - Six new accounts added to auth.accounts with addresses eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy, eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd, eve1wrns6kdtxql3rstkk7mx8f4v49tal3dzsptfr7, eve1yy4u2ap6zl95tsvg36k3datly7ctek05w22g7h, eve1l6qf3pdxe8rrr8ak8lt9ypff66s3rhuaphvc2c, and eve1l732ry6k3zrf5jre96c0jmy5mdjvddpumutqqe.
- New balance entries in bank.balances for all six addresses with 100000000000000 in ueve.
- Updated bank.supply from 100000000000000 to 700000000000000 for denom: "ueve".
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.
networks/testnets/raspi/gentx/gentx-7fd5c2ff19fae9b881291d311d06a420018a0aba.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.
networks/testnets/raspi/gentx/gentx-5ce9d2210fb8c25750766211efa6479f20e7f224.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.
networks/testnets/raspi/gentx/gentx-db72de7035fa8877d5c9ee14eea18ff901f82ab3.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.
networks/testnets/raspi/gentx/gentx-a8903d9f0589b84586f5eebd258345caa14651e8.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.
networks/testnets/raspi/gentx/gentx-db8dff4ddd8d414a462377f4409df0ee0622e7a8.json - New transaction JSON added for MsgCreateValidator, including validator details, commission rates, and staking information.

Possibly related PRs

Suggested reviewers

  • hoank101

Poem

In the land of code where rabbits play,
New accounts and validators come out to stay.
With balances growing, our joy is clear,
A blockchain adventure, let’s all give a cheer!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between de970ba and 5f24dbd.

📒 Files selected for processing (1)
  • networks/testnets/raspi/gentx/gentx-5ce9d2210fb8c25750766211efa6479f20e7f224.json (1 hunks)
🔇 Additional comments (2)
networks/testnets/raspi/gentx/gentx-5ce9d2210fb8c25750766211efa6479f20e7f224.json (2)

1-1: Commission rate configuration looks good

The commission rate (0.1) is now properly configured to be less than the max_rate (0.2), which resolves the previous issue.


1-1: ⚠️ Potential issue

Add missing delegator address

The delegator_address field is empty, which is required for creating a validator. Based on the AI summary, this should match the account address from genesis.json.

Apply this fix:

- "delegator_address":""
+ "delegator_address":"eve1wrns6kdtxql3rstkk7mx8f4v49tal3dzsptfr7"

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (1)

1-1: Consider using a more professional validator moniker

The moniker "lol" appears unprofessional for a validator node. Consider using a more descriptive and professional name that reflects your validator's identity or purpose.

🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c41f122 and 26863ed.

📒 Files selected for processing (2)
  • networks/testnets/raspi/genesis.json (4 hunks)
  • networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.21.2)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (4)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (1)

1-1: Verify the validator's public key exposure

The static analysis tool detected a potential API key exposure. While this is likely a false positive (as validator public keys are meant to be public), please ensure you're not accidentally exposing any private keys or sensitive information.

✅ Verification successful

Let me try a different approach to verify the keys in the gentx file.


Let me check the content of another gentx file to compare the key formats.


No sensitive information exposed in the validator gentx file

After analyzing both gentx files in the testnet directory, I can confirm this is a false positive. The file contains only public information that is standard for Cosmos validator gentx files:

  • The ed25519 public key format is consistent across validators
  • No private keys or sensitive credentials are exposed
  • The file follows the standard Cosmos validator gentx structure with expected fields like commission rates, pubkeys, and signatures
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify if the key is a standard ed25519 public key format
echo "KvRZdsJqIckq7eqZDZwejabRtqGuaClVAa2zXsjB9Zk=" | base64 -d | xxd -p | wc -c
# Expected output: 32 (bytes for ed25519 public key)

Length of output: 273


Script:

#!/bin/bash
# Search for similar gentx files to compare the key format
rg -l "cosmos.crypto.ed25519.PubKey" networks/testnets/raspi/gentx/

# Check if there are any private keys accidentally committed
rg -i "private|secret" networks/testnets/raspi/gentx/

Length of output: 287


Script:

#!/bin/bash
# Compare the content of both gentx files
cat networks/testnets/raspi/gentx/gentx-856d266156a8daa399a74bf9c9e387d53054a3dc.json

# Also check if these files are part of standard testnet setup
rg -l "gentx" networks/testnets/raspi/README.md

Length of output: 1343

🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

networks/testnets/raspi/genesis.json (3)

28-34: Verify account sequence and numbering

The new account is correctly configured with:

  • account_number: "1"
  • sequence: "0"
    This follows the expected sequence after the existing account (number "0").

47-55: Verify staking amount consistency

The account balance (100000000000000 ueve) aligns with the validator's staking amount (10000000000000 ueve) in the gentx file, leaving sufficient tokens for future operations.


47-55: Verify token supply calculations

The changes show consistent token accounting:

  • New account balance: 100000000000000 ueve
  • Total supply increased by the same amount to 200000000000000 ueve
  • Matches the existing account's balance

The mathematical consistency is maintained between balances and total supply.

Also applies to: 69-69

✅ Verification successful

Let me try a different approach to verify the balances since paste and bc commands are not available. I'll use jq to sum the balances directly.


Token supply calculations are verified and correct

The verification confirms:

  • Total supply (200000000000000 ueve) exactly matches the sum of all balances
  • Two accounts with 100000000000000 ueve each:
    • eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy
    • eve16hpk4083nxajqhuc3rh9lvxpw6rz8z60ra3sem
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify total supply matches sum of balances
total_balance=$(cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.balances[].coins[] | select(.denom == "ueve") | .amount' | paste -sd+ - | bc)
total_supply=$(cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.supply[] | select(.denom == "ueve") | .amount')
echo "Total balance: $total_balance"
echo "Total supply: $total_supply"

Length of output: 612


Script:

#!/bin/bash
# Verify total supply matches sum of balances using jq's built-in sum
total_balance=$(cat networks/testnets/raspi/genesis.json | jq '[.app_state.bank.balances[].coins[] | select(.denom == "ueve") | .amount | tonumber] | add')
total_supply=$(cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.supply[] | select(.denom == "ueve") | .amount')
echo "Total balance: $total_balance"
echo "Total supply: $total_supply"

# Also show individual balances for verification
echo -e "\nIndividual balances:"
cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.balances[] | "\(.address): \(.coins[] | select(.denom == "ueve") | .amount)"'

Length of output: 785

@@ -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=="]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security concerns in validator configuration

Several security-related issues need to be addressed:

  1. Empty delegator_address field
  2. Missing security contact information
  3. Empty website and identity fields

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)


⚠️ Potential issue

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"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=="]}
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"lol","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.200000000000000000","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=="]}
🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

@@ -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=="]}

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.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
networks/testnets/raspi/gentx/gentx-7fd5c2ff19fae9b881291d311d06a420018a0aba.json (1)

1-1: Consider adjusting validator economic parameters

The current configuration has some concerning economic parameters:

  1. Minimum self delegation of "1" is extremely low and could be seen as a red flag by delegators
  2. Maximum commission rate of 20% is relatively low for long-term sustainability
  3. The precise commission rate of 6.942% seems arbitrary

Consider:

  1. Increasing minimum self delegation to show more skin in the game
  2. Setting a more standard maximum commission rate (e.g., 25-30%)
  3. Using a more conventional commission rate (e.g., 5% or 10%)
🧰 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)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 26863ed and 1c9fc68.

📒 Files selected for processing (2)
  • networks/testnets/raspi/genesis.json (4 hunks)
  • networks/testnets/raspi/gentx/gentx-7fd5c2ff19fae9b881291d311d06a420018a0aba.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • networks/testnets/raspi/genesis.json
🧰 Additional context used
🪛 Gitleaks (8.21.2)
networks/testnets/raspi/gentx/gentx-7fd5c2ff19fae9b881291d311d06a420018a0aba.json

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)
networks/testnets/raspi/gentx/gentx-7fd5c2ff19fae9b881291d311d06a420018a0aba.json

[HIGH] 1-2: IBM Cloud IAM Key

(CKV_SECRET_7)

@@ -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=="]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix critical configuration issues in validator setup

There are several critical issues in the validator configuration:

  1. The memo contains a private IP address (192.168.0.82) which won't be accessible by other nodes
  2. The delegator_address field is empty, which will cause transaction failure

Please update the configuration with:

  1. A public IP address or DNS name for your validator node
  2. Your delegator address that will be used for the initial delegation
🧰 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:

  • Genesis instructions explicitly state to fund accounts with 1,000,000,000 ueve and use 1,000,000 ueve for self-delegation
  • The total supply shown in genesis is 200,000,000,000,000 ueve, making this delegation amount (10M EVE) too large for a single validator

Please adjust your delegation amount to 1,000,000 ueve as specified in the genesis instructions.

🔗 Analysis chain

Verify 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 executed

The 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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
networks/testnets/raspi/genesis.json (2)

Line range hint 1-414: Consider separating testnet and mainnet configurations

Since this is a testnet configuration (chain_id: "eve-1000-testnet"), consider:

  1. Documenting that these are testnet-specific allocations
  2. Creating a separate template for mainnet genesis with appropriate supply and distribution
  3. Adding validation checks to prevent testnet configurations from being used in production

Initial balance allocations appear significantly higher than documented testnet amounts

The genesis file allocates 100,000,000,000,000 ueve to each account, which is substantially higher than the documented testnet allocation of 1,000,000,000 ueve mentioned in the README. The total supply of 300,000,000,000,000 ueve in the genesis file appears to be inconsistent with the testnet documentation.

  • The README shows validators should be funded with 1,000,000,000 ueve initially
  • Current genesis allocates 100,000,000,000,000 ueve per account
  • Total supply is set to 300,000,000,000,000 ueve
🔗 Analysis chain

Line range hint 54-79: Verify initial balance allocations

Each account is being allocated 100,000,000,000,000 ueve tokens. Please confirm if this allocation:

  1. Aligns with the network's tokenomics design
  2. Maintains appropriate token distribution
  3. Follows the denomination's decimal places convention

Run the following script to check for similar allocations in other genesis files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for similar balance allocations in other genesis files
# Look for patterns of large initial balances in other genesis files

fd -e json -x jq -r '.app_state.bank.balances[] | select(.coins[].amount == "100000000000000" and .coins[].denom == "ueve") | .address' {}

Length of output: 1089


Script:

#!/bin/bash
# Let's check the total supply and other accounts in the genesis file
cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.supply[] | select(.denom == "ueve") | .amount'

# Also check if there are any other accounts with different amounts
cat networks/testnets/raspi/genesis.json | jq -r '.app_state.bank.balances[] | select(.coins[].denom == "ueve") | {address: .address, amount: .coins[].amount}'

Length of output: 571


Script:

#!/bin/bash
# Let's check if there's any documentation about tokenomics or token distribution
fd -e md -e txt | xargs grep -l -i "tokenomics\|token distribution\|initial supply\|ueve"

# Also check for any configuration files that might define token denominations
fd "config|params" -e toml -e yaml -e json | xargs grep -l "ueve"

Length of output: 185


Script:

#!/bin/bash
# Let's check the content of the testnet README for any relevant information
cat networks/testnets/README.md

# Also check if this is a testnet-specific configuration by looking at the directory structure
ls -R networks/

Length of output: 1870

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1c9fc68 and 9100bd2.

📒 Files selected for processing (1)
  • networks/testnets/raspi/genesis.json (4 hunks)
🔇 Additional comments (1)
networks/testnets/raspi/genesis.json (1)

85-85: Verify total supply calculation

The total supply is set to 300,000,000,000,000 ueve. Please verify that this matches the sum of all account balances:

  • eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy: 100,000,000,000,000
  • eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd: 100,000,000,000,000
  • eve16hpk4083nxajqhuc3rh9lvxpw6rz8z60ra3sem: 100,000,000,000,000

Run the following script to validate the total supply matches all balances:

✅ Verification successful

Total supply calculation verified

The total supply of 300,000,000,000,000 ueve matches exactly with the sum of all account balances:

  • eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy: 100,000,000,000,000 ueve
  • eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd: 100,000,000,000,000 ueve
  • eve16hpk4083nxajqhuc3rh9lvxpw6rz8z60ra3sem: 100,000,000,000,000 ueve
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Validate that total supply matches sum of all balances

jq -r '
  .app_state.bank.supply[] | 
  select(.denom == "ueve") | 
  .amount as $total | 
  ($total | tonumber) == 
  ([../.app_state.bank.balances[].coins[] | 
    select(.denom == "ueve") | 
    .amount | 
    tonumber] | add) or 
  "Supply mismatch: Total=" + $total + " vs Sum=" + 
  ([../.app_state.bank.balances[].coins[] | 
    select(.denom == "ueve") | 
    .amount | 
    tonumber] | add | tostring)
' networks/testnets/raspi/genesis.json

Length of output: 540


Script:

#!/bin/bash
# Let's first check the structure of the genesis.json file
cat networks/testnets/raspi/genesis.json | jq '.app_state.bank'

Length of output: 854

Comment on lines 30 to 41
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy",
"pub_key": null,
"account_number": "1",
"sequence": "0"
},
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd",
"pub_key": null,
"account_number": "1",
"sequence": "0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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:

{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy",
  "pub_key": null,
- "account_number": "1",
+ "account_number": "1",
  "sequence": "0"
},
{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd",
  "pub_key": null,
- "account_number": "1",
+ "account_number": "2",
  "sequence": "0"
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy",
"pub_key": null,
"account_number": "1",
"sequence": "0"
},
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd",
"pub_key": null,
"account_number": "1",
"sequence": "0"
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy",
"pub_key": null,
"account_number": "1",
"sequence": "0"
},
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd",
"pub_key": null,
"account_number": "2",
"sequence": "0"

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
networks/testnets/raspi/gentx/gentx-5ce9d2210fb8c25750766211efa6479f20e7f224.json (1)

1-1: Consider optimizing gas limit

The gas limit of 200000 seems high for a validator creation transaction. Consider reducing it to a more appropriate value like 150000.

- "gas_limit":"200000"
+ "gas_limit":"150000"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9100bd2 and d976d8a.

📒 Files selected for processing (2)
  • networks/testnets/raspi/genesis.json (4 hunks)
  • networks/testnets/raspi/gentx/gentx-5ce9d2210fb8c25750766211efa6479f20e7f224.json (1 hunks)
🔇 Additional comments (3)
networks/testnets/raspi/genesis.json (3)

101-101: Verify total supply calculation

The total supply of 300000000000000 ueve correctly matches the sum of all account balances (100000000000000 * 3).


30-48: ⚠️ Potential issue

Fix duplicate account numbers

Multiple accounts are assigned the same account_number "1", which could lead to transaction ordering issues and state conflicts.

Apply this fix:

{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "eve18p4wl3hss9e9wv264yklyjp700kn8uazvwwxyy",
  "pub_key": null,
- "account_number": "1",
+ "account_number": "1",
  "sequence": "0"
},
{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "eve18r27aslqyuk3wsmaqqq9l4lyd6c0dach4y9lxd",
  "pub_key": null,
- "account_number": "1",
+ "account_number": "2",
  "sequence": "0"
},
{
  "@type": "/cosmos.auth.v1beta1.BaseAccount",
  "address": "eve1wrns6kdtxql3rstkk7mx8f4v49tal3dzsptfr7",
  "pub_key": null,
- "account_number": "1",
+ "account_number": "3",
  "sequence": "0"
}

Line range hint 61-95: Verify initial balance distribution

The initial balance distribution of 100000000000000 ueve to each account seems high. Please confirm if this is the intended distribution for the testnet.

✅ Verification successful

Initial balance distribution appears consistent with testnet configurations

The distribution of 100000000000000 ueve (100M EVE) per account in the Raspberry Pi testnet is actually lower than other testnet configurations, which show distributions of 1000000000000000 (1B EVE). This appears to be an intentional reduction in the testnet allocation, making it more conservative than other test environments.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if similar balance distributions exist in other networks
fd -t f "genesis.json" -x grep -l "100000000000000" {} \;

Length of output: 167


Script:

#!/bin/bash
# Check the total supply and distribution in other genesis files for comparison
for file in $(fd -t f "genesis.json"); do
  echo "=== $file ==="
  # Extract and count unique amounts
  jq -r '.app_state.bank.balances[].coins[].amount' "$file" 2>/dev/null | sort | uniq -c || true
done

Length of output: 824

@@ -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=="]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"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=="]}
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"iliyanbachiyski","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.200000000000000000","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=="]}

⚠️ Potential issue

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"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=="]}
{"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":"eve1wrns6kdtxql3rstkk7mx8f4v49tal3dzsptfr7","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=="]}

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (1)
networks/testnets/raspi/genesis.json (1)

Line range hint 75-133: Consider implications of large initial allocations

The current setup allocates 100,000,000,000,000 ueve tokens to each account, which:

  1. Might not represent realistic mainnet conditions
  2. Could affect testing of economic parameters
  3. May impact validator behavior testing

Consider if smaller allocations would provide more realistic testing scenarios.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c94aae4 and 15707da.

📒 Files selected for processing (2)
  • networks/testnets/raspi/genesis.json (4 hunks)
  • networks/testnets/raspi/gentx/gentx-a8903d9f0589b84586f5eebd258345caa14651e8.json (1 hunks)
🔇 Additional comments (6)
networks/testnets/raspi/genesis.json (3)

28-62: LGTM: Account configuration looks correct

The accounts are properly configured with sequential account numbers and correct initial parameters.


133-133: LGTM: Supply matches total allocation

The updated supply of 600,000,000,000,000 ueve correctly reflects the sum of all account balances (6 accounts × 100,000,000,000,000).


Line range hint 75-127: Verify the intended token distribution

Each account is allocated 100,000,000,000,000 ueve tokens. Please confirm if this significant allocation aligns with the testnet's economic model and testing requirements.

✅ Verification successful

Let me gather more context about the token distribution by checking the genesis configuration and any documentation that might explain these allocations.


Let me check if there are any configuration files or documentation specifically for the testnet that might explain these allocations.


Based on the gathered information, I can now provide a final response about the token distribution in the genesis file:

Token allocation aligns with testnet requirements

The allocation of 100,000,000,000,000 ueve tokens per account is consistent with the testnet's configuration and requirements:

  • This is a testnet environment where large allocations are common for testing purposes
  • The distribution is uniform across all 6 validator accounts
  • The total supply (600,000,000,000,000 ueve) is properly accounted for in the genesis state
  • The configuration follows the chain's economic model where ueve is set as:
    • The primary fee token
    • The staking token (bond_denom)
    • The mint token (mint_denom)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Calculate total allocation and distribution
echo "Total accounts with balance:"
rg -c '"amount": "100000000000000"' networks/testnets/raspi/genesis.json

echo "Unique balance amounts:"
rg '"amount": "\d+"' networks/testnets/raspi/genesis.json --only-matching | sort | uniq -c

Length of output: 448


Script:

#!/bin/bash
# Check for documentation about token distribution
echo "Searching for token distribution documentation:"
rg -i "token distribution|initial allocation|genesis allocation" -A 3 -B 3

echo -e "\nChecking genesis configuration:"
cat networks/testnets/raspi/genesis.json | jq '.app_state.bank.balances[] | {address: .address, amount: .coins[].amount, denom: .coins[].denom}' 

echo -e "\nChecking if these addresses are validators:"
cat networks/testnets/raspi/genesis.json | jq '.app_state.staking.validators[].operator_address'

Length of output: 1281


Script:

#!/bin/bash
# Search for testnet configuration and documentation
echo "Checking testnet documentation:"
fd README -t f | xargs cat

echo -e "\nChecking for testnet configuration files:"
fd . networks/testnets/raspi -t f -x cat {}

echo -e "\nChecking for any denomination configuration:"
rg -i "ueve|denom" -A 2 -B 2

Length of output: 71579

networks/testnets/raspi/gentx/gentx-a8903d9f0589b84586f5eebd258345caa14651e8.json (3)

6-12: Consider adding security contact information and validator identity.

The validator description is missing crucial information that helps establish trust and enables communication during emergencies. Consider adding:

  • A security contact email for urgent communications
  • An identity string (e.g., Keybase identity) for verification
  • A website for transparency

25-28: Verify staking amount meets network requirements.

The staking amount of 10,000,000 EVE needs verification:

  1. Does it meet the minimum validator requirements?
  2. Is it proportional to other validators' stakes?
  3. Does it comply with maximum stake limitations?
✅ Verification successful

Let me try to find the staking parameters from other configuration files since they're not in genesis.json.


Let me try one more search to find any staking-related configurations.


Based on the gathered information, I can now provide a final response:

Staking amount is consistent with other validators

The staking amount of 10,000,000 EVE (10000000000000 ueve) is:

  • Consistent with all other validators in the testnet who have the same stake amount
  • Uses the correct bond denomination "ueve" as specified in the network's genesis
  • No explicit min/max validator stake limits are set in the network parameters

While there are no explicit minimum or maximum stake limitations defined, the fact that all validators have configured the same stake amount (10M EVE) suggests this is the network's recommended value for the testnet.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Compare staking amounts across validators
fd -t f 'gentx-.*\.json' networks/testnets/raspi/gentx --exec jq -r '.body.messages[0].value | "Validator stake: \(.amount) \(.denom)"'

# Check genesis configuration for staking parameters
fd -t f 'genesis.json' networks/testnets/raspi --exec jq -r '.app_state.staking.params | "Min validator stake: \(.min_validator_stake), Max validator stake: \(.max_validator_stake)"'

Length of output: 595


Script:

#!/bin/bash
# Search for staking parameters in config files
rg -i "validator.*stake|min.*stake|max.*stake" -A 2 -B 2

# Look for chain configuration files
fd -t f "config.*.toml|*.yaml|params.json" --exec cat {}

Length of output: 2206


Script:

#!/bin/bash
# Search for staking configurations with fixed paths
fd -t f . --glob '*.toml' --exec cat {}

# Search for staking-related code that might define parameters
ast-grep --pattern 'const $_ = $$$stake$$$'

# Look for staking configurations in app initialization
rg -i "staking.*param|bond.*denom|initial.*stake" -A 2 -B 2

Length of output: 8790


51-56: Verify fee configuration meets network requirements.

The transaction fee configuration shows:

  • Empty fee amount array
  • Gas limit of 200000

Please verify if the network accepts fee-less transactions or if minimum fees are required.

✅ Verification successful

Let me gather more information about the fee configuration by checking other relevant files.


Let me check one more aspect - the chain configuration and any documentation about fees.


Based on the gathered information:

  1. The genesis parameters show a tx_size_cost_per_byte of 10 but no minimum gas price limit
  2. All other gentx files in the directory have the same fee configuration (empty fee amount)
  3. No additional fee configuration was found in config files or documentation

Empty fee configuration appears to be the standard for this testnet

The empty fee configuration in the gentx file aligns with:

  • The network's genesis parameters showing no minimum gas price limit
  • The consistent pattern across all other gentx files
  • The testnet nature of the network (testnets often allow fee-less transactions)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check network's minimum fee requirements
fd -t f 'genesis.json' networks/testnets/raspi --exec jq -r '.app_state.auth.params.min_gas_price_limit, .app_state.auth.params.tx_size_cost_per_byte'

Length of output: 158


Script:

#!/bin/bash
# Check config files for fee settings
fd -t f 'config.toml|app.toml' networks/testnets/raspi --exec cat {} \; | grep -i 'minimum-gas\|min-gas\|fee'

# Check other gentx files for fee patterns
fd -t f 'gentx-.*\.json' networks/testnets/raspi/gentx --exec jq -r '.body.fee' {}

Length of output: 229


Script:

#!/bin/bash
# Check README or documentation files for fee information
fd -t f 'README.md|SETUP.md|GENESIS.md' networks/testnets/raspi --exec cat {}

# Check chain configuration
fd -t f 'chain.json|chain_config.json' networks/testnets/raspi --exec cat {}

# Check genesis template if exists
fd -t f 'genesis.template.json' networks/testnets/raspi --exec cat {}

Length of output: 234

Comment on lines +18 to +20
"min_self_delegation": "1",
"delegator_address": "",
"validator_address": "evevaloper1l6qf3pdxe8rrr8ak8lt9ypff66s3rhuaqlsvtl",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Missing delegator address and insufficient minimum self delegation.

Two critical issues found:

  1. The delegator_address field is empty, which will cause the transaction to fail
  2. The min_self_delegation of "1" is extremely low. Consider setting a higher value to demonstrate skin in the game and prevent validator hopping.

}
}
],
"memo": "[email protected]:26656",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Invalid node address in memo field.

The memo contains a private network IP address (192.168.0.78) which won't be accessible to other nodes on the network. Please update this to a public IP address or domain name.

Comment on lines +13 to +17
"commission": {
"rate": "0.100000000000000000",
"max_rate": "0.200000000000000000",
"max_change_rate": "0.010000000000000000"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Commission rate exceeds maximum rate in multiple validators

Critical issue found: Several validators have set their initial commission rate to 42.0699%, which exceeds their maximum rate of 20%. This is an invalid configuration that will cause validator creation to fail.

Affected validators:

  • Rate: 42.0699%, Max Rate: 20% (found in 3 gentx files)
  • Rate: 6.942%, Max Rate: 20% (found in 2 gentx files)
  • Rate: 10%, Max Rate: 20% (found in 1 gentx file)

The initial commission rate must be less than or equal to the maximum rate. The validators with 42.0699% initial rate need to adjust their configuration.

🔗 Analysis chain

Verify commission rate configuration aligns with network economics.

The commission configuration is immutable after validator creation. Current settings:

  • Initial rate: 10%
  • Maximum rate: 20%
  • Maximum daily increase: 1%

The maximum rate of 20% might be restrictive for future adjustments. Consider if this aligns with the network's long-term economic model.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check other validators' commission configurations for consistency
fd -t f 'gentx-.*\.json' networks/testnets/raspi/gentx --exec jq -r '.body.messages[0].commission | "Rate: \(.rate), Max Rate: \(.max_rate), Max Change Rate: \(.max_change_rate)"'

Length of output: 769

@failfmi failfmi changed the title genesis: lol account genesis: accounts & txs Dec 5, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (1)

1-1: Consider using standard commission rates

The current commission rate (0.042069900000000000) appears to be a meme reference. For a production network, consider using standard commission rates (e.g., 5% or 10%) that reflect your validator's value proposition and operational costs.

🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 51d7fc0 and 70595fe.

📒 Files selected for processing (1)
  • networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.21.2)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (2)
networks/testnets/raspi/gentx/gentx-9486066c4712c00a7cab5f7b188fff4c978fb9e7.json (2)

1-1: Verify key ownership and backup

The public keys are properly formatted, but ensure you:

  1. Have securely backed up the corresponding private keys
  2. Have tested these keys on a testnet before mainnet deployment
  3. Are using a hardware security module (HSM) for private key storage
🧰 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: ⚠️ Potential issue

Improve validator profile for production readiness

The validator description needs professional configuration:

  1. Change moniker from "lol" to a professional name
  2. Add security contact information (required for network security)
  3. Provide website and identity details for transparency

Example configuration:

-"moniker":"lol","identity":"","website":"","security_contact":"","details":""
+"moniker":"EveValidator-1","identity":"keybase_id","website":"https://validator.example.com","security_contact":"[email protected]","details":"Professional Eve Network 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)

@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"lol","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.042069900000000000","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":["qGzGtfwk2d1Y9dUY0HHUHzwy1c+FS8GT7ZQRYgQut98tJaqCQiR/7T/eGpCsSTFq8uQdNGzM6o9kS3tStYeCcw=="]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Fix delegation configuration

Several critical issues in the delegation setup:

  1. Empty delegator_address field must be filled
  2. min_self_delegation of "1" is too low for a production validator

Recommendations:

  1. Add your delegator address
  2. Set a meaningful min_self_delegation amount (e.g., "1000000000" ueve) to demonstrate commitment to the network
🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


⚠️ Potential issue

Update node address configuration

The node address (192.168.0.170) is a private IP address that won't be accessible to other nodes in the network. Update this to your public endpoint before submitting the gentx.

Example:

-"[email protected]:26656"
+"9486066c4712c00a7cab5f7b188fff4c978fb9e7@public.validator.example.com:26656"

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Gitleaks (8.21.2)

1-1: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 70595fe and de970ba.

📒 Files selected for processing (2)
  • networks/testnets/raspi/genesis.json (4 hunks)
  • networks/testnets/raspi/gentx/gentx-db8dff4ddd8d414a462377f4409df0ee0622e7a8.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • networks/testnets/raspi/genesis.json
🔇 Additional comments (3)
networks/testnets/raspi/gentx/gentx-db8dff4ddd8d414a462377f4409df0ee0622e7a8.json (3)

1-1: ⚠️ Potential issue

Warning: Private IP address in node address

The memo field contains a private IP address (192.168.0.175), which won't be accessible to other nodes on the network. For a testnet validator, you should use a public IP address or DNS name.


1-1: Verify staking amount against network parameters

The staking amount of 10,000,000,000,000 ueve needs to be verified against:

  1. The network's total supply
  2. Other validators' stake amounts
  3. Network's minimum validator stake requirements
✅ Verification successful

Staking amount is consistent with network parameters

The verification shows that:

  1. All gentx files have the same staking amount of 10,000,000,000,000 ueve
  2. The genesis file shows each validator account has been allocated 100,000,000,000,000 ueve
  3. Total supply is 700,000,000,000,000 ueve (distributed among 7 accounts)

The staking amount (10T ueve) is reasonable as it represents 10% of each validator's initial allocation (100T ueve), allowing for future delegation and maintaining network security while not over-committing their funds.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Compare stake amounts across all gentx files
rg -l "amount" | xargs jq -r '.body.messages[0].value.amount'

# Check if genesis.json exists and get total supply
if [ -f "../genesis.json" ]; then
    jq -r '.app_state.bank.supply' "../genesis.json"
fi

Length of output: 147


Script:

#!/bin/bash
# Let's try a more specific search for gentx files and their amounts
fd 'gentx.*json$' networks/testnets/raspi/gentx/ | while read -r file; do
  echo "File: $file"
  jq -r '.body.messages[0].value.amount' "$file"
done

# Check for network parameters in config files
fd -t f '.*config.*\.json$|.*genesis.*\.json$' networks/testnets/raspi/ | while read -r file; do
  echo "File: $file"
  cat "$file"
done

Length of output: 15261


1-1: Consider enhancing validator security and identity configuration

  1. The minimum self delegation of "1" is extremely low and might not demonstrate sufficient skin in the game.
  2. Security contact information is empty, which is not recommended for production validators.
  3. Missing identity fields reduce validator discoverability and trustworthiness.

Consider:

  • Increasing minimum self delegation to a more substantial amount
  • Adding security contact information
  • Including identity information from keybase.io

@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"tuga","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper1l732ry6k3zrf5jre96c0jmy5mdjvddpu65h5p7","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"fpYtN2Y6/BiT73duDs6NXBOnXgRz1dMrpEFf+F+P1B8="},"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+cXoTUypYotoi2gEaOjEWMn4JRPDouXwlcVigIiMqjE"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["VGixvwF/LoHHKj7F/YTU4G3uT+WxW9uy6YFH9a5jHGkwBPt50loCcAOV8IDHoNTHb+zPbOYjYHCM9prQyPz20Q=="]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Critical: Empty delegator addresses in all gentx files

All gentx files in the repository have empty delegator addresses, which is a systemic issue. The delegator address is a mandatory field that must be set to the address derived from the signer's public key for each validator. This will cause all transactions to fail.

  • Found 7 gentx files, all with missing delegator addresses
  • Each file has a validator address set but the corresponding delegator address is empty
🔗 Analysis chain

Critical: Missing delegator address

The delegator_address field is empty, which will cause the transaction to fail. This address is required and should match the address derived from the signer's public key.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if this is a pattern in other gentx files
rg -l "delegator_address" | xargs jq -r '.body.messages[0].delegator_address' | grep -c '^$'

Length of output: 94


Script:

#!/bin/bash
# Let's check all gentx files to see the pattern of empty delegator addresses
rg -l "delegator_address" | xargs jq -r '[.body.messages[0].delegator_address, .body.messages[0].validator_address] | @tsv'

Length of output: 482

@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"iliyanbachiyski","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","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":["jGgW/wSw6T4S8AQ3UicWCGx85sM4mMW2YO4K4cIxoKkyfkN1JHBY8VPrSx6gKrv/2r5Iim/nK5VCEN0oAmt2xA=="]}

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.
@@ -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=="]}

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.
@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"tuga","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper1l732ry6k3zrf5jre96c0jmy5mdjvddpu65h5p7","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"fpYtN2Y6/BiT73duDs6NXBOnXgRz1dMrpEFf+F+P1B8="},"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+cXoTUypYotoi2gEaOjEWMn4JRPDouXwlcVigIiMqjE"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["VGixvwF/LoHHKj7F/YTU4G3uT+WxW9uy6YFH9a5jHGkwBPt50loCcAOV8IDHoNTHb+zPbOYjYHCM9prQyPz20Q=="]}

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.
@faddat faddat merged commit 5680e19 into eve-network:main Dec 6, 2024
7 of 8 checks passed
This was referenced Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants