Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 21 2017 21:23
    @jpitts banned @Musk11
Paul Pham
@cryptogoth
Does anyone know if there is anything preventing a Whisper node operator from sniffing calls to shh_newKeyPair to get clients' key IDs, and then subscribing to their private messages with a call like this?
https://github.com/status-im/whisper-tutorial#-todo-subscribe-to-private-messages
Jaren Lynch
@JarenL
How would I implement whisper for a chat dapp with web3? Very little whisper implementation examples out there.
Paul Pham
@cryptogoth

hey Jaren Lynch (Gitter) i agree, there should be more examples out there. The one I used is Status's command-line example:
https://dev.status.im/tutorials/whisper_basic_cli.html

There's a webpage / browser example here too:
https://ethereum.stackexchange.com/a/38955/4670

Benjamin Diamond
@benediamond
hmm
so yeah, the question is where messages sit (if anywhere) when you receive them, but they aren't picked up by any active filter
also: in the latest geth, there is a "mailserver" app of some kind. have you looked at this/
?
Paul Pham
@cryptogoth
The specs seem to state that the whisper node should try to keep messages that match your filter after you install it with
https://github.com/ethereum/go-ethereum/wiki/Whisper-v6-RPC-API#shh_newmessagefilter
and until you call to retrieve messages with
https://github.com/ethereum/go-ethereum/wiki/Whisper-v6-RPC-API#shh_getfiltermessages
Benjamin Diamond
@benediamond
sure---but if a message is received before the relevant filter is applied, then is it gone?
"This filter can be used to poll for new messages that match the set of criteria." i guess it's unclear whether "new messages" includes messages that were received before the filter was created
Paul Pham
@cryptogoth
The node implementation could do its best to keep messages like that, but it sounds too inefficient to keep all messages. So the spec doesn’t guarantee that
Benjamin Diamond
@benediamond
hmm
Paul Pham
@cryptogoth
Even with the filter installed, I think it’s ‘best effort’ storage, which is why whisper is like UDP, the sender needs to keep sending / broadcasting until it gets acks
Benjamin Diamond
@benediamond
hmm, ok. well i'll have to look more into the exact detail around which messages are kept, etc. seems thinly documented
Paul Pham
@cryptogoth
I agree, I’ll post an example if I get one working.
Benjamin Diamond
@benediamond
excellent, yeah, i've certainly got whisper up and running, i just haven't experimented yet with if messages are stored / stick around, etc.
Paul Pham
@cryptogoth
nice!
i have my node too, but I’m going to IP restrict the WS/HTTP port to prevent spammers / hackers.
do you want to try and peer them with each other?
Benjamin Diamond
@benediamond
sure, we can coordinate offline
Paul Pham
@cryptogoth
also Status had a major facelift and improvement of docs a few days ago, including Whisper docs
https://status.im/research/secure_messaging_compendium.html
Jaren Lynch
@JarenL
@cryptogoth Thanks for the info! So to use whisper you have to have a local node running? Kind of confused on how to implement this in a dapp, users would have to run their own nodes? In the examples the provider is a node on localhost, are there nodes available I can connect to instead?
matrixbot
@matrixbot
cryptogoth hi @Jare
Paul Pham
@cryptogoth

Hi @JarenL you’re welcome. You don’t have to have a local node running for message relaying (on port 30303). There are several public nodes like that you can add manually, like this one advertised by @gballet above
https://github.com/invisible-college/democracy/blob/master/docs/WhisperExperiment.md#testnet

To get JSON-RPC / websocket access for API calls, like in the Javascript example above, it is best to run your own node, restricted to your own IP address to prevent spammers. However, you are welcome to use my nodes for testing and learning
https://github.com/invisible-college/democracy/blob/master/docs/WhisperExperiment.md#public-node

