#StackBounty: #go-ethereum #whisper #message Whisper: How to send a message from one node to another that is located on different host?

Bounty: 100

  • geth version: 1.8.15-unstable
  • Python: 3.5
  • OS: osx/linux

I have followed this answer.

On the answer’s approach, I observe that each node can only send message to itself and other nodes don’t filter/see those messages. For example, when node-1 sends a message to the network; it won’t show up on the node-2 such that node-2’s web3.shh.info{memory} remains 0, where I assume that it never catches the message.


I have tried using Web3.js and Web3.py where sent message on Node_1 does not show up on Node_2.

=> This is as far as I came by using Web3.js:

The way I start geth, please note that one of the node started with --nodiscover flag, I am not sure that will affect or not:

geth --syncmode fast --cache=1024 --shh --datadir $DATADIR/private  --rpcaddr 127.0.0.1 --rpc --rpcport 8545 --rpccorsdomain="*" --networkid 12345 --rpcapi admin,eth,net,web3,debug,personal,shh

On node-1’s geth-client:

generatedSymKey=shh.generateSymKeyFromPassword("hello");    
symKey=shh.getSymKey(generatedSymKey)    
symKeyID=shh.addSymKey(symKey) //ex: "d5212e736703afbb21246e8acd192e4345ea910398544d765ed6b49f0ec524b5"
filter = web3.shh.newMessageFilter(
        {symKeyID: symKeyID, topic: '0x07678231'}, 
        function(err, res) {console.log(web3.toUtf8(res.payload))});

On node-2’s geth-client:

generatedSymKey=shh.generateSymKeyFromPassword("hello")    
symKey=shh.getSymKey(generatedSymKey)    
symKeyID=shh.addSymKey(symKey) //ex: "c4c4cecf6ad9499c2386b8ce6416f44684e042e491726b38315646c0b4afadc6"
filter = web3.shh.newMessageFilter(
        {symKeyID: symKeyID, topic: '0x07678231'}, 
        function(err, res) {console.log(web3.toUtf8(res.payload))});

Then, node-1 sends message to the network, where only node-1 receives it but node-2 does not.

Following code is run on node-1's geth-client:

node-1’s symKeyID is given:

web3.shh.post({
  symKeyID: 'd5212e736703afbb21246e8acd192e4345ea910398544d765ed6b49f0ec524b5', //symKeyID of the node-1
  ttl: 10,
  topic: '0x07678231',
  powTarget: 2.01,
  powTime: 2,
  payload: web3.fromAscii("Hello there!")
  });

=> This is as far as I came by using Web3.py:

Node_1 runs shh_filter.get_new_entries()
in order to catch messages but len(received_messages) returns 0, where there is no message is received and web3.shh.info{memory} remains 0.

On node-1:

from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545'))
from web3.shh import Shh
Shh.attach(web3, "shh")

import time, sys;

from hexbytes import (
    HexBytes,
)

receiver = web3.shh.newKeyPair()
receiver_pub = web3.shh.getPublicKey(receiver)
print('receiverPubK: ' + receiver_pub);

topic = '0x07678231'

shh_filter = web3.shh.newMessageFilter({
    'privateKeyID': receiver,
    'topics': [topic]
})

input("Press Enter to continue...");

received_messages = [];
received_messages = shh_filter.get_new_entries()
print(len(received_messages)) # Returns '0'
print(web3.shh.info.memory) # Returns '0'

Output:

receiverPubK: 0x04226d96bf9857ac0ba429c1e8b480a2811ce47cb526dbd3829d7586e5cae740198ba291f3eca0f279f82db8a136be90ea9ec629ed6cd1d45cc7f873159811757d
Press Enter to continue...

After Node_1‘s messages are sent; I have copied printed receiverPublicKey into receiver_pub variable on the following code. I run following code on Node 2. Node 2 sends a message to the network. Later I press enter on the Node_1 and any of those messages does not show up on theNode_1:

On node-2:

from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545'))
from web3.shh import Shh
Shh.attach(web3, "shh")

import time, sys;

from hexbytes import (
    HexBytes,
)

receiver_pub='0x04226d96bf9857ac0ba429c1e8b480a2811ce47cb526dbd3829d7586e5cae740198ba291f3eca0f279f82db8a136be90ea9ec629ed6cd1'; # obtained from node_1 and assigned here.

