code: public static Message buildProposal(Transaction txn) {
      ZabMessage.Zxid zxid = toProtoZxid(txn.getZxid());
  
      Proposal prop = Proposal.newBuilder()
                              .setZxid(zxid)
                              .setBody(ByteString.copyFrom(txn.getBody()))
                              .setType(ProposalType.values()[txn.getType()])
                              .build();
  
      return Message.newBuilder().setType(MessageType.PROPOSAL)
                                 .setProposal(prop)
                                 .build();
    }
docs: Creates a PROPOSAL message.
  
  @param txn the transaction of this proposal.
  @return a protobuf message.