Expand XCM Protocol usability
XBI Format is an XCM-based high-level interface that each Parachain can optionally implement and enable others to use while defining the error and result handling using an asynchronous, promise-like solution. XBI focuses explicitly on setting the standards for Polkadot cross-chain smart contract execution.
Main Features
XBI Instruction
A set of instructions that Parachains can use to execute code on other Parachains, using the XCM Transact protocol for secure communication.
XBI Metadata
Specifies details of interoperable execution, such as execution costs and result formats, and allows for asynchronous results.
Transport layer
XBI uses the XCM standard and various protocols underneath it as its transport layer, in particular, utilizing XCM::transact.
Collaborators
We are focusing on XBI to have a standard way of submitting the executions and the execution orders on all parachains connected with Polkadot.
Maciej Baj, Founder & CTO of t3rn
High-Level Interface
XBI is designed with ease of use in mind, making it simple for developers to integrate Polkadot cross-chain functionality into their projects.
Cross-Chain Interoperability
With XBI, you can easily communicate and execute transactions across different blockchain networks within Dotsama, unlocking new possibilities for decentralized applications.
Flexible Interaction
XBI is designed to recognize and interact with smart contracts in the most popular formats in the Polkadot ecosystem, such as EVM and WASM, making it a versatile tool for developers.
XBI Standardizes XCM Protocol For Vastly Greater Usability
Maciej Baj , Founder & CTO
FAQs
What is the motivation behind XBI?
To set a high-level format XBI standard for interfaces implementing interactions between Parachains, specifically EVM and WASM-based contracts. XBI focuses on usability. It will recognize the difference between WASM and EVM, today's most popular smart contract byte code in the Polkadot ecosystem. The XBI interface offers contingencies against runtime upgrades while allowing Parachains to define and expose their functionalities without needing runtime upgrades upon introducing new XBI Instructions distinct for selected Parachains. XBI Metadata provides coherent controls over cross-chain execution, leaving the dispatching origin in complete control over the execution costs and results format.
What is the purpose of XBI Metadata?
XBI Metadata provides coherent controls over the message and its handling, guaranteeing the user that the message will be handled as requested.
What are the fields included in XBI Metadata?
XBI Metadata includes fields such as the id, dest_para_id, src_para_id, timestamp, fees and maybe_known_origin. Each of these fields serves a specific purpose and allows the user to have control over the handling of the message.
How does XBI handle fees?
XBI Metadata includes the max_exec_cost and max_notifications_cost fields, allowing the user to control the execution and transport costs. Additionally, if the asset_id field is set within fees, it can change the max_exec_cost and max_notifications_cost fields to a different currency they can use to pay for the message.
What programming languages can I use to work with XBI?
XBI is based on the Rust programming language and can be integrated with other languages that have support for Rust FFI (Foreign function interface).
Can I test XBI before implementing it on a live Parachain?
Yes, XBI can be tested on a local development environment before implementing it on a live Parachain. Polkadot provides the "Polkadot JS" library, which allows for easy testing and development of just about anything in the Polkadot ecosystem.
How can I control the execution timeout for my XBI instruction?
XBI Metadata includes the executed field, which specifies the timeout in blocks before the XBI instruction starts executing. In case this timeout is exceeded, XBI::Result will resolve with ErrorExecutionTimeoutExceeded.
Can I trace the execution of my XBI instruction across multiple Parachains?
Yes, XBI Metadata includes the id field, which assigns a unique ID to the XBI instruction, enabling the clients to query through the XBI Orders across the Parachains storage. This way, you can trace the execution of your instruction across multiple Parachains.
How can I handle errors that occur during the execution of my XBI instruction?
XBI uses an asynchronous, promise-like solution for error handling. XBI::Result resolves different errors based on various conditions such as ErrorSentTimeoutExceeded, ErrorDeliveryTimeoutExceeded, ErrorExecutionTimeoutExceeded, and more. You can check the Polkadot documentation for more information on the errors that can be handled.