interface-spec icon indicating copy to clipboard operation
interface-spec copied to clipboard

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

Open iclighthouse opened this issue 2 years ago • 1 comments

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.

iclighthouse avatar Apr 23 '23 04:04 iclighthouse

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.

dietersommer avatar Aug 08 '23 08:08 dietersommer