Not same hash on pin service
vanpd-0859 opened this issue Β· 6 comments
I am using Infura and Pinata for my pin service.
But it always said "Found inconsistency in pinned hashes"
Pinata folder name is always Cloudflare DNS Record, or /Users/myusername/.config/yarn/global/node_modules/ipfs-deploy/src
Not the real folder name.
I have this happening as well but with pinata and ipfs-cluster. Infura doesn't seem to be working at all.
When I deploy to only ipfs-cluster the hash returned is not the right one (I think it may be the latest file added??) However, the correct hash is successfully pinned which is the same hash that pinata also returns when deploying individually.
When deploying with cluster and updating cloudflare it sends the incorrect hash to cloudflare. I've worked around it by deploying twice. first to ipfs-cluster then to pinata/cloudflare.
Let me know if you need any more info, thanks.
Infura doesn't seem to be working at all.
How is it not working? Here it seems to work fine. Remember that Infura is a free service that might have unexpected interruptions.
When I deploy to only ipfs-cluster the hash returned is not the right one (I think it may be the latest file added??)
Isn't it the correct one? I am using ipfs-deploy
in a build to update xkcd.hacdias.com
everyday and it seems the right hash have been using.
As far as I remember right now, IPFS Cluster returns multiple hashes and the last hash is the base directory, which is the one we're using.
Did it start happening after the last release or has it always happened?
Could you give me examples of "wrong" hashes and which should've been the correct ones?
How is it not working? Here it seems to work fine. Remember that Infura is a free service that might have unexpected interruptions.
Yes, I did write it off as unexpected interruptions but I've tried it a bunch of times and it just stays at "uploading and pinning to infura"
Isn't it the correct one? I am using
ipfs-deploy
in a build to updatexkcd.hacdias.com
everyday and it seems the right hash have been using.As far as I remember right now, IPFS Cluster returns multiple hashes and the last hash is the base directory, which is the one we're using.
Providing example below.
Did it start happening after the last release or has it always happened?
I tried using older versions and the same result
Could you give me examples of "wrong" hashes and which should've been the correct ones?
I've created public/index.html and public/page2.html. index.html just links to page2.html
ipd -p ipfs-cluster returns
Added and pinned to IPFS Cluster with hash:
βΉ π QmUgAexNV1xp4t58AHWzuS3FnmCKtPxkTZAQEsJ5s6gowJ (βhttps://ipfs.io/ipfs/QmUgAexNV1xp4t58AHWzuS3FnmCKtPxkTZAQEsJ5s6gowJ/β)
This hash (QmUgAexNV1xp4t58AHWzuS3FnmCKtPxkTZAQEsJ5s6gowJ) points to page2.html but if I do ipfs-cluster-ctl status it returns QmP4DKjJ4sBydjrafkLRPspf64AwHZZCq7fBQWTXfmYXQK as pinned. This hash is the base directory.
For me, ipfs-deploy pins the right hash but returns the wrong one to the user and sends the wrong one to cloudflare. Pinata deployment uses the YXQK hash successfully for both. This leads to the inconsistency when trying to do both at same time.
Thanks.
Unfortunately, I'm not being able to reproduce that:
$ ipfs add -r public
added QmNQHJYsv3YxEsD82EqdqA51eb9HWYYTsoXHPXjSpC7QrC public/index.html
added QmQztBnN8WozYv7EPnBxJGxwjB1FQH5n5wcALrigaK5TZu public/public2.html
added QmT9QPxqU1rjSdsdrrLN1GwcJiMhshyGPvtAsxboCvBi93 public
34 B / 34 B [=========================================================================================================] 100.00%
$ ipfs-deploy -p ipfs-cluster -p infura -C -O
βΉ π€ No path argument specified. Looking for common onesβ¦
β π Found local public directory. Deploying that.
β π Directory public weighs 34 B.
β π Added and pinned to IPFS Cluster with hash:
βΉ π QmT9QPxqU1rjSdsdrrLN1GwcJiMhshyGPvtAsxboCvBi93
β π Added and pinned to Infura with hash:
βΉ π QmT9QPxqU1rjSdsdrrLN1GwcJiMhshyGPvtAsxboCvBi93
QmT9QPxqU1rjSdsdrrLN1GwcJiMhshyGPvtAsxboCvBi93
Will try later with PiΓ±ata too.
Hi again, I decided to come back to this and after some trial and error I found out my issue (sort of).
I have a Hugo site I was trying to deploy. I narrowed the offending folder to static/admin which has netlifycms files in it. That folder also had a .gitkeep file in it. After deleting .gitkeep ipfs add and ipfs-deploy have the same hash.
Now, when I was previously trying I didn't have the static/admin folder so I'm not sure why it was doing what it did before but it seems to be working now.
Thanks for the update @stevenmccurdy. Superseeded by #193