Skip to content

Commit 8a5bc51

Browse files
committed
use trackerless-network
1 parent e5481b1 commit 8a5bc51

22 files changed

+5024
-13080
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- run: npm run build
2525
- uses: streamr-dev/[email protected]
2626
with:
27-
services-to-start: mysql graph-deploy-streamregistry-subgraph trackers
27+
services-to-start: mysql dev-chain-fast deploy-network-subgraphs-fastchain
2828
- run: npm run test
2929
docker:
3030
needs: test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The GraphQL endpoint is available e.g. at <http://localhost:4001/api>.
2929
Start dependencies:
3030

3131
```
32-
streamr-docker-dev start mysql graph-deploy-streamregistry-subgraph trackers
32+
streamr-docker-dev start mysql dev-chain-fast deploy-network-subgraphs-fastchain
3333
```
3434

3535
```

bin/crawler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ import Container from 'typedi'
66
import { CONFIG_TOKEN, readFromFile } from '../src/Config'
77
import { Crawler } from '../src/crawler/Crawler'
88

9+
const getIterationCount = () => {
10+
const arg = process.argv[3]
11+
return (arg !== undefined) ? parseInt(arg) : undefined
12+
}
13+
914
const main = async () => {
1015
const configFile = process.argv[2]
1116
const config = await readFromFile(configFile)
1217
Container.set(CONFIG_TOKEN, config)
1318
const crawler = Container.get(Crawler)
14-
crawler.start()
19+
crawler.start(getIterationCount())
1520
}
1621

1722
main()

config/development.json

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
},
66
"crawler": {
77
"subscribeDuration": 10000,
8+
"newStreamAnalysisDelay": 60000,
89
"iterationDelay": 3600000
910
},
1011
"database": {
@@ -13,48 +14,21 @@
1314
"user": "root",
1415
"password": "password"
1516
},
16-
"trackers": [
17-
{
18-
"id": "0xb9e7cEBF7b03AE26458E32a059488386b05798e8",
19-
"ws": "ws://127.0.0.1:30301",
20-
"http": "http://10.200.10.1:30301"
21-
},
22-
{
23-
"id": "0x0540A3e144cdD81F402e7772C76a5808B71d2d30",
24-
"ws": "ws://10.200.10.1:30302",
25-
"http": "http://10.200.10.1:30302"
26-
},
27-
{
28-
"id": "0xf2C195bE194a2C91e93Eacb1d6d55a00552a85E2",
29-
"ws": "ws://10.200.10.1:30303",
30-
"http": "http://10.200.10.1:30303"
17+
"client": {
18+
"environment": "dev2",
19+
"network": {
20+
"controlLayer": {
21+
"entryPointDiscovery": {
22+
"enabled": false
23+
},
24+
"websocketPortRange": {
25+
"min": 32400,
26+
"max": 32800
27+
},
28+
"iceServers": [],
29+
"webrtcAllowPrivateAddresses": true,
30+
"websocketServerEnableTls": false
31+
}
3132
}
32-
],
33-
"networkNode": {
34-
"id": "0xde444A1825b160D3c14d26950712bfB82e23fB17",
35-
"disconnectionWaitTime": 30000,
36-
"peerPingInterval": 30000,
37-
"newWebrtcConnectionTimeout": 15000,
38-
"webrtcDatachannelBufferThresholdLow": 32768,
39-
"webrtcDatachannelBufferThresholdHigh": 131072,
40-
"iceServers": [],
41-
"rttUpdateTimeout": 15000,
42-
"trackerConnectionMaintenanceInterval": 5000,
43-
"webrtcDisallowPrivateAddresses": false,
44-
"acceptProxyConnections": false,
45-
"trackerPingInterval": 60000
46-
},
47-
"contracts": {
48-
"streamRegistryChainAddress": "0x6cCdd5d866ea766f6DF5965aA98DeCCD629ff222",
49-
"streamRegistryChainRPCs": {
50-
"chainId": 8995,
51-
"rpcs": [
52-
{
53-
"url": "http://10.200.10.1:8546"
54-
}
55-
]
56-
},
57-
"theGraphUrl": "http://10.200.10.1:8000/subgraphs/name/streamr-dev/network-contracts",
58-
"pollInterval": 10000
5933
}
6034
}

jest.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
module.exports = {
2-
preset: 'ts-jest',
2+
preset: 'ts-jest/presets/js-with-ts',
33
testEnvironment: 'node',
4-
modulePathIgnorePatterns: [
5-
'<rootDir>/dist/package.json'
6-
]
4+
transform: {
5+
'^.+\\.ts$': [
6+
'ts-jest',
7+
{
8+
tsconfig: 'tsconfig.jest.json'
9+
}
10+
]
11+
},
12+
setupFilesAfterEnv: ['jest-extended/all'],
13+
modulePathIgnorePatterns: ['dist']
714
}

0 commit comments

Comments
 (0)