public static BlockHeaderBuilder fromBuilder(final BlockHeaderBuilder fromBuilder) {
    final BlockHeaderBuilder toBuilder =
        create()
            .parentHash(fromBuilder.parentHash)
            .ommersHash(fromBuilder.ommersHash)
            .coinbase(fromBuilder.coinbase)
            .stateRoot(fromBuilder.stateRoot)
            .transactionsRoot(fromBuilder.transactionsRoot)
            .receiptsRoot(fromBuilder.receiptsRoot)
            .logsBloom(fromBuilder.logsBloom)
            .difficulty(fromBuilder.difficulty)
            .number(fromBuilder.number)
            .gasLimit(fromBuilder.gasLimit)
            .gasUsed(fromBuilder.gasUsed)
            .timestamp(fromBuilder.timestamp)
            .extraData(fromBuilder.extraData)
            .baseFee(fromBuilder.baseFee)
            .prevRandao(fromBuilder.mixHashOrPrevRandao)
            .withdrawalsRoot(fromBuilder.withdrawalsRoot)
            .excessBlobGas(fromBuilder.excessBlobGas)
            .parentBeaconBlockRoot(fromBuilder.parentBeaconBlockRoot)
            .requestsHash(fromBuilder.requestsHash)
            .blockHeaderFunctions(fromBuilder.blockHeaderFunctions);
    toBuilder.nonce = fromBuilder.nonce;
    return toBuilder;
  }
A utility class for building block headers.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockHeaderBuilder.java