neo
neo copied to clipboard
How to setup an Oracle?
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.
You should set oracle role in native contract named RoleManagement
via DesignateAsRole
.
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.
If this is for development, neo express has built-in oracle support
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
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.
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.