Reputation: 564
Suppose I have a smart contract that uses Chainlink's "Call Any External API" capability to get some data from an external URL. My understanding is that each Ethereum full node runs each smart contract to verify the status; it does so to verify the latest block. But what if, between the time one full node runs the contract and another one does, the data returned by calling tha external API changes. Then it would seem that different full nodes would get different results for that smart contract, resulting in inconsistent states. Why does that not happen?
Upvotes: 1
Views: 440
Reputation: 632
Because oracle responses are stored on-chain.
You are right, if fetching external data was part of the validation process, no nodes would be able to reach a consensus. So instead, a Chainlink oracle network places the data on-chain in a transaction, and then it goes through the same validation process as every other transaction.
You can read more about how Chainlink's Basic Request Model looks, but this is basically the reason why having an oracle system built into a blockchain is impossible.
Upvotes: 1