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 ShardTransition.shard_data_roots and add custody game block-level tests #1937

Merged
merged 5 commits into from
Jul 2, 2020

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Jun 25, 2020

(pending on #1928 refactoring)

Issues

  1. Phase 1 known issues checklist #1768 B.7: Should use non-length mixins root for shard_data_roots
  2. Lack of block-level custody operations tests

How did I fix it

  1. [validator spec] Fix ShardTransition.shard_data_roots: use get_block_data_merkle_root helper to calculate the root.
  2. Testing
    • Rework get_valid_custody_chunk_response testing helper: accept block_length_or_custody_data
    • Add test_with_shard_transition_with_custody_challenge_and_response, test_custody_key_reveal, test_early_derived_secret_reveal, test_custody_slashing test cases for increasing testing coverage.
    • Fix run_beacon_block: should yield the signed_beacon_block
  3. pyspec cache
    • Fix get_attesting_indices cache: add randao_mixes to the cache keys

1. Fix `ShardTransition.shard_data_roots`: use `get_block_data_merkle_root` helper to calculate it.
2. Rework `get_valid_custody_chunk_response` testing helper: accept
`block_length_or_custody_data`
3. Add `test_with_custody_challenge_and_response` test
@hwwhww hwwhww marked this pull request as ready for review June 25, 2020 18:11
@hwwhww hwwhww changed the base branch from hwwhww/shard-block-tests to dev June 26, 2020 03:54
@hwwhww hwwhww changed the title Fix ShardTransition.shard_data_roots and add test Fix ShardTransition.shard_data_roots and add custody game block-level tests Jun 29, 2020
@hwwhww hwwhww requested review from dankrad and djrtwo June 29, 2020 13:02
specs/phase1/validator.md Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
specs/phase1/validator.md Outdated Show resolved Hide resolved
@hwwhww hwwhww merged commit d608be7 into dev Jul 2, 2020
@hwwhww hwwhww deleted the hwwhww/custody-block-test branch July 2, 2020 06:48
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.

2 participants