-
Notifications
You must be signed in to change notification settings - Fork 993
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
Allow the shielded reward precision for tokens to be explicitly set. #4423
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4423 +/- ##
==========================================
- Coverage 74.53% 74.49% -0.05%
==========================================
Files 339 339
Lines 110504 110653 +149
==========================================
+ Hits 82368 82433 +65
- Misses 28136 28220 +84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@murisi Do we need to modify the e2e test |
1e4409b
to
35b1045
Compare
Thanks, good point. I've introduced an integration test named |
…t the precision changes work as expected.
d9234d3
to
20a497c
Compare
Describe your changes
An attempt to address #4422 by introducing new storage keys to hold the shielded reward precision for each token and reading that instead of deducting it. More precisely, the changes are as follows:
10^(max(denom,3)-3)
This PR should be backwards compatible in the sense it can read/support current mainnet state without any migrations. And simultaneously it allows the shielded rewards precision to be set for new tokens as they are introduced by governance proposals. But to fix the precision of IBC tokens that have already been introduced into the system, purging of its
ConversionLeaf::conversion
entries (by setting them toMaspAmount::zero()
) would also have to be done in addition to setting its desired shielded reward precision in storage. (More generally, once the shielded reward precision for a token is set, it cannot be changed without doing a similar purging process.)Checklist before merging
breaking::
labelsnamada-docs
reponamada-indexer
ornamada-masp-indexer
, a corresponding PR is opened in that repo