code: public static Proposal fromTransaction(Transaction txn) {
      ZabMessage.Zxid zxid = toProtoZxid(txn.getZxid());
      ByteString bs = ByteString.copyFrom(txn.getBody());
      return Proposal.newBuilder().setZxid(zxid).setBody(bs)
                     .setType(ProposalType.values()[txn.getType()]).build();
    }
docs: Converts Transaction object to protobuf Proposal object.
  
  @param txn the Transaction object.
  @return the protobuf Proposal object.