Closed freak12techno closed 4 months ago
The update introduces a new ConsumerValidatorsFetcher
component, enhancing the system's ability to fetch and process consumer validators across multiple chains using Tendermint RPC. This includes creating necessary data structures for consumer validators, fetching methods, and integrating these updates into existing generator and application initialization logic.
Files / Directories | Summary of Changes |
---|---|
pkg/app.go |
Added NewConsumerValidatorsFetcher call in NewApp function. |
pkg/constants/constants.go |
Added FetcherNameConsumerValidators constant. |
pkg/fetchers/consumer_validators.go |
Introduced ConsumerValidatorsFetcher struct and related methods for fetching and processing consumer validators data asynchronously. |
pkg/generators/validators_info.go |
Added handling and processing logic for consumersDataRaw in the Generate function. |
pkg/tendermint/rpc.go |
Added GetConsumerValidators method for fetching consumer validators data for a given chain ID. |
pkg/types/tendermint.go |
Removed unneeded imports, added ConsumerValidator and ConsumerValidatorsResponse types, removed GetValConsAddress method from ConsensusPubkey . |
sequenceDiagram
participant App as App
participant Fetcher as ConsumerValidatorsFetcher
participant RPC as RPC
participant Chain as Blockchains
App->>Fetcher: NewConsumerValidatorsFetcher(logger, config, rpcs, tracer)
Fetcher->>+RPC: GetConsumerValidators(ctx, chainId)
RPC->>-Fetcher: ValidatorsResponse
Fetcher->>+Chain: processChain(ctx, rpc, chain)
Chain-->>-Fetcher: Updated Validators Data
Fetcher-->>App: ConsumerValidatorsData
App->>Generator: Generate(state, consumersData)
Generator->>Metrics: Update metrics with consumersData
In realms of code where data flow, New validators fetchers grow. Across the chains, they swiftly move, Tendermint’s calls, their paths improve, Metrics rise with every fetch, Our app, enhanced, its bounds now stretch. 🎉🐇
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?
Summary by CodeRabbit
New Features
Enhancements
Removals