Instance input_Serializer : Serializer VarD.input :=
{| serialize := serialize_input;
deserialize := deserialize_input;
serialize_deserialize_id := input_serialize_deserialize_id |}.
Section Serializers.
Variable n : nat.
Instance raft_params : RaftParams VarD.vard_base_params :=
raft_params n.
Definition entry_serialize (e : entry) :=
serialize (Raft.eAt e) +$+
serialize (Raft.eClient e) +$+
serialize (Raft.eId e) +$+
serialize (Raft.eIndex e) +$+
serialize (Raft.eTerm e) +$+
serialize (Raft.eInput e).
Definition entry_deserialize : ByteListReader.t entry :=
At <- deserialize;;
Client <- deserialize;;
Id <- deserialize;;
Index <- deserialize;;
Term <- deserialize;;
Input <- deserialize;;
ByteListReader.ret (Raft.mkEntry At Client Id Index Term Input).

Lemma entry_serialize_deserialize_id :
serialize_deserialize_id_spec entry_serialize entry_deserialize.