Skip to content

Commit

Permalink
Revert "update libp2p to latest version (#2493)"
Browse files Browse the repository at this point in the history
This reverts commit e415dde.
  • Loading branch information
zeroxbt committed Jul 14, 2023
1 parent a4aecd1 commit ac22e9d
Show file tree
Hide file tree
Showing 14 changed files with 4,225 additions and 7,209 deletions.
55 changes: 50 additions & 5 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,21 @@
"package": "./network/implementation/libp2p-service.js",
"config": {
"dht": {
"kBucketSize": 20
"kBucketSize": 20,
"type": "dual"
},
"connectionManager": {
"autoDial": true,
"autoDialInterval": 10e3,
"dialTimeout": 2e3
},
"peerRouting": {
"refreshManager": {
"enabled": true,
"interval": 6e5,
"bootDelay": 2e3
}
},
"connectionManager": { "dialTimeout": 5e3 },
"port": 9100,
"bootstrap": []
}
Expand Down Expand Up @@ -214,7 +226,18 @@
"dht": {
"kBucketSize": 20
},
"connectionManager": { "dialTimeout": 5e3 },
"connectionManager": {
"autoDial": true,
"autoDialInterval": 10e3,
"dialTimeout": 2e3
},
"peerRouting": {
"refreshManager": {
"enabled": true,
"interval": 6e5,
"bootDelay": 2e3
}
},
"port": 9000,
"bootstrap": [
"/ip4/0.0.0.0/tcp/9000/p2p/QmWyf3dtqJnhuCpzEDTNmNFYc5tjxTrXhGcUUmGHdg2gtj"
Expand Down Expand Up @@ -319,7 +342,18 @@
"dht": {
"kBucketSize": 20
},
"connectionManager": { "dialTimeout": 5e3 },
"connectionManager": {
"autoDial": true,
"autoDialInterval": 10e3,
"dialTimeout": 2e3
},
"peerRouting": {
"refreshManager": {
"enabled": true,
"interval": 6e5,
"bootDelay": 2e3
}
},
"port": 9000,
"bootstrap": [
"/ip4/164.92.138.30/tcp/9000/p2p/QmbiZQm18JefDizrQwbRhPgkaLykTLyrUEpeMWuKJHXuUM",
Expand Down Expand Up @@ -455,7 +489,18 @@
"dht": {
"kBucketSize": 20
},
"connectionManager": { "dialTimeout": 5e3 },
"connectionManager": {
"autoDial": true,
"autoDialInterval": 10e3,
"dialTimeout": 2e3
},
"peerRouting": {
"refreshManager": {
"enabled": true,
"interval": 6e5,
"bootDelay": 2e3
}
},
"port": 9000,
"bootstrap": [
"/ip4/157.230.96.194/tcp/9000/p2p/QmZFcns6eGUosD96beHyevKu1jGJ1bA56Reg2f1J4q59Jt",
Expand Down
85 changes: 40 additions & 45 deletions dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@

## dependencies

##### [@libp2p/noise](https://www.npmjs.com/package/@libp2p/noise)

- **version**: ^4.0.0
- **description**: used for libp2p message encription

##### [@comunica/query-sparql](https://www.npmjs.com/package/@comunica/query-sparql)

- **version**: ^2.4.3
Expand All @@ -94,16 +89,6 @@
- **version**: ^5.7.0
- **description**: Used for creating substrate and evm accounts mapping signatures in `create-account-mapping-signature.js`

##### [@libp2p/bootstrap](https://www.npmjs.com/package/@libp2p/bootstrap)

- **version**: ^8.0.0
- **description**: used to define libp2p bootstrap nodes

##### [@libp2p/crypto](https://www.npmjs.com/package/@libp2p/crypto)

- **version**: ^1.0.17
- **description**: used to create libp2p keys

##### [@polkadot/api](https://www.npmjs.com/package/@polkadot/api)

- **version**: ^9.3.2
Expand All @@ -124,31 +109,6 @@
- **version**: ^10.1.7
- **description**: Used for creating substrate and evm accounts mapping signatures in `create-account-mapping-signature.js`

##### [@libp2p/kad-dht](https://www.npmjs.com/package/@libp2p/kad-dht)

- **version**: ^9.3.3
- **description**: used for libp2p kad dht initialisation

##### [@libp2p/mplex](https://www.npmjs.com/package/@libp2p/mplex)

- **version**: ^8.0.1
- **description**: used for libp2p mplex initialisation

##### [@libp2p/peer-id](https://www.npmjs.com/package/@libp2p/peer-id)

- **version**: ^2.0.3
- **description**: used to create libp2p peer ids from string

##### [@libp2p/peer-id-factory](https://www.npmjs.com/package/@libp2p/peer-id-factory)

- **version**: ^2.0.3
- **description**: used to create and parse libp2p keys

##### [@libp2p/tcp](https://www.npmjs.com/package/@libp2p/tcp)

- **version**: ^7.0.1
- **description**: used for libp2p tcp communication

##### [app-root-path](https://www.npmjs.com/package/app-root-path)

- **version**: ^3.1.0
Expand Down Expand Up @@ -236,17 +196,17 @@

##### [it-length-prefixed](https://www.npmjs.com/package/it-length-prefixed)

- **version**: ^9.0.1
- **version**: ^5.0.3
- **description**: used to encode and decode streamed buffers in libp2p

##### [it-map](https://www.npmjs.com/package/it-map)

- **version**: ^3.0.3
- **version**: ^1.0.6
- **description**: used to map values received yielded by libp2p async iterators

##### [it-pipe](https://www.npmjs.com/package/it-pipe)

- **version**: ^3.0.1
- **version**: ^1.1.0
- **description**: stream pipeline that supports libp2p duplex streams. Used for streaming messages between nodes

##### [jsonld](https://www.npmjs.com/package/jsonld)
Expand All @@ -266,9 +226,34 @@

##### [libp2p](https://www.npmjs.com/package/libp2p)

- **version**: ^0.45.0
- **version**: ^0.32.4
- **description**: used for p2p network communication

##### [libp2p-bootstrap](https://www.npmjs.com/package/libp2p-bootstrap)

- **version**: ^0.13.0
- **description**: used to define libp2p bootstrap nodes

##### [libp2p-kad-dht](https://www.npmjs.com/package/libp2p-kad-dht)

- **version**: ^0.24.2
- **description**: used for libp2p kad dht initialisation

##### [libp2p-mplex](https://www.npmjs.com/package/libp2p-mplex)

- **version**: ^0.10.7
- **description**: used for libp2p mplex initialisation

##### [libp2p-noise](https://www.npmjs.com/package/libp2p-noise)

- **version**: ^4.0.0
- **description**: used for libp2p message encription

##### [libp2p-tcp](https://www.npmjs.com/package/libp2p-tcp)

- **version**: ^0.17.2
- **description**: used for libp2p tcp communication

##### [minimist](https://www.npmjs.com/package/minimist)

- **version**: ^1.2.7
Expand All @@ -284,6 +269,11 @@
- **version**: ^3.3.0
- **description**:

##### [peer-id](https://www.npmjs.com/package/peer-id)

- **version**: ^0.15.3
- **description**: used to create network id

##### [pino](https://www.npmjs.com/package/pino)

- **version**: ^8.4.2
Expand Down Expand Up @@ -314,14 +304,19 @@
- **version**: ^6.29.0
- **description**: used to communicate with sql repository

##### [timeout-abort-controller](https://www.npmjs.com/package/timeout-abort-controller)

- **version**: ^3.0.0
- **description**: timeout network messages

##### [toobusy-js](https://www.npmjs.com/package/toobusy-js)

- **version**: ^0.5.1
- **description**: used to check nodejs event loop lag

##### [uint8arrays](https://www.npmjs.com/package/uint8arrays)

- **version**: ^4.0.3
- **version**: ^3.1.0
- **description**: used to convert from string to buffer and from buffer to string

##### [umzug](https://www.npmjs.com/package/umzug)
Expand Down
2 changes: 1 addition & 1 deletion ot-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class OTNode {
if (!(await blockchainModuleManager.identityIdExists(blockchain))) {
this.logger.info(`Creating profile on network: ${blockchain}`);
const networkModuleManager = this.container.resolve('networkModuleManager');
const peerId = networkModuleManager.getPeerIdString();
const peerId = networkModuleManager.getPeerId().toB58String();
await blockchainModuleManager.createProfile(blockchain, peerId);

if (
Expand Down
Loading

0 comments on commit ac22e9d

Please sign in to comment.