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

HTTPS Outcall: Add another http_request method to improve the dependency on a single point of data #159

Open
iclighthouse opened this issue Apr 23, 2023 · 1 comment

Comments

@iclighthouse
Copy link

iclighthouse commented Apr 23, 2023

The current http_request() method accepts a url parameter url (single point data), and all nodes in the subnet go to access this single point data and then form a consensus, this consensus only solves the problem of preventing data inconsistency during the access, and there is no consensus on the data itself. If I want to get the consensus of multi-point data, I need to access multiple urls (multi-point data) to re-execute the consensus at the business layer. But this brings the problem of inefficiency and excessive cycles consumption.
Scenario: Canister accesses the RPC url of an ethereum node via HTTPS Outcall, and this time it runs the risk of single point data failure or false data. If I go to access the RPC of multiple nodes at the same time, this overhead and cycles consumption is very high.
Is it possible to provide a http_request2() method where the url field in the parameters is changed to urls, an array of urls. Each node of the subnet randomly selects a url to access and then performs consensus on the data. This solves the above problem.

This is important for accessing distributed system that has the same API.

@dietersommer
Copy link
Contributor

This is a good idea and I think we should keep this in mind for a future extension of the feature. Particularly, when using HTTPS outcalls to call to Ethereum RPC nodes, this may be of interest.

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

No branches or pull requests

2 participants