# Cross-Consensus Query Language (XCQ)

**URL:** <https://forum.polkadot.network/t/cross-consensus-query-language-xcq/7583>\
**Category:** Tech Talk\
**Created:** [April 26, 2024, 4:39am UTC](https://forum.polkadot.network/t/cross-consensus-query-language-xcq/7583 "2024-04-26T04:39:17Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![xlc](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/xlc/32/690_2.png) [@xlc](https://forum.polkadot.network/u/xlc)\
**Post date:** [May 2, 2024, 9:52am UTC](https://forum.polkadot.network/t/cross-consensus-query-language-xcq/7583/10 "2024-05-02T09:52:10Z")

</div>

I have the very first PoC running

> **[XCQ/poc at master · open-web3-stack/XCQ](https://github.com/open-web3-stack/XCQ/tree/master/poc)**
>
> Cross-Consensus Query Language for Polkadot. Contribute to open-web3-stack/XCQ development by creating an account on GitHub.

 ![Screenshot 2024-05-02 at 9.48.46 PM](https://europe1.discourse-cdn.com/flex005/uploads/polkadot2/original/2X/0/0bcf4e5b1bc9c8084d40fded8e4202d4df052c69.png)

I have a simple PolkaVM program calling into host and do some simple calculation

> <https://github.com/open-web3-stack/XCQ/blob/bf3112529290093c73bf86b84eeec9a324bacf57/poc/guest/src/main.rs>

The hex of the this PolkaVM program is:

`50564d0001010400009000040e0100000000686f73745f63616c6c05070100046d61696e061500001002110703104e02775401100211081300694a00`

I have a runtime implements the XCQ Runtime API

> <https://github.com/open-web3-stack/XCQ/blob/bf3112529290093c73bf86b84eeec9a324bacf57/poc/runtime/src/lib.rs#L213-L217>

It implements the host function and execute the provided XCQ program and return the result

> <https://github.com/open-web3-stack/XCQ/blob/bf3112529290093c73bf86b84eeec9a324bacf57/poc/runtime/src/xcq.rs>

---

_[View the full topic](https://forum.polkadot.network/t/cross-consensus-query-language-xcq/7583)._
