1

There has been an evolution in how one defines pallets in the Substrate framework over time, and this has left the ecosystem in a state where useful pallets exist in different versions.

This begs the question

is it safe to mix pallets built using distinct FRAME macros in the same runtime?

In other words, if it all builds, can one assume there is no extra risk or problems coming from the mixing itself?

2
  • 1
    Can you point to an example? I am not sure what you are talking about. Do you mean v3 vs v4? Thanks!
    – Bruno
    Commented Aug 12, 2022 at 14:08
  • 1
    Yes basically :) Commented Aug 15, 2022 at 8:25

3 Answers 3

2

It should be okay to mix pallets from the old and new macros. We had this for a while when we were migrating pallets to the new macros.

End of the day, the underlying generated Rust code is the same, just the syntax for defining a pallet is different.

0

I think pretty much everyone's using the new macro system (rather than the older decl macros that used to exist). I would see if there's an alternative pallet if you're still seeing the old decl ones as maybe it's not been updated because the ecosystem has moved on to something better. If you've got specific examples maybe we can highlight modern day equivalents.

1
  • Appreciate the answer ;) Commented Aug 15, 2022 at 8:26
0

In the nodes we were running we were able to mix the two versions safely while we were working on getting all of our pallets upgraded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.