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

Add transition test case of non-empty pre-state historical_roots #3585

Merged
merged 2 commits into from Jan 18, 2024

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Jan 17, 2024

Issue

To cover prysmaticlabs/prysm#13477 with this test case.

Description

  • Add fork transition test case of non-empty pre-state historical_roots
  • [non-substantive] Update transition test format
  • [non-substantive] Fix Capella spec comment typo

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. a quick comment on the usage of a var for the list length

Therefore, we need to fill in `historical_roots` with non-empty value.
"""
# fill in historical_roots with non-empty values
pre_historical_roots = [b'\x56' * 32 for _ in range(spec.SLOTS_PER_HISTORICAL_ROOT)]
Copy link
Contributor

Choose a reason for hiding this comment

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

SLOTS_PER_HISTORICAL_ROOT is fine here but it's a bit misleading in it's relationship to historical_roots which is a list of unbound length

Copy link
Collaborator

Choose a reason for hiding this comment

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

The test would do its job with > 0 items so why no set it to 1?

Therefore, we need to fill in `historical_roots` with non-empty value.
"""
# fill in historical_roots with non-empty values
pre_historical_roots = [b'\x56' * 32 for _ in range(spec.SLOTS_PER_HISTORICAL_ROOT)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The test would do its job with > 0 items so why no set it to 1?

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
@hwwhww
Copy link
Contributor Author

hwwhww commented Jan 18, 2024

@djrtwo @dapplion thank you for you reviews! I addressed your feedback.

@hwwhww hwwhww merged commit 3727a75 into dev Jan 18, 2024
30 checks passed
@hwwhww hwwhww deleted the historical-roots-fork-transition branch January 18, 2024 05:54
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