Unfortunately the 'pt-spec.txt section 3.3.5' section they mention does not exist, and in looking around I can't find anything that describes what these event fields are defined as ('PT=' 'TYPE=', 'CONNECT=', etc).
I started to write a stem parser for these but can't continue until this is done (I can't parse events without knowing what fields they include).
David is aware of this and plans to has kindly offered to add the missing info...
22:24 <+atagar> dgoulet: Your control-spec addition to descript PT_LOG and PT_STATUS cite a pt-spec section 3.3.4 which does not exist.22:24 <+atagar> s/descript/describe22:29 <+atagar> dgoulet: Huh. I'm not spotting anything that lists the keyword arguments ('PT=' and 'SEVERITY=') so guess the sections simply missing from the spec. I need that for stem support so please give me a nudge when the event spec's done. :)22:59 <+dgoulet> atagar: oh hmmm I'll fix that sorry23:17 <+atagar> Thanks! Much appreciated. :)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
On a side note I'd appreciate it if the control-spec lists all the event fields rather than instructing the reader to see the pt-spec. It's fine to cite the pt-spec for information, but when it comes the basic event format the control-spec should include everything the reader needs.
I watch the control-spec and dir-spec to keep informed about control and directory specification changes. Reshuffling event formatting under other specs makes my life harder, and arguably makes our control-spec incomplete.
On a side note I'd appreciate it if the control-spec lists all the event fields rather than instructing the reader to see the pt-spec. It's fine to cite the pt-spec for information, but when it comes the basic event format the control-spec should include everything the reader needs.
I watch the control-spec and dir-spec to keep informed about control and directory specification changes. Reshuffling event formatting under other specs makes my life harder, and arguably makes our control-spec incomplete.
If we duplicate information in control-spec and pt-spec, then they will get out of sync. Here's two options to avoid that:
put the relevant information in control-spec, and point pt-spec to control-spec
put the basic syntax in control-spec, and then say that additional fields may be added, and point to pt-spec for details
Whatever we decide, we should make sure that we are consistent with our other specs.
For example, the control-spec directory GETINFOs have basic info like URLs and descriptions, but the exact format is in dir-spec (like option 2).
I'm not a big fan of specifying the same structures both places, but I think we should extend control spec with information about the SEVERITY of the message in PT_LOG. Then I think that message type would be complete.
For PT_STATUS I think you should wait with doing anything fancy handling for now. We still don't have any PT's that emits anything useful here. If you want to implement some basic handling for this in stem, I suggest you emit an event which contains a dictionary of strings to string and write a parser for the serialization format we use (see tor's kv_line implementation).
atagar: Would an acceptable fix for this ticket be to specify SEVERITY for PT_LOG? As far as I can tell that is the only piece missing in control-spec.txt to be able to implement a PT_LOG handler purely from reading the control-spec.txt itself without ever having a look at the PT specification.
Hi Alex. I'd appreciate if the control-spec includes all information necessary for parsers. Just about every other event type specifies in detail what each field within the event will contain...
Personally I don't have an interest in what these events do or even if they're implemented. My sole concern is our spec, as that is what Stem will implement. If PT_STATUS is moot then lets remove it from the spec.
Yup. The formal parser grammar and future proofing details are the tidbits I'm interested in. I'll aim to whip up something for us to discuss in a few days (juggling this with both work and a sore throat).
That would be pretty nice to have both in the PT spec, but also in the Control spec, as it's the same format that is going through here and we plan on use this in more places in the future as it makes it easier to extend the messages later on.
Hi ahf, sorry about the delay. Just finished getting over my cold and now looking at a daunting load of work from my dayjob. I probably won't be able to get to this for a few weeks.
Hi ahf, apologies for the delay. I've pushed a prospective patch to the 'bug29136' branch of my repository. Please read the commit message for a few open questions.
Do PT_STATUS events exist or not? The prior spec confusingly said they're both a thing and unimplemented. We should either implement PT_STATUS or remove it from this specification (and tor's codebase, if present).
They exist, but as a reserved keyword right now. We still don't use them yet, so the spec will need revision as we add items here.
Are other severities permissible? And are we sure we want the 'severity' to be lowercase? Other events use upercase enumerations. Changing this would probably require a change in tor.
I think lowercase is fine here.
I've defined all PT_LOG and PT_STATUS attributes to be optional. Should any of them be mandatory? If so then please drop their square brackets.
For PT_LOG all 3 of the keys are mandatory: SEVERITY, PT, and MESSAGE. The MESSAGE value could be empty, but most likely wont be.
For PT_STATUS the PT and TRANSPORT is mandatory. Everything else is optional.
Hi Alex. Is there a ticket for implementing PT_STATUS? If so then this spec patch should either await it (if PT_STATUS's merge is imminent), or we should remove PT_STATUS until it's ready.
Maybe I'm missing something but it sounds like a mistake to spec or reserve the keyword for something that doesn't exist. Doing so risks that five years from now someone will ask "What is this PT_STATUS thing?" and the answer will be "something we started to spec out but never got around to".
Better to merge and spec PT_STATUS after it's done. :)
PT_STATUS is merged into tor.git, but no message structures are currently reserved for it there. It is in there such that PT developers can experiment with what messages that makes sense to have. Since it has the key/value format, they can practically describe any structure they find useful and we can then reserve them in the spec. Does that make sense?
Hi Alex. Is there a ticket for implementing PT_STATUS? If so then this spec patch should either await it (if PT_STATUS's merge is imminent), or we should remove PT_STATUS until it's ready.
Maybe I'm missing something but it sounds like a mistake to spec or reserve the keyword for something that doesn't exist. Doing so risks that five years from now someone will ask "What is this PT_STATUS thing?" and the answer will be "something we started to spec out but never got around to".
Better to merge and spec PT_STATUS after it's done. :)
We have reserved cell types and protocol versions before, and then never implemented them. atagar is right: if it is proposed, it belongs in a proposal. If it's in tor, it belongs in the spec.