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

Use trackerless network #2

Merged
merged 10 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- run: npm run build
- uses: streamr-dev/[email protected]
with:
services-to-start: mysql graph-deploy-streamregistry-subgraph trackers
services-to-start: mysql dev-chain-fast deploy-network-subgraphs-fastchain
- run: npm run test
docker:
needs: test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The GraphQL endpoint is available e.g. at <http://localhost:4001/api>.
Start dependencies:

```
streamr-docker-dev start mysql graph-deploy-streamregistry-subgraph trackers
streamr-docker-dev start mysql dev-chain-fast deploy-network-subgraphs-fastchain
```

```
Expand Down
7 changes: 6 additions & 1 deletion bin/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ import Container from 'typedi'
import { CONFIG_TOKEN, readFromFile } from '../src/Config'
import { Crawler } from '../src/crawler/Crawler'

const getIterationCount = () => {
const arg = process.argv[3]
return (arg !== undefined) ? parseInt(arg) : undefined
}

const main = async () => {
const configFile = process.argv[2]
const config = await readFromFile(configFile)
Container.set(CONFIG_TOKEN, config)
const crawler = Container.get(Crawler)
crawler.start()
crawler.start(getIterationCount())
}

main()
60 changes: 17 additions & 43 deletions config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
},
"crawler": {
"subscribeDuration": 10000,
"newStreamAnalysisDelay": 60000,
"iterationDelay": 3600000
},
"database": {
Expand All @@ -13,48 +14,21 @@
"user": "root",
"password": "password"
},
"trackers": [
{
"id": "0xb9e7cEBF7b03AE26458E32a059488386b05798e8",
"ws": "ws://127.0.0.1:30301",
"http": "http://10.200.10.1:30301"
},
{
"id": "0x0540A3e144cdD81F402e7772C76a5808B71d2d30",
"ws": "ws://10.200.10.1:30302",
"http": "http://10.200.10.1:30302"
},
{
"id": "0xf2C195bE194a2C91e93Eacb1d6d55a00552a85E2",
"ws": "ws://10.200.10.1:30303",
"http": "http://10.200.10.1:30303"
"client": {
"environment": "dev2",
"network": {
"controlLayer": {
"entryPointDiscovery": {
"enabled": false
},
"websocketPortRange": {
"min": 32400,
"max": 32800
},
"iceServers": [],
"webrtcAllowPrivateAddresses": true,
"websocketServerEnableTls": false
}
}
],
"networkNode": {
"id": "0xde444A1825b160D3c14d26950712bfB82e23fB17",
"disconnectionWaitTime": 30000,
"peerPingInterval": 30000,
"newWebrtcConnectionTimeout": 15000,
"webrtcDatachannelBufferThresholdLow": 32768,
"webrtcDatachannelBufferThresholdHigh": 131072,
"iceServers": [],
"rttUpdateTimeout": 15000,
"trackerConnectionMaintenanceInterval": 5000,
"webrtcDisallowPrivateAddresses": false,
"acceptProxyConnections": false,
"trackerPingInterval": 60000
},
"contracts": {
"streamRegistryChainAddress": "0x6cCdd5d866ea766f6DF5965aA98DeCCD629ff222",
"streamRegistryChainRPCs": {
"chainId": 8995,
"rpcs": [
{
"url": "http://10.200.10.1:8546"
}
]
},
"theGraphUrl": "http://10.200.10.1:8000/subgraphs/name/streamr-dev/network-contracts",
"pollInterval": 10000
}
}
}
17 changes: 12 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
module.exports = {
preset: 'ts-jest',
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'node',
modulePathIgnorePatterns: [
'<rootDir>/dist/package.json'
]
}
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.jest.json'
}
]
},
setupFilesAfterEnv: ['jest-extended/all'],
modulePathIgnorePatterns: ['dist']
}
Loading
Loading