Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whisper payload encoding differences vs Geth, EIP 627 #6

Open
arnetheduck opened this issue Sep 25, 2018 · 7 comments
Open

Whisper payload encoding differences vs Geth, EIP 627 #6

arnetheduck opened this issue Sep 25, 2018 · 7 comments

Comments

@arnetheduck
Copy link

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
Copy link
Author

Also filed under ethereum/go-ethereum#17761

@Tbaut
Copy link

Tbaut commented Sep 26, 2018

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

@5chdn
Copy link
Contributor

5chdn commented Sep 26, 2018

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

@arnetheduck
Copy link
Author

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

@gballet
Copy link
Contributor

gballet commented Sep 27, 2018

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

@5chdn
Copy link
Contributor

5chdn commented Sep 27, 2018

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

@gballet thanks for committing to that :)

@niklasad1 niklasad1 transferred this issue from openethereum/parity-ethereum Sep 17, 2019
@michaelsbradleyjr
Copy link

Has there been any movement on compatibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants