-
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
Another Async Oracle Implementation #1743
Conversation
What is |
A message used to collect response signature data |
I don't think this is a good idea. We should not add a new payload to the p2p network for collecting the signatures. I think they can combine signatures through other channels. |
Oracle nodes connect directly? |
Then it could be easier to detect the oracle nodes |
The IP address of the oracle node is easy to detect. As long as you visit https once, the IP address is exposed. So it doesn't really matter. |
OK.I remove the OraclePayload. Signature data will be collected by another way. |
public bool SetOracleValidators(ApplicationEngine engine, byte[] data) | ||
{ | ||
ECPoint[] validators = data.AsSerializableArray<ECPoint>(); | ||
UInt160 committeeAddress = NEO.GetCommitteeAddress(engine.Snapshot); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the 21
from the committee will be default oracles?
As I mentioned on Erik's PR, it would be great if soon we could have the possibility of registering alternative Oracle Groups.
The Default of any TX
can still be the Commiteee, but there could be a field for choosing any other service. This looks quite crucial in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
committeeAddress
is used to check witness and committee will not be default oracles.Oracle nodes is designated by committee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doubiliu, I like both PRs, in my opinion all going in good directions.
|
||
namespace Neo.SmartContract.Native | ||
{ | ||
public class OracleContract : NativeContract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OracleContractAsync
, if it is just for Committee and not open for other to register maybe it should be OracleContractAsyncFixed
, something like that, until we allow other to participate.
This is another asynchronous Oracle implementation.
In this implementation, we adopted the off-chain aggregation method and implemented the corresponding permission and fee model.Compared with on-chain aggregation, off-chain aggregation can save storage resources and reduce the complexity of verification in contracts.
Partial code related to signature aggregation will be placed in the module and will be submitted later.