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

fix: make blake2b optional #2012

Merged
merged 4 commits into from
Sep 2, 2021
Merged

Conversation

fubuloubu
Copy link
Contributor

@fubuloubu fubuloubu commented Jul 21, 2021

What was wrong?

fixes: #1959
may fix: #1941

How was it fixed?

Used the native implementation of blake2b compression function if blake2b-py is not installed.
Made blake2b-py an optional dependency via eth-extra.

To-Do

  • Clean up commit history

Cute Animal Picture

cute elephant

Copy link
Contributor

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

LGTM

eth/precompiles/blake2.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

Generally looks good but CI errors need to be addressed. Also just pinging @carver since that might affect Py-EVM and he's closer to that project than I am.

@fubuloubu
Copy link
Contributor Author

fubuloubu commented Jul 22, 2021

Generally looks good but CI errors need to be addressed.

As far as I can tell, none of the linting errors have to do with files I edited.

Also just pinging @carver since that might affect Py-EVM and he's closer to that project than I am.

Yes, this definitely might affect downstream users of py-evm, like eth-tester and trinity. trinity has been deprecated, but I think for eth-tester it should be an optional dependency (and web3py[tester] as well)

@cburgdorf
Copy link
Contributor

Sorry for the late response.

As far as I can tell, none of the linting errors have to do with files I edited.

Yes, but they still need to be addressed since we can not merge a PR that didn't pass all CI checks.

I'm not working on this project anymore (and I just actually noticed this is a Py-EVM PR not a blake2b PR 🙈 ) but I know that @carver is currently working on EIP-1559 support for Py-EVM so if you don't feel like investing time into fixing these linting issues you may just wait for them to be fixed in master and then rebase at a later point :)

@fubuloubu
Copy link
Contributor Author

I just actually noticed this is a Py-EVM PR not a blake2b PR

Yes, this seemed like the best solution to this issue as adding Windows support to the Rust-based blake2-py would be much more difficult, and the blake2 precompile is not used nearly enough in production to justify that work.

@carver is currently working on EIP-1559 support for Py-EVM so if you don't feel like investing time into fixing these linting issues you may just wait for them to be fixed in master and then rebase

I would prefer this sooner than later, I will take a look at the linting issues. This is a blocker for me.

@cburgdorf cburgdorf merged commit 6d02bd6 into ethereum:master Sep 2, 2021
@cburgdorf
Copy link
Contributor

Thanks @fubuloubu

@fubuloubu fubuloubu deleted the fix/blake2b-optional branch September 2, 2021 17:14
@MatthiasLohr
Copy link

MatthiasLohr commented Sep 3, 2021

Great! Thanks!

Any idea, when this gets released (uploaded to PyPI)?

@carver
Copy link
Contributor

carver commented Sep 3, 2021

The next release will probably happen after London tests pass. You can watch #2021

@fubuloubu
Copy link
Contributor Author

Note: this will not fix #1941 because the issue there is the pyethash dependency

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.

Windows support? Replace or improve blake2b-py dependency
4 participants