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 some phase 0 typing #1731

Merged
merged 3 commits into from
Apr 20, 2020
Merged

Fix some phase 0 typing #1731

merged 3 commits into from
Apr 20, 2020

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Apr 17, 2020

This PR fixes some typing issues found in #1707.

  1. Fix the mocking get_eth1_data in setup.py
  2. Fix the outdated/missing typing
    • utils.hash_function
    • config.config_util
  3. Fix some missing type castings in beacon-chain.md

No substantive change.

for (k, h) in hash_cache:
if x == k:
return h
def hash(x: bytes) -> bytes:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The cache is not really used much at all anymore, since remerkleable does the hashing and structural caching. Maybe a few randao mixes get in the cache. Just removing it would not hurt.

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

looks good.
fine if we remove hash or keep it. If we remove it, let's sanity check runtime

@hwwhww
Copy link
Contributor Author

hwwhww commented Apr 20, 2020

@protolambda @djrtwo eth2spec.utils.hash_function.hash is imported in tests/core/pyspec/eth2spec/utils/merkle_minimal.py, so maybe just keep it?

@djrtwo
Copy link
Contributor

djrtwo commented Apr 20, 2020

fine by me

@djrtwo djrtwo merged commit 5b4f5c3 into v012x Apr 20, 2020
@djrtwo djrtwo deleted the hwwhww/phase0_typing branch April 20, 2020 23:24
@hwwhww hwwhww added this to the v0.12.0 milestone May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants