From 0ed3a79186d7efd1ba0f72be20c37f3227abb9b6 Mon Sep 17 00:00:00 2001 From: Lucas Saldanha Date: Mon, 22 Jul 2024 16:16:01 +1200 Subject: [PATCH] Remove randomness from mock execution payload header builder --- .../datastructures/interop/GenesisStateBuilder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/interop/GenesisStateBuilder.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/interop/GenesisStateBuilder.java index 6607ebe035a..27c32dfa87f 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/interop/GenesisStateBuilder.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/interop/GenesisStateBuilder.java @@ -146,19 +146,19 @@ private ExecutionPayloadHeader mockExecutionPayloadHeader() { .getExecutionPayloadHeaderSchema() .createExecutionPayloadHeader( b -> { - b.blockHash(Bytes32.random()); + b.blockHash(generateMockGenesisBlockHash()); b.parentHash(Bytes32.ZERO); b.feeRecipient(Bytes20.ZERO); b.stateRoot(Bytes32.ZERO); b.receiptsRoot(Bytes32.ZERO); - b.logsBloom(Bytes.random(256)); - b.prevRandao(Bytes32.random()); + b.logsBloom(Bytes.repeat((byte) 0x00, 256)); + b.prevRandao(Bytes32.ZERO); b.blockNumber(UInt64.ZERO); - b.gasLimit(UInt64.ONE); + b.gasLimit(UInt64.ZERO); b.gasUsed(UInt64.ZERO); b.timestamp(UInt64.ZERO); - b.extraData(Bytes.random(20)); - b.baseFeePerGas(UInt256.ONE); + b.extraData(Bytes.repeat((byte) 0x00, 20)); + b.baseFeePerGas(UInt256.ZERO); b.transactionsRoot(Bytes32.ZERO); // Capella b.withdrawalsRoot(() -> Bytes32.ZERO);