diff --git a/packages/blockchain/src/blockchain.ts b/packages/blockchain/src/blockchain.ts index 2ebc41e7b0..b49667c5e2 100644 --- a/packages/blockchain/src/blockchain.ts +++ b/packages/blockchain/src/blockchain.ts @@ -6,7 +6,7 @@ import { BIGINT_1, BIGINT_8, KECCAK256_RLP, - KECCAK256_RLP_RH, + SHA256_EMPTY_RH, Lock, MapDB, bigIntToHex, @@ -1314,7 +1314,7 @@ export class Blockchain implements BlockchainInterface { number: 0, stateRoot, withdrawalsRoot: common.isActivatedEIP(4895) ? KECCAK256_RLP : undefined, - requestsHash: common.isActivatedEIP(7685) ? KECCAK256_RLP_RH : undefined, + requestsHash: common.isActivatedEIP(7685) ? SHA256_EMPTY_RH : undefined, } if (common.consensusType() === 'poa') { if (common.genesis().extraData) { diff --git a/packages/util/src/constants.ts b/packages/util/src/constants.ts index 22e3c606dd..8c166da964 100644 --- a/packages/util/src/constants.ts +++ b/packages/util/src/constants.ts @@ -1,4 +1,5 @@ import { secp256k1 } from 'ethereum-cryptography/secp256k1.js' +import { sha256 } from 'ethereum-cryptography/sha256' import { hexToBytes } from './bytes.js' @@ -67,13 +68,7 @@ export const KECCAK256_RLP = hexToBytes(KECCAK256_RLP_S) /** * Keccak-256 hash of the RLP of an empty requests hash */ -export const KECCAK256_RLP_RH_S = - export const SHA256_EMPTY_RH_S = sha256(new Uint8Array([0, 1, 2])) - -/** - * Keccak-256 hash of the RLP of an empty requests hash - */ -export const SHA256_EMPTY_RH = hexToBytes(SHA256_EMPTY_RH_S) +export const SHA256_EMPTY_RH = sha256(new Uint8Array([0, 1, 2])) /** * RLP encoded empty string