Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

feat: add moniker and valoper address to signatures query #627

Merged
merged 6 commits into from
Nov 29, 2023

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Nov 28, 2023

Overview

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Summary by CodeRabbit

  • New Features

    • Introduced enhanced validator information display, including validator names (Monikers) and addresses.
    • Implemented new query capabilities to retrieve validator sets and corresponding EVM addresses.
  • Enhancements

    • Improved log outputs to include additional validator details for better clarity and tracking.
  • Documentation

    • Updated internal documentation to reflect new query functions and data structures.

@rach-id rach-id added enhancement New feature or request orchestrator orchestrator related labels Nov 28, 2023
@rach-id rach-id self-assigned this Nov 28, 2023
@rach-id rach-id requested a review from evan-forbes as a code owner November 28, 2023 16:41
Copy link
Contributor

coderabbitai bot commented Nov 28, 2023

Walkthrough

The codebase has been updated to enhance the functionality related to validators. New structures and fields have been introduced to store validator information, including a ValopAddress. Functions have been added to query validator sets and EVM addresses, and existing functions have been modified to incorporate the new validator data, improving the visibility of validator details in logs and outputs.

Changes

File Path Change Summary
cmd/.../query/cmd.go
rpc/app_querier.go
Added validatorInfo struct, ValopAddress field, toValidatorsInfo function; modified toQueryOutput and printConfirms functions to include validator details. Introduced QueryStakingValidatorSet and QueryEVMAddress functions; imported new packages for querying validator and EVM address information.

🐇✨
In the code's burrow, deep and wide,
New functions and structs now reside.
Validators' details, in the light,
A rabbit's touch, made all so bright. 🌟🌙


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 577f257 and 5506b8c.
Files selected for processing (2)
  • cmd/blobstream/query/cmd.go (8 hunks)
  • rpc/app_querier.go (2 hunks)
Additional comments: 6
cmd/blobstream/query/cmd.go (6)
  • 138-143: The addition of the ValopAddress field to the signature struct aligns with the summary and enhances the data structure with more relevant information.

  • 146-150: The introduction of the validatorInfo struct is a good encapsulation of validator details, which should improve code maintainability and clarity.

  • 242-257: The toValidatorsInfo function is correctly implemented to map staking validators to validatorInfo instances, which is consistent with the summary.

  • 287-311: The update to the toQueryOutput function to include Moniker and ValopAddress in the signature struct is consistent with the summary and enhances the output with more detailed information.

  • 333-345: The modifications to the printConfirms function to display Moniker and ValopAddress in the log output are consistent with the summary and improve the visibility of these new details.

  • 284-311: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [9-345]

No issues found regarding error handling, data races, or performance in the provided hunks.

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (d6df3b4) 26.09% compared to head (2660c5a) 25.91%.

Files Patch % Lines
rpc/app_querier.go 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #627      +/-   ##
==========================================
- Coverage   26.09%   25.91%   -0.19%     
==========================================
  Files          29       29              
  Lines        3023     3044      +21     
==========================================
  Hits          789      789              
- Misses       2139     2160      +21     
  Partials       95       95              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5506b8c and 71ac624.
Files selected for processing (1)
  • rpc/app_querier.go (2 hunks)

rpc/app_querier.go Show resolved Hide resolved
# Conflicts:
#	cmd/blobstream/query/cmd.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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 71ac624 and 1d3a721.
Files selected for processing (1)
  • cmd/blobstream/query/cmd.go (8 hunks)
Additional comments: 6
cmd/blobstream/query/cmd.go (6)
  • 15-22: The import of stakingtypes and its usage in the code is correct and aligns with the summary provided.

  • 153-158: The addition of the ValopAddress field to the signature struct is correctly implemented and matches the summary.

  • 161-164: The validatorInfo struct is well-defined and serves the purpose of encapsulating validator details as described in the summary.

  • 257-272: The toValidatorsInfo function is correctly implemented to create a map of validatorInfo from the staking validators.

  • 302-326: The toQueryOutput function has been modified appropriately to include validatorsInfo and populate the signature struct with Moniker and ValopAddress.

  • 348-360: The printConfirms function has been updated to display the new Moniker and ValopAddress fields, which enhances the visibility of validator actions.

cmd/blobstream/query/cmd.go Outdated Show resolved Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1d3a721 and 758ac66.
Files selected for processing (1)
  • cmd/blobstream/query/cmd.go (8 hunks)
Additional comments: 6
cmd/blobstream/query/cmd.go (6)
  • 18-18: The import of stakingtypes is correctly used in the new validatorInfo struct and toValidatorsInfo function.

  • 153-158: The addition of the ValopAddress field to the signature struct is correctly implemented and used in the toQueryOutput function.

  • 161-164: The new validatorInfo struct is well-defined and serves its purpose within the toValidatorsInfo function.

  • 257-272: The toValidatorsInfo function is correctly implemented to create a map of validator information from the staking validators.

  • 302-326: The toQueryOutput function has been modified appropriately to include validatorsInfo and populate Moniker and ValopAddress fields in the signature struct.

  • 348-360: The printConfirms function has been updated to log Moniker and ValopAddress alongside EvmAddress, which aligns with the summary of changes.

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.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 758ac66 and 2660c5a.
Files selected for processing (1)
  • cmd/blobstream/query/cmd.go (9 hunks)

cmd/blobstream/query/cmd.go Show resolved Hide resolved
cmd/blobstream/query/cmd.go Show resolved Hide resolved
cmd/blobstream/query/cmd.go Show resolved Hide resolved
cmd/blobstream/query/cmd.go Show resolved Hide resolved
@rach-id rach-id enabled auto-merge (squash) November 28, 2023 22:57
@rach-id rach-id merged commit 98e4c45 into celestiaorg:main Nov 29, 2023
17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request orchestrator orchestrator related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants