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: PoW calculations as specified in EIP-627 #19753

Merged
merged 2 commits into from Jun 25, 2019

Conversation

Projects
None yet
3 participants
@gballet
Copy link
Member

commented Jun 25, 2019

As noted by @kdeme in #18070 the calculation of the nonce is not what is specified in EIP-627 and that adds to the list of incompatibilities with Parity's version.

@gballet gballet added this to the 1.9.0 milestone Jun 25, 2019

@gballet gballet changed the title [WIP] whisper: PoW calculations as specified in EIP-627 whisper: PoW calculations as specified in EIP-627 Jun 25, 2019

@holiman
Copy link
Contributor

left a comment

LGTM

@gballet gballet merged commit 54fd263 into ethereum:master Jun 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kdeme
Copy link

left a comment

The hashing / leadingZeros calculation looks good now.

However, I noticed (I could/should have spotted this already in #19330) that the size taken at the end is the size of rlpWithoutNonce while the EIP specifies: where size is the size of the full RLP-encoded envelope.

I do acknowledge that this is somewhat an annoying requirement in the specification as it makes the reverse calculation when mining to a specific PoW target a bit more complicated (e.g. need to recalculate size each time if you want your PoW target 100% exact).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.