private void processExtraData() {
    final ObjectNode configNode =
        JsonUtil.getObjectNode(genesisConfig, "config")
            .orElseThrow(
                () -> new IllegalArgumentException("Missing config section in config file"));

    final JsonGenesisConfigOptions genesisConfigOptions =
        JsonGenesisConfigOptions.fromJsonObject(configNode);
    if (genesisConfigOptions.isIbft2()) {
      LOG.info("Generating IBFT extra data.");
      final String extraData =
          IbftExtraDataCodec.encodeFromAddresses(addressesForGenesisExtraData).toString();
      genesisConfig.put("extraData", extraData);
    } else if (genesisConfigOptions.isQbft()) {
      LOG.info("Generating QBFT extra data.");
      final String extraData =
          QbftExtraDataCodec.encodeFromAddresses(addressesForGenesisExtraData).toString();
      genesisConfig.put("extraData", extraData);
    }
  }
Computes RLP encoded exta data from pre filled list of addresses.
app/src/main/java/org/hyperledger/besu/cli/subcommands/operator/GenerateBlockchainConfig.java