Skip to content

Kusama AssetHub: AbridgedHostConfiguration #75

@jsdw

Description

@jsdw

This type was pointed out as needing some definition not found in PJs types. I was curious since everything should be found somewhere in the PJS definitions and checked this out.

I looked at PJS types and the AbridgedHostConfiguration type was quite different from the one that was added in our type definitions. The PJS one is:

AbridgedHostConfiguration: {
  maxCodeSize: 'u32',
  maxHeadDataSize: 'u32',
  maxUpwardQueueCount: 'u32',
  maxUpwardQueueSize: 'u32',
  maxUpwardMessageSize: 'u32',
  maxUpwardMessageNumPerCandidate: 'u32',
  hrmpMaxMessageNumPerCandidate: 'u32',
  validationUpgradeFrequency: 'BlockNumber',
  validationUpgradeDelay: 'BlockNumber'
}

(https://github.com/polkadot-js/api/blob/ce6f698c69dc3e3b20cc9191effdde9e364a280e/packages/types/src/interfaces/parachains/definitions.ts#L114)

This decodes just fine (and aligns with the type I can find in old polkadot: https://github.com/paritytech/polkadot/blob/52209dcfe546ff39cc031b92d64e787e7e8264d4/primitives/src/v5/mod.rs#L1141)

The type added in our types currently is quite different:

AbridgedHostConfiguration:
  max_code_size: Compact<u32>
  max_head_data_size: Compact<u32>
  max_upward_queue_count: Compact<u32>
  max_upward_queue_size: Compact<u32>
  max_upward_message_size: Compact<u32>
  max_upward_message_num_per_candidate: Compact<u32>
  hrmp_max_message_num_per_candidate: Compact<u32>
  ump_service_total_weight: Weight
  hrmp_max_parachain_outbound_channels: Compact<u32>
  hrmp_max_parathread_outbound_channels: Compact<u32>
  hrmp_open_request_ttl: Compact<u32>
  hrmp_channel_max_capacity: Compact<u32>
  hrmp_channel_max_total_size: Compact<u32>
  hrmp_max_parachain_inbound_channels: u32
  hrmp_max_parathread_inbound_channels: u32
  hrmp_channel_max_message_size: u32
  code_retention_period: u32

(

AbridgedHostConfiguration:
)

This also decodes ok, but that doesn't mean its correct since it doesn't line up with any reference to the type that I can find.

Where did our definition come from? Should we fix it to be the one in PJS?

\cc @soul022

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions