simulators/ethereum/engine: Add newPayload while syncing tests to increase coverage #531
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.
Adds several test cases for valid and invalid payloads while the client is in
SYNCINGstate to increase tests coverage.All
Invalid * NewPayloadtest cases now have a(Syncing)variant which adds the following steps:SYNCINGstate by being disconnected from the CL Mocker, producing a new payload which is not sent to the client, and sending afcU(head -> missingPayload)newPayload(alteredPayload), wherealteredPayload.parent==missingPayload, and has incorrectstateRoot, or incorrectgasLimit, etc, but the hash of this payload is correctly calculated.ACCEPTEDorSYNCINGstatus response from thenewPayloadnewPayload(missingPayload), which shall returnVALIDnewPayload(alteredPayload)is sent again and the expected response is nowINVALIDeth_getBlockByHash(alteredPayload), which shall return an errorSimilar test case
Valid NewPayload->ForkchoiceUpdated on Syncing Clientis added which follows the same steps but using a valid payload.Geth is having an unexpected behavior with test case
Invalid Number NewPayload (Syncing):alteredPayloadhasalteredPayload.parent==missingPayloadbut alsoalteredPayload.Number==missingPayload.NumbernewPayload(missingPayload),newPayload(alteredPayload)sends client intoSYNCINGmode instead of returningINVALID.Nethermind is passing all new tests.
cc @mkalinin @MariusVanDerWijden