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

core refactor #2503

Merged
merged 15 commits into from
Feb 27, 2024
Merged

core refactor #2503

merged 15 commits into from
Feb 27, 2024

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Feb 1, 2024

Describe your changes

closes #2483

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

#2493 - diff https://github.com/anoma/namada/pull/2503/files/00cddd4c2585829d7e1b4e9bbded892b3b80d2d2..94d1a0b2048bb33fd2043aa27a69d388d965163a

Checklist before merging to draft

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

tzemanovic added a commit that referenced this pull request Feb 2, 2024
@tzemanovic tzemanovic marked this pull request as ready for review February 2, 2024 09:23
@tzemanovic tzemanovic mentioned this pull request Feb 2, 2024
2 tasks
@tzemanovic tzemanovic added the modularization Part of Namada's modularization effort label Feb 2, 2024
This was referenced Feb 2, 2024
tzemanovic added a commit that referenced this pull request Feb 5, 2024
tzemanovic added a commit that referenced this pull request Feb 6, 2024
* tomas/refactor-testing-addrs:
  changelog: add #2507
  core: prevent from using addresses for testing in non-test code
  changelog: add #2506
  gov: replace namada_state dep with namada_storage
  changelog: add #2503
  update all core types usages
  core: flatten types mod
  update replay_protection usage
  core: factor out the ledger::replay_protection mod into a new crate
  core: refactor out ledger::eth_bridge mod
  changelog: add #2493
  benches: fix the shell to update conversions on new epochs
  move shielded params from core into shielded_token
  move inflation from core to trans_token
  replace namada_state usage with namada_storage in token crates
  changelog: add #2482
  refactor finalize_block PoS updates
  refactor finalize_block governance updates
  refactor finalize_block token updates
@brentstone brentstone mentioned this pull request Feb 8, 2024
This was referenced Feb 9, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

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

Project coverage is 53.38%. Comparing base (c733be2) to head (94d1a0b).
Report is 79 commits behind head on main.

Files Patch % Lines
crates/core/src/event.rs 47.87% 49 Missing ⚠️
crates/proof_of_stake/src/lib.rs 78.94% 36 Missing ⚠️
crates/storage/src/mockdb.rs 51.42% 17 Missing ⚠️
crates/shielded_token/src/lib.rs 26.31% 14 Missing ⚠️
crates/apps/src/lib/bench_utils.rs 0.00% 7 Missing ⚠️
crates/sdk/src/masp.rs 0.00% 6 Missing ⚠️
crates/storage/src/lib.rs 87.50% 4 Missing ⚠️
crates/core/src/ethereum_events.rs 0.00% 3 Missing ⚠️
crates/namada/src/ledger/native_vp/masp.rs 0.00% 3 Missing ⚠️
...rates/apps/src/lib/node/ledger/shell/governance.rs 89.47% 2 Missing ⚠️
... and 13 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2503   +/-   ##
=======================================
  Coverage   53.38%   53.38%           
=======================================
  Files         302      305    +3     
  Lines      103403   103356   -47     
=======================================
- Hits        55198    55176   -22     
+ Misses      48205    48180   -25     

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

tzemanovic added a commit that referenced this pull request Feb 22, 2024
* tomas/core-refactor:
  changelog: add #2503
  update all core types usages
  core: flatten types mod
  update replay_protection usage
  core: factor out the ledger::replay_protection mod into a new crate
  core: refactor out ledger::eth_bridge mod
tzemanovic added a commit that referenced this pull request Feb 23, 2024
* tomas/core-refactor:
  changelog: add #2503
  update all core types usages
  core: flatten types mod
  update replay_protection usage
  core: factor out the ledger::replay_protection mod into a new crate
  core: refactor out ledger::eth_bridge mod
@@ -572,13 +573,27 @@ macro_rules! impl_storage_traits {
impl_storage_traits!(WlStorage<D, H>);
impl_storage_traits!(TempWlStorage<'_, D, H>);

impl<D, H> WithConversionState for WlStorage<D, H>
Copy link
Member

Choose a reason for hiding this comment

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

Does this really need a separate trait?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so - it is used to replace the state dep in shielded_token with storage, which restricts what the crate can access. The idea is to use a similar approach (with mocking when needed) to remove inter-sub-system dependencies

@tzemanovic tzemanovic merged commit 84b922c into main Feb 27, 2024
14 of 17 checks passed
@tzemanovic tzemanovic deleted the tomas/core-refactor branch February 27, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modularization Part of Namada's modularization effort non-breaking-change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core refactor
3 participants