Skip to content

migrate pallet-mixnet to umbrella crate#6986

Merged
UtkarshBhardwaj007 merged 16 commits into
paritytech:masterfrom
UtkarshBhardwaj007:pallet-mixet-migration
Jan 3, 2025
Merged

migrate pallet-mixnet to umbrella crate#6986
UtkarshBhardwaj007 merged 16 commits into
paritytech:masterfrom
UtkarshBhardwaj007:pallet-mixet-migration

Conversation

@UtkarshBhardwaj007

@UtkarshBhardwaj007 UtkarshBhardwaj007 commented Dec 23, 2024

Copy link
Copy Markdown
Member

Description

Migrate pallet-mixnet to use umbrella crate whilst adding a few types and traits in the frame prelude that are used by other pallets as well.

Review Notes

  • This PR migrates pallet-mixnet to use the umbrella crate.
  • Note that some imports like use sp_application_crypto::RuntimeAppPublic; and imports from sp_mixnet::types:: have not been migrated to the umbrella crate as they are not used in any / many other places and are relevant only to the pallet-mixnet.
  • Transaction related helpers to submit transactions from frame-system have been added to the main prelude as they have usage across various pallets.
	pub use frame_system::offchain::*;
  • Exporting arithmetic module in the main prelude since this is used a lot throughout various pallets.
  • Nightly formatting has been applied using cargo fmt
  • Benchmarking dependencies have been removed frompalet-mixnet as there is no benchmarking.rs present for pallet-mixnet. For the same reason, "pallet-mixnet?/runtime-benchmarks" has been removed from umbrella/Cargo.toml.

@UtkarshBhardwaj007 UtkarshBhardwaj007 added R0-no-crate-publish-required The change does not require any crates to be re-published. T2-pallets This PR/Issue is related to a particular pallet. labels Dec 23, 2024
@UtkarshBhardwaj007 UtkarshBhardwaj007 requested a review from a team as a code owner December 23, 2024 11:47
@UtkarshBhardwaj007

Copy link
Copy Markdown
Member Author

Part of #6504

@UtkarshBhardwaj007 UtkarshBhardwaj007 marked this pull request as draft December 23, 2024 11:55
@UtkarshBhardwaj007 UtkarshBhardwaj007 marked this pull request as ready for review December 23, 2024 12:14
Comment thread substrate/frame/mixnet/src/lib.rs Outdated
Comment thread substrate/frame/mixnet/src/lib.rs Outdated
Comment thread substrate/frame/mixnet/src/lib.rs
Comment thread substrate/frame/mixnet/src/lib.rs Outdated
Comment thread substrate/frame/src/lib.rs
Co-authored-by: Dónal Murray <donalm@seadanda.dev>
@paritytech-review-bot paritytech-review-bot Bot requested a review from a team December 24, 2024 21:40
Comment thread substrate/frame/mixnet/src/lib.rs
Comment thread umbrella/Cargo.toml
////////////////////////////////////////////////////////////////////////////////

#[frame_support::pallet(dev_mode)]
#[frame::pallet(dev_mode)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This dev_mode is not really good for production as well 🙈 not in scope for now, but should be removed later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see, will have to dig in the code to understand why but we could create an issue for it if there's isn't one already.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Think this is just because I never got around to adding weights.

@github-actions github-actions Bot requested a review from kianenigma December 31, 2024 15:06
@github-actions

Copy link
Copy Markdown
Contributor

Review required! Latest push from author must always be reviewed

Comment thread substrate/frame/mixnet/src/lib.rs
Comment thread prdoc/pr_6986.prdoc Outdated
@github-actions github-actions Bot requested a review from ggwpez January 2, 2025 16:54

@ggwpez ggwpez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot requested review from ggwpez and re-gius January 3, 2025 10:09
@UtkarshBhardwaj007 UtkarshBhardwaj007 added this pull request to the merge queue Jan 3, 2025
Merged via the queue into paritytech:master with commit f3ab385 Jan 3, 2025
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the pallet-mixet-migration branch January 3, 2025 11:14
dudo50 pushed a commit to paraspell-research/polkadot-sdk that referenced this pull request Jan 4, 2025
# Description

Migrate pallet-mixnet to use umbrella crate whilst adding a few types
and traits in the frame prelude that are used by other pallets as well.

## Review Notes

* This PR migrates `pallet-mixnet` to use the umbrella crate. 
* Note that some imports like `use
sp_application_crypto::RuntimeAppPublic;` and imports from
`sp_mixnet::types::` have not been migrated to the umbrella crate as
they are not used in any / many other places and are relevant only to
the `pallet-mixnet`.
* Transaction related helpers to submit transactions from `frame-system`
have been added to the main `prelude` as they have usage across various
pallets.
```Rust
	pub use frame_system::offchain::*;
```
* Exporting `arithmetic` module in the main `prelude` since this is used
a lot throughout various pallets.
* Nightly formatting has been applied using `cargo fmt`
* Benchmarking dependencies have been removed from`palet-mixnet` as
there is no benchmarking.rs present for `pallet-mixnet`. For the same
reason, `"pallet-mixnet?/runtime-benchmarks"` has been removed from
`umbrella/Cargo.toml`.

---------

Co-authored-by: Dónal Murray <donalm@seadanda.dev>
ordian added a commit that referenced this pull request Jan 7, 2025
* master: (256 commits)
  fix chunk fetching network compatibility zombienet test (#6988)
  chore: delete repeat words (#7034)
  Print taplo version in CI (#7041)
  Implement cumulus StorageWeightReclaim as wrapping transaction extension + frame system ReclaimWeight (#6140)
  Make `TransactionExtension` tuple of tuple transparent for implication (#7028)
  Replace duplicated whitelist with whitelisted_storage_keys (#7024)
  [WIP] Fix networking-benchmarks (#7036)
  [docs] Fix release naming (#7032)
  migrate pallet-mixnet to umbrella crate (#6986)
  Improve remote externalities logging (#7021)
  Fix polkadot sdk doc. (#7022)
  Remove warning log from frame-omni-bencher CLI (#7020)
  [pallet-revive] fix file case (#6981)
  Add workflow for networking benchmarks (#7029)
  [CI] Skip SemVer on R0-silent and update docs (#6285)
  correct path in cumulus README (#7001)
  sync: Send already connected peers to new subscribers (#7011)
  Excluding chainlink domain for link checker CI (#6524)
  pallet-bounties: Fix benchmarks for 0 ED (#7013)
  Log peerset set ID -> protocol name mapping (#7005)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published. T2-pallets This PR/Issue is related to a particular pallet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants