Closed freak12techno closed 2 months ago
This update introduces the ability to ignore specific denominations (denoms
) in various configurations and metric exports. By adding an ignore
flag to the denoms
array in the configuration, you can now exclude certain denominational data from metrics and processing logic. The changes span multiple files, adding checks to ensure exclusions and adjusted validations accordingly.
File/Group | Change Summary |
---|---|
config.example.toml |
Added ignore field to denoms array to mark denominations for exclusion. |
pkg/config/denom_info.go |
Updated DenomInfo struct and methods to handle the Ignore field. |
pkg/generators/active_set_tokens.go |
Added checks to skip processing if the denomination should be ignored. |
pkg/generators/balance.go |
Enhanced loops to skip balances with ignored denominations. |
pkg/generators/commission.go |
Modified to bypass processing for ignored denominations. |
pkg/generators/rewards.go |
Added conditions to skip ignored denomination rewards. |
pkg/generators/self_delegation.go |
Implemented nil checks and ignored denomination logic. |
pkg/generators/single_validator_info.go |
Incorporated new checks for delegations of ignored denominations. |
pkg/generators/validators_info.go |
Added a new conditional to handle ignored denomination totals. |
Test updates in pkg/generators/..._test.go |
Included tests for the new ignore functionality across different generators. Updated imports and assertions to align with new logic. |
sequenceDiagram
participant User as User
participant ConfigParser as Config Parser
participant DenomInfo as DenomInfo Struct
participant MetricsExporter as Metrics Exporter
User->>ConfigParser: Provide config with denoms
ConfigParser->>DenomInfo: Parse denoms with `ignore` field
DenomInfo->>MetricsExporter: Skip denoms with `ignore=true`
MetricsExporter-->>User: Export metrics excluding ignored denoms
In the den of code, some coins take flight, An option to ignore them feels just right. With careful checks, we ensure our task, Denominations hidden, no need to ask. Metrics clean and crisp, with ease they flow, A rabbit's touch in the silence of code. 🐇✨
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?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
3a4edb8
) to head (b1262f4
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
Bug Fixes
nil
, ensuring more robust and error-free metric generation.Tests
Chores