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 XCM Simulator with LAOS Runtime and Add Comprehensive Tests #800

Merged
merged 71 commits into from
Oct 8, 2024

Conversation

asiniscalchi
Copy link
Member

@asiniscalchi asiniscalchi commented Oct 2, 2024

PR Type

Enhancement, Tests


Description

  • Integrated XCM simulator with LAOS runtime, adding configuration for balances, system, and XCM.
  • Added comprehensive tests for XCM operations including DMP, UMP, XCMP, and asset transfers.
  • Updated Cargo.toml files to include xcm-simulator and necessary dependencies.

Changes walkthrough 📝

Relevant files
Enhancement
8 files
balances.rs
Add balance configuration for LAOS runtime                             

xcm-simulator/src/laosish/configs/balances.rs

  • Added configuration for balance parameters including
    ExistentialDeposit.
  • Implemented pallet_balances::Config for Runtime.
  • +51/-0   
    mod.rs
    Add module imports and parachain info config                         

    xcm-simulator/src/laosish/configs/mod.rs

  • Added modules for balances, system, and xcm_config.
  • Implemented parachain_info::Config for Runtime.
  • +7/-0     
    system.rs
    Add system configuration for LAOS runtime                               

    xcm-simulator/src/laosish/configs/system.rs

  • Added system configuration parameters.
  • Implemented frame_system::Config for Runtime.
  • +82/-0   
    xcm_config.rs
    Add XCM configuration for LAOS runtime                                     

    xcm-simulator/src/laosish/configs/xcm_config.rs

  • Added XCM configuration with various parameter types.
  • Implemented xcm_executor::Config for XcmConfig.
  • +228/-0 
    mod.rs
    Add parachain runtime mock for LAOS                                           

    xcm-simulator/src/laosish/mod.rs

  • Added parachain runtime mock for LAOS.
  • Defined types and modules for the runtime.
  • +200/-0 
    lib.rs
    Add XCM simulator library setup                                                   

    xcm-simulator/src/lib.rs

  • Added modules for laosish, parachain, and relay_chain.
  • Defined test network and parachains.
  • +178/-0 
    parachain.rs
    Add parachain runtime mock configuration                                 

    xcm-simulator/src/parachain.rs

  • Added parachain runtime mock.
  • Defined configuration and runtime setup.
  • +470/-0 
    relay_chain.rs
    Add relay chain runtime mock configuration                             

    xcm-simulator/src/relay_chain.rs

  • Added relay chain runtime mock.
  • Defined configuration and runtime setup.
  • +295/-0 
    Tests
    2 files
    laosish_xcm.rs
    Add tests for LAOS XCM functionality                                         

    xcm-simulator/src/tests/laosish_xcm.rs

  • Added tests for LAOS XCM functionality.
  • Included tests for token balance and UMP.
  • +42/-0   
    mod.rs
    Add comprehensive XCM operation tests                                       

    xcm-simulator/src/tests/mod.rs

  • Added comprehensive tests for XCM operations.
  • Included tests for DMP, UMP, XCMP, and asset transfers.
  • +499/-0 
    Configuration changes
    4 files
    Cargo.toml
    Update Cargo.toml for XCM simulator integration                   

    Cargo.toml

  • Added xcm-simulator to workspace members.
  • Updated dependencies and features for XCM support.
  • +5/-9     
    Cargo.toml
    Update primitives for parachains support                                 

    primitives/Cargo.toml

    • Added parachains-common/std to std feature.
    +1/-0     
    Cargo.toml
    Clean up runtime dependencies                                                       

    runtime/laos/Cargo.toml

    • Removed commented-out ORML dependencies.
    +0/-6     
    Cargo.toml
    Add Cargo.toml for XCM simulator                                                 

    xcm-simulator/Cargo.toml

  • Added new Cargo.toml for xcm-simulator.
  • Defined dependencies and features for the simulator.
  • +74/-0   

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

    @asiniscalchi
    Copy link
    Member Author

    /describe

    Copy link

    github-actions bot commented Oct 4, 2024

    PR Description updated to latest commit (0783497)

    @github-actions github-actions bot changed the title Feature/integration xcm simulator Integrate XCM Simulator with LAOS Runtime and Add Tests Oct 4, 2024
    @asiniscalchi
    Copy link
    Member Author

    /describe

    @github-actions github-actions bot changed the title Integrate XCM Simulator with LAOS Runtime and Add Tests Integrate XCM Simulator with LAOS Runtime and Add Comprehensive Tests Oct 4, 2024
    Copy link

    github-actions bot commented Oct 4, 2024

    PR Description updated to latest commit (2119906)

    xcm-simulator/src/relay_chain.rs Outdated Show resolved Hide resolved
    xcm-simulator/src/relay_chain.rs Outdated Show resolved Hide resolved
    xcm-simulator/src/parachain.rs Outdated Show resolved Hide resolved
    xcm-simulator/src/parachain.rs Outdated Show resolved Hide resolved
    ///
    /// Asserts that the parachain accounts are updated as expected.
    #[test]
    fn withdraw_and_deposit_nft() {
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    So we finally need to write test related to nfts?

    Copy link
    Member Author

    @asiniscalchi asiniscalchi Oct 4, 2024

    Choose a reason for hiding this comment

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

    nope. They are the tests related to the Para* from the polkadot.sdk. Our test will be included in laosish_xcm.rs file.

    Copy link
    Collaborator

    @tsenovilla tsenovilla Oct 4, 2024

    Choose a reason for hiding this comment

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

    Okay, so maybe we may delete them at some point?

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    If we modify the configuration of the mock parachains and they begin to fail, we simply remove them. They're not really within our scope or serving our purpose, but since they're harmless tests, there's no strong reason to remove them. They might still reveal some changes in behavior.

    asiniscalchi and others added 4 commits October 7, 2024 09:47
    Co-authored-by: Tomás Senovilla Polo  <[email protected]>
    Co-authored-by: Tomás Senovilla Polo  <[email protected]>
    Co-authored-by: Tomás Senovilla Polo  <[email protected]>
    Co-authored-by: Tomás Senovilla Polo  <[email protected]>
    tsenovilla
    tsenovilla previously approved these changes Oct 7, 2024
    @asiniscalchi asiniscalchi merged commit 40936bc into main Oct 8, 2024
    9 checks passed
    @asiniscalchi asiniscalchi deleted the feature/integration-xcm-simulator branch October 8, 2024 14:23
    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.

    XCM allows for Sending and Receiving MERC Tokens to/from AssetHub in Zombienet
    3 participants