Permit a null LVH from an INVALID response to newPayload (#4037)

## Issue Addressed

NA

## Proposed Changes

As discovered in #4034, Lighthouse is not accepting `latest_valid_hash == None` in an `INVALID` response to `newPayload`. The `null`/`None` response *was* illegal at one point, however it was added in https://github.com/ethereum/execution-apis/pull/254.

This PR brings Lighthouse in line with the standard and should fix the root cause of what #4034 patched around.

## Additional Info

NA
This commit is contained in:
Paul Hauner
2023-03-03 04:12:50 +00:00
parent 2b6348781a
commit cac3a66be4
5 changed files with 81 additions and 54 deletions

View File

@@ -427,7 +427,16 @@ impl<E: GenericExecutionEngine> TestRig<E> {
.notify_new_payload(&invalid_payload)
.await
.unwrap();
assert!(matches!(status, PayloadStatus::InvalidBlockHash { .. }));
assert!(matches!(
status,
PayloadStatus::InvalidBlockHash { .. }
// Geth is returning `INVALID` with a `null` LVH to indicate it
// does not know the invalid ancestor.
| PayloadStatus::Invalid {
latest_valid_hash: None,
..
}
));
/*
* Execution Engine A: