neo icon indicating copy to clipboard operation
neo copied to clipboard

How to setup an Oracle?

Open logikonline opened this issue 3 years ago • 6 comments

I have installed the plug-in and the Nodes array is blank but in a SOlo-Node - can the server not also be an Oracle? And if so, I added the node in the plugin config, like the seed in the main config but the error just reports back "The oracle is unavailable"

I wish you had more help around this. Any help is greatly appreciated.

logikonline avatar Dec 31 '21 06:12 logikonline

You should set oracle role in native contract named RoleManagement via DesignateAsRole.

ZhangTao1596 avatar Jan 04 '22 01:01 ZhangTao1596

Check https://github.com/NeoResearch/neocompiler-eco/blob/main/assets/eco-scripts/oracles.js

We have a preloaded wallet that says pub key of oracle node and the rest is automatically obtained from the network.

We also have all committee necessary signatures on the frontend.

vncoelho avatar Jan 05 '22 13:01 vncoelho

If this is for development, neo express has built-in oracle support

devhawk avatar Jan 08 '22 15:01 devhawk

If this is for development, neo express has built-in oracle support

It was to be used in a Private-Net - I was able to get everything else running but struggled to get the Oracle working

logikonline avatar Jan 14 '22 05:01 logikonline

You should set oracle role in native contract named RoleManagement via [DesignateAsRole]

Is there a way I can do this in Neo-Gui? I am sorry to ask a basic question, still trying to consume all the pieces.

logikonline avatar Jan 14 '22 05:01 logikonline

You should set oracle role in native contract named RoleManagement via [DesignateAsRole]

Is there a way I can do this in Neo-Gui? I am sorry to ask a basic question, still trying to consume all the pieces.

To set up an oracle, 2/3 (two-thirds, 66.67%) of the commitee members should agree on the DesignateAsRole transaction. Technically, for a 7-committee chain, we can let a committee member execute the transaction, and then ask 3 others to sign recursively on the transaction. Finally you can relay the transaction signed by multiple committee members to make effect.
To do so with neo-cli, you can open a consensus wallet and execute the command invoke {RoleManagementScriptHash} DesignateAsRole [arguments...] to get a long json result (let's call it r0). Then with another consensus wallet in neo-cli, sign r0 to get a longer json r1. With still another wallet, sign r1 to get r2; then continue with sign r2 getting r3. Finally you can relay r3.
But with merely neo-gui you can only get the long json object r0 after invoking DesignateAsRole. There seems no explicit way to sign or relay the json objects.

Hecate2 avatar Feb 25 '22 10:02 Hecate2