Add additional get_proposer_head
test coverage
#3633
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently clients can potentially pass all
get_proposer_head
spec tests without having a fully spec compliant implementation. This PR attempts to improveget_proposer_head
test coverage. A newtest_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_time
is_head_weak
all evaluate totrue
is_parent_strong
evaluates 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 oftest_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.