Closed freak12techno closed 4 months ago
The update introduces new fetchers and generators to the NewApp
function, making significant alterations to the structure and functionality of components in the codebase. It adds a ValidatorConsumersFetcher
to gather validator consumer data and a ConsumerNeedsToSignGenerator
to generate metrics related to consumer chains. Additionally, the changes include reordering constants, adding new structs, and new test functions to ensure the correctness of the implementations.
Files | Change Summaries |
---|---|
pkg/app.go |
Added ValidatorConsumersFetcher and ConsumerNeedsToSignGenerator in NewApp function. |
pkg/constants/constants.go |
Reordered and renamed FetcherName constants. Added FetcherNameValidatorConsumers . |
pkg/fetchers/has_to_validate.go |
Introduced ValidatorConsumersFetcher struct and related methods. |
pkg/generators/consumer_needs_to_sign.go , pkg/generators/consumer_needs_to_sign_test.go |
Added ConsumerNeedsToSignGenerator struct, methods for Prometheus metrics, and test functions. |
pkg/tendermint/rpc.go |
Added GetValidatorConsumerChains function. |
pkg/types/tendermint.go |
Added ValidatorConsumerChains struct. |
assets/validator-consumers.json |
Introduced JSON object with a list of consumer chain IDs. |
pkg/fetchers/has_to_validate_test.go |
Added comprehensive test functions for ValidatorConsumersFetcher . |
sequenceDiagram
participant User
participant App as NewApp
participant Fetcher as ValidatorConsumersFetcher
participant Generator as ConsumerNeedsToSignGenerator
participant RPC as RPC.GetValidatorConsumerChains
User->>App: Initialize NewApp
App->>Fetcher: Add ValidatorConsumersFetcher
App->>Generator: Add ConsumerNeedsToSignGenerator
Fetcher->>RPC: Fetch validator consumer data
RPC-->>Fetcher: Return validator consumer chains
Generator->>App: Generate metrics
App-->>User: Return initialized App
A rabbit hops, code changes spring,
Fetchers and generators bring a zing,
Validators, consumers, all in queue,
New data fetched, metrics to view.
Chains align in perfect rhyme,
Our app evolves one hop at a time.
🌟🐇✨
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?
Attention: Patch coverage is 98.01980%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 90.54%. Comparing base (
abe5308
) to head (4b559cc
).
Files | Patch % | Lines |
---|---|---|
pkg/app.go | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
ValidatorConsumersFetcher
for fetching validator consumer data asynchronously.ConsumerNeedsToSignGenerator
for generating Prometheus metrics related to consumer chains that need to sign.Bug Fixes
Tests
ConsumerNeedsToSignGenerator
andValidatorConsumersFetcher
to validate functionality under different state conditions.