mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +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:
@@ -699,7 +699,7 @@ pub fn generate_blobs<E: EthSpec>(
|
||||
Ok((bundle, transactions.into()))
|
||||
}
|
||||
|
||||
fn static_valid_tx<T: EthSpec>() -> Result<Transaction<T::MaxBytesPerTransaction>, String> {
|
||||
pub fn static_valid_tx<T: EthSpec>() -> Result<Transaction<T::MaxBytesPerTransaction>, String> {
|
||||
// This is a real transaction hex encoded, but we don't care about the contents of the transaction.
|
||||
let transaction: EthersTransaction = serde_json::from_str(
|
||||
r#"{
|
||||
|
||||
@@ -244,7 +244,7 @@ impl<T: EthSpec> MockExecutionLayer<T> {
|
||||
// TODO: again consider forks
|
||||
let status = self
|
||||
.el
|
||||
.notify_new_payload(payload.try_into().unwrap())
|
||||
.notify_new_payload(payload.to_ref().try_into().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(status, PayloadStatus::Valid);
|
||||
|
||||
@@ -25,8 +25,8 @@ use warp::{http::StatusCode, Filter, Rejection};
|
||||
|
||||
use crate::EngineCapabilities;
|
||||
pub use execution_block_generator::{
|
||||
generate_blobs, generate_genesis_block, generate_genesis_header, generate_pow_block, Block,
|
||||
ExecutionBlockGenerator,
|
||||
generate_blobs, generate_genesis_block, generate_genesis_header, generate_pow_block,
|
||||
static_valid_tx, Block, ExecutionBlockGenerator,
|
||||
};
|
||||
pub use hook::Hook;
|
||||
pub use mock_builder::{MockBuilder, Operation};
|
||||
|
||||
Reference in New Issue
Block a user