func encodeOp(op consensus.Op) ([]byte, error) {
	var buf bytes.Buffer
	err := encode(op, &buf)
	return buf.Bytes(), err
}
encodeOp serializes an op
package libp2praft
import (
	"bytes"
	"io"
	consensus "github.com/libp2p/go-libp2p-consensus"
	codec "github.com/ugorji/go/codec"
)