We have created the following diagram, which is the topic of this article. Let’s explain what different parts represent.
To understand how Paralink data ingress services will work, we have to cover some basics first.
We have already covered the topic of smart contracts, and if you are unfamiliar with smart contracts, please read this blog post first. In short, a smart contract is a piece of code with predefined rules of execution. These rules are constructed in “if-then” semantics. A smart contract gets executed automatically when something happens that corresponds with predefined rules of the contract.
Not all contracts require external information, but if they do, they can use the oracle smart contract and request the data using PQL from the real world (internet).
Oracles are smart contracts that bridge the blockchain (on-chain) and the outside world or the internet (off-chain). Oracle provides an interface for the smart contracts living on ethereum (or other chains) to request the outside information and receive it back.
Paralink Node is software living on a server outside the blockchain; thus, it is an off-chain component. It listens to any requests from oracles on the blockchain, and the node operator defines which oracles to listen to.
When a request is initiated, the PQL definition is obtained from the IPFS, then executed, and the result is submitted back to the original oracle. One Paralink Node can serve multiple oracles.
One of the most significant advantages of using Paralink as an oracle service is PQL or Paralink Query Language. PQL is a powerful query language that also features PQL Query Editor (with UI), which helps to quickly assemble queries for common data structures (JSON, XML, SQL), and includes basic post-processing utilities such as math functions and typecasting.
IPFS is used to immutably store the job definition and provide an addressable content hash. The hash is only 32 bytes long, significantly shorter than the job definition itself, making it suitable for request signalling on resource-constrained chains such as Ethereum.
Paralink data ingress with PQL
Let’s go through one example of a data ingress request using Paralink and PQL in six short steps.
- Smart contract developer writes a smart contract that requires data ingress (or input) from the real world.
- Smart contract requests the result from an oracle with PQL.*
- Paralink Node is listening for any requests from the oracle.
- Paralink Node processes PQL requests from the oracle.
- Paralink Node sends the result back to the oracle.
- Oracle returns the result to the contract.
* In the future, when the smart contract will request the result from an oracle (with PQL in step 2) the payment for this service will be executed with PARA tokens.
Please note that this is a high-level overview where details were left out on purpose. Data ingress flow will also differ from blockchain to blockchain and we will publish more articles that explain different Paralink mechanics in the future.
How to get started?
This guide is made for developers who want to use Paralink as an oracle solution for their smart contracts and node operators who wish to provide a trusted oracle service or create their oracle quorum.
You can join our official Discord server, where we have a dedicated channel for developers. You can join here: