polkadot icon indicating copy to clipboard operation
polkadot copied to clipboard

Cleaning "common good" vs "system"

Open bkontur opened this issue 2 years ago • 8 comments

Everything with paraId<2000 should be considered as system parachain. (Here where also introduced system_parachain constants: https://github.com/paritytech/polkadot/pull/7005)

There are 3 possible places that are effected by change para<1000 -> para<2000. So the main question is where to use "explicit paraIds" or relaxed para<2000?

How to setup:


Polkadot:

AllowExplicitUnpaidExecutionFrom

  • actual: AllowExplicitUnpaidExecutionFrom<CollectivesOrFellows>
  • update:
    • [ ] no change
    • AllowExplicitUnpaidExecutionFrom<SystemParachainsOrFellows>
      • [ ] SystemParachains -> paraId<2000
      • [ ] SystemParachains -> explicitly say which one (using constants)

ChildSystemParachainAsSuperuser

  • actual: does not use for LocalOriginConverter
  • update:
    • [ ] no change
    • add ChildSystemParachainAsSuperuser<SystemParachains>
      • [ ] SystemParachains -> paraId<2000
      • [ ] SystemParachains -> explicitly say which one (using constants)

TrustedTeleporters

  • actual: (DotForAssetHub, DotForCollectives) (explicit)
  • update:
    • [ ] no change (stay explicit - BH is comming here)
    • [ ] DotForSystemParachain based on paraId<2000 e.g. https://github.com/paritytech/cumulus/pull/2842/files#diff-53073f451405f5fdf3a02c595270a9fce3b0d5951122e0ad26f482a073019ad1R68-R79

Kusama:

AllowExplicitUnpaidExecutionFrom

  • actual: AllowExplicitUnpaidExecutionFrom<IsChildSystemParachain<ParaId> (effected bychange in PR paraId<1000 -> paraId<2000)
  • update:
    • [ ] no change (with this PR this will automatically include AssetHub, BridgeHub, Collectives, Encointer)
    • [ ] AllowExplicitUnpaidExecutionFrom<SystemParachains> -> explicitly say which one (using constants)

ChildSystemParachainAsSuperuser

  • actual: ChildSystemParachainAsSuperuser<ParaId> (effected by change in PR paraId<1000 -> paraId<2000)
  • update:
    • [ ] no change (with this PR this will automatically include AssetHub, BridgeHub, Collectives, Encointer)
    • [ ] ChildSystemParachainAsSuperuser<SystemParachains> -> explicitly say which one (using constants)

TrustedTeleporters

  • actual: (KsmForAssetHub, KsmForEncointer) (explicit)
  • update:
    • [ ] no change (stay explicit - BH is comming here)
    • [ ] KsmForSystemParachain based on paraId<2000 e.g. https://github.com/paritytech/cumulus/pull/2842/files#diff-53073f451405f5fdf3a02c595270a9fce3b0d5951122e0ad26f482a073019ad1R68-R79

Westend/Rococo:

the same as Kusama or relaxed more


  • [ ] SiblingSystemParachainAsSuperuser - never used in Cumulus (effected by change in PR paraId<1000 -> paraId<2000)

  • [ ] move NativeAssetFromSiblingSystemParachain to xcm-builder from here

bkontur avatar Jul 11 '23 11:07 bkontur

ChildSystemParachainAsSuperuser

Superusers should be explicitly listed IMO. Would not use < 2000 for that.

TrustedTeleporters

I am OK with using < 2000 for this.

joepetrowski avatar Jul 11 '23 11:07 joepetrowski

ChildSystemParachainAsSuperuser

Superusers should be explicitly listed IMO. Would not use < 2000 for that.

TrustedTeleporters

I am OK with using < 2000 for this.

cool, thank you, so I am going to change that, and what about:

  • Kusama AllowExplicitUnpaidExecutionFrom<IsChildSystemParachain - < 2000 or explicit?
  • Polkadot AllowExplicitUnpaidExecutionFrom<CollectivesOrFellows> - should we add AssetHub/BridgeHub?

bkontur avatar Jul 11 '23 11:07 bkontur

For AllowExplicitUnpaidExecutionFrom, I am not 100% sure. I think paraId < 2000 is OK but lean toward keeping them explicit. It all comes down to whether the chain lets user construct their own XCM programs, and as long as we require governance to use xcm.send, it's only Collectives and Fellowship that can send a message with UnpaidExecution.

So I think either is OK, but perhaps @KiChjang can confirm, or we just keep it explicit for now.

joepetrowski avatar Jul 12 '23 04:07 joepetrowski

So the only problem that we may have in doing < 2000 is that we may accidentally whitelist a chain where we don't really know how its runtime code looks like, and I think Encointer then comes to mind. Being explicit is definitely the safest choice.

KiChjang avatar Jul 28 '23 07:07 KiChjang

So the only problem that we may have in doing < 2000 is that we may accidentally whitelist a chain where we don't really know how its runtime code looks like, and I think Encointer then comes to mind. Being explicit is definitely the safest choice.

@KiChjang thank you, and would you mind if I copy out system_parachains constants from your PR here?

bkontur avatar Jul 31 '23 09:07 bkontur

Yeah, it's just a matter of merging master depending on whether your PR or mine lands first.

KiChjang avatar Aug 03 '23 03:08 KiChjang

bot rebase

bkontur avatar Aug 16 '23 20:08 bkontur

Rebased