diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90eea8b..1b46e89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: eth-pm, relay-angular-chat, relay-reactjs-chat, - rln-react-ts, store-reactjs-chat, web-chat ] diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index ca96acb..cc7af3a 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -37,7 +37,6 @@ pipeline { stage('eth-pm') { steps { script { buildExample() } } } stage('relay-angular-chat') { steps { script { buildExample() } } } stage('relay-reactjs-chat') { steps { script { buildExample() } } } - stage('rln-react-ts') { steps { script { buildExample() } } } stage('store-reactjs-chat') { steps { script { buildExample() } } } stage('web-chat') { steps { script { buildExample() } } } } diff --git a/eth-pm/package.json b/eth-pm/package.json index 8791b73..024601a 100644 --- a/eth-pm/package.json +++ b/eth-pm/package.json @@ -10,7 +10,7 @@ "@material-ui/icons": "^4.11.2", "ethers": "5.7.1", "fontsource-roboto": "^4.0.0", - "js-waku": "0.29.0", + "js-waku": "0.30.0", "protobufjs": "^7.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/eth-pm/pnpm-lock.yaml b/eth-pm/pnpm-lock.yaml index e089a4d..a127789 100644 --- a/eth-pm/pnpm-lock.yaml +++ b/eth-pm/pnpm-lock.yaml @@ -14,7 +14,7 @@ specifiers: eslint: ^8.9.0 ethers: 5.7.1 fontsource-roboto: ^4.0.0 - js-waku: 0.29.0 + js-waku: 0.30.0 npm-run-all: ^4.1.5 prettier: ^2.5.1 protobufjs: ^7.1.0 @@ -31,7 +31,7 @@ dependencies: '@material-ui/icons': 4.11.3_upnjamd3tbaukgopcqqdlc7jbm ethers: 5.7.1 fontsource-roboto: 4.0.0 - js-waku: 0.29.0_undici@5.10.0 + js-waku: 0.30.0_undici@5.10.0 protobufjs: 7.1.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -8487,8 +8487,8 @@ packages: /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - /js-waku/0.29.0_undici@5.10.0: - resolution: {integrity: sha512-44GOpNbkFt/1/bDZ3tcaeemehaZaxw404QmTvHw7FUwY6dtvGsDEERLEw1TERUljDESFjvEOcJjYnLcNDY1MHg==} + /js-waku/0.30.0_undici@5.10.0: + resolution: {integrity: sha512-CcPsPXbuIIoaMwRU/jw+U4pVCqRPbt4h/tjpk4skXnlTLTSGDOkfpvQ45Aj5tS0yXgwKdAjOMziV14OwfeZw/w==} engines: {node: '>=16'} dependencies: '@chainsafe/libp2p-gossipsub': 4.1.1_undici@5.10.0 diff --git a/eth-pm/src/waku.ts b/eth-pm/src/waku.ts index 12268d2..b3261ac 100644 --- a/eth-pm/src/waku.ts +++ b/eth-pm/src/waku.ts @@ -5,11 +5,6 @@ import { PrivateMessage, PublicKeyMessage } from "./messaging/wire"; import { validatePublicKeyMessage } from "./crypto"; import { Message } from "./messaging/Messages"; import { equals } from "uint8arrays/equals"; -import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; -import { - getPredefinedBootstrapNodes, - Fleet, -} from "js-waku/lib/predefined_bootstrap_nodes"; import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer"; import { createLightNode } from "js-waku/lib/create_waku"; @@ -17,13 +12,7 @@ export const PublicKeyContentTopic = "/eth-pm/1/public-key/proto"; export const PrivateMessageContentTopic = "/eth-pm/1/private-message/proto"; export async function initWaku(): Promise { - const waku = await createLightNode({ - libp2p: { - peerDiscovery: [ - new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)), - ], - }, - }); + const waku = await createLightNode({ defaultBootstrap: true }); await waku.start(); await waitForRemotePeer(waku, [Protocols.Filter, Protocols.LightPush]); diff --git a/light-js/index.html b/light-js/index.html index 58d6aea..e024d05 100644 --- a/light-js/index.html +++ b/light-js/index.html @@ -22,30 +22,22 @@ - +
- - + +
- +
diff --git a/store-reactjs-chat/package.json b/store-reactjs-chat/package.json index 13797aa..d808529 100644 --- a/store-reactjs-chat/package.json +++ b/store-reactjs-chat/package.json @@ -7,7 +7,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.2.0", "@testing-library/user-event": "^14.1.1", - "js-waku": "0.29.0", + "js-waku": "0.30.0", "protobufjs": "^7.1.0", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/store-reactjs-chat/pnpm-lock.yaml b/store-reactjs-chat/pnpm-lock.yaml index 634d173..ea0a842 100644 --- a/store-reactjs-chat/pnpm-lock.yaml +++ b/store-reactjs-chat/pnpm-lock.yaml @@ -5,7 +5,7 @@ specifiers: '@testing-library/jest-dom': ^5.16.4 '@testing-library/react': ^13.2.0 '@testing-library/user-event': ^14.1.1 - js-waku: 0.29.0 + js-waku: 0.30.0 protobufjs: ^7.1.0 react: ^18.1.0 react-dom: ^18.1.0 @@ -17,7 +17,7 @@ dependencies: '@testing-library/jest-dom': 5.16.5 '@testing-library/react': 13.3.0_biqbaboplfbrettd7655fr4n2y '@testing-library/user-event': 14.4.2_znfriv3ismgf3ybh2woqwlpfea - js-waku: 0.29.0 + js-waku: 0.30.0 protobufjs: 7.1.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -7375,8 +7375,8 @@ packages: /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - /js-waku/0.29.0: - resolution: {integrity: sha512-44GOpNbkFt/1/bDZ3tcaeemehaZaxw404QmTvHw7FUwY6dtvGsDEERLEw1TERUljDESFjvEOcJjYnLcNDY1MHg==} + /js-waku/0.30.0: + resolution: {integrity: sha512-CcPsPXbuIIoaMwRU/jw+U4pVCqRPbt4h/tjpk4skXnlTLTSGDOkfpvQ45Aj5tS0yXgwKdAjOMziV14OwfeZw/w==} engines: {node: '>=16'} dependencies: '@chainsafe/libp2p-gossipsub': 4.1.1 diff --git a/store-reactjs-chat/src/App.js b/store-reactjs-chat/src/App.js index 95a2e7b..9755c0a 100644 --- a/store-reactjs-chat/src/App.js +++ b/store-reactjs-chat/src/App.js @@ -2,11 +2,6 @@ import { utils } from "js-waku"; import * as React from "react"; import protobuf from "protobufjs"; import { createLightNode } from "js-waku/lib/create_waku"; -import { - Fleet, - getPredefinedBootstrapNodes, -} from "js-waku/lib/predefined_bootstrap_nodes"; -import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list"; import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer"; import { DecoderV0 } from "js-waku/lib/waku_message/version_0"; @@ -28,13 +23,7 @@ function App() { setWakuStatus("Starting"); - createLightNode({ - libp2p: { - peerDiscovery: [ - new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)), - ], - }, - }).then((waku) => { + createLightNode({ defaultBootstrap: true }).then((waku) => { waku.start().then(() => { setWaku(waku); setWakuStatus("Connecting"); diff --git a/web-chat/package.json b/web-chat/package.json index 7e5808a..c96c1a8 100644 --- a/web-chat/package.json +++ b/web-chat/package.json @@ -6,7 +6,7 @@ "dependencies": { "@livechat/ui-kit": "^0.5.0-20", "@multiformats/multiaddr": "^10.4.0", - "js-waku": "0.29.0", + "js-waku": "0.30.0", "process": "^0.11.10", "protons-runtime": "^3.1.0", "react": "^17.0.2", diff --git a/web-chat/pnpm-lock.yaml b/web-chat/pnpm-lock.yaml index 2542e48..bdc7d13 100644 --- a/web-chat/pnpm-lock.yaml +++ b/web-chat/pnpm-lock.yaml @@ -9,7 +9,7 @@ specifiers: '@types/react-dom': ^17.0.11 cspell: ^6.0.0 gh-pages: ^4.0.0 - js-waku: 0.29.0 + js-waku: 0.30.0 npm-run-all: ^4.1.5 prettier: ^2.6.2 process: ^0.11.10 @@ -26,7 +26,7 @@ specifiers: dependencies: '@livechat/ui-kit': 0.5.0-20_ibvs32p3vr2bbtbo3dwziny444 '@multiformats/multiaddr': 10.4.0 - js-waku: 0.29.0 + js-waku: 0.30.0 process: 0.11.10 protons-runtime: 3.1.0_uint8arraylist@2.3.2 react: 17.0.2 @@ -8382,8 +8382,8 @@ packages: /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - /js-waku/0.29.0: - resolution: {integrity: sha512-44GOpNbkFt/1/bDZ3tcaeemehaZaxw404QmTvHw7FUwY6dtvGsDEERLEw1TERUljDESFjvEOcJjYnLcNDY1MHg==} + /js-waku/0.30.0: + resolution: {integrity: sha512-CcPsPXbuIIoaMwRU/jw+U4pVCqRPbt4h/tjpk4skXnlTLTSGDOkfpvQ45Aj5tS0yXgwKdAjOMziV14OwfeZw/w==} engines: {node: '>=16'} dependencies: '@chainsafe/libp2p-gossipsub': 4.1.1 diff --git a/web-chat/src/App.tsx b/web-chat/src/App.tsx index 5093a46..e495634 100644 --- a/web-chat/src/App.tsx +++ b/web-chat/src/App.tsx @@ -219,8 +219,7 @@ async function initWaku(setter: (waku: WakuLight) => void) { function selectFleetEnv() { // Works with react-scripts - // TODO: Re-enable the switch once nwaku v0.12 is deployed - if (true || process?.env?.NODE_ENV === "development") { + if (process?.env?.NODE_ENV === "development") { return Fleet.Test; } else { return Fleet.Prod; diff --git a/web-chat/src/Room.tsx b/web-chat/src/Room.tsx index 30dccd7..f95323a 100644 --- a/web-chat/src/Room.tsx +++ b/web-chat/src/Room.tsx @@ -76,7 +76,7 @@ async function handleMessage( message: string, nick: string, commandHandler: (cmd: string) => void, - sender: (wakuMsg: WakuMessage) => Promise + sender: (wakuMsg: Partial) => Promise ) { if (message.startsWith("/")) { commandHandler(message);