topic = '0x07678231'
payloads = [web3.toHex(text="test message :)"), web3.toHex(text="2nd test message")]

web3.shh.post({
        'powTarget': 2.5,
        'powTime': 2,
        'ttl': 60,
        'payload': payloads[0],
        'pubKey': receiver_pub
})
time.sleep(1)

web3.shh.post({
        'powTarget': 2.5,
        'powTime': 2,
        'ttl': 60,
        'payload': payloads[1],
        'topic': topic,
        'pubKey': receiver_pub
})

[Q] How could I send a whisper message from one node to another? What do I do wrong on my approaches?


Please note that, I have opened issue on Web3.py and go-ethereum but no one responded.


Get this bounty!!!

#StackBounty: #go-ethereum #whisper #message Whisper: How to send a message from one node to another?

Bounty: 100

  • geth version: 1.8.15-unstable
  • Python: 3.5
  • OS: osx/linux

I have followed this answer.

On the answer’s approach, I observe that each node can only send message to itself and other nodes don’t filter/see those messages. For example, when node-1 sends a message to the network; it won’t show up on the node-2 such that node-2’s web3.shh.info{memory} remains 0, where I assume that it never catches the message.


I have tried using Web3.js and Web3.py where sent message on Node_1 does not show up on Node_2.

=> This is as far as I came by using Web3.js:

On node-1’s geth-client:

generatedSymKey=shh.generateSymKeyFromPassword("hello");    
symKey=shh.getSymKey(generatedSymKey)    
symKeyID=shh.addSymKey(symKey) //ex: "d5212e736703afbb21246e8acd192e4345ea910398544d765ed6b49f0ec524b5"
filter = web3.shh.newMessageFilter(
        {symKeyID: symKeyID, topic: '0x07678231'}, 
        function(err, res) {console.log(web3.toUtf8(res.payload))});

On node-2’s geth-client:

generatedSymKey=shh.generateSymKeyFromPassword("hello")    
symKey=shh.getSymKey(generatedSymKey)    
symKeyID=shh.addSymKey(symKey) //ex: "c4c4cecf6ad9499c2386b8ce6416f44684e042e491726b38315646c0b4afadc6"
filter = web3.shh.newMessageFilter(
        {symKeyID: symKeyID, topic: '0x07678231'}, 
        function(err, res) {console.log(web3.toUtf8(res.payload))});

Then, node-1 sends message to the network, where only node-1 receives it but node-2 does not.

Following code is run on node-1's geth-client:

node-1’s symKeyID is given:

web3.shh.post({
  symKeyID: 'd5212e736703afbb21246e8acd192e4345ea910398544d765ed6b49f0ec524b5', //symKeyID of the node-1
  ttl: 10,
  topic: '0x07678231',
  powTarget: 2.01,
  powTime: 2,
  payload: web3.fromAscii("Hello there!")
  });

=> This is as far as I came by using Web3.py:

Node_1 runs shh_filter.get_new_entries()
in order to catch messages but len(received_messages) returns 0, where there is no message is received and web3.shh.info{memory} remains 0.

On node-1:

from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545'))
from web3.shh import Shh
Shh.attach(web3, "shh")

import time, sys;

from hexbytes import (
    HexBytes,
)

receiver = web3.shh.newKeyPair()
receiver_pub = web3.shh.getPublicKey(receiver)
print('receiverPubK: ' + receiver_pub);

topic = '0x07678231'

shh_filter = web3.shh.newMessageFilter({
    'privateKeyID': receiver,
    'topics': [topic]
})

input("Press Enter to continue...");

received_messages = [];
received_messages = shh_filter.get_new_entries()
print(len(received_messages)) # Returns '0'
print(web3.shh.info.memory) # Returns '0'

Output:

receiverPubK: 0x04226d96bf9857ac0ba429c1e8b480a2811ce47cb526dbd3829d7586e5cae740198ba291f3eca0f279f82db8a136be90ea9ec629ed6cd1d45cc7f873159811757d
Press Enter to continue...

After Node_1‘s messages are sent; I have copied printed receiverPublicKey into receiver_pub variable on the following code. I run following code on Node 2. Node 2 sends a message to the network. Later I press enter on the Node_1 and any of those messages does not show up on theNode_1:

