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

feat: Upload AppData pre-images to IPFS #2302

Open
fleupold opened this issue Jan 17, 2024 · 2 comments
Open

feat: Upload AppData pre-images to IPFS #2302

fleupold opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@fleupold
Copy link
Contributor

Problem

Users and UIs can specify elaborate metadata about each order using the app_data field on CoW protocol orders (cf. docs)

The field itself represents that IPFS hash of the file that contains the raw metadata in json format. For convenience the API provides an endpoint for integrations to create new app data without needing to upload it to IPFS themselves.

Currently the backend verifies that the hash is indeed a correct but only stores the contents of the metadata files locally. However, for decentralisation the files should also be uploaded to IPFS so that they can easily be fetched by other parties (e.g. solvers) without relying on CoW Swaps backend.

We already have logic to fetch files from IPFS (for orders that are placed only with the appDataHash without also providing the metadata file in plain format)

Suggested solution

Whenever the backend receives and appData hash together with the raw metadata, the content should also be uploaded to IPFS if it not already exists.

Alternatives considered

Continue rely on local storage only or require integrators to upload files to IPFS themselves

@fleupold fleupold added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 17, 2024
@Rizary
Copy link

Rizary commented Jan 21, 2024

Hi @fleupold I stumble upon this repo after reading cow's job ads. I want to try to contribute first to see how far can I go with this. Can I get assigned to this issue to try with suggested solution?

@fleupold
Copy link
Contributor Author

Yes please, feel free to take this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants