-
Notifications
You must be signed in to change notification settings - Fork 5
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
Anchor data on-chain when uploading files and posts #422
Comments
Okay, I've done some research on Graphile Worker and the existing task implementations in regen-server. I have some questions about how we want to implement this, I think we have a few options. But graphile worker should work well. The backoff method for retries should be sufficient, and minus some gas fees, there shouldn't be any harm if an IRI is anchored twice. First, the task payload and execution.
Scheduling jobs. Two options:
Executing jobs. Two options:
Curious what you think @aaronc @blushi. Both option 2s seem quite elegant to me, if you don't mind creating a new function on the DB and testing the experimental feature. |
Looking at the designs https://www.figma.com/file/Bksz1JeDYxQVIXdI46EgPT/Project-Posts?node-id=744%3A47640&mode=dev, it seems like we want primarily signing (ie attesting) events (not necessarily anchoring at first) so we want to be able to retrieve timestamp and tx hash for those. I believe that could work indeed with the indexer based on the events https://buf.build/regen/regen-ledger/docs/main:regen.data.v1#regen.data.v1.EventAttest I believe option 2 makes more sense for scheduling jobs. |
Marie and I discussed this and decided to go ahead and try using an executable file/script + regen binary. Ultimately though we need to make sure we can get the regen binary into the heroku production environment... Although we could maybe deploy a docker image to heroku, it seems like the proper option is to use heroku buildpacks
In particular we'll need to use multiple buildpacks for an app, likely creating a custom buildpack that builds the regen binary and makes it available to the main app. Perhaps this could be useful for other Heroku apps/services for RND? We should figure out the heroku details before I go much further but I've made an initial implementation of this task executor using the regen binary in the docker container + an executable bash script in #454 . I'll add some more details on this specific implementation in the PR. |
We spoke about this today. There is a little concern about vendor lockin/being too coupled to Heroku if we need to build + maintain a custom buildpack. The alternative is deploying a docker image that might be more general and useful in other hosting platforms. For now shall we investigate the buildpack a bit more and go with this if it doesn't look too complex to maintain? I believe it does require creating another repo but the buildpack could be quite simple. We may not even need to build the binary if the pre-built release is compatible with the heroku environment. A good example is written here: https://www.petekeen.net/introduction-to-heroku-buildpacks What do you think @blushi @aaronc @clevinson ? |
When we store JSON-LD posts and their attached media files we should anchor the data on-chain using a hot wallet with a minimum balance of REGEN just to be used for anchoring data.
The text was updated successfully, but these errors were encountered: