[Cumulus] Add GeneralKey variant to AggregateMessageOrigin#2338
[Cumulus] Add GeneralKey variant to AggregateMessageOrigin#2338vgeddes wants to merge 2 commits intoparitytech:masterfrom
GeneralKey variant to AggregateMessageOrigin#2338Conversation
But that is cleaner? If we only ever need those variants in the bridgehub runtimes, then only the bridge hub runtimes should expose them. You even wrote in that comment:
Any downstream team is strongly encouraged to create their own origin types. AFAIK no downstream team needs to use this type at all. We cannot add some variants here, since we then force all system chains to also have them. It is much better to wrap the type when possible. Another issue with this is that Explorers and UIs loose all introspection for which queue is currently doing something. When they are listed in an enum, then PolkadotJS and wallets can correctly display this. enum BridgeOrigin {
Core(AggregateMessageOrigin),
Abridged(...),
}Without any need to update the |
|
Those are good points - I thought the generalized approach would have been the lightest touch approach. Though as you say, its not very type safe or introspectable. I appreciate the time you've spent reviewing this and previous drafts. Thanks Oliver. Closing this off. Instead, will submit a PR providing the specialized |
Adds
GeneralKeyvariant toAggregateMessageOrigin.This change is needed for the system BridgeHub runtimes, so that Snowbridge can also make use of the
MessageQueuepallet. See previous discussion at #2146 (comment).We have reworked Snowbridge to utilize the more generic approach introduced by this PR.
This avoids the need for BridgeHub runtimes to define their own
AggregateMessageOriginand associated helper types.Other parachain teams may also benefit from this.