Snowbridge V2: Add OnNewCommitment hook to outbound-queue pallet#8053
Conversation
|
@Agusrodri do have a use case that you need this hook for? cc @vgeddes @yrong |
Yes sure! A use case in which this hook would be useful, is for instance a solo-chain context. It might be the case that we want to add the message commitment root as part of the |
…und-commitment-hook
|
@Agusrodri that sounds cool! I think we should only add this when there is a concrete use case for this? I understand (correct me if I am wrong) that more runtime code will be added to support this feature. So I think we should only add the hook when implementing a concrete requirement is necessary, to avoid having unused code that might not be used. |
I didn't fully get what you mean by "more runtime code". For the use case I mentioned above (use case I need and will implement) yes, there would be more code, but that extra code would be part of my custom runtime logic. To be precise, I would create a pallet that implements this hook and make use of it inside my runtime. This means, that no more code needs to be added to Snowbridge/polkadot-sdk besides the one I'm proposing in this PR if that was somehow your concern. Also, I believe that polkadot-sdk pallets (even Snowbridge ones) should be as generic as possible, and in my humble opinion this feature aims to contribute on that path. Let me know your thoughts on this, and also thanks for your time :) |
claravanstaden
left a comment
There was a problem hiding this comment.
To be precise, I would create a pallet that implements this hook and make use of it inside my runtime.
Got it. 👍🏻
acatangiu
left a comment
There was a problem hiding this comment.
The hook makes sense and is simple enough, doesn't add any complexity. I am ok with it.
…/bridge_to_ethereum_config.rs Co-authored-by: Adrian Catangiu <adrian@parity.io>
|
Review required! Latest push from author must always be reviewed |
…und-commitment-hook
…und-commitment-hook
|
@acatangiu @claravanstaden can we merge? Let me know if I need to do something else from my side to make the CI happy :) |
|
@Agusrodri I am happy to have this merged. :) |
…und-commitment-hook
a0a3b84
…aritytech#8053) ## Description This PR adds a simple hook to `snowbridge-pallet-outbound-queue-v2` which allows to perform actions whenever there is a new commitment in this pallet. --------- Co-authored-by: Adrian Catangiu <adrian@parity.io>
…8053) ## Description This PR adds a simple hook to `snowbridge-pallet-outbound-queue-v2` which allows to perform actions whenever there is a new commitment in this pallet. --------- Co-authored-by: Adrian Catangiu <adrian@parity.io>
Description
This PR adds a simple hook to
snowbridge-pallet-outbound-queue-v2which allows to perform actions whenever there is a new commitment in this pallet.