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

gballet
Copy link
Member

@gballet gballet 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
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

@kdeme kdeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants