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

feat: Add consensus address to validator query response #20434

Merged
merged 35 commits into from
Jun 21, 2024

Conversation

lucaslopezf
Copy link
Contributor

@lucaslopezf lucaslopezf commented May 21, 2024

Description

Closes: 19159


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Added consensus address to the validator query response in the staking module.
    • Updated MinCommissionRate in MsgUpdateParams to affect all validators.
  • Bug Fixes

    • Improved handling and extraction of consensus address information for validators.
  • Tests

    • Added tests to verify the setting of the consensus address for validators.
    • Updated various test cases to include address codec arguments.
  • Documentation

    • Updated changelog to reflect new features and changes in the staking module.
  • Chores

    • Introduced migrations for staking state from version 6 to version 7.

Copy link
Contributor

coderabbitai bot commented May 21, 2024

Walkthrough

The recent updates to the cosmos-sdk primarily enhance the x/staking module by adding a consensus address to the validator query response, ensuring each validator now includes this field in the response. This introduces changes to the validator creation functions, data structures, and test cases across multiple files. Additionally, the MinCommissionRate parameter update affects all validators, and several tests have been adapted to fit the new functionality.

Changes

File(s) Change Summary
x/staking/.../grpc_query.go Added setConsensusAddress function and modified Validators function to handle consensus address information.
x/staking/.../staking.proto Added consensus_address field to Validator message and introduced ValidatorInfo message in query.proto.
x/staking/.../validator.go Updated NewValidator function to include ConsensusAddress and parameter for codec.
x/staking/.../validator_test.go Added TestValidatorSetConsensusAddress to verify consensus address setting for a validator.
api/cosmos/staking/.../staking.pulsar.go Introduced ConsensusAddress field to Validator struct and updated methods to handle the new field.
tests/integration/.../msg_server_test.go Modified tests to include addresscodec.NewBech32Codec as an argument when creating validators.
tests/integration/.../common_test.go Updated NewValidator calls in createValidators function to include address codec argument.
tests/integration/.../genesis_test.go Added address codec import and modified TestInitGenesisLargeValidatorSet to include the codec.
tests/integration/.../msg_server_test.go Modified test cases to include address codec argument when creating validators.
tests/sims/.../operations_test.go Updated NewValidator function calls to include address codec argument in simulation tests.
x/distribution/.../allocation_test.go Modified NewValidator call in TestAllocateTokensTruncation to include address codec argument.
x/staking/.../migrations.go Added migration functionality from v6 to v7.
x/staking/.../v7/store.go Introduced MigrateStore function for updating validators to set the consensus address.
x/staking/.../module.go Updated consensusVersion constant and added migration registration for v6 to v7.
server/.../gogoreflection/fix_registration.go Reorganized import statements.
simapp/.../mint_fn.go Updated SendCoinsFromModuleToModule function signature.
x/staking/.../grpc_query_test.go Added TestGRPCQueryValidators to test querying validators using gRPC.
x/staking/CHANGELOG.md Documented new feature of including consensus address in validator query response.

Sequence Diagrams

sequenceDiagram
    participant User as User
    participant Node as Node
    participant StakingModule as x/staking

    User->>Node: Request validator query
    Node->>StakingModule: Query validators
    StakingModule->>StakingModule: Include consensus address
    StakingModule->>Node: Return validators with consensus address
    Node->>User: Response with validators
Loading

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@lucaslopezf lucaslopezf marked this pull request as ready for review May 21, 2024 15:30
@lucaslopezf lucaslopezf requested a review from a team as a code owner May 21, 2024 15:30
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: 0

Outside diff range and nitpick comments (1)
CHANGELOG.md (1)

65-65: Consider providing more detail in the changelog entry.

While the current entry is clear, adding a brief description of how the consensus address is added (e.g., through updates to the Validator struct and gRPC queries) could provide more context and clarity for the reader.

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between a2dd2a0 and 1d7cb9a.
Files ignored due to path filters (1)
  • x/staking/types/staking.pb.go is excluded by !**/*.pb.go
Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • api/cosmos/staking/v1beta1/staking.pulsar.go (17 hunks)
  • x/staking/keeper/grpc_query.go (4 hunks)
  • x/staking/proto/cosmos/staking/v1beta1/staking.proto (1 hunks)
  • x/staking/types/validator.go (1 hunks)
  • x/staking/types/validator_test.go (1 hunks)
Files not summarized due to errors (1)
  • api/cosmos/staking/v1beta1/staking.pulsar.go: Error: Message exceeds token limit
Additional Context Used
Path-based Instructions (5)
x/staking/types/validator_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/staking/types/validator.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/staking/keeper/grpc_query.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

CHANGELOG.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

api/cosmos/staking/v1beta1/staking.pulsar.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Additional comments not posted (20)
x/staking/types/validator_test.go (1)

322-325: The test function TestValidatorSetConsensusAddress correctly verifies the setting of the ConsensusAddress. Good coverage for the new feature.

x/staking/types/validator.go (1)

49-49: The addition of the ConsensusAddress field in the Validator struct is correctly initialized in the NewValidator function. This aligns with the changes in the protobuf definition and the PR objectives.

x/staking/proto/cosmos/staking/v1beta1/staking.proto (1)

149-150: The addition of the consensus_address field in the Validator message is correctly defined with appropriate protobuf options. This change is consistent with the updates in the Go types and aligns with the PR objectives.

x/staking/keeper/grpc_query.go (3)

657-668: The implementation of setConsensusAddress correctly handles potential nil validators and successfully sets the consensus address if the public key type assertion passes.


52-52: The integration of setConsensusAddress in the Validators method is correctly placed to ensure each validator's consensus address is set during the query.


89-89: The use of setConsensusAddress in the Validator method is correctly applied to set the consensus address for the queried validator.

api/cosmos/staking/v1beta1/staking.pulsar.go (14)

2963-2963: Addition of fd_Validator_consensus_address field descriptor is consistent with the protobuf changes.


2982-2982: Proper initialization of fd_Validator_consensus_address using md_Validator.Fields().ByName("consensus_address").


3128-3133: Ensure ConsensusAddress is included in the message only if it is non-empty. This is a good practice to avoid unnecessary data transmission.


3175-3176: Correct implementation of the case for ConsensusAddress in the switch statement. It checks for non-empty values correctly.


3219-3220: Proper handling of the ConsensusAddress field in the reset case, setting it to an empty string.


3279-3281: Correct retrieval of the ConsensusAddress value for the protobuf message.


3330-3331: Correct assignment of the ConsensusAddress from the interface value. This ensures type safety and correctness.


3394-3395: Correctly marking the ConsensusAddress field as immutable in this context, which aligns with the protobuf specifications for non-mutable fields.


3440-3441: Returning a default empty string for ConsensusAddress when requested, which is a safe fallback.


3562-3565: Proper calculation of the serialized size for ConsensusAddress, including handling of non-empty strings.


3595-3601: Correct serialization logic for ConsensusAddress, ensuring it is included only if non-empty and properly calculating its position in the byte array.


4205-4236: Proper unmarshalling logic for ConsensusAddress, including error handling for incorrect wire types and unexpected EOF.


15020-15021: Addition of ConsensusAddress to the Validator struct is consistent with the protobuf changes and PR objectives.


15135-15140: Implementation of GetConsensusAddress method is correct, ensuring it returns an empty string if the Validator is nil, which is a good null safety practice.

x/staking/types/validator.go Outdated Show resolved Hide resolved
x/staking/proto/cosmos/staking/v1beta1/staking.proto Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
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 (3)
x/staking/CHANGELOG.md (2)

Line range hint 103-103: Use "an" instead of "a" before words that start with a vowel sound.

- In a undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.
+ In an undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.

Line range hint 55-99: The indentation for list items should be consistent. Adjust to 2 spaces for better readability and adherence to Markdown best practices.

- * [#20238](https://github.com/cosmos/cosmos-sdk/pull/20238) `NewKeeper` now accepts a `core/comet.Service` as its last argument. 
+   * [#20238](https://github.com/cosmos/cosmos-sdk/pull/20238) `NewKeeper` now accepts a `core/comet.Service` as its last argument. 
- * [#19788](https://github.com/cosmos/cosmos-sdk/pull/19788) Remove `ABCIValidatorUpdate` and `ABCIValidatorUpdateZero`, use `ModuleValidatorUpdate` and `ModuleValidatorUpdateIsZero` instead.
+   * [#19788](https://github.com/cosmos/cosmos-sdk/pull/19788) Remove `ABCIValidatorUpdate` and `ABCIValidatorUpdateZero`, use `ModuleValidatorUpdate` and `ModuleValidatorUpdateIsZero` instead.
- * [#19754](https://github.com/cosmos/cosmos-sdk/pull/19754) Update to use `[]appmodule.ValidatorUpdate` as return for `ApplyAndReturnValidatorSetUpdates`.
+   * [#19754](https://github.com/cosmos/cosmos-sdk/pull/19754) Update to use `[]appmodule.ValidatorUpdate` as return for `ApplyAndReturnValidatorSetUpdates`.
...
x/staking/keeper/msg_server.go (1)

112-112: Ensure that error handling is consistent across all methods.

It's good practice to ensure that error messages are consistent and informative across all methods. This helps in debugging and maintaining the code more effectively.

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1d7cb9a and 424b463.
Files ignored due to path filters (1)
  • x/staking/types/staking.pb.go is excluded by !**/*.pb.go
