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

Commit 7f69628

Browse files
dryajovdaviddias
authored andcommitted
feat: use reduces keysize (#1232)
* feat: use reduces keysize * chore: update deps
1 parent 0f1e00f commit 7f69628

28 files changed

+117
-51
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@
6060
},
6161
"homepage": "https://github.com/ipfs/js-ipfs#readme",
6262
"devDependencies": {
63-
"aegir": "^13.0.0",
63+
"aegir": "^13.0.5",
6464
"buffer-loader": "0.0.1",
6565
"chai": "^4.1.2",
6666
"delay": "^2.0.0",
6767
"detect-node": "^2.0.3",
6868
"dir-compare": "^1.4.0",
6969
"dirty-chai": "^2.0.1",
70-
"eslint-plugin-react": "^7.6.1",
70+
"eslint-plugin-react": "^7.7.0",
7171
"execa": "^0.9.0",
7272
"expose-loader": "^0.7.4",
7373
"form-data": "^2.3.2",
7474
"go-ipfs-dep": "^0.4.13",
7575
"hat": "0.0.3",
7676
"interface-ipfs-core": "~0.52.0",
77-
"ipfsd-ctl": "~0.28.0",
77+
"ipfsd-ctl": "~0.29.0",
7878
"left-pad": "^1.2.0",
7979
"lodash": "^4.17.5",
8080
"mocha": "^5.0.1",
@@ -98,7 +98,7 @@
9898
"byteman": "^1.3.5",
9999
"cids": "~0.5.2",
100100
"debug": "^3.1.0",
101-
"file-type": "^7.5.0",
101+
"file-type": "^7.6.0",
102102
"filesize": "^3.6.0",
103103
"fsm-event": "^2.1.0",
104104
"get-folder-size": "^1.0.1",
@@ -119,7 +119,7 @@
119119
"is-ipfs": "^0.3.2",
120120
"is-stream": "^1.1.0",
121121
"joi": "^13.1.2",
122-
"libp2p": "~0.17.0",
122+
"libp2p": "~0.18.0",
123123
"libp2p-circuit": "~0.1.4",
124124
"libp2p-floodsub": "~0.14.1",
125125
"libp2p-kad-dht": "~0.8.0",
@@ -128,16 +128,16 @@
128128
"libp2p-multiplex": "~0.5.1",
129129
"libp2p-railing": "~0.7.1",
130130
"libp2p-secio": "~0.9.2",
131-
"libp2p-tcp": "~0.11.5",
132-
"libp2p-webrtc-star": "~0.13.3",
133-
"libp2p-websocket-star": "~0.7.6",
134-
"libp2p-websockets": "~0.10.4",
131+
"libp2p-tcp": "~0.11.6",
132+
"libp2p-webrtc-star": "~0.13.4",
133+
"libp2p-websocket-star": "~0.7.7",
134+
"libp2p-websockets": "~0.10.5",
135135
"lodash.flatmap": "^4.5.0",
136136
"lodash.get": "^4.4.2",
137137
"lodash.sortby": "^4.7.0",
138138
"lodash.values": "^4.3.0",
139139
"mafmt": "^4.0.0",
140-
"mime-types": "^2.1.17",
140+
"mime-types": "^2.1.18",
141141
"mkdirp": "~0.5.1",
142142
"multiaddr": "^3.0.2",
143143
"multihashes": "~0.4.13",
@@ -153,9 +153,9 @@
153153
"pull-file": "^1.1.0",
154154
"pull-ndjson": "^0.1.1",
155155
"pull-paramap": "^1.2.2",
156-
"pull-pushable": "^2.1.2",
156+
"pull-pushable": "^2.2.0",
157157
"pull-sort": "^1.0.1",
158-
"pull-stream": "^3.6.1",
158+
"pull-stream": "^3.6.2",
159159
"pull-stream-to-stream": "^1.3.4",
160160
"pull-zip": "^2.0.1",
161161
"read-pkg-up": "^3.0.0",

test/cli/ls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('ls', () => runOnAndOff((thing) => {
3131
// If the daemon is on, ls should search until it hits a timeout
3232
return Promise.race([
3333
ipfs.fail('ls QmYmW4HiZhotsoSqnv2o1oSssvkRM8b9RweBoH7ao5nki2'),
34-
new Promise((res, rej) => setTimeout(res, 4000))
34+
new Promise((resolve, reject) => setTimeout(resolve, 4000))
3535
])
3636
.catch(() => expect.fail(0, 1, 'Should have thrown or timedout'))
3737
})

test/cli/pubsub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('pubsub', function () {
4444
.create({ type: 'proc' })
4545
.spawn({
4646
exec: IPFS,
47+
initOptions: { bits: 512 },
4748
config,
4849
args: ['--enable-pubsub-experiment']
4950
}, (err, _ipfsd) => {
@@ -58,6 +59,7 @@ describe('pubsub', function () {
5859

5960
before((done) => {
6061
df.spawn({
62+
initOptions: { bits: 512 },
6163
args: ['--enable-pubsub-experiment'],
6264
exec: `./src/cli/bin.js`,
6365
config

test/cli/swarm.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,23 @@ describe('swarm', () => {
3636

3737
series([
3838
(cb) => {
39-
df.spawn({ exec: `./src/cli/bin.js`, config }, (err, node) => {
39+
df.spawn({
40+
exec: `./src/cli/bin.js`,
41+
config,
42+
initOptions: { bits: 512 }
43+
}, (err, node) => {
4044
expect(err).to.not.exist()
4145
ipfsA = ipfsExec(node.repoPath)
4246
nodes.push(node)
4347
cb()
4448
})
4549
},
4650
(cb) => {
47-
df.spawn({ exec: `./src/cli/bin.js`, config }, (err, node) => {
51+
df.spawn({
52+
exec: `./src/cli/bin.js`,
53+
config,
54+
initOptions: { bits: 512 }
55+
}, (err, node) => {
4856
expect(err).to.not.exist()
4957
node.api.id((err, id) => {
5058
expect(err).to.not.exist()

test/core/bitswap.spec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ let nodes = []
7070
function addNode (inProcNode, callback) {
7171
fDaemon.spawn({
7272
exec: './src/cli/bin.js',
73+
initOptions: { bits: 512 },
7374
config: {
7475
Addresses: {
7576
Swarm: [`/ip4/127.0.0.1/tcp/0/ws`]
@@ -118,7 +119,11 @@ describe('bitswap', function () {
118119
})
119120
}
120121

121-
fInProc.spawn({ exec: IPFS, config: config }, (err, _ipfsd) => {
122+
fInProc.spawn({
123+
exec: IPFS,
124+
config: config,
125+
initOptions: { bits: 512 }
126+
}, (err, _ipfsd) => {
122127
expect(err).to.not.exist()
123128
nodes.push(_ipfsd)
124129
inProcNode = _ipfsd.api

test/core/bootstrap.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('bootstrap', () => {
2424
this.timeout(40 * 1000)
2525
df.spawn({
2626
exec: IPFS,
27+
initOptions: { bits: 512 },
2728
config: {
2829
Addresses: {
2930
Swarm: ['/ip4/127.0.0.1/tcp/0']

test/core/files-sharding.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ describe('files directory (sharding tests)', () => {
3636

3737
df.spawn({
3838
exec: IPFS,
39+
initOptions: { bits: 512 },
3940
config: {
4041
Addresses: {
4142
Swarm: []
@@ -86,6 +87,7 @@ describe('files directory (sharding tests)', () => {
8687

8788
df.spawn({
8889
exec: IPFS,
90+
initOptions: { bits: 512 },
8991
args: ['--enable-sharding-experiment'],
9092
config: {
9193
Addresses: {

test/core/interface/block.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/bootstrap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/dag.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/files.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/generic.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/key.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const IPFS = require('../../../src')
1010
const DaemonFactory = require('ipfsd-ctl')
1111
const df = DaemonFactory.create({ type: 'proc', exec: IPFS })
1212
const options = {
13-
args: ['--pass ipfs-is-awesome-software']
13+
args: ['--pass ipfs-is-awesome-software'],
14+
initOptions: { bits: 512 }
1415
}
1516
const nodes = []
1617
const common = {

test/core/interface/object.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/pubsub.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn({ args: ['--enable-pubsub-experiment'] },
18-
(err, _ipfsd) => {
19-
if (err) {
20-
return cb(err)
21-
}
17+
df.spawn({
18+
initOptions: { bits: 512 },
19+
args: ['--enable-pubsub-experiment']
20+
}, (err, _ipfsd) => {
21+
if (err) {
22+
return cb(err)
23+
}
2224

23-
nodes.push(_ipfsd)
24-
cb(null, _ipfsd.api)
25-
})
25+
nodes.push(_ipfsd)
26+
cb(null, _ipfsd.api)
27+
})
2628
}
2729
})
2830
},

test/core/interface/stats.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ const common = {
1414
setup: function (callback) {
1515
callback(null, {
1616
spawnNode: (cb) => {
17-
df.spawn((err, _ipfsd) => {
17+
df.spawn({
18+
initOptions: { bits: 512 }
19+
}, (err, _ipfsd) => {
1820
if (err) {
1921
return cb(err)
2022
}

test/core/interface/swarm.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const common = {
2424
config = undefined
2525
}
2626

27-
df.spawn({ repoPath, config }, (err, _ipfsd) => {
27+
df.spawn({
28+
repoPath,
29+
config,
30+
initOptions: { bits: 512 }
31+
}, (err, _ipfsd) => {
2832
if (err) {
2933
return cb(err)
3034
}

test/core/kad-dht.node.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const config = {
2626
}
2727

2828
function createNode (callback) {
29-
f.spawn({ exec: './src/cli/bin.js', config }, callback)
29+
f.spawn({
30+
exec: './src/cli/bin.js',
31+
config,
32+
initOptions: { bits: 512 }
33+
}, callback)
3034
}
3135

3236
describe.skip('verify that kad-dht is doing its thing', () => {

test/http-api/interface/block.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const common = {
1212
setup: function (callback) {
1313
callback(null, {
1414
spawnNode: (cb) => {
15-
df.spawn((err, _ipfsd) => {
15+
df.spawn({
16+
initOptions: { bits: 512 }
17+
}, (err, _ipfsd) => {
1618
if (err) {
1719
return cb(err)
1820
}

test/http-api/interface/bootstrap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const common = {
1212
setup: function (callback) {
1313
callback(null, {
1414
spawnNode: (cb) => {
15-
df.spawn((err, _ipfsd) => {
15+
df.spawn({
16+
initOptions: { bits: 512 }
17+
}, (err, _ipfsd) => {
1618
if (err) {
1719
return cb(err)
1820
}

test/http-api/interface/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const common = {
1212
setup: function (callback) {
1313
callback(null, {
1414
spawnNode: (cb) => {
15-
df.spawn((err, _ipfsd) => {
15+
df.spawn({
16+
initOptions: { bits: 512 }
17+
}, (err, _ipfsd) => {
1618
if (err) {
1719
return cb(err)
1820
}

test/http-api/interface/files.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const common = {
1212
setup: function (callback) {
1313
callback(null, {
1414
spawnNode: (cb) => {
15-
df.spawn((err, _ipfsd) => {
15+
df.spawn({
16+
initOptions: { bits: 512 }
17+
}, (err, _ipfsd) => {
1618
if (err) {
1719
return cb(err)
1820
}

test/http-api/interface/key.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const parallel = require('async/parallel')
88
const DaemonFactory = require('ipfsd-ctl')
99
const df = DaemonFactory.create({ exec: 'src/cli/bin.js' })
1010
const options = {
11-
args: ['--pass', 'ipfs-is-awesome-software']
11+
args: ['--pass', 'ipfs-is-awesome-software'],
12+
initOptions: { bits: 512 }
1213
}
1314

1415
const nodes = []

test/http-api/interface/object.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const common = {
1212
setup: function (callback) {
1313
callback(null, {
1414
spawnNode: (cb) => {
15-
df.spawn((err, _ipfsd) => {
15+
df.spawn({
16+
initOptions: { bits: 512 }
17+
}, (err, _ipfsd) => {
1618
if (err) {
1719
return cb(err)
1820
}

0 commit comments

Comments
 (0)