iExecBlockchainComputing / iexec-apps

Dockerfile of all iExec apps
18 stars 23 forks source link

Flight Delay doracle #40

Open nikhil3000 opened 4 years ago

nikhil3000 commented 4 years ago

I have developed the flight delay doracle. It is deployed at: https://explorer.iex.ec/kovan/task/0x7fb1cf592f8bdbf5cefbe6856bdab9d94ef069c54a8a9f541d2efb3f068f2f0b

I have created an api which send dummy hardcoded flight delay data in minutes and works for flight ids 1-6. The api is deployed on my heroku.

sulliwane commented 4 years ago

Thanks @nikhil3000 for your contribution.

One remark: Could you change the code so that the API is a publicly available one, like "flight radar API", instead of fetching data from your own Heroku?

For at least two reasons:

Ensuring the trust of the data source is very important as the trust level of the whole Oracle is the one of its weakest link...

Thanks!

nikhil3000 commented 4 years ago

Hey @sulliwane I totally understand all the points stated by you. But I have used this dummy API because I couldn't find a free(flight radar suggested by you is paid without any trial) API that provides such data. Moreover, I found this ans where the accepted ans says that such data is not openly available and the api provided by second ans needs one to apply with all the project details. So it would be helpful if you can point me towards any such API.

sulliwane commented 4 years ago

Hi @nikhil3000, I'm really not up to date with flight trackers etc, but in the link you provided there is a pointer to https://opensky-network.org/apidoc/rest.html. That may do the job? Otherwise you'll need to find another data provider. (If the API key is not free, an option is to monetize it on the data store, by deploying an encrypted dataset. But that's a new workflow)

nikhil3000 commented 4 years ago

@sulliwane I have updated the API. The app can be now checked at: https://explorer.iex.ec/kovan/task/0xb03a957710e1e9e2a646f98bb5a6203bd5d9b346bcdd081235f6707a3e5bb80c

Regarding the determinism of the app, the api does not take any timestamp and I also think that delay in flight should not change so frequently that we need to get the flight delay with timestamp. However, I have passed the timestamp as a parameter and stored the same with the delay result in the oracle.