Files selected for processing (20)
  • api/cosmos/staking/v1beta1/staking.pulsar.go (16 hunks)
  • tests/integration/distribution/keeper/msg_server_test.go (1 hunks)
  • tests/integration/gov/keeper/common_test.go (2 hunks)
  • tests/integration/staking/keeper/genesis_test.go (2 hunks)
  • tests/integration/staking/keeper/msg_server_test.go (1 hunks)
  • tests/integration/staking/keeper/validator_test.go (2 hunks)
  • tests/sims/distribution/operations_test.go (1 hunks)
  • tests/sims/slashing/operations_test.go (2 hunks)
  • x/distribution/keeper/allocation_test.go (1 hunks)
  • x/distribution/testutil/staking_helper.go (1 hunks)
  • x/slashing/keeper/hooks_test.go (2 hunks)
  • x/slashing/keeper/msg_server_test.go (5 hunks)
  • x/staking/CHANGELOG.md (1 hunks)
  • x/staking/keeper/grpc_query.go (4 hunks)
  • x/staking/keeper/msg_server.go (2 hunks)
  • x/staking/proto/cosmos/staking/v1beta1/staking.proto (1 hunks)
  • x/staking/simulation/genesis.go (2 hunks)
  • x/staking/testutil/validator.go (2 hunks)
  • x/staking/types/validator.go (1 hunks)
  • x/staking/types/validator_test.go (2 hunks)
Files skipped from review as they are similar to previous changes (4)
  • x/staking/keeper/grpc_query.go
  • x/staking/proto/cosmos/staking/v1beta1/staking.proto
  • x/staking/types/validator.go
  • x/staking/types/validator_test.go
Additional Context Used
LanguageTool (2)
x/staking/CHANGELOG.md (2)

Near line 96: Consider a shorter alternative to avoid wordiness.
Context: ...pi/cosmos/staking/v1beta1".Infraction_` in order to remove dependency between modules on st...


Near line 103: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ub.com//pull/18841) In a undelegation or redelegation if the sha...

Markdownlint (25)
x/staking/CHANGELOG.md (25)

55: Expected: 2; Actual: 4
Unordered list indentation


57: Expected: 2; Actual: 4
Unordered list indentation


58: Expected: 2; Actual: 4
Unordered list indentation


60: Expected: 2; Actual: 4
Unordered list indentation


61: Expected: 2; Actual: 4
Unordered list indentation


63: Expected: 2; Actual: 4
Unordered list indentation


64: Expected: 2; Actual: 4
Unordered list indentation


66: Expected: 2; Actual: 4
Unordered list indentation


68: Expected: 2; Actual: 4
Unordered list indentation


70: Expected: 2; Actual: 4
Unordered list indentation


71: Expected: 2; Actual: 4
Unordered list indentation


74: Expected: 2; Actual: 4
Unordered list indentation


75: Expected: 2; Actual: 4
Unordered list indentation


77: Expected: 2; Actual: 4
Unordered list indentation


79: Expected: 2; Actual: 4
Unordered list indentation


81: Expected: 2; Actual: 4
Unordered list indentation


83: Expected: 2; Actual: 4
Unordered list indentation


85: Expected: 2; Actual: 4
Unordered list indentation


88: Expected: 2; Actual: 4
Unordered list indentation


90: Expected: 2; Actual: 4
Unordered list indentation


92: Expected: 2; Actual: 4
Unordered list indentation


95: Expected: 2; Actual: 4
Unordered list indentation


99: Expected: 2; Actual: 4
Unordered list indentation


