paritytech / paritytech/frame-decode

Kusama AssetHub: AbridgedHostConfiguration

Open
#75 2 comments 0 reactions 1 assignee View on GitHub

@soul022 is already working on this.

Since Dec 11, 2025.

Dominant language
Rust
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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

(https://github.com/paritytech/frame-decode/blob/4b39aad5c5b8ab90abf3d019f7280c18ba350821/types/kusama_assethub_types.yaml#L1309)

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.