Skip to content

feat: Add RC Runtime Endpoints for Relay Chain Access#1708

Merged
TarikGul merged 5 commits into
masterfrom
tg-runtime-rc
Jul 23, 2025
Merged

feat: Add RC Runtime Endpoints for Relay Chain Access#1708
TarikGul merged 5 commits into
masterfrom
tg-runtime-rc

Conversation

@TarikGul

Copy link
Copy Markdown
Member

Summary

This PR adds a complete set of /rc/runtime/* endpoints that enable Asset Hub to query relay chain runtime information directly. These endpoints are only accesible when connected to Assethub with the relay chain set as a multi chain connection.

New Endpoints

  • /rc/runtime/spec - Get relay chain runtime version information
  • /rc/runtime/metadata - Get relay chain metadata in decoded JSON format
  • /rc/runtime/metadata/versions - Get available relay chain metadata versions
  • /rc/runtime/metadata/{metadataVersion} - Get specific version of relay chain metadata
  • /rc/runtime/code - Get relay chain runtime Wasm code blob

@TarikGul TarikGul requested a review from a team as a code owner July 22, 2025 23:54

@filvecchiato filvecchiato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

const RC_CODE_KEY = '0x3a636f6465';

export class RcRuntimeCodeService extends AbstractService {
/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a particular reason you are duplicating these classes for RC? It seems that the code is the same for the generic RuntimeCodeService class

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I just wanted to ensure it always uses the rcApi.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you did in your PR, we don't have to redo the classes for services at all, just the controllers!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll clean that all up before I merge.

@TarikGul TarikGul merged commit 3e38c0f into master Jul 23, 2025
20 of 21 checks passed
@TarikGul TarikGul deleted the tg-runtime-rc branch July 23, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants