Skip to content
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] Supported Protocols #1260

Closed
shargon opened this issue Nov 20, 2019 · 24 comments
Closed

[Oracles] Supported Protocols #1260

shargon opened this issue Nov 20, 2019 · 24 comments
Labels
Discussion Initial issue state - proposed but not yet accepted Oracles Oracle related issues

Comments

@shargon
Copy link
Member

shargon commented Nov 20, 2019

We can discuss about Oracle HTTP Protocols here:

With protocols we should implement in HTTP?

(Main topic discussion Syscall and ApplicationEngine #1275)
(Initial discussion #1243 (comment))


Summarized by Erik:

Supported schema: http, https, neofs
Supported http methods: GET, POST*

*Whether or not to support POST is still controversial.

@shargon shargon added the Question Used in questions label Nov 20, 2019
@shargon
Copy link
Member Author

shargon commented Nov 20, 2019

My opinion.

We should allow GET and POST. Because are the most common used, and also, sometimes the API (like our RPC), required to send a little information by POST.

@erikzhang
Copy link
Member

We should support http and neofs. Another protocol we need to consider is https.

For http and https, I think we only need to support GET.

For neofs, we need a URI standard. Please discuss here: #1256

@shargon shargon added Discussion Initial issue state - proposed but not yet accepted and removed Question Used in questions labels Nov 20, 2019
@realloc
Copy link

realloc commented Nov 21, 2019

According to W3Tech report more then 56% of websites use https by default, so https support is a must, not an option, even for just getting information from regular web sites.

Because Smart Contracts most probably would interact with dApp backends, there also must be support for at least both POST and GET verbs, because it's part of JSON RPC standard and both POST and GET are used in most REST APIs.

@erikzhang erikzhang changed the title Oracle: HTTP Protocols Oracle: Supported Protocols Nov 21, 2019
@shargon
Copy link
Member Author

shargon commented Nov 21, 2019

Agree with @realloc

@igormcoelho
Copy link
Contributor

Agree, https should be default, and we will need GET/POST for REST,and standard auth. neofs and http will also be fundamental. @shargon any way we can.enforce name resolution via dnssec? It could be important too, although oracle voting.may also "fix" this (or not).

@shargon
Copy link
Member Author

shargon commented Nov 21, 2019

any way we can.enforce name resolution via dnssec?

I am not sure if dotnet core allow this, but we can try it

@shargon
Copy link
Member Author

shargon commented Nov 21, 2019

In fact, I think that we should only allow HTTPS schema, and not HTTP

Tech benefits:

  • More secure

Economic benefits:

  • If the certificate pinning is defined in the ABI. If they need to update it, the project will use the GAS for the manifest upgrade.

@erikzhang
Copy link
Member

Agree with @shargon . We should allow https only.

@igormcoelho
Copy link
Contributor

Good, I also think that https is much better. Yet, if its self signed certificate, or "untrusted" entity, one should pass the allowed identification for the oracle to know what to expect... would this be passed on tx header as well? It could be good I think.

@erikzhang
Copy link
Member

Maybe we need to have a built-in trusted certification authority list? Otherwise, non-determinism may occur.

@lock9
Copy link
Contributor

lock9 commented Nov 23, 2019

If we need everyone to share the same rules, I suspect this should be done inside a smart contract, like the network policy smart contract.
Isn't this a basic requirement for id systems?

@belane belane changed the title Oracle: Supported Protocols [Oracles] Supported Protocols Nov 26, 2019
@belane belane added the Oracles Oracle related issues label Nov 26, 2019
@belane belane added this to the NEO 3.0 milestone Nov 26, 2019
@belane
Copy link
Member

belane commented Jan 3, 2020

It has been decided to start with the implementation of HTTP-GET.
Once finished, continue with HTTP-POST, HTTP 2.0, ...

I would also like to define the different limits and how are we going to store these values (oracle policy?)

  • Connection timeout.
  • Download timeout.
  • Request max size.
  • Response max size.
  • Response max size after filtering.

@doubiliu
Copy link
Contributor

@belane Hi,Belane. I think we should add a GRPC protocol. Have you started?Or NGD can help to implement.

@realloc
Copy link

realloc commented Mar 24, 2020

For NeoFS Oracle there is no need for generic grpc protocol support. Please see NeoFS protocol bindings, there is C# support. Additionally we are preparing a wrapper library for C# with more http-like abstraction layer,

@Tommo-L
Copy link
Contributor

Tommo-L commented Mar 24, 2020

Look forward to publishing as a Nuget package.

@belane
Copy link
Member

belane commented Mar 24, 2020

@belane Hi,Belane. I think we should add a GRPC protocol. Have you started?Or NGD can help to implement.

gRPC sounds cool @doubiliu. No, I hadn't thought about it, do you think we should prioritize it over others?

@doubiliu
Copy link
Contributor

Can be synchronized, if your time is priority, ngd can help to achieve it

@erikzhang
Copy link
Member

I don't think gRPC is our priority, so don't implement it yet.

@shargon
Copy link
Member Author

shargon commented Mar 26, 2020

I think that NeoFs maybe only will require POST for upload the files, is this correct? @realloc

For NeoFS Oracle there is no need for generic grpc protocol support. Please see NeoFS protocol bindings, there is C# support. Additionally we are preparing a wrapper library for C# with more http-like abstraction layer,

I tried to find the protocol bindings without luck, can you share the direct link please?

@realloc
Copy link

realloc commented Mar 26, 2020

@shargon, Not exactly. NeoFS can't be used via http gate from within the Smart Contract or Oracle, so http POST would not work. There should be a separate NeoFS Oracle using NeoFS API directly. Semantically it would be very similar to http PUT, but implementation is different.

We plan to release updated C# bindings early next week, but current quarantine measures may slow us down a little.

@erikzhang
Copy link
Member

NeoFS can't be used via http gate from within the Smart Contract or Oracle...

Why not?

@realloc
Copy link

realloc commented Mar 26, 2020

@erikzhang It would break the decentralized nature of NeoFS integration with Neo. While NeoFS network is decentralized and all nodes speak the same NeoFS API, http gates are separate single instanced applications. They do not form any resilient decentralized network, they just proxy requests.

@erikzhang
Copy link
Member

@shargon I think it's okay. We access NeoFS through this form of URI:

neofs://{containerId}/{objectId}

It has nothing to do with http.

@vncoelho
Copy link
Member

vncoelho commented Mar 26, 2020

grpc looks like to be a good idea, https://github.com/NeoResearch/libbft has been created using that.

@shargon shargon mentioned this issue Apr 18, 2020
@erikzhang erikzhang removed this from the NEO 3.0 milestone Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Initial issue state - proposed but not yet accepted Oracles Oracle related issues
Projects
None yet
Development

No branches or pull requests

9 participants