Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Update mutable tests with new spec#6

Merged
lidel merged 15 commits intoipfs-shipyard:defaultfrom
AgregoreWeb:default
Jun 26, 2022
Merged

Update mutable tests with new spec#6
lidel merged 15 commits intoipfs-shipyard:defaultfrom
AgregoreWeb:default

Conversation

@RangerMauve
Copy link
Copy Markdown
Collaborator

Talking to Lidel about IPNS protocols in particular, we decided to take a new approach to generating and managing keys for IPNS.

It'd be good to get this merged in in case other browser vendors would be looking at adding mutability to their IPFS support.

@RangerMauve RangerMauve requested a review from lidel May 16, 2022 00:21
Copy link
Copy Markdown
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

lgtm, but we should update format= to align with specs and go-ipfs 0.13 (details below)

Comment thread README.md Outdated
Co-authored-by: Marcin Rataj <[email protected]>
Copy link
Copy Markdown
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

lgtm, some thoughts around ipns:// in comments inline, but we can improve these areas in follow-up PRs, this is already good step forward, thank you @RangerMauve!

Comment thread publish-files.js

console.log('Uploading to IPFS')
const { stdout: output } = await exec('ipfs add ./files/ --cid-version=1 --raw-leaves=false -r')
const { stdout: output } = await exec('ipfs add ./files/ --cid-version=1 --raw-leaves=false -r --api /ip4/127.0.0.1/tcp/5001')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@RangerMauve question: why --raw-leaves=false here?

Comment thread README.md
Comment on lines +47 to +50
- [x] GET `ipfs://<CID>/?format=car`
- [x] GET `ipfs://<CID>/?format=raw`
- [x] GET `ipfs://<CID>/?format=dag-json`
- [x] GET `ipfs://<CID>/?format=dag-cbor`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💭 we should add tests with Accept header at some point – filled #7 so we dont forget

Comment thread README.md
Comment on lines +37 to +38
- [x] JS `fetch('ipns://<key>', {method: 'POST', body: <CID>})`
- [x] JS `fetch('ipns://<key>/example.txt', {method: 'POST', body: <CID>})`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💭 sending CID in the body feels weird, but I can't put my finger on why 😅

I was thinking that maybe it is squatting too much, what if one wants to do IPNS in userland, maintain keys on their own, create, sign record in JS, and then send it to ipns:// only for publishing? I believe we should make sure a primitive for doing it exists.

I guess that could be represented as POST with Content-Type: application/vnd.ipfs.ipns.record ?

@lidel lidel merged commit f225a31 into ipfs-shipyard:default Jun 26, 2022
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.

3 participants