Yesterday I have encountered a key that I am unable to publish to. Any attempt to publish to the key produces the following error message:
$ ipfs name publish --key=thebrokenkey /ipfs/QmQ579LpiPt84mL5CzcQN51eymu4xAAxpSP9m89RUHVHNG Error: can't replace a newer value with an older value
I dug in to the code a bit and found the place where this error string is being produced here
But not being a go programmer and not having a go IDE, I was unable to figure out what produces the
i != 0. Some kind of validator that compares the old value to the new value. But shouldn’t I be able to publish arbitrary values in IPNS, as long as they are proper CIDs?
Any idea what caused this issue? It forced us to replace the key with a new one, which was quite painful since it was used in multiple places. And I would really like to understand this.
IPFS version was 0.4.17, on Linux amd64.
p.s. I don’t think this is related in any way, but this is a private swarm.