-
Notifications
You must be signed in to change notification settings - Fork 1
Supernode self report #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
All issues have been addressed. The
However, in More importantly,
So subsequent checks like However, for
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d21a47e to
e90126c
Compare
7f69e60 to
ee3c2e6
Compare
1ad19b4 to
ee9a02a
Compare
There was a problem hiding this 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 PR implements a comprehensive supernode metrics self-reporting system. Supernodes can now report structured performance metrics (CPU, memory, storage, version, network connectivity) which are validated against configurable thresholds. Non-compliant nodes are automatically transitioned to a new POSTPONED state, and can recover by submitting compliant reports. An end-block staleness check ensures active supernodes report metrics regularly or face postponement.
Key Changes
- Introduces
MsgReportSupernodeMetricsfor structured metrics reporting with compliance validation - Adds
SuperNodeStatePostponedstate for temporarily non-compliant supernodes with automatic recovery - Implements end-block staleness enforcement based on configurable intervals and grace periods
Reviewed changes
Copilot reviewed 49 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| x/supernode/v1/types/tx.pb.go | Generated protobuf code for new MsgReportSupernodeMetrics and response types |
| x/supernode/v1/types/query.pb.go | Generated protobuf code for GetMetrics query endpoint |
| x/supernode/v1/types/params.pb.go | Generated protobuf code for 11 new metrics-related parameters |
| x/supernode/v1/types/supernode_state.pb.go | Generated protobuf code adding SUPERNODE_STATE_POSTPONED enum value |
| x/supernode/v1/types/metrics.pb.go | New generated protobuf code for SupernodeMetrics and SupernodeMetricsState structures |
| x/supernode/v1/types/msg_report_supernode_metrics.go | Validation logic for metrics reporting message |
| x/supernode/v1/types/params.go | Parameter defaults, validation, and WithDefaults method for backward compatibility |
| x/supernode/v1/types/msg_update_params.go | Removed inline validation to support partial parameter updates |
| x/supernode/v1/types/keys.go | Added MetricsStateKey prefix for metrics storage |
| x/supernode/v1/types/events.go | Added EventTypeMetricsReported, EventTypeSupernodePostponed, EventTypeSupernodeRecovered |
| x/supernode/v1/types/codec.go | Registered MsgReportSupernodeMetrics in codec |
| x/supernode/v1/types/expected_keepers.go | Added SetMetricsState and GetMetricsState methods to SupernodeKeeper interface |
| x/supernode/v1/keeper/msg_server_report_supernode_metrics.go | Handler for metrics reporting with compliance evaluation and state transitions |
| x/supernode/v1/keeper/metrics_validation.go | Core compliance checking logic against parameter thresholds |
| x/supernode/v1/keeper/metrics_store.go | Storage and retrieval of SupernodeMetricsState |
| x/supernode/v1/keeper/metrics_state.go | State transition helpers for POSTPONED and recovery |
| x/supernode/v1/keeper/metrics_staleness.go | End-block staleness checking with overdue threshold enforcement |
| x/supernode/v1/keeper/query_get_metrics.go | Query handler to retrieve latest metrics for a validator |
| x/supernode/v1/keeper/abci.go | Begin/EndBlocker delegation to staleness handler |
| x/supernode/v1/keeper/params.go | Applied WithDefaults in GetParams and SetParams for backward compatibility |
| x/supernode/v1/keeper/msg_update_params.go | Implemented parameter merging to support partial governance updates |
| x/supernode/v1/keeper/msg_server_register_supernode.go | Removed legacy Metrics field initialization |
| x/supernode/v1/keeper/query_get_top_super_nodes_for_block.go | Updated filtering to exclude POSTPONED by default unless explicitly requested |
| x/supernode/v1/module/module.go | Applied WithDefaults in genesis validation and init, enabled BeginBlock/EndBlock |
| x/supernode/v1/README.md | Comprehensive documentation of metrics system, parameters, and state transitions |
| tests/systemtests/supernode_metrics_test.go | E2E tests for metrics reporting, postponement, and recovery |
| tests/systemtests/supernode_metrics_staleness_test.go | E2E tests for staleness detection and recovery flows |
| tests/systemtests/cli.go | Added FundAddressWithNode helper for multi-node testing |
| go.mod | Promoted github.com/Masterminds/semver/v3 to direct dependency |
| Various test files | Unit and system tests covering new functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reviewing your PR now. I'll share feedback in a few minutes! |
Reviewing your PR now. Feedback coming soon! |
* Implement supernode metrics reporting and postponement * Fix metrics helper wiring and postpone utils * Simplify metrics report compliance aggregation * Ensure deterministic metrics validation and add tests * Handle partial supernode params updates * Default missing supernode params * Fix metrics compliance tests * Extend governance proposal wait in system tests
ee9a02a to
690e628
Compare
No description provided.