Jaren Lynch
@JarenL
@cryptogoth Thanks for the info! I’ll check this out
Paul Pham
@cryptogoth
:thumbsup:
gtlewis
@gtlewis
Hi, I have a whisper issue I am hoping someone can help me with
I have a Dapp that subscribes to whisper topic, all working fine, messages received
However if the whisper node goes offline / is restarted then the subscription is not durable and messages stop being received (after node comes back online)
The only way I seem to be able to fix this is to poll 'hasSymKey' to detect when connection interrupted - and then re-initiate web3 shh provider and resubscribe to the topic
gtlewis
@gtlewis
Is there a better way? I feel like I am doing something wrong. Is there a working example of a whisper client that survives node restarts?
Thanasi
@karysto
Since smart contract events create immutable log entries, does that imply that read-only contract methods cannot emit events?
Guillaume Ballet
@gballet
@/all with geth 1.9 the PoW calculations will change to be compatible with Parity's and EIP-627. If your messages don't get transferred, make sure that your clients are upgraded.
@gtlewis Whisper's not keeping the messages on disk is by design. If you want persistent messages, look at whisper/mailserver for inspiration
gtlewis
@gtlewis
@gballet thanks for the response, I don't want to keep the messages on disk - rather I want the client subscription to survive a restart of the whisper node. At the moment, if a whisper node is restarted then all clients stop receiving future messages (they have to somehow detect something went wrong and resubscribe)
noman
@noman-land
is there a standalone js version of whisper i can run just in the browser? i wanna do some stuff with whisper but don't need the chain, so geth is overkill, and i'd like to do it completely in browser so geth is not even possible
Antoine Toulme
@atoulme
whisper uses some PoW functions and is implemented as a RLPx subprotocol, so it only will work with TCP persistent connections. It will not work in the browser for that reason. There is no implementation of whisper that is standalone that I know of. You can certainly combine geth config switches to avoid running a full node.
Jacek Sieka
@arnetheduck
https://github.com/status-im/murmur moves in that direction.. libp2p-devp2p bridge that web clients can connect through
noman
@noman-land
@atoulme thanks for the info. that clears some things up for me. it's not just a full node i'm trying to avoid, it's also a secondary process. in my ideal implementation, you just go to a website on a non-web3 enabled browser and can do whisper stuff
@arnetheduck murmur looks really cool! the devp2p-libp2p bridge is wild. i did not know that was happening. i've heard some talk about ethereum moving from devp2p to libp2p. is that still the plan?
noman
@noman-land
looks like murmur uses all the status whisper nodes so it seems trivial to send chats to status channels using only pure node. prettttty cool
Jacek Sieka
@arnetheduck
eth2 is libp2p, and there are experiments to offer up eth1 over libp2p as well.. it's a bit of a winding road to get there though.
Islam Mustafa
@Isso
Hi everyone, I'm one of the developers of Elk. We've been working on a hardware dev board to build IoT devices that communicates through Whisper, including a mobile app to use Whisper through your phone. We just launched on Kickstarter today and would love to get your feedback: https://www.kickstarter.com/projects/233173198/elk-the-dev-board-for-the-decentralized-world
Jayhem
@Jayhem
does any one know if Metamask intends to implement the web3.shh part of web3?
Paul Pham
@cryptogoth
@Jayhem i haven’t heard of any plans. What would you like metamask to do with web3.shh?
It would be cool, e.g., to have a private messenger or share dapp-specific secrets through whisper, stored in metmask
hacktar
@hacktar
@Jayhem i suppose there is no plan for whisper in metamask
Take a look to Inzhoop Wallet mobile Leth for a messanger with whisper ...
Jayhem
@Jayhem
@cryptogoth I was actually thinking of using it to encrypt data, to securely share it with multiple people.
matrixbot
@matrixbot
cryptogoth That's a good use for it, as a private channel (eg for secret sharing) . Whisper is ephemeral, so you're right metamask or some other layer would be needed to store the secrets
noman
@noman-land
@Jayhem Not part of metamask but you could try just doing it on the JS side https://github.com/status-im/murmur
Samuel Stokes
@sastokes23623
Does anyone know of a tool or a way to detect how many active Eth clients have Whisper enabled? I'm hoping there is something similar to https://etherscan.io/nodetracker that shows Whisper participants