aaytuncc / HackFS-2023

0 stars 0 forks source link

HackFS Judging #2

Open DeveloperAlly opened 1 year ago

DeveloperAlly commented 1 year ago

Heya!

This is great. Just wondering did you build the python script for Bacalhau to run?

Also how are you interacting with Bacalhau?

Mostly curious if it's useful for the Bacalhau script to be able to be triggered from a contract or not in this use case & what your future plans might be here :)

aaytuncc commented 1 year ago

Hello!

We've created a straightforward Docker image that houses a Python script. The script retrieves data from an ./input folder, which is specified through the --input=data-endpoint. It then processes this data and generates output, which it stores in an output folder. The contents of this output folder are directly uploaded to IPFS via Bacalhau.

Subsequently, we established a basic Node.js server responsible for triggering Bacalhau jobs as cronjobs. After these jobs are executed, the server retrieves the output, extracts the required information, and updates the contract in FVM. This process allows the data to be served on-chain. Moreover, the server sends a push notification to the end user, including an IPFS link, for those who have subscribed to our push protocol channel.

The contract, Python script, and server script can all be easily accessed from our repository. It's important to note that this project was initially set up as a proof of concept, so the emphasis wasn't on the data we provided. However, since we've successfully managed the proof of concept, expanding the data set can easily be achieved.

In the future, we aim to have the ability to trigger this process directly from the contract. This would enable us to achieve full decentralization. Please feel free to ask any questions - we're more than happy to provide answers.

DeveloperAlly commented 1 year ago

Really great work!

Hope you enjoyed building this!

As an FYI check out Lilypad as a potential solution to triggering jobs from smart contracts directly;)

aaytuncc commented 1 year ago

Thank you very much :) We watched your demo about Lilypad on youtube, we'll look more in detail and see how can we integrate to our system.