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

Update mutable tests with new spec #6

Merged
merged 15 commits into from
Jun 26, 2022
Merged

Conversation

RangerMauve
Copy link
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
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)

README.md Outdated Show resolved Hide resolved
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Copy link
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!

@@ -63,7 +63,7 @@ async function run () {
await fs.mkdir(emptyDir, { recursive: true })

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
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 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
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 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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants