little-bear-labs / ipfs-chromium

19 stars 1 forks source link

IPNS resolution: V2-only records #39

Closed lidel closed 9 months ago

lidel commented 1 year ago

Writing this down, as there is a lot of confusion in ecosystem around this atm, the goal of this issue is to be useful reference while we clean this up.

There are two ways of getting a signed IPNS record over HTTP:

For the record, there is also legacy Kubo RPC:

lidel commented 1 year ago

@John-LittleBearLabs iirc ipfs-chromium currently uses the Kubo RPC? Or did we switch to application/vnd.ipfs.ipns-record on gateways? (it was not supported when this project started, but it is now, at least at ipfs.io one)

John-LittleBearLabs commented 1 year ago

Kubo RPC? Or did we switch to application/vnd.ipfs.ipns-record on gateways? (it was not supported when this project started, but it is now, at least at ipfs.io one)

The latter: ipns/{id}?format=ipns-record

There was a short time at the beginning of the project where it was understood this was coming, but wasn't yet released. At that early phase this simply wasn't trustless for IPNS URLs - was just forwarding them as-is to a Kubo gateway.

lidel commented 1 year ago

Ack, in that case I think we are mostly done, only remainign thign around IPNS is to ensure wait for https://github.com/ipfs/specs/issues/376 and then revisit this issue to make sure we interpret both V1+V2 and V2-only records as valid.

lidel commented 11 months ago

Update: IPIP-428 landed, it includes IPNS Records that can act as test vectors (both positive and negative): https://specs.ipfs.tech/ipips/ipip-0428/#test-fixtures

I think for this project, tldr is making sure we implement the updated "Record Verification" section at https://specs.ipfs.tech/ipns/ipns-record/#record-verification + do the right thing for the mentioned test vectors.