Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export runtime metadata #605

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

th7nder
Copy link
Contributor

@th7nder th7nder commented Nov 24, 2024

Description

Our current runtime configuration does not expose Runtime API metadata.
It's due to a 'bug' in (https://github.com/paritytech/polkadot-sdk-parachain-template), which was discovered while trying to implement an Runtime API using subxt to generate a deadline info needed for #449 .

The bug is described in paritytech/subxt#1873.
TL;DR when impl_runtime_apis! is not implemented in the root module lib.rs the trait visibility rules are broken and APIs are not exposed.

polka-storage git:(fix/no-ref/export-runtime-metadata) ✗ subxt explore -a --url http://0.0.0.0:42069          
Usage:
    subxt explore pallet <PALLET>
        explore a specific pallet
    subxt explore api <RUNTIME_API>
        explore a specific runtime api

Available <PALLET>'s are:
    Aura
    AuraExt
    Authorship
    Balances
    CollatorSelection
    CumulusXcm
    Faucet
    Market
    MessageQueue
    ParachainInfo
    ParachainSystem
    PolkadotXcm
    Proofs
    Randomness
    RandomnessSource
    Session
    StorageProvider
    Sudo
    System
    Timestamp
    TransactionPayment
    XcmpQueue

Available <RUNTIME_API>'s are:
    AccountNonceApi
    AuraApi
    AuraUnincludedSegmentApi
    BlockBuilder
    CollectCollationInfo
    Core
    GenesisBuilder
    Metadata
    OffchainWorkerApi
    SessionKeys
    TaggedTransactionQueue
    TransactionPaymentApi
    TransactionPaymentCallApi

@th7nder th7nder added the bug Something isn't working label Nov 24, 2024
@th7nder th7nder added this to the Phase 3 milestone Nov 24, 2024
@th7nder th7nder requested a review from a team November 24, 2024 13:38
@th7nder th7nder self-assigned this Nov 24, 2024
@th7nder th7nder added the ready for review Review is needed label Nov 24, 2024
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Nov 24, 2024
Copy link
Contributor

@aidan46 aidan46 left a comment

Choose a reason for hiding this comment

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

Nicely dug out, good job! You should close the subxt issue if the fix was on the parachain side.

@jmg-duarte
Copy link
Collaborator

Nicely dug out, good job! You should close the subxt issue if the fix was on the parachain side.

The fix is not on the parachain side, the bandaid is. This is an issue on their end, and they even discussed that they wanted to separate things because they didn't want a super large file.

@jmg-duarte jmg-duarte merged commit 3f12350 into develop Nov 25, 2024
5 checks passed
@jmg-duarte jmg-duarte deleted the fix/no-ref/export-runtime-metadata branch November 25, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants