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

Another Async Oracle Implementation #1743

Closed
wants to merge 8 commits into from
Closed

Another Async Oracle Implementation #1743

wants to merge 8 commits into from

Conversation

doubiliu
Copy link
Contributor

@doubiliu doubiliu commented Jul 1, 2020

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.

@doubiliu doubiliu changed the title Async oracle improve Another Async Oracle Implementation Jul 1, 2020
@erikzhang
Copy link
Member

What is OraclePayload?

@doubiliu
Copy link
Contributor Author

doubiliu commented Jul 1, 2020

A message used to collect response signature data

@erikzhang
Copy link
Member

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.

@doubiliu
Copy link
Contributor Author

doubiliu commented Jul 1, 2020

Oracle nodes connect directly?

@shargon
Copy link
Member

shargon commented Jul 1, 2020

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.

Then it could be easier to detect the oracle nodes

@erikzhang
Copy link
Member

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.

@doubiliu
Copy link
Contributor Author

doubiliu commented Jul 1, 2020

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);
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@vncoelho vncoelho left a 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
Copy link
Member

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.

@erikzhang
Copy link
Member

@doubiliu Can we close this and focus on #1738?

@doubiliu doubiliu closed this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants