Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

fix: go-ipfs 0.5 sync #113

Merged
merged 3 commits into from
May 21, 2020
Merged

fix: go-ipfs 0.5 sync #113

merged 3 commits into from
May 21, 2020

Conversation

hugomrdias
Copy link
Member

@hugomrdias hugomrdias commented May 20, 2020

  • fix remote node ipfs http client path
  • fix rabin params go-ipfs has validation and returns errors
  • fix use cid instead of hash in the pin tests

@hugomrdias hugomrdias changed the title fix: fix remote node ipfs http client path fix: go-ipfs 0.5 sync May 21, 2020
@@ -354,7 +354,7 @@ describe('files', function () {

it('rabin chunker small chunks', () => {
const options = {
chunker: 'rabin-16-16-16',
chunker: 'rabin-16-32-64',
Copy link
Member

Choose a reason for hiding this comment

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

Why was this change necessary? rabin-16-16-16 seems to be supported by js and go:

$ ipfs add --chunker=rabin-16-16-16 ./package.json 
added QmTUSudDKFYaVHLdU1wRoHYXkydQaDch4Kt8CwuVFShpiU package.json
$ jsipfs add --chunker=rabin-16-16-16 ./package.json 
added QmTUSudDKFYaVHLdU1wRoHYXkydQaDch4Kt8CwuVFShpiU package.json

Copy link
Member Author

Choose a reason for hiding this comment

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

api returns validation errors, min needs to bigger than avg, avg need to be smaller than max etc

Copy link
Member

Choose a reason for hiding this comment

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

Which api? The js-IPFS api? Should probably fix that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Didn't confirm, but I'm assuming go http api we didn't change anything.
I will look into it

Copy link
Member

@achingbrain achingbrain May 21, 2020

Choose a reason for hiding this comment

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

Oh, no - I think you're correct, it's go-IPFS that's changed, I think I was running an old version just now (still 0.5.x but an old version from go-ipfs master):

$ ipfs add --chunker=rabin-16-16-16 ./package.json 
Error: incorrect format: rabin-min must be smaller than rabin-avg

Copy link
Member

Choose a reason for hiding this comment

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

@Stebalien was this change intentional?

Copy link
Member

Choose a reason for hiding this comment

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

This chunker config is equivalent to a fixed-sized chunker. I'm not sure if this was intentional, but I'd like to leave it as it helps detect misuse of the chunker.

Copy link
Member Author

Choose a reason for hiding this comment

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

added this item here ipfs/js-ipfs#3030 so we replicate in js-ipfs

@achingbrain achingbrain merged commit df79b59 into master May 21, 2020
@achingbrain achingbrain deleted the fix/remote-http-path branch May 21, 2020 18:15
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