diff --git a/consensus/state_processing/src/execution_processing.rs b/consensus/state_processing/src/execution_processing.rs new file mode 100644 index 0000000000..ee79b68242 --- /dev/null +++ b/consensus/state_processing/src/execution_processing.rs @@ -0,0 +1,10 @@ +use crate::BlockProcessingError; +use types::{BeaconState, ChainSpec, EthSpec, SignedExecutionEnvelope}; + +pub fn process_execution_payload_envelope( + state: &mut BeaconState, + signed_envelope: SignedExecutionEnvelope, + spec: &ChainSpec, +) -> Result<(), BlockProcessingError> { + Ok(()) +} diff --git a/consensus/state_processing/src/lib.rs b/consensus/state_processing/src/lib.rs index adabf6862d..1dcd7372b7 100644 --- a/consensus/state_processing/src/lib.rs +++ b/consensus/state_processing/src/lib.rs @@ -21,6 +21,7 @@ pub mod block_replayer; pub mod common; pub mod consensus_context; pub mod epoch_cache; +pub mod execution_processing; pub mod genesis; pub mod per_block_processing; pub mod per_epoch_processing; @@ -32,6 +33,7 @@ pub mod verify_operation; pub use all_caches::AllCaches; pub use block_replayer::{BlockReplayError, BlockReplayer}; pub use consensus_context::{ConsensusContext, ContextError}; +pub use execution_processing::process_execution_payload_envelope; pub use genesis::{ eth2_genesis_time, initialize_beacon_state_from_eth1, is_valid_genesis_state, process_activations, diff --git a/consensus/types/src/execution_payload_envelope.rs b/consensus/types/src/execution_envelope.rs similarity index 96% rename from consensus/types/src/execution_payload_envelope.rs rename to consensus/types/src/execution_envelope.rs index ae8ffd1d32..b0401bc47a 100644 --- a/consensus/types/src/execution_payload_envelope.rs +++ b/consensus/types/src/execution_envelope.rs @@ -38,7 +38,7 @@ use tree_hash_derive::TreeHash; #[arbitrary(bound = "E: EthSpec")] #[ssz(enum_behaviour = "transparent")] #[tree_hash(enum_behaviour = "transparent")] -pub struct ExecutionPayloadEnvelope { +pub struct ExecutionEnvelope { #[superstruct(only(EIP7732), partial_getter(rename = "payload_eip7732"))] pub payload: ExecutionPayloadEIP7732, #[serde(with = "serde_utils::quoted_u64")] diff --git a/consensus/types/src/lib.rs b/consensus/types/src/lib.rs index 53d2a6f28a..afda77ddfb 100644 --- a/consensus/types/src/lib.rs +++ b/consensus/types/src/lib.rs @@ -41,8 +41,8 @@ pub mod eth1_data; pub mod eth_spec; pub mod execution_bid; pub mod execution_block_hash; +pub mod execution_envelope; pub mod execution_payload; -pub mod execution_payload_envelope; pub mod execution_payload_header; pub mod fork; pub mod fork_data; @@ -77,7 +77,7 @@ pub mod signed_beacon_block_header; pub mod signed_bls_to_execution_change; pub mod signed_contribution_and_proof; pub mod signed_execution_bid; -pub mod signed_execution_payload_envelope; +pub mod signed_execution_envelope; pub mod signed_voluntary_exit; pub mod signing_data; pub mod sync_committee_subscription; @@ -172,14 +172,12 @@ pub use crate::eth_spec::EthSpecId; pub use crate::execution_bid::ExecutionBid; pub use crate::execution_block_hash::ExecutionBlockHash; pub use crate::execution_block_header::{EncodableExecutionBlockHeader, ExecutionBlockHeader}; +pub use crate::execution_envelope::{ExecutionEnvelope, ExecutionEnvelopeEIP7732}; pub use crate::execution_payload::{ ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella, ExecutionPayloadDeneb, ExecutionPayloadEIP7732, ExecutionPayloadElectra, ExecutionPayloadRef, Transaction, Transactions, Withdrawals, }; -pub use crate::execution_payload_envelope::{ - ExecutionPayloadEnvelope, ExecutionPayloadEnvelopeEIP7732, -}; pub use crate::execution_payload_header::{ ExecutionPayloadHeader, ExecutionPayloadHeaderBellatrix, ExecutionPayloadHeaderCapella, ExecutionPayloadHeaderDeneb, ExecutionPayloadHeaderElectra, ExecutionPayloadHeaderRef, @@ -255,7 +253,7 @@ pub use crate::signed_beacon_block_header::SignedBeaconBlockHeader; pub use crate::signed_bls_to_execution_change::SignedBlsToExecutionChange; pub use crate::signed_contribution_and_proof::SignedContributionAndProof; pub use crate::signed_execution_bid::SignedExecutionBid; -pub use crate::signed_execution_payload_envelope::SignedExecutionPayloadEnvelope; +pub use crate::signed_execution_envelope::SignedExecutionEnvelope; pub use crate::signed_voluntary_exit::SignedVoluntaryExit; pub use crate::signing_data::{SignedRoot, SigningData}; pub use crate::slot_epoch::{Epoch, Slot}; diff --git a/consensus/types/src/signed_execution_payload_envelope.rs b/consensus/types/src/signed_execution_envelope.rs similarity index 92% rename from consensus/types/src/signed_execution_payload_envelope.rs rename to consensus/types/src/signed_execution_envelope.rs index 5e265ab83c..9781b74078 100644 --- a/consensus/types/src/signed_execution_payload_envelope.rs +++ b/consensus/types/src/signed_execution_envelope.rs @@ -37,8 +37,8 @@ use tree_hash_derive::TreeHash; #[arbitrary(bound = "E: EthSpec")] #[ssz(enum_behaviour = "transparent")] #[tree_hash(enum_behaviour = "transparent")] -pub struct SignedExecutionPayloadEnvelope { +pub struct SignedExecutionEnvelope { #[superstruct(only(EIP7732), partial_getter(rename = "message_eip7732"))] - pub message: ExecutionPayloadEnvelopeEIP7732, + pub message: ExecutionEnvelopeEIP7732, pub signature: Signature, }