I am puzzled by the question if not only the data, but also the header of a relay cell in Tor is onion-encrypted.
I understand that when an OR receives an outbound relay cell and peels off one layer of encryption, the relay header's 'recognized' field being 0 tells the OR if it is the last hop (if the relay digest confirms this). This sounds like the relay header is onion-encrypted, just like the actual data contained in the relay cell.
But then, the other relay header fields (relay_command, stream_id, payload_len) seem to be visible (and identical) at every hop, independent of it being the final hop or an intermediate relay. This sounds like the relay header isn't onion-encrypted.
Clearly, I must be missing something? Grateful for any clues!