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

wip: Try to save current Website IPFS Hash to FFS storage #7

Merged
merged 3 commits into from
Jul 16, 2020

Conversation

ltfschoen
Copy link
Owner

@ltfschoen ltfschoen commented Jul 16, 2020

I've tried to save the current Website IPFS Hash to FFS storage on local testnet.
To setup I follow these steps:

But I've encountered issues when using FFS as follows, and I've added those concerns as FIXME's in this PR, as follows. I've attached screenshots of the outputs below:

  • How to check if any cid's exist in FFS without having to use a try/catch block so it doesn't crash with error Uncaught (in promise) Error: stored item not found if no items exist?

  • How to check if a specific cid exists in FFS without having to use a try/catch block so it doesn't crash with error if we try to remove it Uncaught (in promise) Error: stored item not found but when it doesn't exist? Note that if we try using ffs.get(cid) and it doesn't exist then it also crashes with that same error, so we need to use a try/catch block with that too.

  • How to use FFS to check if a cid already exists before running ffs.pushConfig(cid) without it crashing when we call ffs.get(cid) but it doesn't exist (e.g. why not add a new FFS function isCid?). It appears to be necessary to do this, otherwise if you try to call ffs.pushConfig(cid) when the cid already exists, it crashes with error cid may have already been pinned, consider using override flag but where do we find out how to use the override flag?

  • How do we detect when it's been successfully stored to FFS Storage? Do we just watch the job and watch for a specific job status and check the dealErrorList is empty? (see screenshot)

  • Why cidData (e.g. 42650d43746dd706dd531ca7bc36dacb0c4c0cc7ab6d69d9019299aa71c1f70156d7) does not match the cid value (e.g. the Website IPFS Address of QmUNQ3Rt1wbdUxynvDbaywxMDMerbWnZAZKZqnHB9wFW15) when using ffs.get(cid)?

Screenshot 2020-07-16 at 11 07 56 am

Screenshot 2020-07-16 at 11 09 03 am

@ltfschoen ltfschoen merged commit 1f8f294 into master Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant