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

V0.8.3 tests part2 - BLS + Shuffling + State transition epoch #372

Merged
merged 13 commits into from
Sep 3, 2019

Conversation

mratsim
Copy link
Contributor

@mratsim mratsim commented Sep 2, 2019

This PR:

  • updates the fixtures to 0.8.3
  • updates BLS tests to 0.8.3
  • updates Shuffling tests to 0.8.3
  • Adds all state transition for epoch process:
    • Justification & Finalization - PASSED
    • Crosslinks - PASSED
    • Registry Updates - PASSED
    • Slashings - FAILED Passing
    • Final updates - FAILED

Failed tests are deactivated at the moment.

Edit: I've also added a deep inspection macro that pinpoints all the fields in a BeaconState that are different.

@mratsim mratsim requested a review from tersec September 2, 2019 17:00
@mratsim
Copy link
Contributor Author

mratsim commented Sep 2, 2019

Fixed the slashings tests

For final updates it's not trivial from looking at the spec, would have to inspect the fields individually.

There is at least this change that has to be done:
https://github.com/status-im/nim-beacon-chain/blob/1ec4c5aef7a8db64e9a694d30158745bbec68566/beacon_chain/spec/state_transition_epoch.nim#L485

to

indices_list = sszList(get_active_validator_indices(state, index_epoch), VALIDATOR_REGISTRY_LIMIT)

@mratsim
Copy link
Contributor Author

mratsim commented Sep 2, 2019

I've added a deep inspection macro for BeaconState reportDiff.

It reports precisely the fields that are different between 2 states (note: there won't be bold)

For instance for final_updates/compact_committees_root
stateRef.active_index_roots == postRef.active_index_roots Diff: stateRef.active_index_roots = [BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, 16E7DA2912B78AE1AA7558D8927DF8D3B35E2B039AF9E7C80E6B7269403C0E4B, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, ...,
BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63]
and postRef.active_index_roots = [BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63, ..., BA1031BA1A5DAAB0D49597CFA8664CE2B4C9B4DB6CA69FBEF51E0A9A325A3B63]
[AssertionError]

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

2 participants