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] Native Oracle Policy #1277

Closed
belane opened this issue Nov 25, 2019 · 8 comments · Fixed by #1445
Closed

[Oracles] Native Oracle Policy #1277

belane opened this issue Nov 25, 2019 · 8 comments · Fixed by #1445
Labels
Discussion Initial issue state - proposed but not yet accepted Oracles Oracle related issues

Comments

@belane
Copy link
Member

belane commented Nov 25, 2019

For the use of the Oracles we must contemplate a new native contract (or use the current one) that stores the oracle policy and the agreed values, such as authorized nodes, fee, protocols and active filters, blocked endpoints, ...

The idea is that all Oracle nodes share the same policy to obtain homogeneous behavior, but leaving the door open for Oracle node owners to specify a specific policy (for example of supported protocols).

It must be able to add and remove authorized nodes and other values.

This topic is closely linked to Oracle nodes election #1278

@belane belane added the Discussion Initial issue state - proposed but not yet accepted label Nov 25, 2019
@belane belane added this to the NEO 3.0 milestone Nov 25, 2019
@erikzhang
Copy link
Member

Can you list what needs to be included in the policy?

@vncoelho
Copy link
Member

vncoelho commented Nov 25, 2019

I believe Oracle Policy should be the same as Native Policy. Maybe a new class just to better organize, but the class could be initialized inside the Native Policy.
Initially, maybe something like that:

  • Get Available oracles services: Ex: [native, neofs, freeoracles, payedoraclesupperhighspeed, etc..]
  • Get Number of Registered ON of service: Ex: [10]
  • Register a new service...
  • Add a new ON to a service...
  • Get Service default threshold...
  • etc...

@belane belane added the Oracles Oracle related issues label Nov 25, 2019
@belane
Copy link
Member Author

belane commented Nov 26, 2019

It's a good idea to use the same native contract, it would be a way to have all the network operating parameters in the same contract. But it is not strictly necessary.

Currently, we will need to save the authorized Oracle Nodes (current validators), Allowed Protocols/Filters and base cost of oracles use.

@belane
Copy link
Member Author

belane commented Jan 3, 2020

We can start with the implementation of the policy contract, this must include at least:

  • Current Oracles Nodes (read: all / write: consensus)
  • Number of oracles, how many Oracles can authorize a consensus node. (read: all / write: consensus majority)

The only question we have left before implementation is to decide if we prefer a new contract or include it in the current policy contract.

👍 Current policy contract.
👎 New oracle policy contract.

@doubiliu
Copy link
Contributor

I begin to implement the code of OraclePolicy.
Currently I have written the following functions:

  1. Register as an Oracle Node
  2. Modify the Oracle node
  3. Get the currently authorized Oracle nodes
  4. Get the current number of authorized Oracle nodes

What else need to be added?
@belane

@belane
Copy link
Member Author

belane commented Feb 10, 2020

Great @doubiliu, that would be enough for now.
Just leave the door open to include other values ​​such as fee, timeouts, ... (if we finally include them in the policy contract).

@doubiliu
Copy link
Contributor

Maybe we need add a DistributeFee function.We cannot guarantee that the costs will be divisible.Number of nodes is not fixed.

@doubiliu
Copy link
Contributor

Also, we may need to consider the timeliness of Oracle nodes. We cannot guarantee that Oracle nodes will still be authorized when CN make consensus.

@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

Successfully merging a pull request may close this issue.

4 participants