Skip to content

feat(governance): expose get_maturity_modulation query endpoint#9879

Draft
jasonz-dfinity wants to merge 2 commits intojason/NNS1-4319-compute-maturity-modulationfrom
jason/NNS1-4319-get-maturity-modulation-api
Draft

feat(governance): expose get_maturity_modulation query endpoint#9879
jasonz-dfinity wants to merge 2 commits intojason/NNS1-4319-compute-maturity-modulationfrom
jason/NNS1-4319-get-maturity-modulation-api

Conversation

@jasonz-dfinity
Copy link
Copy Markdown
Contributor

@jasonz-dfinity jasonz-dfinity commented Apr 14, 2026

Why

PR #9847 computes maturity modulation locally but does not expose it via the canister API.
This adds a query endpoint so that external tools and dashboards can read the current
maturity modulation value, as defined by Mission 70.

https://dfinity.atlassian.net/browse/NNS1-4319

What

  • Add MaturityModulation, GetMaturityModulationRequest, and GetMaturityModulationResponse types to the ic-nns-governance-api crate
  • Add Governance::get_maturity_modulation() method
  • Add #[query] fn get_maturity_modulation endpoint to the governance canister
  • Add corresponding types and service entry to governance.did
  • Add pb::api From conversion for MaturityModulation

PR Chain

Copy link
Copy Markdown
Contributor

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 PR exposes the Mission 70 “maturity modulation” value through the Governance canister’s public Candid interface so external tools/dashboards can query it.

Changes:

  • Added MaturityModulation, GetMaturityModulationRequest, and GetMaturityModulationResponse to ic-nns-governance-api.
  • Added Governance::get_maturity_modulation() and a corresponding #[query] get_maturity_modulation canister endpoint.
  • Updated governance.did and added the required pb→api conversion for MaturityModulation.

Reviewed changes

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

Show a summary per file
File Description
rs/nns/governance/src/pb/conversions/mod.rs Adds pb→api From conversion for MaturityModulation.
rs/nns/governance/src/governance.rs Adds a getter that exposes maturity modulation from heap state via API response type.
rs/nns/governance/canister/governance.did Declares new request/response + MaturityModulation types and adds the new service method.
rs/nns/governance/canister/canister.rs Implements the new public query endpoint that returns the modulation value.
rs/nns/governance/api/src/types.rs Introduces new public API types for the query endpoint and payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-get-maturity-modulation-api branch from 40e573b to ebb47a9 Compare April 14, 2026 23:12
@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-compute-maturity-modulation branch from 0724790 to 9a31ba9 Compare April 15, 2026 19:27
@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-get-maturity-modulation-api branch from ebb47a9 to 83dc934 Compare April 15, 2026 19:28
@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-compute-maturity-modulation branch from 9a31ba9 to a7108f0 Compare April 15, 2026 21:29
@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-get-maturity-modulation-api branch 2 times, most recently from ee64f46 to 5ff783e Compare April 15, 2026 22:29
@jasonz-dfinity jasonz-dfinity force-pushed the jason/NNS1-4319-get-maturity-modulation-api branch from 5ff783e to c1a9ced Compare April 16, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants