Skip to content
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

Murisi/remove reverse conversions #4290

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

murisi
Copy link
Collaborator

@murisi murisi commented Jan 31, 2025

Describe your changes

An alternative to #4288 where the ability to choose the epoch to which amounts are exchanged to is simply removed. This functionality became redundant once pinned transactions were removed in #3142 . More generally, this functionality is only needed for properly implementing functionality like account statements and pinned transactions where the amounts that were received need to be printed out exactly as they were in the past without any influence from conversions in the current tree.

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 mentioned this pull request Jan 31, 2025
3 tasks
@murisi murisi force-pushed the murisi/remove-reverse-conversions branch from c5bc0a6 to ba4d2c7 Compare February 3, 2025 08:50
@murisi murisi force-pushed the murisi/remove-reverse-conversions branch from ba4d2c7 to b9f4594 Compare February 3, 2025 09:15
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 98.36066% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.16%. Comparing base (1465f26) to head (e229b19).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/masp.rs 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4290      +/-   ##
==========================================
+ Coverage   74.03%   74.16%   +0.12%     
==========================================
  Files         345      345              
  Lines      110047   110510     +463     
==========================================
+ Hits        81476    81961     +485     
+ Misses      28571    28549      -22     

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

@murisi murisi requested review from batconjurer, grarco and sug0 February 3, 2025 10:19
@@ -2076,13 +2035,12 @@ mod test_shielded_wallet {
// to construct conversions properly, just like the protocol does, i.e.
// with conversions for non-consecutive epochs

// Query the balance with conversions at epoch 4
// Query the balance with conversions at epoch 5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this test is not needed anymore since it's testing the functionality that this pr removes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you're right. But maybe this test can just be repurposed since the specific checks that it does are still useful in the absence of inverse conversions...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right but I think for this test to make sense we should shield at epoch 4 instead of 5. Right now we shield at 5 and query at 5 so we just get back the same amount. We should instead shield at 4, query at epoch 4 expecting the same amount and then query at epoch 5 expecting the rewards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants