-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Filters #1259
Comments
My opinion. Yes, the oracle must do this process. They will be paid for it. And it will optimize the queries, the spaces and also it could allow to consume third party services. |
@neo-project/core What do you think? I need your opinion. |
This is my pros and cons. Pros:
Cons (one, but a big one):
Yes, if the developer need the complete json, they can do that with an empty filter. But usually will be faster will a filter. |
This is an interesting discussion. Initially, oracle was just supposed to use url and dump data on tx headers (signed by oracle). The size I'm imagining is not megabytes, but bytes or kilobytes at maximum. If we stick to this scenario, oracle filter is not too important. But I agree it may reduce chain space, if only part of data is useful. |
Oracle protocol should be considered as a generic mechanism to interact with external systems. However introducing complex data preprocessing instead of simple predictable filtering could be overkill. =) |
@igormcoelho propuse to create a syscall for filtering. Is not a bad idea. But this is a different thing because if you don't have the filter inside the oracle. You can't extract this information and agree the
|
So, in the end, its like @erikzhang said, we will need a standard/spec for oracle access. Because these filters, if integrated directly into oracle processing (without explicit syscalls configurable by user), will require a syntax for users to explore it. |
@igormcoelho There are already standards for filtering. For JSON it should be JSONPath and XPath for XML. For plain text a safe subset of regex may be used to keep things simple and predictable for a start. Having NeoVM bytecode for complex data preprocessing may introduce unpredictable execution complexity and will require to add GAS limitation on the execution of filters and eventually we may find one more Neo network there. Maybe it would be better to keep Oracles with simple filters and leave that complex preprocessing to future version of Neo, when it would have sharding features. |
I know there standards for json and xml, and I know both JSONPath and XPath. Yet, the question is: are they enough for the purposes of oracle filtering? If so, how to represent both in a unified manner? In other thread we discuss allowed data formats, this supposes we will adopt only json, xml and text, but not binary and pure html, which is standard for most existing web. Will we leave space to extend this in the future? Will we be able to easily extend this for new formats? |
Maybe we should discuss the data format first. |
I think we should keep this as simple as possible. JSON/JSONPath is enough for the first implementation. I think we should focus on that only now. |
As we have decided in the last conversations, the first filter we are going to implement is JSON PATH. An idea that @igormcoelho highlighted is the possibility of implementing oracle filters as a smart contract. Advantages:
Disadvantages:
|
We can use a contract hash for filters, we can create a syscall for |
If the filter is a native contract, the advantage of a single implementation between all systems disappears. There would only be the advantage that the filter can be used externally of the Oracle, or does it have any more advantages? |
But you have the other advatange, users can create his own filter. |
We can discuss about Oracle filters here:
Initial discussion:
#1243 (comment)
Shall we use filters in the oracle syscall?
(Main topic discussion Syscall and ApplicationEngine #1275)
The text was updated successfully, but these errors were encountered: