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

omni-node: add metadata checks for runtime/parachain compatibility #6450

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

iulianbarbu
Copy link
Contributor

@iulianbarbu iulianbarbu commented Nov 12, 2024

Description

Get runtime's metadata, parse it and verify pallets list for a pallet named ParachainSystem (for now), and block number to be the same for both node and runtime. Ideally we'll add other pallets checks too, at least a small set of pallets we think right away as mandatory for parachain compatibility.
Closes: #5565

Integration

Runtime devs must be made aware that to be fully compatible with Omni Node, certain naming conventions should be respected when defining pallets (e.g we verify parachain-system pallet existence by searching for a pallet with name ParachainSystem in runtime's metadata). Not finding such a pallet will not influence the functionality yet, but by doing these checks we could provide useful feedback for runtimes that are clearly not implementing what's required for full parachain compatibility with Omni Node.

Review Notes

  • parachain system check
  • check frame_system's metadata to ensure the block number in there is the same as the one in the node side
  • add tests for the previous checking logic
  • update omni node polkadot-sdk docs to make these conventions visible.
  • add more pallets checks?

@iulianbarbu iulianbarbu self-assigned this Nov 12, 2024
@iulianbarbu iulianbarbu changed the title omni-node: check if parachain system pallet exists omni-node: add metadata checks for runtime/parachain compatibility Nov 12, 2024
Signed-off-by: Iulian Barbu <[email protected]>
@iulianbarbu iulianbarbu added the T9-cumulus This PR/Issue is related to cumulus. label Nov 15, 2024
@iulianbarbu iulianbarbu marked this pull request as ready for review November 18, 2024 16:30
iulianbarbu and others added 8 commits November 18, 2024 18:40
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T9-cumulus This PR/Issue is related to cumulus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polkadot-omni-node: Metadata checks
2 participants