On node-2:

from web3 import Web3, HTTPProvider
web3 = Web3(HTTPProvider('http://localhost:8545'))
from web3.shh import Shh
Shh.attach(web3, "shh")

import time, sys;

from hexbytes import (
    HexBytes,
)

receiver_pub='0x04226d96bf9857ac0ba429c1e8b480a2811ce47cb526dbd3829d7586e5cae740198ba291f3eca0f279f82db8a136be90ea9ec629ed6cd1'; # obtained from node_1 and assigned here.

topic = '0x07678231'
payloads = [web3.toHex(text="test message :)"), web3.toHex(text="2nd test message")]

web3.shh.post({
        'powTarget': 2.5,
        'powTime': 2,
        'ttl': 60,
        'payload': payloads[0],
        'pubKey': receiver_pub
})
time.sleep(1)

web3.shh.post({
        'powTarget': 2.5,
        'powTime': 2,
        'ttl': 60,
        'payload': payloads[1],
        'topic': topic,
        'pubKey': receiver_pub
})

[Q] How could I send a whisper message from one node to another? What do I do wrong on my approaches?


Get this bounty!!!

#StackBounty: #go-ethereum #poa #clique How to immediately include transactions into blocks if there is still space?

Bounty: 50

  • Geth version: 1.8.12-stable
  • OS & Version: Linux/OSX

Expected Behavior

Transactions to distributed to network right at its sent block number and deployed within that.


Actual Behavior

Transactions are delayed one block time to be distributed over network and consequently deployed one block time late.


Explanation

I have a small cluster that is connected to private Ethereum chain that uses POA and block time is fixed 15 seconds. The cluster has four nodes that all nodes are connected to each other. Please note that, there is three signer nodes on my cluster.

When I submit a transaction from a node; the transaction does not reach to all signer nodes on the current block but it is transferred onto the next block. But, I observe that the sent transaction was received by the non-signer node right after it is sent.

For example; when I sent a transaction within the current block, it will not deployed on the current block but on the up coming block. So this forces network to deploy a transaction in 2 block time which is in between 15 seconds to 30 seconds.


Example case:
alper@home is non-signer node and other nodes are signer node.

I sent a transaction within block number 869,334 from node named eBloc@netlab (signer-node) and transaction shows up right after at alper@home named node (non-signer node) on block number 869,334 but it does not show up on the signer nodes even on the node that I sent it from.

enter image description here

On the next block (869,335) I observe that all nodes receive the transactions.

enter image description here

And finally on block number (869,336) the transaction is deployed.

enter image description here

=> If the transaction was distributed to all cluster right after it sent it should be deployed on the block number (869,334) but it used 1 additional block time for this.

[Q1] Why the sent transaction received by the non-signer nodes right after it is sent but not by the signer nodes?

[Q2] Is this normal that the sent transaction won’t transfer to all the network right after it is sent but it takes additional 1 block time even all nodes are connected to each other? Is there any way to force to transfer a transaction to all my signer nodes right after it has been sent?


Get this bounty!!!

#StackBounty: #go-ethereum #poa #clique How to force a transaction to be transferred to the signer nodes right after it is sent to the …

Bounty: 50

I have a small cluster that is connected to private Ethereum chain that uses POA and block time is fixed 15 seconds. The cluster has four nodes that all nodes are connected to each other. Please note that, there is three signer nodes on my cluster.

When I submit a transaction from a node; the transaction does not reach to all signer nodes on the current block but it is transferred onto the next block. But, I observe that the sent transaction was received by the non-signer node right after it is sent.

For example; when I sent a transaction within the current block, it will not deployed on the current block but on the up coming block. So this forces network to deploy a transaction in 2 block time which is in between 15 seconds to 30 seconds.


Example case:
alper@home is non-signer node and other nodes are signer node.

I sent a transaction within block number 869,334 from node named eBloc@netlab (signer-node) and transaction shows up right after at alper@home named node (non-signer node) on block number 869,334 but it does not show up on the signer nodes even on the node that I sent it from.

enter image description here

On the next block (869,335) I observe that all nodes receive the transactions.

enter image description here

And finally on block number (869,336) the transaction is deployed.

enter image description here

=> If the transaction was distributed to all cluster right after it sent it should be deployed on the block number (869,334) but it used 1 additional block time for this.

[Q1] Why the sent transaction received by the non-signer nodes right after it is sent but not by the signer nodes?

[Q2] Is this normal that the sent transaction won’t transfer to all the network right after it is sent but it takes additional 1 block time even all nodes are connected to each other? Is there any way to force to transfer a transaction to all my signer nodes right after it has been sent?


Get this bounty!!!

#StackBounty: #go-ethereum How to force a transaction to be transferred to the signer nodes right after it is sent to the network?

Bounty: 50

I have a small cluster that is connected to private Ethereum chain that uses POA and block time is fixed 15 seconds. The cluster has four nodes that all nodes are connected to each other. Please note that, there is three signer nodes on my cluster.

When I submit a transaction from a node; the transaction does not reach to all signer nodes on the current block but it is transferred onto the next block. But, I observe that the sent transaction was received by the non-signer node right after it is sent.

For example; when I sent a transaction within the current block, it will not deployed on the current block but on the up coming block. So this forces network to deploy a transaction in 2 block time which is in between 15 seconds to 30 seconds.


Example case:
alper@home is non-signer node and other nodes are signer node.

I sent a transaction within block number 869,334 from node named eBloc@netlab (signer-node) and transaction shows up right after at alper@home named node (non-signer node) on block number 869,334 but it does not show up on the signer nodes even on the node that I sent it from.

enter image description here

On the next block (869,335) I observe that all nodes receive the transactions.

enter image description here

And finally on block number (869,336) the transaction is deployed.

enter image description here

=> If the transaction was distributed to all cluster right after it sent it should be deployed on the block number (869,334) but it used 1 additional block time for this.

[Q1] Why the sent transaction received by the non-signer nodes right after it is sent but not by the signer nodes?

[Q2] Is this normal that the sent transaction won’t transfer to all the network right after it is sent but it takes additional 1 block time even all nodes are connected to each other? Is there any way to force to transfer a transaction to all my signer nodes right after it has been sent?


Get this bounty!!!

#StackBounty: #go-ethereum #private-blockchain #testing Ethereum Deployment Problems

Bounty: 50

I deployed a private version of Ethereum on my laptop.

I am using this code to deploy:

geth –-identity "blockdb" –-rpc -–rpcport "9040" --rpccorsdomain "*" –-rpcapi "db,eth,net,web3" –-datadir "c:\blockchain" –-port "30303" –-nodiscover –-networkid 76543 console

and this genesis:

{
"config": {  
    "chainId": 76543, 
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0
               },
"difficulty": "0x4000",
"gasLimit": "0x8000000",  
"alloc": {}
 }
 }

The blockchain seems to deploy well, since it gives me the same chain ID, i open Mist (without changing an ysettings) and can see the wallets i create. Miner.start() also works. I see the ethers coming in from the mining. I can see the wallets i create andthe minutes since last block. but the status remains always connecting.

enter image description here

My questions are as follows:

1) When i close the console and restart it, to restart the node, i use the above command again. is that correct? Because:

2) when I restart, I can see the wallets previously created but not the ether. the ether is lost. they all restart from 0. why is that?

3) I am trying to interact ‘externally’ with the blockchain, by using nethereum and ethereum wallet. In both apps I can see the wallets and their balance. but i cannot create new wallets, deploy contracts or transfer ether.


Get this bounty!!!

#StackBounty: #go-ethereum #whisper How to send 1-N signalling or broadcast messages on Whisper?

Bounty: 50

From Whisper wiki:

Low-latency, 1-1 or 1-N signalling messages.

Shh.post(self, message:) and Whisper Usage / shh.post

Creates a whisper message and injects it into the network for
distribution.

Example usage of web3.shh.post, for more details please see this answer:

web3.shh.post({
  pubKey: 'PUBLIC_KEY_OF_THE_RECEIVER',
  ttl: 3600,
  topic: '0x07678231',
  powTarget: 2.01,
  powTime: 2,
  payload: web3.fromAscii("Hello there!")
  });

When I remove pubKey from web3.shh.post as arguments; it says: Error: specify either a symmetric or an asymmetric key.

shh.post({ "topic": t, "payload": p }); No signature, no encryption: Anonymous broadcast; a bit like an anonymous subject-filtered twitter feed.

