Skip to content

Conversation

maiquanghiep
Copy link
Collaborator

PR(Pull Request) Overview

Briefly describe the changes made in this PR.

Changes

  • Major feature addition or modification
  • Bug fix
  • Code improvement
  • Documentation update

Related Issue

Please reference the Issue number this PR addresses: #123

Description of Changes

Describe the key changes or parts of the code that have been modified.

Testing Method

Explain how to test the changes step by step: 1. Run ‘…’ 2. Check ‘…’

Additional Information

If there is any additional information relevant to this PR, please include it here.

Jeongseup and others added 30 commits February 19, 2025 18:54
…ippcrat

Support New Chain: Add hippocrat testnet network into support_chain.yaml
…r-verifier/sync-logic

Fix: axelar amplifier verifier package
…-axelar

Add a new package : axelar-vald-heartbeats
…ts-for-axelar

Add rules for axelar vald heartbeats
…oce/grpc_query

fix: eventnonoce package grpc query for TLS and unregistered validator
@Copilot Copilot AI review requested due to automatic review settings September 1, 2025 01:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request contains extensive synchronization changes across the CVMS (Cosmostation Validator Monitoring System) codebase, adding support for Gnoland blockchain, enhancing Axelar functionality, and implementing various improvements and fixes.

  • Adds complete Gnoland blockchain support including vote indexer, block health monitoring, and API integrations
  • Enhances Axelar ecosystem support with new amplifier verifier functionality and VALD heartbeats monitoring
  • Updates test configurations and removes deprecated chain support (terra-classic)

Reviewed Changes

Copilot reviewed 88 out of 89 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/make_support_chains.sh Removes terra-classic from ignored chains list
internal/testutil/.env.test.sample Removes old test environment template
internal/testutil/.env.test Adds new comprehensive test environment configuration
internal/packages/health/block/ Updates block health monitoring to support Gnoland and removes unused fields
internal/packages/gnoland/ Adds complete Gnoland vote indexer implementation
internal/packages/axelar/ Enhances Axelar amplifier verifier and adds VALD heartbeats monitoring
internal/common/ Adds Gnoland types, parsers, and API functions
internal/helper/ Updates helper functions to support Gnoland protocol
Comments suppressed due to low confidence (2)

internal/packages/health/block/types/cosmos.go:1

  • The removal of the ID field from CosmosV34BlockResponse may break existing code that depends on this field. Ensure all usages of this struct are updated accordingly and consider adding a migration strategy if this is a breaking change.
package types

internal/packages/health/block/api/api.go:1

  • Variable declaration order issue: resp is declared twice with different types. The first declaration (line 32) should be removed as it's overwritten by the second declaration (line 33).
package api

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// first add new verifiers
isNewVerifier := false
newVerifierInfo := make([]indexermodel.VerifierInfo, 0)
newVerifierMap := make(map[string]bool, 0)
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

Using make with a capacity of 0 for a map is unnecessary. Maps don't use capacity like slices do. Use make(map[string]bool) instead.

Suggested change
newVerifierMap := make(map[string]bool, 0)
newVerifierMap := make(map[string]bool)

Copilot uses AI. Check for mistakes.

Comment on lines +38 to +42
if strings.Contains(c.GetGRPCEndPoint(), ":443") {
tlsConf := &tls.Config{
NextProtos: []string{"h2"}, // only allow HTTP/2
MinVersion: tls.VersionTLS12,
}
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The TLS configuration should include ServerName for proper certificate validation. Consider adding ServerName: extractHostFromEndpoint(c.GetGRPCEndPoint()) to prevent potential man-in-the-middle attacks.

Copilot uses AI. Check for mistakes.

}

var CosmosConsensusParamsQueryPath = "/cosmos/consensus/v1/params"
var CosmosConsensusParamsQueryPath = "/consensus_params"
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The change from /cosmos/consensus/v1/params to /consensus_params appears to be switching from a REST API endpoint to an RPC endpoint. Ensure this change is intentional and that all dependent code is updated to handle the different response format.

Suggested change
var CosmosConsensusParamsQueryPath = "/consensus_params"
// NOTE: This is now an RPC endpoint, not REST. Response format differs from /cosmos/consensus/v1/params.
var CosmosConsensusParamsRPCQueryPath = "/consensus_params"

Copilot uses AI. Check for mistakes.

// this logic will be progressed only when there are new tendermint validators in this block
if isNewFinalityProvider {
newfpInfoList, err := function.MakeFinalityProviderInfoList(idx.CommonClient, idx.ChainInfoID, newFinalityProviderMap)
newfpInfoList, err := function.MakeFinalityProviderInfoList(idx.CommonClient, chainID, idx.ChainInfoID, newFinalityProviderMap)
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The function signature change adds a chainID parameter. This is a breaking change that requires all callers to be updated. Verify that all usages of MakeFinalityProviderInfoList have been updated accordingly.

Copilot uses AI. Check for mistakes.

Tokens: "", // initia has multiple tokens on validators, so skip the tokens
})
// NOTE: mstaking module is not supporting status query string yet.
if validator.Status == types.BOND_STATUS_BONDED {
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The comparison uses types.BOND_STATUS_BONDED but the validator.Status field is a string type. This will likely always be false unless types.BOND_STATUS_BONDED is also a string constant. Verify the type compatibility.

Suggested change
if validator.Status == types.BOND_STATUS_BONDED {
if validator.Status == "Bonded" {

Copilot uses AI. Check for mistakes.

@maiquanghiep maiquanghiep changed the title Sync Rebase from cosmostation:develop Sep 1, 2025
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.

6 participants