diff --git a/.gitignore b/.gitignore index 5d53f0ebd..a8ecef543 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ rln *.log +package-lock.json +node_modules/ diff --git a/.gitmodules b/.gitmodules index 7341d7df2..1b005cb05 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ path = vendor/nim-libp2p url = https://github.com/status-im/nim-libp2p.git ignore = dirty - branch = unstable + branch = master [submodule "vendor/nim-stew"] path = vendor/nim-stew url = https://github.com/status-im/nim-stew.git diff --git a/.update.timestamp b/.update.timestamp index 48f7491a7..377fe2378 100644 --- a/.update.timestamp +++ b/.update.timestamp @@ -1 +1 @@ -1615918720 \ No newline at end of file +1615971147 \ No newline at end of file diff --git a/examples/v1/example.nim b/examples/v1/example.nim index 7a90d4526..9121adab9 100644 --- a/examples/v1/example.nim +++ b/examples/v1/example.nim @@ -33,7 +33,7 @@ let # Create Ethereum Node var node = newEthereumNode(config.nodekey, # Node identifier address, # Address reachable for incoming requests - 1, # Network Id, only applicable for ETH protocol + NetworkId(1), # Network Id, only applicable for ETH protocol nil, # Database, not required for Waku clientId, # Client id string addAllCapabilities = false, # Disable default all RLPx capabilities diff --git a/tests/test_helpers.nim b/tests/test_helpers.nim index 23cc9e950..ad745d19c 100644 --- a/tests/test_helpers.nim +++ b/tests/test_helpers.nim @@ -15,7 +15,7 @@ proc setupTestNode*( rng: ref BrHmacDrbgContext, capabilities: varargs[ProtocolInfo, `protocolInfo`]): EthereumNode = let keys1 = keys.KeyPair.random(rng[]) - result = newEthereumNode(keys1, localAddress(nextPort), 1, nil, + result = newEthereumNode(keys1, localAddress(nextPort), NetworkId(1), nil, addAllCapabilities = false, rng = rng) nextPort.inc for capability in capabilities: diff --git a/tests/v1/test_rpc_waku.nim b/tests/v1/test_rpc_waku.nim index 02584582e..761a40d4e 100644 --- a/tests/v1/test_rpc_waku.nim +++ b/tests/v1/test_rpc_waku.nim @@ -20,7 +20,7 @@ proc setupNode(capabilities: varargs[ProtocolInfo, `protocolInfo`], srvAddress = Address(ip: parseIpAddress("0.0.0.0"), tcpPort: Port(30303), udpPort: Port(30303)) - result = newEthereumNode(keypair, srvAddress, 1, nil, "waku test rpc", + result = newEthereumNode(keypair, srvAddress, NetworkId(1), nil, "waku test rpc", addAllCapabilities = false, rng = rng) for capability in capabilities: result.addCapability capability diff --git a/tests/v2/test_jsonrpc_waku.nim b/tests/v2/test_jsonrpc_waku.nim index ead70da12..bc753eb4c 100644 --- a/tests/v2/test_jsonrpc_waku.nim +++ b/tests/v2/test_jsonrpc_waku.nim @@ -206,7 +206,7 @@ procSuite "Waku v2 JSON-RPC API": asyncTest "Store API: retrieve historical messages": waitFor node.start() - node.mountRelay(@[defaultTopic]) + node.mountRelay() # RPC server setup let @@ -231,6 +231,7 @@ procSuite "Waku v2 JSON-RPC API": node.wakuStore.setPeer(listenSwitch.peerInfo) + listenSwitch.mount(node.wakuRelay) listenSwitch.mount(node.wakuStore) var subscriptions = newTable[string, MessageNotificationSubscription]() diff --git a/waku/common/wakubridge.nim b/waku/common/wakubridge.nim index 1dc8e9f2a..a97ca5d4a 100644 --- a/waku/common/wakubridge.nim +++ b/waku/common/wakubridge.nim @@ -42,7 +42,7 @@ proc startWakuV1(config: WakuNodeConf, rng: ref BrHmacDrbgContext): udpPort: Port(config.udpPort + config.portsShift)) # Set-up node - var node = newEthereumNode(config.nodekeyv1, address, 1, nil, clientIdV1, + var node = newEthereumNode(config.nodekeyv1, address, NetworkId(1), nil, clientIdV1, addAllCapabilities = false, rng = rng) node.addCapability Waku # Always enable Waku protocol # Set up the Waku configuration. diff --git a/waku/v1/node/wakunode1.nim b/waku/v1/node/wakunode1.nim index b084b71e2..a98163f3b 100644 --- a/waku/v1/node/wakunode1.nim +++ b/waku/v1/node/wakunode1.nim @@ -27,7 +27,7 @@ proc run(config: WakuNodeConf, rng: ref BrHmacDrbgContext) = udpPort: Port(config.udpPort + config.portsShift)) # Set-up node - var node = newEthereumNode(config.nodekey, address, 1, nil, clientId, + var node = newEthereumNode(config.nodekey, address, NetworkId(1), nil, clientId, addAllCapabilities = false, rng = rng) if not config.bootnodeOnly: node.addCapability Waku # Always enable Waku protocol