mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Verify Versioned Hashes During Optimistic Sync (#4832)
* Convert NewPayloadRequest to use Reference * Refactor for Clarity * Verify Versioned Hashes * Added Tests for Version Hash Verification * Added Moar Tests * Fix Problems Caused By Merge * Update to use Alloy Instead of Reth Crates (#14) * Update beacon_node/execution_layer/src/engine_api/new_payload_request.rs Co-authored-by: realbigsean <seananderson33@GMAIL.com> * Faster Versioned Hash Extraction * Update to rust 1.75 & Pin alloy-consensus
This commit is contained in:
@@ -381,7 +381,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.notify_new_payload(valid_payload.clone().try_into().unwrap())
|
||||
.notify_new_payload(valid_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(status, PayloadStatus::Valid);
|
||||
@@ -435,7 +435,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.notify_new_payload(invalid_payload.try_into().unwrap())
|
||||
.notify_new_payload(invalid_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(matches!(
|
||||
@@ -507,7 +507,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.notify_new_payload(second_payload.clone().try_into().unwrap())
|
||||
.notify_new_payload(second_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(status, PayloadStatus::Valid);
|
||||
@@ -559,7 +559,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_b
|
||||
.execution_layer
|
||||
.notify_new_payload(second_payload.clone().try_into().unwrap())
|
||||
.notify_new_payload(second_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(matches!(status, PayloadStatus::Syncing));
|
||||
@@ -597,7 +597,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_b
|
||||
.execution_layer
|
||||
.notify_new_payload(valid_payload.clone().try_into().unwrap())
|
||||
.notify_new_payload(valid_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(status, PayloadStatus::Valid);
|
||||
@@ -611,7 +611,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let status = self
|
||||
.ee_b
|
||||
.execution_layer
|
||||
.notify_new_payload(second_payload.clone().try_into().unwrap())
|
||||
.notify_new_payload(second_payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(status, PayloadStatus::Valid);
|
||||
|
||||
Reference in New Issue
Block a user