Skip to content

Flight Delay doracle #40

Open
nikhil3000 wants to merge 3 commits intoiExecBlockchainComputing:masterfrom
nikhil3000:master
Open

Flight Delay doracle #40
nikhil3000 wants to merge 3 commits intoiExecBlockchainComputing:masterfrom
nikhil3000:master

Conversation

@nikhil3000
Copy link
Contributor

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
Copy link
Contributor

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:

  • Public API offer API documentation, brand name, company registration. This mitigates the risk of data being tampered in order to benefit from the smart contract relying on it.
  • The day you bring your heroku down, the oracle stops working. There's less chance this happens with a public API.

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
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor Author

@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.

*****************************************************************************/

var [id , timestamp] = process.argv.slice(2).map(s => s);
var [id, timestamp] = process.argv.slice(2).map(s => s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the map is not really needed here :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timestamp is not processed and just passed in the result. There is absolutelly no link between this timestamp and the results provided.

A better approach would be to not include timestamp in the arguments, and put a timestamp comming provided by the api (latest update for this flight ?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any freely available API's (didn't check the details of paid ones) with flight delay data that takes in timestamp as a parameter. To counter that problem I created my own API for the pr but that created a single point of failure. Can you suggest some workaround?

*****************************************************************************/

var [id , timestamp] = process.argv.slice(2).map(s => s);
var [id, timestamp] = process.argv.slice(2).map(s => s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timestamp is not processed and just passed in the result. There is absolutelly no link between this timestamp and the results provided.

A better approach would be to not include timestamp in the arguments, and put a timestamp comming provided by the api (latest update for this flight ?)

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.

3 participants