whisper
whisper copied to clipboard
Whisper payload encoding differences vs Geth, EIP 627
Comparing the whisper payloads of Geth and Parity, there seems to be a few differences - generally, geth payload follows https://eips.ethereum.org/EIPS/eip-627
https://github.com/paritytech/parity-ethereum/blob/cc963d42a06bcae2480cec657fa4b55a829fdaa6/whisper/src/rpc/payload.rs#L147
- Parity adds a payload version field, geth does not
- Parity puts padding length in bits 7-6, geth in 1-0
- Parity puts signature flag in bit 5, geth in bit 2 (same as above)
Further, the documentation states that AES nonce comes before message, whereas code seems to put it after instead - after is consistent with geth. https://github.com/paritytech/parity-ethereum/blob/cc963d42a06bcae2480cec657fa4b55a829fdaa6/whisper/src/rpc/payload.rs#L34 https://github.com/paritytech/parity-ethereum/blob/cc963d42a06bcae2480cec657fa4b55a829fdaa6/whisper/src/rpc/crypto.rs#L82
go-ethereum: https://github.com/ethereum/go-ethereum/blob/d3441ebb563439bac0837d70591f92e2c6080303/whisper/whisperv6/message.go#L300
Also filed under https://github.com/ethereum/go-ethereum/issues/17761
Thanks for the report. This is no news unfortunately. I was recently talking with @gballet as he planned to have a look.
The problem here is the Parity v6 implementation was coded when EIP-627 was still being modified. We later agreed on a more strict versioning for Whisper to prevent this from happening again; and I think, there will be a promising future for Whisper if we can stick to this :)
But nobody at Parity caught up with the updated spec of v6. Unfortunately, this is of lower priority for now, but any pull requests to help aligning this with Geth and EIP are welcome
@5chdn was this agreement documented somewhere perhaps? I'd love to hear any background info or progress on this issue.. Over at status, we'll be throwing another client into the mix at some point, so anything you have is valuable.
@arnetheduck look at the EIP-627 this is what is implemented in geth and I'll work on a compatibility PR for parity after devcon.
@arnetheduck no, but in case of doubt please use the EIP as a reference.
@gballet thanks for committing to that :)
Has there been any movement on compatibility?