Skip to content
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

Storing the proof of creation on-chain #110

Closed
3 tasks done
AltiMario opened this issue Oct 30, 2022 · 1 comment
Closed
3 tasks done

Storing the proof of creation on-chain #110

AltiMario opened this issue Oct 30, 2022 · 1 comment

Comments

@AltiMario
Copy link
Collaborator

AltiMario commented Oct 30, 2022

The "preview" function generates a JSON representing the "Proof Of co-CREation" (with the status).
This JSON is the info we want to store on-chain (because it has to be global and immutable) but only when the authorship is acknowledged and the process is complete (status completed and NOT pending).
The status is complete when there are no claiming processes and the CAW (Creation Authorship Window) time window is ended.
image

Further clarifications:

We don't generate an on-chain transaction every time the creation change status (from creation to pending to closed) because it's too expensive. For these middle statuses, we continue to store off-chain (DB) data, even the final status is always in DB but also stored on-chain
During the litigation process, we don't store on-chain all the voting transactions, it is an off-chain process (in the future we could change it).
The best scenario is having hydra that manages all of these "middle" transactions, but at the moment the tech doesn't fit 100% of our requirements.

Potential issues:

The JSON output of the "preview" could be too long to be fully stored on-chain, maybe compressing and splitting is an option but probably the best option is storing (again) in IPFS.

How to store the JSON on Cardano:

Every transaction (send token) in Cardano associates metadata (a few bytes of available space to describe what we are sending). The idea is to store the JSON (or the link to IPFS representing the JSON) during a transaction.
To do technically this is straightforward using https://meshjs.dev toolkit. The only thing you need is https://meshjs.dev/apis/transaction "Send ADA to addresses".

Transaction between actors:

POCRE will have its Cardano wallet
The user will have his Cardano wallet
POCRE transact a minimum amount of ADA to the user and inside the metadata it will store the representing JSON (or IPFS link) that is the output of the "preview" feature which is the "Proof Of co-CREation" (with status completed).

Where do the tokens come from?

The user will pay POCRE in advance, for the service. POCRE returns part of the tokens with the transaction on the JSON.
Anyway, this is a detail for another ticket.

Action Items

  • 1. Display a button to publish/store the creation on chain on every non-draft creation after the user makes it. The transaction amount is 9 ADA + Transfer Fee. All transactions are from User's to POCRE's wallet
  • 2. Store creation IPFS and metadata in every crypto (ADA) transaction
  • 3. Mark the creation stored on chain as 'stored' in the db.
@AltiMario AltiMario self-assigned this Oct 30, 2022
@AltiMario AltiMario removed their assignment Jan 10, 2023
@AltiMario AltiMario changed the title Storing the proof of creation on chain Storing the proof of creation on-chain Jan 10, 2023
@huzaifa-99
Copy link
Contributor

Closing as completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants