go-ipfs 0.12 interop
Ref. https://github.com/ipfs/go-ipfs/releases/tag/v0.12.0
- [ ] check if our webui preload logic is impacted by
refs localchange or not
in companion, you have browser action icon.. you can open webui. the very first time you install ipfs-companion, if you do this, your node may not have webui in local cache, so it may take time to fetch the content locally. this is not a great UX experience.. there is a blank page for 30 seconds or so. (20Mb or so)
That check is using CIDs, and in 0.12 go-ipfs, the format of CIDs was changed returned by refs local command to be CIDv1 [WITH raw CODEC instead of dag-pb]
https://github.com/ipfs/ipfs-companion/blob/5ed967e8032e8cb65fd70792f142d76f4d1ae838/add-on/src/lib/precache.js#L14-L18
https://github.com/ipfs/ipfs-companion/blob/5ed967e8032e8cb65fd70792f142d76f4d1ae838/add-on/src/lib/precache.js#L48-L59
Thanks, tl;dr is that this should re refactored to use something around the lines: ipfs.block.get --offline ipfs.dag.get --offline for checking if block is in local store and ipfs.dag.stat to do preload.
This task is blocked by https://github.com/ipfs/ipfs-companion/pull/1054