47: Expected: 0 or 2; Actual: 1
Trailing spaces


98: Expected: 0 or 2; Actual: 1
Trailing spaces

Path-based Instructions (16)
x/staking/testutil/validator.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/slashing/keeper/hooks_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/integration/gov/keeper/common_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/staking/simulation/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/distribution/testutil/staking_helper.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

tests/integration/staking/keeper/genesis_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/staking/CHANGELOG.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

tests/sims/slashing/operations_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/sims/distribution/operations_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/slashing/keeper/msg_server_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/integration/staking/keeper/msg_server_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/distribution/keeper/allocation_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

x/staking/keeper/msg_server.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

tests/integration/distribution/keeper/msg_server_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/integration/staking/keeper/validator_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

api/cosmos/staking/v1beta1/staking.pulsar.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Additional comments not posted (40)
x/staking/testutil/validator.go (1)

Line range hint 10-21: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

x/slashing/keeper/hooks_test.go (1)

Line range hint 6-31: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

tests/integration/gov/keeper/common_test.go (1)

Line range hint 15-49: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

x/staking/simulation/genesis.go (1)

Line range hint 12-93: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

x/distribution/testutil/staking_helper.go (1)

11-17: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

tests/integration/staking/keeper/genesis_test.go (1)

Line range hint 16-200: LGTM! Consider adding a comment explaining the use of addresscodec.NewBech32Codec for future maintainability.

x/staking/CHANGELOG.md (1)

31-31: The changelog entry succinctly captures the essence of the PR. Good job on maintaining clarity and brevity.

tests/sims/slashing/operations_test.go (2)

211-211: Ensure that the NewValidator function is correctly setting up the validator, especially with respect to the consensus address and other new fields introduced in the PR.

Verification successful

The NewValidator function in x/staking/types/validator.go correctly initializes all fields, including the consensus address and other relevant fields. Here are the key points from the implementation:

  • The consensus address is derived from the public key and converted to a string using the consensusAddressCodec.
  • All other fields such as OperatorAddress, ConsensusPubkey, Jailed, Status, Tokens, DelegatorShares, Description, UnbondingHeight, UnbondingTime, Commission, MinSelfDelegation, and UnbondingOnHoldRefCount are properly initialized.

No issues were found with the setup of the NewValidator function.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct setup of validators in the test environment.

# Test: Search for the `NewValidator` function usage and check for correct field initializations. Expect: Proper initialization of all fields.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) {
  $$$
}'

Length of output: 76



Script:

#!/bin/bash
# Description: Locate the `NewValidator` function definition and inspect its implementation.

# Step 1: Locate the `NewValidator` function definition.
rg 'func NewValidator' --glob '*.go'

# Step 2: Once located, print the function implementation to verify field initializations.
# Note: The file path and line numbers will be dynamically determined from the previous command's output.

Length of output: 1063



Script:

#!/bin/bash
# Description: Extract and inspect the `NewValidator` function implementation from `x/staking/types/validator.go`.

# Step 1: Extract the `NewValidator` function implementation.
ast-grep --lang go --pattern $'func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description, consensusAddressCodec address.Codec) (Validator, error) {
  $$$
}' x/staking/types/validator.go

Length of output: 2102


34-34: Ensure that all necessary imports are used and there are no unused imports to maintain clean code.

tests/sims/distribution/operations_test.go (1)

264-264: Ensure that the NewValidator function is correctly setting up the validator, especially with respect to the consensus address and other new fields introduced in the PR.

Verification successful

The NewValidator function in x/staking/types/validator.go correctly initializes all necessary fields, including the consensus address and other relevant fields. The function implementation ensures that the validator is set up properly with the provided parameters.

  • OperatorAddress
  • ConsensusAddress
  • ConsensusPubkey
  • Jailed
  • Status
  • Tokens
  • DelegatorShares
  • Description
  • UnbondingHeight
  • UnbondingTime
  • Commission
  • MinSelfDelegation
  • UnbondingOnHoldRefCount

This confirms that the validator setup in the test file tests/sims/distribution/operations_test.go is correct.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct setup of validators in the test environment.

# Test: Search for the `NewValidator` function usage and check for correct field initializations. Expect: Proper initialization of all fields.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) {
  $$$
}'

Length of output: 76



Script:

#!/bin/bash
# Description: Locate the definition of the `NewValidator` function and inspect its implementation.

# Search for the `NewValidator` function definition in the codebase.
rg 'func NewValidator' --glob '*.go'

Length of output: 1063



Script:

#!/bin/bash
# Description: Extract the implementation of the `NewValidator` function from `x/staking/types/validator.go`.

# Extract the implementation of the `NewValidator` function.
ast-grep --lang go --pattern $'func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description, consensusAddressCodec address.Codec) (Validator, error) {
  $$$
}' x/staking/types/validator.go

Length of output: 2102

x/slashing/keeper/msg_server_test.go (1)

176-176: Ensure that the test cases cover all new functionalities introduced in the PR, especially those related to the handling of the consensus address.

Also applies to: 217-217, 252-252, 287-287, 322-322

tests/integration/staking/keeper/msg_server_test.go (2)

47-47: Ensure the NewValidator function is updated to handle the new ConsensusAddress field as per the changes in x/staking/types/validator.go.

Verification successful

The NewValidator function in x/staking/types/validator.go has been updated to handle the new ConsensusAddress field. The function signature and implementation confirm that the ConsensusAddress is being processed correctly.

  • x/staking/types/validator.go:41: The function signature includes consensusAddressCodec address.Codec.
  • x/staking/types/validator.go:54: The ConsensusAddress field is set in the returned Validator struct.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' src/x/staking/types/validator.go

Length of output: 190



Script:

#!/bin/bash
# Locate the correct path for the `validator.go` file
fd validator.go

# Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' $(fd validator.go)

Length of output: 2522


47-47: Ensure the RotateConsPubKey function is updated to handle the new ConsensusAddress field as per the changes in x/staking/types/validator.go.

x/distribution/keeper/allocation_test.go (3)

297-297: Ensure the NewValidator function is updated to handle the new ConsensusAddress field as per the changes in x/staking/types/validator.go.

Verification successful

The NewValidator function in x/staking/types/validator.go has been updated to handle the new ConsensusAddress field.

  • The function signature includes consensusAddressCodec address.Codec.
  • The function body processes the ConsensusAddress and assigns it to the Validator struct.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' src/x/staking/types/validator.go

Length of output: 190



Script:

#!/bin/bash
# Locate the correct path for validator.go
fd validator.go

# Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' $(fd validator.go)

Length of output: 2522


297-297: Ensure the NewValidator function is updated to handle the new ConsensusAddress field as per the changes in x/staking/types/validator.go.

Verification successful

The NewValidator function in x/staking/types/validator.go has been updated to handle the new ConsensusAddress field. The function signature and implementation confirm that the ConsensusAddress is being processed correctly.

  • x/staking/types/validator.go:54: ConsensusAddress is included in the Validator struct.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' src/x/staking/types/validator.go

Length of output: 190



Script:

#!/bin/bash
# Locate the correct path for the `validator.go` file
fd validator.go

# Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' $(fd validator.go)

Length of output: 2522


297-297: Ensure the NewValidator function is updated to handle the new ConsensusAddress field as per the changes in x/staking/types/validator.go.

Verification successful

The NewValidator function in x/staking/types/validator.go has been updated to handle the new ConsensusAddress field. The function signature and implementation reflect the changes, ensuring the new field is properly managed.

  • x/staking/types/validator.go:41: func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description, consensusAddressCodec address.Codec) (Validator, error) {
  • x/staking/types/validator.go:54: ConsensusAddress: consAddressStr,
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' src/x/staking/types/validator.go

Length of output: 190



Script:

#!/bin/bash
# Locate the file `validator.go` and verify the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Step 1: Locate the `validator.go` file.
validator_file=$(fd validator.go)

# Step 2: Verify the `NewValidator` function in the located file.
if [ -n "$validator_file" ]; then
  ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' "$validator_file"
else
  echo "validator.go file not found."
fi

Length of output: 1219



Script:

#!/bin/bash
# Locate the file `validator.go` and verify the `NewValidator` function is updated to handle the new `ConsensusAddress` field.

# Step 1: Locate the `validator.go` files.
validator_files=$(fd validator.go)

# Step 2: Verify the `NewValidator` function in each located file.
for file in $validator_files; do
  echo "Checking file: $file"
  ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) $_ { $$$ }' "$file"
done

Length of output: 4150

x/staking/keeper/msg_server.go (1)

112-112: Ensure the NewValidator function correctly initializes the ConsensusAddress.

Verification successful

The NewValidator function in x/staking/types/validator.go correctly initializes the ConsensusAddress field. The consensus address is derived from the public key and converted to a string using the provided codec before being assigned to the ConsensusAddress field.

  • x/staking/types/validator.go:
    func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description, consensusAddressCodec address.Codec) (Validator, error) {
        pkAny, err := codectypes.NewAnyWithValue(pubKey)
        if err != nil {
            return Validator{}, err
        }
        consAddress := sdk.ConsAddress(pubKey.Address())
        consAddressStr, err := consensusAddressCodec.BytesToString(consAddress)
        if err != nil {
            return Validator{}, err
        }
    
        return Validator{
            OperatorAddress:         operator,
            ConsensusAddress:        consAddressStr,
            ConsensusPubkey:         pkAny,
            Jailed:                  false,
            Status:                  Unbonded,
            Tokens:                  math.ZeroInt(),
            DelegatorShares:         math.LegacyZeroDec(),
            Description:             description,
            UnbondingHeight:         int64(0),
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `ConsensusAddress` is correctly initialized in the `NewValidator` function.

# Test: Search for the function usage. Expect: Initialization of `ConsensusAddress`.
ast-grep --lang go --pattern $'func NewValidator($_, $_, $_, $_) Validator {
  $$$
  ConsensusAddress: $_,
  $$$
}'

Length of output: 116



Script:

#!/bin/bash
# Description: Locate the `NewValidator` function definition and verify the initialization of `ConsensusAddress`.

# Step 1: Locate the `NewValidator` function definition.
rg 'func NewValidator' --glob '*.go'

# Step 2: Verify the initialization of `ConsensusAddress` within the located function.
# This will be done by extracting the function definition and checking its content.
ast-grep --lang go --pattern 'func NewValidator($_, $_, $_, $_) Validator { $$$ }'

Length of output: 1148



Script:

#!/bin/bash
# Description: Extract and inspect the `NewValidator` function from `x/staking/types/validator.go`.

# Step 1: Extract the `NewValidator` function definition.
rg -A 20 'func NewValidator' x/staking/types/validator.go

Length of output: 843

tests/integration/distribution/keeper/msg_server_test.go (7)

219-219: LGTM! The test cases for setting withdraw addresses are comprehensive.


219-219: Excellent coverage of scenarios for withdrawing validator commissions.


219-219: Comprehensive testing of community pool funding scenarios.


219-219: Thorough testing for updating distribution parameters.


219-219: Effective testing of community pool spending scenarios.


219-219: Comprehensive testing for depositing into the validator rewards pool.


219-219: Ensure the NewValidator function correctly initializes the ConsensusAddress.

Verification successful

The NewValidator function correctly initializes the ConsensusAddress as part of its implementation.

  • The ConsensusAddress is derived from the public key and converted to a string using the provided codec.
  • This initialization is confirmed in the following lines of the function:
    consAddress := sdk.ConsAddress(pubKey.Address())
    consAddressStr, err := consensusAddressCodec.BytesToString(consAddress)
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `NewValidator` function initializes the `ConsensusAddress`.

# Test: Search for the function usage. Expect: Initialization of `ConsensusAddress`.
rg --type go $'NewValidator'

Length of output: 21852



Script:

#!/bin/bash
# Extract the implementation of the `NewValidator` function from `x/staking/types/validator.go`
ast-grep --lang go --pattern $'func NewValidator(operator string, pubKey cryptotypes.PubKey, description Description, consensusAddressCodec address.Codec) (Validator, error) {
  $$$
}' x/staking/types/validator.go

Length of output: 2102

tests/integration/staking/keeper/validator_test.go (1)

Line range hint 15-24: The implementation of newMonikerValidator correctly utilizes the updated NewValidator function to include the consensus address. Good use of assertions for error handling.

api/cosmos/staking/v1beta1/staking.pulsar.go (15)

2963-2963: Added fd_Validator_consensus_address field descriptor for ConsensusAddress.


2982-2982: Correctly initialized the field descriptor for ConsensusAddress.


3128-3133: Properly implemented conditional logic to handle ConsensusAddress if it is not empty.


3175-3176: Correctly added a case to check if ConsensusAddress is not empty.


3219-3220: Properly handled the clearing of ConsensusAddress in the default case.


3279-3281: Correctly implemented the getter for ConsensusAddress.


3330-3331: Properly implemented the setter for ConsensusAddress.


3394-3395: Correctly marked ConsensusAddress as not mutable.


3440-3441: Correctly implemented the default getter for ConsensusAddress.


3562-3565: Correctly calculated the size of ConsensusAddress for serialization.


3595-3601: Properly implemented serialization logic for ConsensusAddress.


4205-4236: Correctly implemented unmarshalling logic for ConsensusAddress, including error handling for wire type and length.


15020-15021: Added ConsensusAddress field to the Validator struct.


15135-15140: Implemented a getter method for ConsensusAddress. Ensures that the method returns an empty string if the Validator instance is nil, which is a good null safety practice.


Line range hint 16197-16260: The protobuf field definition for ConsensusAddress is correctly defined with the appropriate field number and type.

x/staking/keeper/msg_server.go Outdated Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from julienrbrt May 23, 2024 11:04
x/distribution/testutil/staking_helper.go Fixed Show fixed Hide fixed
x/staking/keeper/msg_server.go Fixed Show fixed Hide fixed
x/staking/simulation/genesis.go Fixed Show fixed Hide fixed
x/staking/testutil/validator.go Fixed Show fixed Hide fixed
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: 0

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 424b463 and de54dad.
Files selected for processing (4)
  • x/distribution/testutil/staking_helper.go (1 hunks)
  • x/staking/keeper/msg_server.go (2 hunks)
  • x/staking/simulation/genesis.go (2 hunks)
  • x/staking/testutil/validator.go (2 hunks)
Files skipped from review as they are similar to previous changes (4)
  • x/distribution/testutil/staking_helper.go
  • x/staking/keeper/msg_server.go
  • x/staking/simulation/genesis.go
  • x/staking/testutil/validator.go

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: 0

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between de54dad and 3f9ecd0.
Files selected for processing (1)
  • x/staking/keeper/grpc_query.go (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • x/staking/keeper/grpc_query.go

@lucaslopezf lucaslopezf requested a review from alpe May 24, 2024 17:51
Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

When I understand this correct, you added a new field to the Validator type and lazy set it in the GRPC query handler for the response. I was wondering if a data migration would be more efficient so that you can remove the code in the handler? For new entries the value should be set in the constructor already.

I have noticed that there are also a lot of changes to tests for the constructor. This is not a problem in general but sometimes test fixtures can be very helpful to setup complex objects.

x/staking/types/validator_test.go Outdated Show resolved Hide resolved
x/staking/keeper/grpc_query.go Outdated Show resolved Hide resolved
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)
x/staking/proto/cosmos/staking/v1beta1/query.proto (1)

142-146: Add the since sdk version comment for the ValidatorInfo message.

Consider adding a comment indicating the SDK version since which ValidatorInfo is available, as previously suggested by facundomedica. This helps developers understand version compatibility at a glance.

x/staking/keeper/grpc_query.go (1)

16-16: Ensure consistent import ordering.

Reorder the imports to group standard library imports, third-party imports, and internal module imports separately for better readability and conformity with the Go coding standards.

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between da97cd2 and 9c0621b.

Files ignored due to path filters (1)
  • x/staking/types/query.pb.go is excluded by !**/*.pb.go
Files selected for processing (2)
  • x/staking/keeper/grpc_query.go (2 hunks)
  • x/staking/proto/cosmos/staking/v1beta1/query.proto (1 hunks)
Additional context used
Path-based instructions (1)
x/staking/keeper/grpc_query.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/staking/keeper/grpc_query.go Outdated Show resolved Hide resolved
Copy link
Member

@facundomedica facundomedica left a comment

Choose a reason for hiding this comment

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

LGTM, not totally sure about breaking the query tho

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: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9c0621b and f97f074.

Files selected for processing (1)
  • x/staking/proto/cosmos/staking/v1beta1/query.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • x/staking/proto/cosmos/staking/v1beta1/query.proto

@lucaslopezf lucaslopezf requested a review from julienrbrt June 17, 2024 15:18
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.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f97f074 and 009d532.

Files ignored due to path filters (1)
  • x/staking/types/query.pb.go is excluded by !**/*.pb.go
Files selected for processing (3)
  • x/staking/keeper/grpc_query.go (2 hunks)
  • x/staking/keeper/grpc_query_test.go (1 hunks)
  • x/staking/proto/cosmos/staking/v1beta1/query.proto (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • x/staking/keeper/grpc_query.go
  • x/staking/proto/cosmos/staking/v1beta1/query.proto
Additional context used
Path-based instructions (1)
x/staking/keeper/grpc_query_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

Additional comments not posted (1)
x/staking/keeper/grpc_query_test.go (1)

Line range hint 9-63: The test cases in TestGRPCQueryValidator are well-structured and effectively cover both negative and positive scenarios. Good use of the require assertions ensures that the tests are halted at the first failure, which is appropriate for unit testing.

x/staking/keeper/grpc_query_test.go Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from kocubinski June 19, 2024 10:40
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: 0

Outside diff range and nitpick comments (3)
x/staking/CHANGELOG.md (3)

31-31: The changelog entry succinctly captures the essence of the PR. It might be beneficial to include a brief description or impact of this addition to provide more context to users.


Line range hint 104-104: Use "an" instead of "a" before a word beginning with a vowel sound.

- In a undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.
+ In an undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.

Line range hint 55-55: Correct the indentation of the unordered list items to maintain consistency and adhere to Markdown best practices.

-    * remove from `Keeper`: `GetParams`, `SetParams`
+  * remove from `Keeper`: `GetParams`, `SetParams`
-    * remove from `types`: `GetRedelegationTimeKey`
+  * remove from `types`: `GetRedelegationTimeKey`
-    * remove from `Keeper`: `RedelegationQueueIterator`
+  * remove from `Keeper`: `RedelegationQueueIterator`
-    * remove from `types`: `GetLastValidatorPowerKey`
+  * remove from `types`: `GetLastValidatorPowerKey`
-    * remove from `Keeper`: `LastValidatorsIterator`, `IterateLastValidators`
+  * remove from `Keeper`: `LastValidatorsIterator`, `IterateLastValidators`
-    * remove from `types`: `GetUBDKeyFromValIndexKey`, `GetUBDsByValIndexKey`, `GetUBDByValIndexKey`
+  * remove from `types`: `GetUBDKeyFromValIndexKey`, `GetUBDsByValIndexKey`, `GetUBDByValIndexKey`
-    * remove from `Keeper`: `UBDQueueIterator`
+  * remove from `Keeper`: `UBDQueueIterator`
-    * remove from `types`: `GetUnbondingDelegationTimeKey`
+  * remove from `types`: `GetUnbondingDelegationTimeKey`
-    * remove `Keeper`: `GetHistoricalInfo`, `SetHistoricalInfo`
+  * remove `Keeper`: `GetHistoricalInfo`, `SetHistoricalInfo`
-    * remove `Keeper`: `SetLastTotalPower`, `GetLastTotalPower`
+  * remove `Keeper`: `SetLastTotalPower`, `GetLastTotalPower`

Also applies to: 57-57, 58-58, 60-60, 61-61, 63-63, 64-64, 66-66, 68-68, 70-70, 71-71, 74-74, 75-75, 77-77, 79-79, 81-81, 83-83, 85-85, 88-88, 90-90, 92-92, 95-95, 99-99

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 009d532 and de98c7e.

Files selected for processing (1)
  • x/staking/CHANGELOG.md (1 hunks)
Additional context used
Path-based instructions (1)
x/staking/CHANGELOG.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

LanguageTool
x/staking/CHANGELOG.md

[style] ~96-~96: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...pi/cosmos/staking/v1beta1".Infraction_` in order to remove dependency between modules on st...


[misspelling] ~104-~104: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ub.com//pull/18841) In a undelegation or redelegation if the sha...

Markdownlint
x/staking/CHANGELOG.md

55-55: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


57-57: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


58-58: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


60-60: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


61-61: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


63-63: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


64-64: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


66-66: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


68-68: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


70-70: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


71-71: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


74-74: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


75-75: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


77-77: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


79-79: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


81-81: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


83-83: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


85-85: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


88-88: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


90-90: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


92-92: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


95-95: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


99-99: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


47-47: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


98-98: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


100-100: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces

@lucaslopezf lucaslopezf enabled auto-merge June 20, 2024 16:53
@lucaslopezf lucaslopezf added this pull request to the merge queue Jun 21, 2024
Merged via the queue into main with commit 467cc6d Jun 21, 2024
67 of 68 checks passed
@lucaslopezf lucaslopezf deleted the lucas/add-cons-address-to-validator branch June 21, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Return the address of validator when query validators.
7 participants