[ORACLES] Updates, Requests, Questions and Feedback

it is not possible to query the oracle and process its response within one function call right?
It can certainly be done, but I can’t really think of a useful case since it would mean that the contract would also have to act as the oracle in between query and reading the answer :wink:

_how would oracle responses be processed? _
Oracles are dual purpose, either they are “plain text” and then all processing is done off-chain. Or they are “contract oracles” and in that case queries and responses are encoded as contract values (and the contract interfacing the oracle is checking the types etc.) An oracle that is created within a contract is always a “contract oracle”.

TTL questions
Yes, if the oracle expire the state tree is garbage collected. The same is true for individual queries (and responses).

In order to use an oracle response it has to be in the state tree at the height where the usage is done so to say. And if a contract use an oracle response at height X then we can always validate this contract call at height X - but if the oracle response expire at height Y, then another contract call cannot use it at height Y + 1…

There is a difference between immutable and eternal, the response will never change, but it will also not be around forever.

If the response is “in the blockchain” after it has expired is more of a philosophical question… No, it is no longer in the state tree. Yes, its effect can be visible for example a contract could have stored the response in its own state. And if you have something like an “archiving” node you can always go back and look at the state at height X…

3 Likes