[Q] Since web3.shh.post()requires us to provide single public key of the receiver; is it possible to send 1-N or broadcast message using whisper protocol? If yes, how?


Get this bounty!!!

#StackBounty: #go-ethereum #whisper How to send 1-N signalling messages on Whisper?

Bounty: 50

From Whisper wiki:

Low-latency, 1-1 or 1-N signalling messages.

Shh.post(self, message:)

Creates a whisper message and injects it into the network for
distribution.

Example usage of web3.shh.post, for more details please see this answer:

web3.shh.post({
  pubKey: 'PUBLIC_KEY_OF_THE_RECEIVER',
  ttl: 3600,
  topic: '0x07678231',
  powTarget: 2.01,
  powTime: 2,
  payload: web3.fromAscii("Hello there!")
  });

When I remove pubKey from web3.shh.post as arguments; it says: Error: specify either a symmetric or an asymmetric key. Whisper overview is out of date. It gives following example as use case which does not work:

shh.post({ "topic": t, "payload": p }); No signature, no encryption: Anonymous broadcast; a bit like an anonymous subject-filtered twitter feed.

[Q] Since web3.shh.post()requires us to provide single public key of the receiver; is it possible to send 1-N message using whisper protocol? If yes, how?


Get this bounty!!!

#StackBounty: #go-ethereum #whisper Whisper: How could we print received messages that are actually stored in the memory when geth was …

Bounty: 50

Whisper Protocol is not well documented related to its usage. I believe this issue will help other users who might face with similar problem.

Each sent message has time-to-live in seconds (ttl), that is defined by the sender. For more detail please see Whisper v5 RPC API => shh_post. Whisper Protocol keeps received messages in the memory until messages’ time-to-live time is over, when geth was closed or shh.newMessageFilter() is not activated.

=> How could we access and print those received messages that are actually stored in the memory?


Whisper v5 RPC API:

shh_getFilterMessages

Retrieve messages that match the filter criteria and are received
between the last time this function was called and now.

  • But there is no getFilterMessages() method with the latest shh. Please see.

On this solution; we can use same key pairs after geth is restarted. But the issue after geth is restarted and later when we run shh.newMessageFilter(); it does not retrieve/return any message that was sent while geth was closed.

[Q] How could we obtain/filter messages that sent when geth was closed or shh.newMessageFilter() is not activated?. When we run web3.shh.newMessageFilter(), it only retrieves/filters messages right after it start running and it does not filter/print any message before it starts running.

Example Scenario:

=> On the receiver node I closed geth and from the sender node, I have sent multiple messages into receiver node. Later, when I reopened geth on the receiver node, shh.info.memory verifies that there are received messages in memory, but I was not able to retrieve/filter those messages using web3.shh.newMessageFilter().

> shh.info.memory
780

Here is some logs:

Creating web3.shh.newMessageFilter():

> kId=shh.addPrivateKey('0x8de0b39f3a4a109f27bb06a92dab680d58e8f029eaca61da6be7115981a2ed11')
"439bfd6aa63a81b404ba20e4fc250e11c326d72ad9943c72dc445f476638989d"

> filter=web3.shh.newMessageFilter(
...         {privateKeyID:kId},
...         function(err, res) {console.log(web3.toUtf8(res.payload))});
{
  callbacks: [function(err, res)],
  filterId: "a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78",
  formatter: null,
  getLogsCallbacks: [],
  implementation: {
    getLogs: function(),
    newFilter: function(),
    poll: function(),
    uninstallFilter: function()
  },
  options: {
    privateKeyID: "439bfd6aa63a81b404ba20e4fc250e11c326d72ad9943c72dc445f476638989d"
  },
  pollFilters: [],
  requestManager: {
    polls: {
      82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597: {
        data: {...},
        id: "82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597",
        callback: function(error, messages),
        uninstall: function()
      },
      a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78: {
        data: {...},
        id: "a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78",
        callback: function(error, messages),
        uninstall: function()
      }
    },
    provider: {
      newAccount: function(),
      openWallet: function(),
      send: function github.com/ethereum/go-ethereum/console.(*bridge).Send-fm(),
      sendAsync: function github.com/ethereum/go-ethereum/console.(*bridge).Send-fm(),
      sign: function(),
      unlockAccount: function()
    },
    timeout: {},
    poll: function(),
    reset: function(keepIsSyncing),
    send: function(data),
    sendAsync: function(data, callback),
    sendBatch: function(data, callback),
    setProvider: function(p),
    startPolling: function(data, pollId, callback, uninstall),
    stopPolling: function(pollId)
  },
  get: function(callback),
  stopWatching: function(callback),
  watch: function(callback)
}

