Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPNS records are validated twice when resolved #394

Closed
2color opened this issue Jan 18, 2024 · 0 comments · Fixed by #396
Closed

IPNS records are validated twice when resolved #394

2color opened this issue Jan 18, 2024 · 0 comments · Fixed by #396
Assignees

Comments

@2color
Copy link
Member

2color commented Jan 18, 2024

Background

Currently, the @helia/ipns package relies on the routers abstraction to resolve IPNS record. This allows it to use more than one router to resolve a record, e.g. DHT, PubSub, and delegated routing API.

As it currently stands, the IPNS module handles verification of every record it gets from a router:

routers.map(async (router) => {
try {
const record = await router.get(routingKey, options)
await ipnsValidator(routingKey, record)
records.push(record)
} catch (err) {
log.error('error finding IPNS record', err)
}
})

Additionally, thehelia-delegated-routing-v1-http-api also validates the IPNS record which results in two validations which is unnecessary.

Would be good to add an option to the https://github.com/ipfs/helia-delegated-routing-v1-http-api to avoid verifying the record

achingbrain added a commit that referenced this issue Jan 18, 2024
Updates IPNS module to version that is capable of round-tripping records
created with non-nano-second validity times.

Updates `@helia/delegated-routing-v1-http-api-client` to version that
can skip verification of incoming records.

Fixes #394 and #395
achingbrain added a commit that referenced this issue Jan 18, 2024
…396)

Updates IPNS module to version that is capable of round-tripping records
created with non-nano-second validity times.

Updates `@helia/delegated-routing-v1-http-api-client` to version that
can skip verification of incoming records.

Fixes #394 and #395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants