This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
fix: revert libp2p records being signed for ipns #1570
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The js-ipfs#1543 broke the interop tests for
IPNS
on interop#26.The js-ipfs#1543 was added after my analysis for the implementation of
IPNS over Pubsub
, as I wanted to have exactly the same behavior and interface as the DHT, in order to have an easy to plug DHT afterward. Accordingly:DHT PUT:
js-libp2p-kad-dht/index.js#L166
js-libp2p-kad-dht/utils.js#L150
So, I wanted to make this logic available to Pubsub / local and it is all good in JS land. However,
go-ipfs
does not do that:go-ipfs/namesys/publisher.go#L278
go-libp2p-kad-dht/dht.go#L149
And this causes and interop problem!
At first, different protobuf definitions:
go-libp2p-record/record.proto
js-libp2p-record/record.proto.js
So, when we publish using a GO node, followed by a JS node resolve, the
resolve
will try to validate the record, but it will break js-libp2p-record/record.js#L42There is no author, and trying to get ID is 💥 Other than that, the interop is fine. I believe that, as the
IPNS
record is signed inside thelibp2p-record
, it is not bad to have it not signed. It would be better to have it signed, but we can handle this together withDHT Interop
.Other note: This can be one of many problems regarding DHT interop, and I will look deeper on that later.