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

Move ConversionState token map to the storage for inflation proposal #2601

Merged
20 commits merged into from
Mar 19, 2024

Conversation

yito88
Copy link
Member

@yito88 yito88 commented Feb 12, 2024

Describe your changes

  • Move the token map in ConversionState to the storage to be updated by wasm txs
  • Store the hash of the asset map in ConversionState to be merklized
  • Merklize these storage keys and the hash of the commitment tree

Indicate on which release or other PRs this topic is based on

#2618 v0.31.9

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@brentstone
Copy link
Collaborator

We will need to change namada_apps::node::ledger::shell:is_merklized_storage_key because it currently excludes all MASP keys.

@yito88 yito88 changed the title Add e2e test for IBC token reward Move token/asset map to the storage for inflation proposal Feb 14, 2024
@yito88 yito88 force-pushed the yuji/e2e-reward-shielded-ibc-token branch from e0cef09 to 1ac8568 Compare February 19, 2024 00:29
@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 53.88%. Comparing base (2ba001d) to head (d366d54).

Files Patch % Lines
crates/sdk/src/queries/shell.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2601   +/-   ##
=======================================
  Coverage   53.88%   53.88%           
=======================================
  Files         308      308           
  Lines      100154   100173   +19     
=======================================
+ Hits        53966    53981   +15     
- Misses      46188    46192    +4     

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

@yito88 yito88 changed the title Move token/asset map to the storage for inflation proposal Move ConversionState token map to the storage for inflation proposal Feb 19, 2024
@cwgoes cwgoes mentioned this pull request Feb 21, 2024
@yito88 yito88 marked this pull request as ready for review February 21, 2024 20:04
@yito88 yito88 force-pushed the yuji/e2e-reward-shielded-ibc-token branch from 84e35b4 to 3088e2b Compare February 22, 2024 15:37
brentstone
brentstone previously approved these changes Feb 27, 2024
Copy link
Collaborator

@brentstone brentstone left a comment

Choose a reason for hiding this comment

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

Could be nice to transform TokenMap and its usage into lazy data, but other than that LGTM

@brentstone brentstone mentioned this pull request Mar 8, 2024
brentstone added a commit that referenced this pull request Mar 8, 2024
* yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
brentstone added a commit that referenced this pull request Mar 8, 2024
* yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
brentstone added a commit that referenced this pull request Mar 8, 2024
* yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
brentstone added a commit that referenced this pull request Mar 9, 2024
* origin/yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
@brentstone brentstone mentioned this pull request Mar 9, 2024
2 tasks
@yito88 yito88 mentioned this pull request Mar 12, 2024
2 tasks
@grarco
Copy link
Collaborator

grarco commented Mar 12, 2024

Since this adds the masp convert_anchor to the merkle tree it partially addresses #2794

brentstone added a commit that referenced this pull request Mar 18, 2024
* origin/yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
brentstone added a commit that referenced this pull request Mar 18, 2024
* origin/yuji/e2e-reward-shielded-ibc-token:
  revert LazyMap
  making token map lazy
  WIP making token map lazy
  add changelog
  reduce epochs
  add shielded-sync
  wait more epoch
  wait long
  add retries
  change the epoch query interval
  fix integration test
  propose before ibc transfer
  leave assets in ConversionState and store the hash
  merklize root of masp convert_anchor
  check nam
  move token/asset maps from conversion_state back to storage
  add e2e test
@brentstone brentstone closed this pull request by merging all changes into main in 5e0b162 Mar 19, 2024
@brentstone brentstone deleted the yuji/e2e-reward-shielded-ibc-token branch March 19, 2024 01:52
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.

5 participants