Add additional `get_proposer_head` test coverage
Currently clients can potentially pass all get_proposer_head spec tests without having a fully spec compliant implementation. This PR attempts to improve get_proposer_head test coverage. A new test_parent_weak test is added to check for the following scenario:
-
is_head_late,is_shuffling_stable,is_shuffling_stable,is_finalization_ok,is_proposing_on_timeis_head_weakall evaluate totrue -
is_parent_strongevaluates tofalse
In this situation, the parent block doesn't have enough attestation votes and therefore the head root is returned from get_proposer_head. This new test is pretty much a copy paste of test_basic_is_parent_root with a few minor tweaks.
There are several more tests needed to further improve test coverage. This is my first time writing a consensus spec test so I'm looking for some feedback before writing additional tests.
Thank you @eserilev! Have you run this new test vector with Lighthouse?
@hwwhww yes I have. On Lighthouse unstable this new test vector fails, but on this branch the test passes
@hwwhww The test passes on LH unstable now so we are happy to merge if you are! Thanks
@hwwhww I think this test case is a nice to have, let me know what you think
closing as stale