whisper icon indicating copy to clipboard operation
whisper copied to clipboard

Whisper payload encoding differences vs Geth, EIP 627

Open arnetheduck opened this issue 7 years ago • 7 comments

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

arnetheduck avatar Sep 25 '18 22:09 arnetheduck

Also filed under https://github.com/ethereum/go-ethereum/issues/17761

arnetheduck avatar Sep 26 '18 00:09 arnetheduck

Thanks for the report. This is no news unfortunately. I was recently talking with @gballet as he planned to have a look.

Tbaut avatar Sep 26 '18 08:09 Tbaut

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 avatar Sep 26 '18 14:09 5chdn

@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 avatar Sep 26 '18 17:09 arnetheduck

@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.

gballet avatar Sep 27 '18 09:09 gballet

@arnetheduck no, but in case of doubt please use the EIP as a reference.

@gballet thanks for committing to that :)

5chdn avatar Sep 27 '18 10:09 5chdn

Has there been any movement on compatibility?

michaelsbradleyjr avatar Nov 21 '19 20:11 michaelsbradleyjr