Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: validate ipns records with inline public keys #3224

Merged
merged 5 commits into from
Aug 18, 2020

Conversation

jacobheun
Copy link
Contributor

The IPNS resolver was unnecessarily (and inaccurately) trying to fetch public keys from the network if they weren't embedded in the record. Embedding has been around for some time so we don't need this anymore.

This also fixes a problem where record validation wouldn't happen for inlined public keys. When PeerId's with inlined keys create ipns records, the public key is not embedded because this is duplicative. (this is the behavior of both Go and JS).

This was caught in interop testing of the latest go-ipfs updates to move to ed25519 keys by default. The failing job for this is https://app.circleci.com/pipelines/github/ipfs/go-ipfs/3329/workflows/33457111-bec0-46a9-80ef-f13fc7844231/jobs/38550.

related ipfs/kubo#7579

@aschmahmann
Copy link
Contributor

aschmahmann commented Aug 13, 2020

The IPNS resolver was unnecessarily (and inaccurately) trying to fetch public keys from the network if they weren't embedded in the record. Embedding has been around for some time so we don't need this anymore.

This is essentially the twin of ipfs/kubo#7549

@jacobheun
Copy link
Contributor Author

@achingbrain I'm not sure why the browser tests are failing but I'm seeing the same failures in master from the release yesterday. Any ideas why these might be happening?

@jacobheun
Copy link
Contributor Author

I bumped ipfs-utils to include the reverted progress code which fixes the browser failures.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! LGTM

@jacobheun jacobheun merged commit 5cc0e08 into master Aug 18, 2020
@jacobheun jacobheun deleted the fix/ipns-inline-keys branch August 18, 2020 14:32
@github-actions github-actions bot mentioned this pull request Mar 1, 2022
SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
* fix: validate with inline keys

* test: check inlined pubkey support

* chore: lock ipfs-utils at 2.3.1

* chore: test with ipfs-utils fix

* chore: update ipfs-utils to 3.0.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants