-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracles blockchain for NEO 3.0 #78
Conversation
Well done @shargon! This would bring amazing oportunities for external executions and interaction with real world. Protecting IP could be done through vpn, I guess that wont be an issue. Congratulations! |
We believe that it is a great functionality and it will provide Neo with great value by incorporating the Oracles into the blockchain. Currently Shargon and I have an open discussion of where it would be better to include the information from the Oracles.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations for the proposal, Belane and Shargon.
I need to understand it more deeply but looks like something interesting for several applications.
|
||
==Abstract== | ||
|
||
The objective of this proposal is to be the first chain capable of not needing oracles to interact with non-deterministic content. Our mission is to make NEO capable of performing REST API calls and other types of non-deterministic functionalities that can be extended in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, SharLane, why you mention REST API calls? Would it be the same as an RPC call?
|
||
In order to provide the system with a non-deterministic execution, Smart Contracts will be provided with a set of Access Proxies to all those elements that could cause an unstable result (through SYSCALL). | ||
|
||
The result of the execution of a non-deterministic function will be stored in the metadata of the block header, allowing the future persistence of the result thus giving the system determinism in time. The execution of a Smart Contract will check if the result has been stored, in which case, the value will be reused. Otherwise, the complete execution of the contract will be performed and the result will be stored in the metadata of the block according to the following cycle: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I got it, metadata will storage results of that specific executions.
Did you think about a zero knowledge proof to be sure that that non-determinism, at least, followed the correct pattern? Toff question...aehauheauheaea
The result of the execution of a non-deterministic function will be stored in the metadata of the block header, allowing the future persistence of the result thus giving the system determinism in time. The execution of a Smart Contract will check if the result has been stored, in which case, the value will be reused. Otherwise, the complete execution of the contract will be performed and the result will be stored in the metadata of the block according to the following cycle: | ||
|
||
[[File:oracles/oracles-image-2.png|center|flow]] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get the Return Result
.
Will it call the execution again? What is the different between the Save
?
|
||
[[File:oracles/oracles-image-2.png|center|flow]] | ||
|
||
Another option is to include the information of the results of the Oracles in the remark field of the transaction itself, being able to validate each TX for specific results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understood until, I think I prefer in the TX, but I need to understand it further.
Basically the internet proxy would be a function of the style: | ||
|
||
[[File:oracles/oracles-image-3.png|center|source]] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More organization, please.. Where is the indentation in this figure? jajajajajaja
|
||
# The execution of the oracle syscalls by the consensus nodes could leak its IP address. Therefore it is recommended to have several network interfaces and the use of VPN for this purpose. | ||
# The processing of these Syscall will increase the consumption of the nodes during the transactions verification, therefore, operations should be more expensive, and with a reduced timeout. | ||
# The use of metadata avoid duplicate information when there are several TXs calling the same contract or API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get this last point of duplicated information.
I imagine that with storing each URL content on-chain ledger size could become quite big quite fast. Is there a possibility in using this somehow with NeoFS, so that metadata would be stored there instead of directly in block? |
In order to ensure the consistency of contract execution, you cannot rely on NeoFS. |
@erikzhang I see, I didn't know about consistency guarantees that NeoFS provides (or don't). That makes sense then, thanks On another note, I can think of several different approaches to Oracles:
Last two approaches also allows for another implementation strategy, which doesn't bring any overhead to block structure or transaction verification.
That way we don't need to change the block structure, Oracles nodes is decoupled from Consensus nodes and there is incentive for people to run Oracle nodes, guaranteeing that there always will be someone to put requested data on-chain as he is incentivized to do so. Another advantage of this approach is that it could be safely backported to Neo 2.0, we only need to make sure that Oracle SC hash won't change in Neo 3.0. And we could use CGAS to pay to Oracle (which should have same contract hash as GAS native contract in Neo 3.0 for backwards compatibility reasons) |
This should be implemented in NEO 3.0. |
The objective of this proposal is to be the first chain capable of not needing oracles to interact with non-deterministic content. Our mission is to make NEO capable of performing REST API calls and other types of non-deterministic functionalities that can be extended in the future.