Skip to content

Murisi/settable native precision#4522

Merged
tzemanovic merged 8 commits intomainfrom
murisi/settable-native-precision
Apr 2, 2025
Merged

Murisi/settable native precision#4522
tzemanovic merged 8 commits intomainfrom
murisi/settable-native-precision

Conversation

@murisi
Copy link
Copy Markdown
Collaborator

@murisi murisi commented Mar 31, 2025

Describe your changes

Based on #4510. The normed inflation is currently (in main) stored in the ConversionState structure in memory. This is potentially problematic because it means that neither governance upgrades nor storage key-based hard fork migrations can change this value. This PR addresses this potential issue by:

  1. moving the normed inflation value into the native token's precision key. (The value was moved to this key because it's used in exactly the same way as precisions for non-native tokens: to control the precision of the inflation computation and as the threshold for rewards.)
  2. moving the reference inflation value from the token precision key (which, because of (1), now stores the current native precision) to a new key called the MASP base native precision storage key.
  3. introducing a new key to allow scheduled changes to the base native precision key. Just like in Scheduled conversion and precision migrations #4510, this will allow migrations targetting the base native precision key to be applied without knowing the MASP epoch in which they will be applied.

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes
  • If this PR requires changes to the docs or specs, a corresponding PR is opened in the namada-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

@murisi murisi added MASP breaking:state State breaking change that is not backwards compatible with a state recorded by current version breaking:consensus Consensus breaking change that requires a hard-fork labels Mar 31, 2025
@murisi murisi force-pushed the murisi/settable-native-precision branch 3 times, most recently from 0517694 to 3ba34e7 Compare March 31, 2025 14:59
@murisi murisi force-pushed the murisi/settable-native-precision branch from 3ba34e7 to 9a45623 Compare March 31, 2025 15:11
@github-actions github-actions bot added the breaking:api public API breaking change label Mar 31, 2025
@Fraccaman Fraccaman self-requested a review April 2, 2025 11:09
@tzemanovic tzemanovic merged commit 49db0e6 into main Apr 2, 2025
23 of 25 checks passed
@tzemanovic tzemanovic deleted the murisi/settable-native-precision branch April 2, 2025 11:50
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (6154e11) to head (e6d957f).
Report is 52 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #4522   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tzemanovic added a commit that referenced this pull request Apr 2, 2025
tzemanovic added a commit that referenced this pull request Apr 2, 2025
* tomas/fix-4522-merge:
  fix #4522 merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking:api public API breaking change breaking:consensus Consensus breaking change that requires a hard-fork breaking:state State breaking change that is not backwards compatible with a state recorded by current version MASP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants