static void storeParentBeaconBlockRoot(
      final WorldUpdater worldUpdater, final long timestamp, final Bytes32 root) {
    /*
     see EIP-4788: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4788.md
    */
    // If code is not deployed don't do anything
    final MutableAccount account = worldUpdater.getAccount(BEACON_ROOTS_ADDRESS);
    if (account == null || Hash.EMPTY.equals(account.getCodeHash())) {
      return;
    }

    final long timestampReduced = Long.remainderUnsigned(timestamp, HISTORY_BUFFER_LENGTH);
    final long timestampExtended = timestampReduced + HISTORY_BUFFER_LENGTH;

    final UInt256 timestampIndex = UInt256.valueOf(timestampReduced);
    final UInt256 rootIndex = UInt256.valueOf(timestampExtended);

    account.setStorageValue(timestampIndex, UInt256.fromBytes(Bytes.ofUnsignedLong(timestamp)));
    account.setStorageValue(rootIndex, UInt256.fromBytes(root));
    worldUpdater.commit();
  }
A helper class to store the parent beacon block root.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ParentBeaconBlockRootHelper.java