public static Bytes encodeFromAddresses(final Collection<Address> addresses) {
    return new QbftExtraDataCodec()
        .encode(
            new BftExtraData(
                Bytes.wrap(new byte[EXTRA_VANITY_LENGTH]),
                Collections.emptyList(),
                Optional.empty(),
                0,
                addresses));
  }
Encode from addresses.

@param addresses the addresses
@return the bytes
consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java