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

Integrate Runtime APIs into lib.rs and Enhance Metadata Testing #823

Merged
merged 6 commits into from
Oct 16, 2024

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Oct 16, 2024

PR Type

enhancement, tests


Description

  • Integrated runtime API implementations directly into lib.rs, removing the apis.rs file.
  • Updated spec_version to 2292 and adjusted related configurations.
  • Added new tests for runtime metadata validation against a golden JSON file.
  • Updated dependencies in Cargo.toml to include frame-metadata and assert-json-diff.
  • Updated RUNTIME_SPEC_VERSION in the end-to-end test configuration.

Changes walkthrough 📝

Relevant files
Enhancement
service.rs
Update Runtime API imports and dispatch method                     

node/src/service.rs

  • Removed import of RuntimeApi from laos_runtime::apis.
  • Added import of RuntimeApi directly from laos_runtime.
  • Updated the dispatch method to use laos_runtime::api::dispatch.
  • +3/-3     
    apis.rs
    Remove deprecated Runtime API definitions                               

    runtime/laos/src/apis.rs

    • Removed the entire apis.rs file.
    +0/-473 
    lib.rs
    Integrate Runtime APIs into lib.rs and update version       

    runtime/laos/src/lib.rs

  • Removed the apis module.
  • Integrated runtime API implementations directly into lib.rs.
  • Updated spec_version to 2292.
  • +450/-5 
    Tests
    metadata.rs
    Add test for runtime metadata validation                                 

    runtime/laos/src/tests/metadata.rs

  • Added a new test to verify runtime metadata against a golden JSON
    file.
  • +28/-0   
    mod.rs
    Include metadata tests module                                                       

    runtime/laos/src/tests/mod.rs

    • Added metadata module for testing.
    +2/-0     
    Configuration changes
    config.ts
    Update runtime specification version in config                     

    e2e-tests/tests/config.ts

    • Updated RUNTIME_SPEC_VERSION to 2292.
    +1/-1     
    Dependencies
    Cargo.toml
    Update version and add new dependencies                                   

    Cargo.toml

  • Bumped version to 0.22.92.
  • Added dependencies for frame-metadata and assert-json-diff.
  • +3/-1     
    Cargo.toml
    Add new dependencies for runtime testing                                 

    runtime/laos/Cargo.toml

  • Added serde_json, frame-metadata, and assert-json-diff as
    dependencies.
  • +3/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    asiniscalchi and others added 4 commits September 23, 2024 12:25
    * move  macro to same file as
    
    * clippy and lint issues
    
    * metadata test
    
    * fix metadata
    
    * bump 2201
    
    * update Cargo.lock
    
    * test passing
    
    * refactoring
    
    * fix clippy
    
    * fix test
    
    ---------
    
    Co-authored-by: Alessandro Siniscalchi <asiniscalchi@gmail.com>
    @asiniscalchi
    Copy link
    Member Author

    /describe

    @asiniscalchi asiniscalchi marked this pull request as ready for review October 16, 2024 12:03
    @github-actions github-actions bot changed the title Release/v0.22 Integrate Runtime APIs and Enhance Metadata Testing Oct 16, 2024
    Copy link

    PR Description updated to latest commit (a23265a)

    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title Integrate Runtime APIs and Enhance Metadata Testing Integrate Runtime APIs into lib.rs and Enhance Metadata Testing Oct 16, 2024
    Copy link

    PR Description updated to latest commit (3f87e0c)

    @asiniscalchi asiniscalchi merged commit 1361605 into main Oct 16, 2024
    8 of 9 checks passed
    @asiniscalchi asiniscalchi deleted the feature/merge_v0.22.1_into_main branch October 16, 2024 12: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