wal: make record a protobuf type