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

Commit

Permalink
feat: use reduces keysize (#1232)
Browse files Browse the repository at this point in the history
* feat: use reduces keysize

* chore: update deps
  • Loading branch information
dryajov committed Feb 28, 2018
1 parent 9ba6c40 commit 97fbe18
Show file tree
Hide file tree
Showing 28 changed files with 117 additions and 51 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@
},
"homepage": "https://github.com/ipfs/js-ipfs#readme",
"devDependencies": {
"aegir": "^13.0.0",
"aegir": "^13.0.5",
"buffer-loader": "0.0.1",
"chai": "^4.1.2",
"delay": "^2.0.0",
"detect-node": "^2.0.3",
"dir-compare": "^1.4.0",
"dirty-chai": "^2.0.1",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.7.0",
"execa": "^0.9.0",
"expose-loader": "^0.7.4",
"form-data": "^2.3.2",
"go-ipfs-dep": "^0.4.13",
"hat": "0.0.3",
"interface-ipfs-core": "~0.52.0",
"ipfsd-ctl": "~0.28.0",
"ipfsd-ctl": "~0.29.0",
"left-pad": "^1.2.0",
"lodash": "^4.17.5",
"mocha": "^5.0.1",
Expand All @@ -98,7 +98,7 @@
"byteman": "^1.3.5",
"cids": "~0.5.2",
"debug": "^3.1.0",
"file-type": "^7.5.0",
"file-type": "^7.6.0",
"filesize": "^3.6.0",
"fsm-event": "^2.1.0",
"get-folder-size": "^1.0.1",
Expand All @@ -119,7 +119,7 @@
"is-ipfs": "^0.3.2",
"is-stream": "^1.1.0",
"joi": "^13.1.2",
"libp2p": "~0.17.0",
"libp2p": "~0.18.0",
"libp2p-circuit": "~0.1.4",
"libp2p-floodsub": "~0.14.1",
"libp2p-kad-dht": "~0.8.0",
Expand All @@ -128,16 +128,16 @@
"libp2p-multiplex": "~0.5.1",
"libp2p-railing": "~0.7.1",
"libp2p-secio": "~0.9.2",
"libp2p-tcp": "~0.11.5",
"libp2p-webrtc-star": "~0.13.3",
"libp2p-websocket-star": "~0.7.6",
"libp2p-websockets": "~0.10.4",
"libp2p-tcp": "~0.11.6",
"libp2p-webrtc-star": "~0.13.4",
"libp2p-websocket-star": "~0.7.7",
"libp2p-websockets": "~0.10.5",
"lodash.flatmap": "^4.5.0",
"lodash.get": "^4.4.2",
"lodash.sortby": "^4.7.0",
"lodash.values": "^4.3.0",
"mafmt": "^4.0.0",
"mime-types": "^2.1.17",
"mime-types": "^2.1.18",
"mkdirp": "~0.5.1",
"multiaddr": "^3.0.2",
"multihashes": "~0.4.13",
Expand All @@ -153,9 +153,9 @@
"pull-file": "^1.1.0",
"pull-ndjson": "^0.1.1",
"pull-paramap": "^1.2.2",
"pull-pushable": "^2.1.2",
"pull-pushable": "^2.2.0",
"pull-sort": "^1.0.1",
"pull-stream": "^3.6.1",
"pull-stream": "^3.6.2",
"pull-stream-to-stream": "^1.3.4",
"pull-zip": "^2.0.1",
"read-pkg-up": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/cli/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('ls', () => runOnAndOff((thing) => {
// If the daemon is on, ls should search until it hits a timeout
return Promise.race([
ipfs.fail('ls QmYmW4HiZhotsoSqnv2o1oSssvkRM8b9RweBoH7ao5nki2'),
new Promise((res, rej) => setTimeout(res, 4000))
new Promise((resolve, reject) => setTimeout(resolve, 4000))
])
.catch(() => expect.fail(0, 1, 'Should have thrown or timedout'))
})
Expand Down
2 changes: 2 additions & 0 deletions test/cli/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('pubsub', function () {
.create({ type: 'proc' })
.spawn({
exec: IPFS,
initOptions: { bits: 512 },
config,
args: ['--enable-pubsub-experiment']
}, (err, _ipfsd) => {
Expand All @@ -58,6 +59,7 @@ describe('pubsub', function () {

before((done) => {
df.spawn({
initOptions: { bits: 512 },
args: ['--enable-pubsub-experiment'],
exec: `./src/cli/bin.js`,
config
Expand Down
12 changes: 10 additions & 2 deletions test/cli/swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,23 @@ describe('swarm', () => {

series([
(cb) => {
df.spawn({ exec: `./src/cli/bin.js`, config }, (err, node) => {
df.spawn({
exec: `./src/cli/bin.js`,
config,
initOptions: { bits: 512 }
}, (err, node) => {
expect(err).to.not.exist()
ipfsA = ipfsExec(node.repoPath)
nodes.push(node)
cb()
})
},
(cb) => {
df.spawn({ exec: `./src/cli/bin.js`, config }, (err, node) => {
df.spawn({
exec: `./src/cli/bin.js`,
config,
initOptions: { bits: 512 }
}, (err, node) => {
expect(err).to.not.exist()
node.api.id((err, id) => {
expect(err).to.not.exist()
Expand Down
7 changes: 6 additions & 1 deletion test/core/bitswap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ let nodes = []
function addNode (inProcNode, callback) {
fDaemon.spawn({
exec: './src/cli/bin.js',
initOptions: { bits: 512 },
config: {
Addresses: {
Swarm: [`/ip4/127.0.0.1/tcp/0/ws`]
Expand Down Expand Up @@ -118,7 +119,11 @@ describe('bitswap', function () {
})
}

fInProc.spawn({ exec: IPFS, config: config }, (err, _ipfsd) => {
fInProc.spawn({
exec: IPFS,
config: config,
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
expect(err).to.not.exist()
nodes.push(_ipfsd)
inProcNode = _ipfsd.api
Expand Down
1 change: 1 addition & 0 deletions test/core/bootstrap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('bootstrap', () => {
this.timeout(40 * 1000)
df.spawn({
exec: IPFS,
initOptions: { bits: 512 },
config: {
Addresses: {
Swarm: ['/ip4/127.0.0.1/tcp/0']
Expand Down
2 changes: 2 additions & 0 deletions test/core/files-sharding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('files directory (sharding tests)', () => {

df.spawn({
exec: IPFS,
initOptions: { bits: 512 },
config: {
Addresses: {
Swarm: []
Expand Down Expand Up @@ -86,6 +87,7 @@ describe('files directory (sharding tests)', () => {

df.spawn({
exec: IPFS,
initOptions: { bits: 512 },
args: ['--enable-sharding-experiment'],
config: {
Addresses: {
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/generic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
3 changes: 2 additions & 1 deletion test/core/interface/key.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const IPFS = require('../../../src')
const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create({ type: 'proc', exec: IPFS })
const options = {
args: ['--pass ipfs-is-awesome-software']
args: ['--pass ipfs-is-awesome-software'],
initOptions: { bits: 512 }
}
const nodes = []
const common = {
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
18 changes: 10 additions & 8 deletions test/core/interface/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn({ args: ['--enable-pubsub-experiment'] },
(err, _ipfsd) => {
if (err) {
return cb(err)
}
df.spawn({
initOptions: { bits: 512 },
args: ['--enable-pubsub-experiment']
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}

nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
}
})
},
Expand Down
4 changes: 3 additions & 1 deletion test/core/interface/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 5 additions & 1 deletion test/core/interface/swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ const common = {
config = undefined
}

df.spawn({ repoPath, config }, (err, _ipfsd) => {
df.spawn({
repoPath,
config,
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 5 additions & 1 deletion test/core/kad-dht.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const config = {
}

function createNode (callback) {
f.spawn({ exec: './src/cli/bin.js', config }, callback)
f.spawn({
exec: './src/cli/bin.js',
config,
initOptions: { bits: 512 }
}, callback)
}

describe.skip('verify that kad-dht is doing its thing', () => {
Expand Down
4 changes: 3 additions & 1 deletion test/http-api/interface/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/http-api/interface/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/http-api/interface/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
4 changes: 3 additions & 1 deletion test/http-api/interface/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
3 changes: 2 additions & 1 deletion test/http-api/interface/key.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const parallel = require('async/parallel')
const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create({ exec: 'src/cli/bin.js' })
const options = {
args: ['--pass', 'ipfs-is-awesome-software']
args: ['--pass', 'ipfs-is-awesome-software'],
initOptions: { bits: 512 }
}

const nodes = []
Expand Down
4 changes: 3 additions & 1 deletion test/http-api/interface/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
df.spawn({
initOptions: { bits: 512 }
}, (err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
Loading

0 comments on commit 97fbe18

Please sign in to comment.