diff --git a/beacon_node/execution_layer/src/block_hash.rs b/beacon_node/execution_layer/src/block_hash.rs index fac07c72649..93931aaa51c 100644 --- a/beacon_node/execution_layer/src/block_hash.rs +++ b/beacon_node/execution_layer/src/block_hash.rs @@ -38,11 +38,11 @@ impl ExecutionLayer { None }; - let rlp_data_gas_used = payload.data_gas_used().ok(); - let rlp_excess_data_gas = payload.excess_data_gas().ok(); + let rlp_blob_gas_used = payload.blob_gas_used().ok(); + let rlp_excess_blob_gas = payload.excess_blob_gas().ok(); // Calculate parent beacon block root (post-Deneb). - let rlp_parent_beacon_block_root = rlp_excess_data_gas + let rlp_parent_beacon_block_root = rlp_excess_blob_gas .as_ref() .map(|_| parent_beacon_block_root); @@ -52,8 +52,8 @@ impl ExecutionLayer { KECCAK_EMPTY_LIST_RLP.as_fixed_bytes().into(), rlp_transactions_root, rlp_withdrawals_root, - rlp_data_gas_used, - rlp_excess_data_gas, + rlp_blob_gas_used, + rlp_excess_blob_gas, rlp_parent_beacon_block_root, ); @@ -110,11 +110,11 @@ pub fn rlp_encode_block_header(header: &ExecutionBlockHeader) -> Vec { if let Some(withdrawals_root) = &header.withdrawals_root { rlp_header_stream.append(withdrawals_root); } - if let Some(data_gas_used) = &header.data_gas_used { - rlp_header_stream.append(data_gas_used); + if let Some(blob_gas_used) = &header.blob_gas_used { + rlp_header_stream.append(blob_gas_used); } - if let Some(excess_data_gas) = &header.excess_data_gas { - rlp_header_stream.append(excess_data_gas); + if let Some(excess_blob_gas) = &header.excess_blob_gas { + rlp_header_stream.append(excess_blob_gas); } if let Some(parent_beacon_block_root) = &header.parent_beacon_block_root { rlp_header_stream.append(parent_beacon_block_root); @@ -165,8 +165,8 @@ mod test { nonce: Hash64::zero(), base_fee_per_gas: 0x036b_u64.into(), withdrawals_root: None, - data_gas_used: None, - excess_data_gas: None, + blob_gas_used: None, + excess_blob_gas: None, parent_beacon_block_root: None, }; let expected_rlp = "f90200a0e0a94a7a3c9617401586b1a27025d2d9671332d22d540e0af72b069170380f2aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0ec3c94b18b8a1cff7d60f8d258ec723312932928626b4c9355eb4ab3568ec7f7a050f738580ed699f0469702c7ccc63ed2e51bc034be9479b7bff4e68dee84accfa029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a00008301553482079e42a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036b"; @@ -196,8 +196,8 @@ mod test { nonce: Hash64::zero(), base_fee_per_gas: 0x036b_u64.into(), withdrawals_root: None, - data_gas_used: None, - excess_data_gas: None, + blob_gas_used: None, + excess_blob_gas: None, parent_beacon_block_root: None, }; let expected_rlp = "f901fda0927ca537f06c783a3a2635b8805eef1c8c2124f7444ad4a3389898dd832f2dbea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e97859b065bd8dbbb4519c7cb935024de2484c2b7f881181b4360492f0b06b82a050f738580ed699f0469702c7ccc63ed2e51bc034be9479b7bff4e68dee84accfa029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800188016345785d8a00008301553482079e42a0000000000000000000000000000000000000000000000000000000000002000088000000000000000082036b"; @@ -228,8 +228,8 @@ mod test { nonce: Hash64::zero(), base_fee_per_gas: 0x34187b238_u64.into(), withdrawals_root: None, - data_gas_used: None, - excess_data_gas: None, + blob_gas_used: None, + excess_blob_gas: None, parent_beacon_block_root: None, }; let expected_hash = diff --git a/beacon_node/execution_layer/src/engine_api.rs b/beacon_node/execution_layer/src/engine_api.rs index 45cf2004659..80f4ac7485b 100644 --- a/beacon_node/execution_layer/src/engine_api.rs +++ b/beacon_node/execution_layer/src/engine_api.rs @@ -198,10 +198,10 @@ pub struct ExecutionBlockWithTransactions { pub withdrawals: Vec, #[superstruct(only(Deneb))] #[serde(with = "serde_utils::u64_hex_be")] - pub data_gas_used: u64, + pub blob_gas_used: u64, #[superstruct(only(Deneb))] #[serde(with = "serde_utils::u64_hex_be")] - pub excess_data_gas: u64, + pub excess_blob_gas: u64, } impl TryFrom> for ExecutionBlockWithTransactions { @@ -278,8 +278,8 @@ impl TryFrom> for ExecutionBlockWithTransactions .into_iter() .map(|withdrawal| withdrawal.into()) .collect(), - data_gas_used: block.data_gas_used, - excess_data_gas: block.excess_data_gas, + blob_gas_used: block.blob_gas_used, + excess_blob_gas: block.excess_blob_gas, }), }; Ok(json_payload) @@ -562,8 +562,8 @@ impl ExecutionPayloadBodyV1 { block_hash: header.block_hash, transactions: self.transactions, withdrawals, - data_gas_used: header.data_gas_used, - excess_data_gas: header.excess_data_gas, + blob_gas_used: header.blob_gas_used, + excess_blob_gas: header.excess_blob_gas, })) } else { Err(format!( 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 487bfa07867..bce4e686f92 100644 --- a/beacon_node/execution_layer/src/engine_api/json_structures.rs +++ b/beacon_node/execution_layer/src/engine_api/json_structures.rs @@ -100,10 +100,10 @@ pub struct JsonExecutionPayload { pub withdrawals: VariableList, #[superstruct(only(V3))] #[serde(with = "serde_utils::u64_hex_be")] - pub data_gas_used: u64, + pub blob_gas_used: u64, #[superstruct(only(V3))] #[serde(with = "serde_utils::u64_hex_be")] - pub excess_data_gas: u64, + pub excess_blob_gas: u64, } impl From> for JsonExecutionPayloadV1 { @@ -175,8 +175,8 @@ impl From> for JsonExecutionPayloadV3 { .map(Into::into) .collect::>() .into(), - data_gas_used: payload.data_gas_used, - excess_data_gas: payload.excess_data_gas, + blob_gas_used: payload.blob_gas_used, + excess_blob_gas: payload.excess_blob_gas, } } } @@ -260,8 +260,8 @@ impl From> for ExecutionPayloadDeneb { .map(Into::into) .collect::>() .into(), - data_gas_used: payload.data_gas_used, - excess_data_gas: payload.excess_data_gas, + blob_gas_used: payload.blob_gas_used, + excess_blob_gas: payload.excess_blob_gas, } } } diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 8909c8526b6..101a3f1ccd0 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -1913,8 +1913,8 @@ impl ExecutionLayer { block_hash: deneb_block.block_hash, transactions: convert_transactions(deneb_block.transactions)?, withdrawals, - data_gas_used: deneb_block.data_gas_used, - excess_data_gas: deneb_block.excess_data_gas, + blob_gas_used: deneb_block.blob_gas_used, + excess_blob_gas: deneb_block.excess_blob_gas, }) } }; diff --git a/beacon_node/execution_layer/src/test_utils/execution_block_generator.rs b/beacon_node/execution_layer/src/test_utils/execution_block_generator.rs index e0a9c7f7ec0..82419a829e4 100644 --- a/beacon_node/execution_layer/src/test_utils/execution_block_generator.rs +++ b/beacon_node/execution_layer/src/test_utils/execution_block_generator.rs @@ -574,8 +574,8 @@ impl ExecutionBlockGenerator { block_hash: ExecutionBlockHash::zero(), transactions: vec![].into(), withdrawals: pa.withdrawals.clone().into(), - data_gas_used: 0, - excess_data_gas: 0, + blob_gas_used: 0, + excess_blob_gas: 0, }), }; diff --git a/consensus/types/src/execution_block_header.rs b/consensus/types/src/execution_block_header.rs index 3d9791578b9..5ec5484cab4 100644 --- a/consensus/types/src/execution_block_header.rs +++ b/consensus/types/src/execution_block_header.rs @@ -26,8 +26,8 @@ use metastruct::metastruct; #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[metastruct(mappings(map_execution_block_header_fields_except_withdrawals(exclude( withdrawals_root, - data_gas_used, - excess_data_gas, + blob_gas_used, + excess_blob_gas, parent_beacon_block_root )),))] pub struct ExecutionBlockHeader { @@ -48,8 +48,8 @@ pub struct ExecutionBlockHeader { pub nonce: Hash64, pub base_fee_per_gas: Uint256, pub withdrawals_root: Option, - pub data_gas_used: Option, - pub excess_data_gas: Option, + pub blob_gas_used: Option, + pub excess_blob_gas: Option, pub parent_beacon_block_root: Option, } @@ -59,8 +59,8 @@ impl ExecutionBlockHeader { rlp_empty_list_root: Hash256, rlp_transactions_root: Hash256, rlp_withdrawals_root: Option, - rlp_data_gas_used: Option, - rlp_excess_data_gas: Option, + rlp_blob_gas_used: Option, + rlp_excess_blob_gas: Option, rlp_parent_beacon_block_root: Option, ) -> Self { // Most of these field mappings are defined in EIP-3675 except for `mixHash`, which is @@ -83,8 +83,8 @@ impl ExecutionBlockHeader { nonce: Hash64::zero(), base_fee_per_gas: payload.base_fee_per_gas(), withdrawals_root: rlp_withdrawals_root, - data_gas_used: rlp_data_gas_used, - excess_data_gas: rlp_excess_data_gas, + blob_gas_used: rlp_blob_gas_used, + excess_blob_gas: rlp_excess_blob_gas, parent_beacon_block_root: rlp_parent_beacon_block_root, } } diff --git a/consensus/types/src/execution_payload.rs b/consensus/types/src/execution_payload.rs index 354c9960666..41241b21bee 100644 --- a/consensus/types/src/execution_payload.rs +++ b/consensus/types/src/execution_payload.rs @@ -85,10 +85,10 @@ pub struct ExecutionPayload { pub withdrawals: Withdrawals, #[superstruct(only(Deneb), partial_getter(copy))] #[serde(with = "serde_utils::quoted_u64")] - pub data_gas_used: u64, + pub blob_gas_used: u64, #[superstruct(only(Deneb), partial_getter(copy))] #[serde(with = "serde_utils::quoted_u64")] - pub excess_data_gas: u64, + pub excess_blob_gas: u64, } impl<'a, T: EthSpec> ExecutionPayloadRef<'a, T> { diff --git a/consensus/types/src/execution_payload_header.rs b/consensus/types/src/execution_payload_header.rs index 5cb89f74420..9f68ca940b2 100644 --- a/consensus/types/src/execution_payload_header.rs +++ b/consensus/types/src/execution_payload_header.rs @@ -80,11 +80,11 @@ pub struct ExecutionPayloadHeader { #[superstruct(only(Deneb))] #[serde(with = "serde_utils::quoted_u64")] #[superstruct(getter(copy))] - pub data_gas_used: u64, + pub blob_gas_used: u64, #[superstruct(only(Deneb))] #[serde(with = "serde_utils::quoted_u64")] #[superstruct(getter(copy))] - pub excess_data_gas: u64, + pub excess_blob_gas: u64, } impl ExecutionPayloadHeader { @@ -155,8 +155,8 @@ impl ExecutionPayloadHeaderCapella { block_hash: self.block_hash, transactions_root: self.transactions_root, withdrawals_root: self.withdrawals_root, - data_gas_used: 0, - excess_data_gas: 0, + blob_gas_used: 0, + excess_blob_gas: 0, } } } @@ -221,8 +221,8 @@ impl<'a, T: EthSpec> From<&'a ExecutionPayloadDeneb> for ExecutionPayloadHead block_hash: payload.block_hash, transactions_root: payload.transactions.tree_hash_root(), withdrawals_root: payload.withdrawals.tree_hash_root(), - data_gas_used: payload.data_gas_used, - excess_data_gas: payload.excess_data_gas, + blob_gas_used: payload.blob_gas_used, + excess_blob_gas: payload.excess_blob_gas, } } } diff --git a/testing/ef_tests/Makefile b/testing/ef_tests/Makefile index 9d18fa84dca..a1a71e0b2af 100644 --- a/testing/ef_tests/Makefile +++ b/testing/ef_tests/Makefile @@ -1,4 +1,4 @@ -TESTS_TAG := v1.4.0-beta.0 +TESTS_TAG := v1.4.0-beta.1 TESTS = general minimal mainnet TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))