From c18f5d3b24329c49a8e46c288b7cf27c35b3add5 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Wed, 31 Jul 2024 10:06:39 +0700 Subject: [PATCH 1/2] Revert "feat: add yamux stream muxer (#5886)" This reverts commit acbedaf14031b8ee74bdeb18f845732479d0ede1. --- packages/beacon-node/package.json | 1 - .../beacon-node/src/network/libp2p/index.ts | 3 +- yarn.lock | 92 +------------------ 3 files changed, 5 insertions(+), 91 deletions(-) diff --git a/packages/beacon-node/package.json b/packages/beacon-node/package.json index dcb5bd2d35a6..f88c2e653cf5 100644 --- a/packages/beacon-node/package.json +++ b/packages/beacon-node/package.json @@ -101,7 +101,6 @@ "@chainsafe/libp2p-gossipsub": "^13.0.0", "@chainsafe/libp2p-identify": "^1.0.0", "@chainsafe/libp2p-noise": "^15.0.0", - "@chainsafe/libp2p-yamux": "^6.0.2", "@chainsafe/persistent-merkle-tree": "^0.7.1", "@chainsafe/prometheus-gc-stats": "^1.0.0", "@chainsafe/ssz": "^0.15.1", diff --git a/packages/beacon-node/src/network/libp2p/index.ts b/packages/beacon-node/src/network/libp2p/index.ts index edd39e09cec7..a0d58033cf2f 100644 --- a/packages/beacon-node/src/network/libp2p/index.ts +++ b/packages/beacon-node/src/network/libp2p/index.ts @@ -10,7 +10,6 @@ import {mplex} from "@libp2p/mplex"; import {prometheusMetrics} from "@libp2p/prometheus-metrics"; import {tcp} from "@libp2p/tcp"; import {noise} from "@chainsafe/libp2p-noise"; -import {yamux} from "@chainsafe/libp2p-yamux"; import {defaultNetworkOptions, NetworkOptions} from "../options.js"; import {Eth2PeerDataStore} from "../peers/datastore.js"; import {Libp2p, LodestarComponents} from "../interface.js"; @@ -86,7 +85,7 @@ export async function createNodeJsLibp2p( }, }), ], - streamMuxers: [yamux({maxInboundStreams: 256}), mplex({maxInboundStreams: 256})], + streamMuxers: [mplex({maxInboundStreams: 256})], peerDiscovery, metrics: nodeJsLibp2pOpts.metrics ? prometheusMetrics({ diff --git a/yarn.lock b/yarn.lock index f41593e92c44..e93fe1218fd7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -484,19 +484,6 @@ uint8arrays "^5.0.0" wherearewe "^2.0.1" -"@chainsafe/libp2p-yamux@^6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@chainsafe/libp2p-yamux/-/libp2p-yamux-6.0.2.tgz#ba94c38ebfe2761d20b0986ff8d832fc05c2ce15" - integrity sha512-S5OkLHqYhEVMQQ4BTgnRANEIbGTQhaC23glCgBwGdeoTRtMpIozwDiPfljFLCm0RYWdCRJw9oFztO95KUHjptA== - dependencies: - "@libp2p/interface" "^1.1.3" - "@libp2p/utils" "^5.2.5" - get-iterator "^2.0.1" - it-foreach "^2.0.6" - it-pipe "^3.0.1" - it-pushable "^3.2.3" - uint8arraylist "^2.4.8" - "@chainsafe/netmask@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@chainsafe/netmask/-/netmask-2.0.0.tgz#0d4a75f47919f65011da4327a3845c9661f1038a" @@ -1591,41 +1578,6 @@ progress-events "^1.0.0" uint8arraylist "^2.4.8" -"@libp2p/interface@^1.1.3": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@libp2p/interface/-/interface-1.2.0.tgz#3b5fdc5d96cffe17a8c88cc29ed78c70516b0a7f" - integrity sha512-ImnGNl3El/AukgaojACT8i9SNW1FOsrThcQU/qA3w5tEBR5p84Uwgzl/nxa4X5vGinItUJ9jLEJmtkQJENoiGQ== - dependencies: - "@multiformats/multiaddr" "^12.2.1" - it-pushable "^3.2.3" - it-stream-types "^2.0.1" - multiformats "^13.1.0" - progress-events "^1.0.0" - uint8arraylist "^2.4.8" - -"@libp2p/interface@^1.2.0", "@libp2p/interface@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@libp2p/interface/-/interface-1.6.1.tgz#dc8f1a49da7ee81cd068e872bde3445c3b631d45" - integrity sha512-bpkIYTvZhGGc/ajITKvgFpaP8UtPWoSj+xHVrj6zyAN8U/cAqN0IQQt4a7daJr5VZa8B86i4d1iccdG42/mz+g== - dependencies: - "@multiformats/multiaddr" "^12.2.3" - it-pushable "^3.2.3" - it-stream-types "^2.0.1" - multiformats "^13.1.0" - progress-events "^1.0.0" - uint8arraylist "^2.4.8" - -"@libp2p/logger@^4.0.10": - version "4.0.17" - resolved "https://registry.yarnpkg.com/@libp2p/logger/-/logger-4.0.17.tgz#1ae663bb2dec3c7e6b29d2195756f64e5e77d939" - integrity sha512-NPGN27uOXFGuKkxnX39InMvxS0lMenq6/aFqQHN1N0f0S3LaG9RuTcz/VE3qyO1Ik1aAockR6qqCwbfFxJuO0g== - dependencies: - "@libp2p/interface" "^1.6.1" - "@multiformats/multiaddr" "^12.2.3" - debug "^4.3.4" - interface-datastore "^8.2.11" - multiformats "^13.1.0" - "@libp2p/logger@^4.0.11", "@libp2p/logger@^4.0.6": version "4.0.11" resolved "https://registry.yarnpkg.com/@libp2p/logger/-/logger-4.0.11.tgz#671692a0cceee73a0c0bf9b5f05ea14fde05f5e5" @@ -1784,27 +1736,6 @@ "@types/sinon" "^17.0.3" stream-to-it "^1.0.0" -"@libp2p/utils@^5.2.5": - version "5.3.1" - resolved "https://registry.yarnpkg.com/@libp2p/utils/-/utils-5.3.1.tgz#1d3ff7e494f78503f33e1c8df4ad4a13209d594b" - integrity sha512-FdGzRU50PJLYSEOmVXqqtq27yjUVXkU4QNRZzMVuXF9L/sKgSC2oXwj0Satc9fHx5tG3MCX1ZOSAmYEIl2fu+w== - dependencies: - "@chainsafe/is-ip" "^2.0.2" - "@libp2p/interface" "^1.2.0" - "@libp2p/logger" "^4.0.10" - "@multiformats/multiaddr" "^12.2.1" - "@multiformats/multiaddr-matcher" "^1.2.0" - delay "^6.0.0" - get-iterator "^2.0.1" - is-loopback-addr "^2.0.2" - it-pushable "^3.2.3" - it-stream-types "^2.0.1" - netmask "^2.0.2" - p-defer "^4.0.1" - race-event "^1.2.0" - race-signal "^1.0.2" - uint8arraylist "^2.4.8" - "@libp2p/utils@^5.3.2": version "5.3.2" resolved "https://registry.yarnpkg.com/@libp2p/utils/-/utils-5.3.2.tgz#044881910350fb22ed0f9db35e6f68f7e8948801" @@ -3801,13 +3732,6 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" -agent-base@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" - integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - dependencies: - debug "^4.3.4" - agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" @@ -7545,15 +7469,7 @@ https-proxy-agent@^7.0.2: agent-base "^7.0.2" debug "4" -https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" - integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== - dependencies: - agent-base "^7.0.2" - debug "4" - -https-proxy-agent@^7.0.4: +https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== @@ -10360,9 +10276,9 @@ p-waterfall@2.1.1: p-reduce "^2.0.0" pac-proxy-agent@^7.0.1: - version "7.0.2" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" - integrity sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg== + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz#6b9ddc002ec3ff0ba5fdf4a8a21d363bcc612d75" + integrity sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A== dependencies: "@tootallnate/quickjs-emscripten" "^0.23.0" agent-base "^7.0.2" From d29066234c261e0b609f6958844b7b543e7b3196 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Wed, 31 Jul 2024 10:08:24 +0700 Subject: [PATCH 2/2] chore: update yarn.lock --- yarn.lock | 56 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/yarn.lock b/yarn.lock index e93fe1218fd7..dd534f93c01a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1847,19 +1847,6 @@ uint8-varint "^2.0.1" uint8arrays "^5.0.0" -"@multiformats/multiaddr@^12.2.3": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@multiformats/multiaddr/-/multiaddr-12.3.0.tgz#b1422813446e5cdec4b0f6cba51f93239f390884" - integrity sha512-JQ8Gc/jgucqqvEaDTFN/AvxlYDHEE7lgEWLMYW7hKZkWggER+GvG/tVxUgUxIP8M0vFpvEHKKHE0lKzyMsgi8Q== - dependencies: - "@chainsafe/is-ip" "^2.0.1" - "@chainsafe/netmask" "^2.0.0" - "@libp2p/interface" "^1.0.0" - "@multiformats/dns" "^1.0.3" - multiformats "^13.0.0" - uint8-varint "^2.0.1" - uint8arrays "^5.0.0" - "@napi-rs/snappy-android-arm-eabi@7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@napi-rs/snappy-android-arm-eabi/-/snappy-android-arm-eabi-7.2.2.tgz#85fee3ba198dad4b444b5f12bceebcf72db0d65e" @@ -3732,6 +3719,13 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" +agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" @@ -7477,6 +7471,14 @@ https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.4: agent-base "^7.0.2" debug "4" +https-proxy-agent@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -10285,9 +10287,9 @@ pac-proxy-agent@^7.0.1: debug "^4.3.4" get-uri "^6.0.1" http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.5" - pac-resolver "^7.0.1" - socks-proxy-agent "^8.0.4" + https-proxy-agent "^7.0.2" + pac-resolver "^7.0.0" + socks-proxy-agent "^8.0.2" pac-resolver@^7.0.1: version "7.0.1" @@ -11879,7 +11881,16 @@ string-argv@~0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -13514,7 +13525,16 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==