I can see shh_getFilterMessages under filter.requestManager.polls but I cannot call it.

> filter.requestManager.polls
{
  82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597: {
    data: {
      method: "shh_getFilterMessages",
      params: ["82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597"]
    },
    id: "82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597",
    callback: function(error, messages),
    uninstall: function()
  },
  a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78: {
    data: {
      method: "shh_getFilterMessages",
      params: ["a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78"]
    },
    id: "a0b4194651c9143d977c2fa4848ab681b414720364461b4096fb17588d84ae78",
    callback: function(error, messages),
    uninstall: function()
  }
}

> a.requestManager.polls.82f08d2d7fe974a69acdadcfac39f788575d337eed9577969b617ae28462e597
(anonymous): Line 1:23 Unexpected token ILLEGAL


Get this bounty!!!

#StackBounty: #go-ethereum #web3js #whisper #rpc web3.js: Error: The method shh_newSymKey does not exist/is not available on Web3.js

Bounty: 50

My main goal is to call web3.shh functions using RPC API , Web3.py or Web3.js. I can call web3.shh functions when I use geth attach; which is my last option to do.

I am following this answer.

  • geth version: 1.8.0-unstable
  • I am running geth with --shh flag.

  • console.log(web3.version); returns: api: '0.20.5'.

When I run following script:

Web3 = require("web3");
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));

if(!web3.isConnected()){ //web3@0.20.5
//if(!web3.eth.net.isListening().then(console.log)){ //web3@1.0.0-beta.34
    console.log("notconnected");
    process.exit();
}

var kId = web3.shh.newSymKey(); //Error occurs. 

var kId = web3.shh.newSymKey(); gives following error with web3@'0.20.5':

Error: The method shh_newSymKey does not exist/is not available
    at Object.InvalidResponse (/home/alper/eBlocBroker/node_modules/web3/lib/web3/errors.js:38:16)
    at RequestManager.send (/home/alper/eBlocBroker/node_modules/web3/lib/web3/requestmanager.js:61:22)
    at Shh.send [as newSymKey] (/home/alper/eBlocBroker/node_modules/web3/lib/web3/method.js:145:58)
    at Object.<anonymous> (/home/alper/eBlocBroker/dd.js:9:20)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Function.Module.runMain (module.js:690:10)

Please note that I have tried it with web3@1.0.0-beta.34 that also gives this error that seems like the same error:

Promise { <pending> }
true
(node:16162) UnhandledPromiseRejectionWarning: Error: Returned error: The method shh_newSymKey does not exist/is not available
    at Object.ErrorResponse (/home/alper/eBlocBroker/node_modules/web3-shh/node_modules/web3-core-helpers/src/errors.js:29:16)
    at /home/alper/eBlocBroker/node_modules/web3-shh/node_modules/web3-core-requestmanager/src/index.js:140:36
    at XMLHttpRequest.request.onreadystatechange (/home/alper/eBlocBroker/node_modules/web3/node_modules/web3-providers-http/src/index.js:77:13)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/alper/eBlocBroker/node_modules/xhr2/lib/xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (/home/alper/eBlocBroker/node_modules/xhr2/lib/xhr2.js:354:12)
    at XMLHttpRequest._onHttpResponseEnd (/home/alper/eBlocBroker/node_modules/xhr2/lib/xhr2.js:509:12)
    at IncomingMessage.<anonymous> (/home/alper/eBlocBroker/node_modules/xhr2/lib/xhr2.js:469:24)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
(node:16162) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16162) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[Q] How could I fix this error? What do I do wrong?

Please note that available shh functions could be seen here; output of console.log(web3.shh).


Further Investigation:

I have tried to use Whisper v5 RPC API ; I was not able to figure out how to do curl request using curl -X POST --data '{...}'. Error I am receiving is curl: no URL specified!.

=> How could I also make RPC API work?


Get this bounty!!!