Description
What is wrong
Right now we have some in-flight functionality for Whisper V6: #784
As it stands, we can write in support for this in web3.shh
but I want to figure out a future proof way to do this. I see the following problems coming down the road.
- API differences between nodes (parity, geth, ...)
- API differences across protocol versions (v5, v6, v???)
How it could be fixed.
When you have middleware, everything looks like a middleware...??
Dealing with API differences across different nodes is an issue that exists in the eth_
namespace as well. Currently, we can mostly address these with middlewares, or intentionally not address them but raise helpful errors.
Namespace by node
Alternatively we could implement submodules like w3.geth.shh
and w3.parity.shh
but that adds some development and testing overhead.
Namespace by version
For dealing with actual changes between protocol versions... not clear. Versioning the actual module might make sense, i.e. web3.shh.v6.WhisperModule
. Still poses some usability hurdles.
Separate package
We could move web3.shh
to it's own package web3-shh
and require installation of the separate package and manual addition of the shh
module.