-
Notifications
You must be signed in to change notification settings - Fork 905
imp(testnet): fix command evmosd testnet init-files
for validator_address is error
#2826
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
Conversation
WalkthroughThe changes introduce a fix for the command Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Command
participant Validator
User->>Command: Run evmosd testnet init-files
Command->>Validator: Create Validator with formatted address
Validator-->>Command: Validator created successfully
Command-->>User: Testnet setup complete
Tip Announcements
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional context usedMarkdownlint
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- cmd/evmosd/testnet.go (1 hunks)
Additional context used
Markdownlint
CHANGELOG.md
54-54: Expected: 120; Actual: 133
Line length(MD013, line-length)
Additional comments not posted (1)
CHANGELOG.md (1)
54-54
: Changelog entry added forevmosd testnet init-files
fix.The addition of the changelog entry under version v19.2.0 is appropriate and follows the standard format for documenting changes. It provides clear information about the fix related to the
validator_address
in theevmosd testnet init-files
command, which enhances the usability and reliability of the testnet setup process.This entry helps ensure that users and developers are aware of the changes and their impact, promoting transparency and accountability in the development process.
Tools
Markdownlint
54-54: Expected: 120; Actual: 133
Line length(MD013, line-length)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2826 +/- ##
===========================================
- Coverage 70.45% 22.63% -47.82%
===========================================
Files 293 413 +120
Lines 22559 73244 +50685
===========================================
+ Hits 15893 16580 +687
- Misses 5800 54923 +49123
- Partials 866 1741 +875 |
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.
Thanks for the contribution @luchenqun!
Can you please add the same change on this line and this one? |
Done. After finishing, I rechecked everything once again. There shouldn't be any fish that slipped through the net. ^_^ |
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
client/testnet.go (1)
314-314
: Inconsistent handling of validator addresses found.The change to use
sdk.ValAddress(addr).String()
for formatting validator addresses has not been consistently applied across the codebase. Instances ofaddr.String()
still exist in several files, which may lead to inconsistencies in address handling.
- Files with
addr.String()
:
x/vesting/types/msg.go
x/vesting/keeper/msg_server.go
x/vesting/keeper/grpc_query.go
x/vesting/keeper/utils.go
x/evm/keeper/grpc_query_test.go
x/evm/keeper/fees_test.go
x/erc20/types/token_pair_test.go
wallets/ledger/ledger_test.go
utils/utils_test.go
testutil/staking-rewards.go
testutil/network/network.go
testutil/integration/evmos/utils/genesis.go
rpc/namespaces/ethereum/personal/api.go
rpc/backend/evm_query_client_test.go
cmd/evmosd/testnet.go
cmd/evmosd/genaccounts.go
client/testnet.go
app/export.go
crypto/hd/algorithm_test.go
app/ante/integration_test.go
Please review these instances and update them as necessary to ensure consistent handling of validator addresses.
Analysis chain
Correct handling of validator addresses.
The change from
addr.String()
tosdk.ValAddress(addr).String()
ensures that the validator address is correctly formatted. This is a crucial fix for maintaining the integrity of validator addresses in the system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all instances of validator address handling have been updated. # Test: Search for the old address handling method. Expect: No occurrences. rg --type go -A 5 $'addr.String()'Length of output: 24421
testutil/network/network.go (1)
429-429
: Inconsistent handling of validator addresses.The verification revealed multiple instances of
addr.String()
still present in the codebase. These occurrences should be reviewed to determine if they need to be updated tosdk.ValAddress(addr).String()
to ensure consistent and correct handling of validator addresses.
x/vesting/types/msg.go
x/vesting/keeper/utils.go
wallets/ledger/ledger_test.go
x/vesting/keeper/msg_server.go
x/vesting/keeper/grpc_query.go
x/erc20/types/token_pair_test.go
x/evm/keeper/fees_test.go
x/evm/keeper/grpc_query_test.go
utils/utils_test.go
testutil/network/network.go
testutil/staking-rewards.go
testutil/integration/evmos/utils/genesis.go
rpc/namespaces/ethereum/personal/api.go
rpc/backend/evm_query_client_test.go
client/testnet.go
crypto/hd/algorithm_test.go
cmd/evmosd/testnet.go
app/export.go
app/ante/integration_test.go
cmd/evmosd/genaccounts.go
Analysis chain
Correct handling of validator addresses.
The change from
addr.String()
tosdk.ValAddress(addr).String()
ensures that the validator address is correctly formatted. This is a crucial fix for maintaining the integrity of validator addresses in the system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all instances of validator address handling have been updated. # Test: Search for the old address handling method. Expect: No occurrences. rg --type go -A 5 $'addr.String()'Length of output: 24421
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.
Thanks for the contribution @luchenqun 🙏
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
CHANGELOG.md (1)
Line range hint
1-1
: Reminder: Add tests.The TODO comment indicates that tests are missing.
Do you want me to generate the unit testing code or open a GitHub issue to track this task?
Tools
Markdownlint
56-56: Expected: 120; Actual: 133
Line length(MD013, line-length)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Additional context used
Markdownlint
CHANGELOG.md
56-56: Expected: 120; Actual: 133
Line length(MD013, line-length)
Description
Execute the command
testnet init-files --v 4 --output-dir ./nodes --chain-id evmos_9000-1 --keyring-backend test --base-fee 10000 --min-gas-price 10000
for gentxs/node0.json file now is
The correct approach should be:
One more minor change is that I have adjusted the commission previously collected by validators from 100% to the default 5% set by the staking module.
Summary by CodeRabbit
evmosd testnet init-files
command to address validator address errors.