Open lanzafame opened 5 years ago
The issue is actually simpler than that.
:remote - failed: #{:pinned :unpin_error :pinning :pin_error} in: [:pins 0 :peer-map 1 :status] at: [:pins :peer-map :status] spec: :cube.pin.peer/status
Indicates that the :status
key inside the :peer-map
is invalid, it should be one of #{:pinned :unpin_error :pinning :pin_error}
. Basically, :remote
is not defined as a valid status for a pin to be in.
Solution is simple, add :remote
to https://github.com/ipfs-shipyard/cube/blob/master/src/shared/db.cljc#L52-L54 (heh, notice the "TODO" there as well :) )
Seems that's not the only issue either. A pin in Cube is defined like this: https://github.com/ipfs-shipyard/cube/blob/master/src/shared/db.cljc#L91-L94
Which says that :name
has to be a string that is not empty. This is not true and a pin in ipfs-cluster could be nil. Also something that would have to be fixed but unrelated to this issue.
Because cube believes it's own state of the world is the source of truth, pinning to cluster via
ipfs-cluster-ctl
causes it spew the above error repeatedly.