refactor out namada crate
Describe your changes
Related to #2111 this PR refactors out the namada crate that will be removed. Two new crates are added:
namada_vpwith native VP interfaces and VP host fns implementationsnamada_vmwith the VM and its wasm implementation
The native VPs from namada crate are moved to their respective crates using the approach outlined in https://hackmd.io/@heliax/r131cSMSR (note that existing cross system deps are not yet removed, only the ones in the moved native VPs):
- [x] governance (uses
proof_of_stake::Readstorage andtoken::Keys) - [x] ethereum_bridge (uses
token::Keys) - [x] ibc (uses
governance::Read,parameters::Keys + Read,token::Keys + Writeandproof_of_stake::Read) - [x] masp (uses
governance::Read,parameters::Read) - moved intoshielded_token - [x] multitoken (uses
governance::Read,parameters::Read) - moved intotrans_token - [x] parameters (uses
governance::Read) - [x] pgf
- [x] proof_of_stake (uses
governance::Read)
Additionally:
- [x] dependency on
namada_parameterscrate innamada_statewas removed with the same DI approach as above to allow thenamada_parametersto depend onnamada_vpto implement its native VP - [x]
mod namada::ledger::protocolis moved intonamada_node::protocol - [x]
mod namada::vm::prefix_itermoved tonamada_state::prefix_iter - [x]
fn dry_run_txis moved into thenodecrate - [x]
mod control_flowhas been moved fromnamada_sdktonamada_core(feature-guarded by non-default "control_flow" as it needs tokio)
Deps graph
The two highlighted crates are newly added:
Indicate on which release or other PRs this topic is based on
v0.40.0
- for reviews the most notable changes are in
- new traits for systems in core
- native VP implementations using these traits moved from
namadacrate into relevant system's crate - new
crates/sdk/src/validation.rsthat injects the dependencies for native VPs
Checklist before merging to draft
- [x] I have added a changelog
- [x] Git history is in acceptable state
Codecov Report
Attention: Patch coverage is 59.05870% with 809 lines in your changes missing coverage. Please review.
Project coverage is 54.51%. Comparing base (
1e21ae8) to head (1154023).
Additional details and impacted files
@@ Coverage Diff @@
## main #3402 +/- ##
==========================================
+ Coverage 53.66% 54.51% +0.85%
==========================================
Files 322 323 +1
Lines 111871 113288 +1417
==========================================
+ Hits 60035 61762 +1727
+ Misses 51836 51526 -310
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
rebased onto 0.40 and added ~~https://github.com/anoma/namada/pull/3402/commits/72b2282786509b93630cbc7788e911c4192b5ba0~~ ~~835061e~~ ~~4e5268b~~ a7b48c1 to move IBC impl out of the MASP VP
@sug0 pls re-check this after the rebase - there's a new commit for MASP VP IBC dep a7b48c1
rebased on 0.41.0
@mergifyio refresh
refresh
✅ Pull request refreshed
@Mergifyio refresh
refresh
✅ Pull request refreshed
@mergifyio dequeue
dequeue
✅ The pull request has been removed from the queue main-queue
Hey @tzemanovic, your pull request has been dequeued due to the following reason: PR_DEQUEUED.
Sorry about that, but you can requeue the PR by using @mergifyio requeue if you think this was a mistake.
Hey @tzemanovic, your pull request has been dequeued due to the following reason: PR_DEQUEUED.
Sorry about that, but you can requeue the PR by using @mergifyio requeue if you think this was a mistake.
@mergifyio requeue
requeue
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically
Hey @tzemanovic, your pull request has been dequeued due to the following reason: PR_DEQUEUED.
Sorry about that, but you can requeue the PR by using @mergifyio requeue if you think this was a mistake.
@mergifyio refresh
refresh
✅ Pull request refreshed
Hey @tzemanovic, your pull request has been dequeued due to the following reason: PR_DEQUEUED.
Sorry about that, but you can requeue the PR by using @mergifyio requeue if you think this was a mistake.
@Mergifyio refresh
refresh
✅ Pull request refreshed
@Mergifyio refresh
refresh