Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Feb 26, 2018
Overview and definitions
Technical aspects of Oracle operations
Oracles have a published API
- An oracle is an entity on the blockchain and lives in the oracle state tree in a full node.
- An oracle is operated by an oracle operator.
- The oracle operator creates an oracle through posting a oracle register transaction on the chain.
- The oracle register transaction register an account as an oracle. (One account - one oracle)
- Any user can query an oracle by posting an oracle query transaction on the chain.
- The oracle query transaction creates an oracle query object in the oracle state tree.
- The oracle operator scans the transactions on the blockchain for the
oracle query transaction through whatever means. Probably on the operator's own node.
- The oracle operator responds to the oracle query by posting an oracle response transaction on the chain.
- The oracle response transaction modifies the oracle query object by adding the response.
- After the response have been added, the oracle query object is closed, and is now immutable.
Oracle responses have a type declaration
- The API defines the format that queries should have.
- The API defined the format answers will have.
Should oracle responses have restrictions on use?
- Types should correspond to types in the smart contract language.
- There should be incentives to use simple types in oracle answers (boolean, integer).
- For example, through access cost in smart contracts.
An oracle query/response has a TTL
- For example, should only the creator of the query be able to use the
answer in a smart contract?
- Should the framework support encryption/decryption of answers?
- The actual response will remain on the chain.
- The response will be pruned from the state tree after a certain number of blocks.
- The cost of posting the answer should reflect the TTL.
Press h to open a hovercard with more details.