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

release v0.7.1 #1176

Merged
merged 19 commits into from
Jun 17, 2019
Merged

release v0.7.1 #1176

merged 19 commits into from
Jun 17, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Jun 13, 2019

A few critical fixes:

Additional changes:

@djrtwo djrtwo requested review from protolambda and hwwhww June 14, 2019 16:26
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

The block state-roots are fixed now, but for review I went through all of it again, and think it's better to not rely on the zero-values for 1 special case: when we overwrite the latest-header, we also implicitly change the state-root to zero. And then there is an undocumented dependency where the next process_slot has to be the very first thing to touch the state, as it hashes it to produce the state-root to put into latest-header. Also, there is a zero-check, but it's not incorrect to not overwrite when it's non-zero. Instead, it should be equal. All in all correct, and we can just merge v0.7.1, but it could be cleaner. What do you think @JustinDrake, would you like to pick this up?

@@ -23,3 +26,13 @@ def get_state_root(spec, state, slot) -> bytes:
"""
assert slot < state.slot <= slot + spec.SLOTS_PER_HISTORICAL_ROOT
return state.latest_state_roots[slot % spec.SLOTS_PER_HISTORICAL_ROOT]


def state_transition_and_sign_block(spec, state, block):
Copy link
Contributor

Choose a reason for hiding this comment

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

Verified we are not outputting any blocks in the tests not produced by this function. appyl_empty_block is not used for output anywhere. But we may want to remove its return in the future, so we don't accidentally get a block with faulty state root in there.

@@ -2,3 +2,4 @@
pytest>=3.6,<3.7
../config_helpers
flake8==3.7.7
pytest-cov
Copy link
Contributor

Choose a reason for hiding this comment

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

yay for coverage reports. Don't forget to make install_test to enable it. Good for changelog.

@djrtwo djrtwo merged commit 2d13a3a into master Jun 17, 2019
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.

2 participants