Cross-Consensus Query Language (XCQ)

We just opened a PR about XCQ RFC. Feedback is welcome!

PVQ Status Report

Summary

  • Rename project from XCQ to PVQ
  • Refactor PVQ extension system
  • Refactor PVQ program macros
  • XCM Intergration PoC

Example Usage

  • PVQ Extensions Definitions: Example
  • Use pvq-program macros to write a guest program. Example
  • PVQ Extensions Implementation: Example

Run Examples

Available PoC PVQ examples:

  • guest-sum-balance: sum the balances of multiple accounts
  • guest-total-supply: get the total supply of an asset
  • guest-sum-balance-percent: sum the balances of multiple accounts and calculate the percentage of the total supply
  1. Build guest program: make guests
  2. Run test runner: cargo run -p pvq-test-runner -- --program output/<guest-program>
    guest-examples contains several guest programs to test the PVQ.

XCM Integration PoC

The test case of XCM integration is located in vendor/polkadot-sdk/polkadot/xcm/xcm-simulator/example/src/tests.rs

#[test]
fn test_report_query() {
    ...
}
1 Like