From 63e418aa013c79bed3229c706ea0b40084e985e4 Mon Sep 17 00:00:00 2001 From: Mark Mackey Date: Tue, 6 Aug 2024 11:01:08 -0500 Subject: [PATCH] Fix Deserialization Bug in `engine-api` --- .../execution_layer/src/engine_api/json_structures.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/beacon_node/execution_layer/src/engine_api/json_structures.rs b/beacon_node/execution_layer/src/engine_api/json_structures.rs index 0eb20484141..665ca38d46e 100644 --- a/beacon_node/execution_layer/src/engine_api/json_structures.rs +++ b/beacon_node/execution_layer/src/engine_api/json_structures.rs @@ -731,13 +731,14 @@ impl From for JsonForkchoiceUpdatedV1Response { #[superstruct( variants(V1, V2), - variant_attributes(derive(Clone, Debug, Serialize, Deserialize),), + variant_attributes( + derive(Clone, Debug, Serialize, Deserialize), + serde(bound = "E: EthSpec", rename_all = "camelCase"), + ), partial_getter_error(ty = "Error", expr = "Error::IncorrectStateVariant") )] #[derive(Clone, Debug, Serialize)] -#[serde(bound = "E: EthSpec")] -#[serde(rename_all = "camelCase")] -#[serde(untagged)] +#[serde(bound = "E: EthSpec", rename_all = "camelCase", untagged)] pub struct JsonExecutionPayloadBody { #[serde(with = "ssz_types::serde_utils::list_of_hex_var_list")] pub transactions: Transactions,