Massive Update to Engine API (#3740)

* Massive Update to Engine API

* Update beacon_node/execution_layer/src/engine_api/json_structures.rs

Co-authored-by: Michael Sproul <micsproul@gmail.com>

* Update beacon_node/execution_layer/src/engine_api/json_structures.rs

Co-authored-by: Michael Sproul <micsproul@gmail.com>

* Update beacon_node/beacon_chain/src/execution_payload.rs

Co-authored-by: realbigsean <seananderson33@GMAIL.com>

* Update beacon_node/execution_layer/src/engine_api.rs

Co-authored-by: realbigsean <seananderson33@GMAIL.com>

Co-authored-by: Michael Sproul <micsproul@gmail.com>
Co-authored-by: realbigsean <seananderson33@GMAIL.com>
This commit is contained in:
ethDreamer
2022-11-22 12:27:48 -06:00
committed by GitHub
parent 61b4bbf870
commit 24e5252a55
19 changed files with 625 additions and 364 deletions

View File

@@ -4,15 +4,19 @@ use crate::case_result::compare_beacon_state_results_without_caches;
use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yaml_decode_file};
use crate::testing_spec;
use serde_derive::Deserialize;
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
use state_processing::per_block_processing::process_operations::{
process_bls_to_execution_changes, process_bls_to_execution_changes,
};
use state_processing::{
per_block_processing::{
errors::BlockProcessingError,
process_block_header, process_execution_payload,
process_operations::{
altair, base, process_attester_slashings, process_bls_to_execution_changes,
process_deposits, process_exits, process_proposer_slashings,
altair, base, process_attester_slashings, process_deposits, process_exits,
process_proposer_slashings,
},
process_sync_aggregate, process_withdrawals, VerifyBlockRoot, VerifySignatures,
process_sync_aggregate, VerifyBlockRoot, VerifySignatures,
},
ConsensusContext,
};
@@ -340,6 +344,7 @@ impl<E: EthSpec> Operation<E> for BlindedPayload<E> {
}
}
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
fn handler_name() -> String {
"withdrawals".into()
@@ -372,6 +377,7 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
}
}
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
impl<E: EthSpec> Operation<E> for SignedBlsToExecutionChange {
fn handler_name() -> String {
"bls_to_execution_change".into()

View File

@@ -21,3 +21,7 @@ deposit_contract = { path = "../../common/deposit_contract" }
reqwest = { version = "0.11.0", features = ["json"] }
hex = "0.4.2"
fork_choice = { path = "../../consensus/fork_choice" }
[features]
default = []
withdrawals = []

View File

@@ -16,8 +16,8 @@ use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
use task_executor::TaskExecutor;
use tokio::time::sleep;
use types::{
Address, ChainSpec, EthSpec, ExecutionBlockHash, ExecutionPayload, FullPayload, Hash256,
MainnetEthSpec, PublicKeyBytes, Slot, Uint256,
Address, ChainSpec, EthSpec, ExecutionBlockHash, ExecutionPayload, ForkName, FullPayload,
Hash256, MainnetEthSpec, PublicKeyBytes, Slot, Uint256,
};
const EXECUTION_ENGINE_START_TIMEOUT: Duration = Duration::from_secs(20);
@@ -326,6 +326,10 @@ impl<E: GenericExecutionEngine> TestRig<E> {
proposer_index,
forkchoice_update_params,
builder_params,
// FIXME: think about how to test other forks
ForkName::Merge,
#[cfg(feature = "withdrawals")]
None,
&self.spec,
)
.await
@@ -450,6 +454,10 @@ impl<E: GenericExecutionEngine> TestRig<E> {
proposer_index,
forkchoice_update_params,
builder_params,
// FIXME: think about how to test other forks
ForkName::Merge,
#[cfg(feature = "withdrawals")]
None,
&self.spec,
)
.await