Skip to content
Snippets Groups Projects
  • Iulian Barbu's avatar
    omni-node: add metadata checks for runtime/parachain compatibility (#6450) · 7cc5cdd0
    Iulian Barbu authored
    
    # 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
    
    - [x] parachain system check
    - [x] check frame_system's metadata to ensure the block number in there
    is the same as the one in the node side
    - [x] add tests for the previous checking logic
    - [x] update omni node polkadot-sdk docs to make these conventions
    visible.
    - [ ] add more pallets checks?
    
    ---------
    
    Signed-off-by: default avatarIulian Barbu <iulian.barbu@parity.io>
    Co-authored-by: default avatarAlexandru Vasile <60601340+lexnv@users.noreply.github.com>
    Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
    Unverified
    7cc5cdd0
Code owners
Assign users and groups as approvers for specific file changes. Learn more.