Getting Inference Results on Chain
Last updated
Last updated
Typically, node operators are required to be deployed for oracle adapters. After the adapters are launched locally or on the node, users need to find the corresponding contract address for their subnet.
The following is the workflow of Chainlink Function:
User initiates the Chainlink Function embedded in the dApp: This is the starting point of the process, where the user triggers the Chainlink Function by interacting with the decentralized application (dApp).
The dApp sends a request to the Chainlink Functions smart contract: This request contains three key elements:
API endpoint: Specifies the external source from which to fetch data
Data transformation logic: Defines how to process the retrieved data
Encrypted credentials (if required): Used for secure access to APIs that require authentication
The Decentralized Oracle Network (DON) processes the request:
The DON continuously monitors the Chainlink Functions smart contract
When a request is detected, each node independently performs the following operations: a. Triggers its runtime environment. b. Retrieves external data c. Executes specified data computations d. Returns the result
Reaching consensus and returning results using OCR 2.0:
Nodes reach consensus on the final answer using the Off-Chain Reporting (OCR) 2.0 protocol
One node is selected to transmit the result back on-chain
If the selected node fails to publish the data, another node is chosen for transmission
This mechanism ensures high reliability and trust-minimized security