I'm writing a chat app on top of Whisper; the app is supposed to manage the lifecycle of the Ethereum node.
One way to build to is to use wnode in the background & communicate with it using stdout/stdin programmatically. However, I prefer to use the web3.shh
API so I need an Ethereum/Whisper client that provides the RPC interface beside Whisper stuff.
geth seems to fit. However, it seems to, by default, start blockchain stuff & other stuff while I only need it for Whisper. So:
1- How to start geth
such that it provides absolutely zero blockchain stuff & only whisper stuff (+rpc)?
2- How to get it to be a bootstrap node for whisper & retrieve its enode
url?
3- How to configure it to use other bootstrap nodes? Is the --bootnodes
flag used for whisper?
Basically, I want to be able to do what's in the example here but using geth
, with no unnecessary overhead:
> wnode -standalone -forwarder -ip=127.0.0.1:30379
my public key: 0x040ef7acd60781c336c52056b3782f7eae45be2063e591ac6b78472dc27ba770010bde445ffd2f3623ad656f3859e00d11ef518df4916c4d4e258c60b15f34c682 enode://15454fc65bbf0031155f4eee83fa732f1454c314e9f78ade9cba4d4a098d29edbf5431764ee65b200169025c3f900cacc3348a000dda7a8a0d9643d0b7618712@127.0.0.1:30379
Bootstrap Whisper node started
... Then, in another tab:
> wnode -test -boot=enode://15454fc65bbf0031155f4eee83fa732f1454c314e9f78ade9cba4d4a098d29edbf5431764ee65b200169025c3f900cacc3348a000dda7a8a0d9643d0b7618712@127.0.0.1:30379
............................
Whisper node started
Connected to peer.
............................
Update
I haven't tried the accepted answer myself but I confirmed from the author that he/she tried it and the solution seems to be meeting all the requirements.