We keep track of the Lightning state machine, but we don't need to keep track of the protocol.
As far as state, we keep track of L2 state and L1 state - about 10 pieces of data each.
We don't keep track of things like gossip and we don't need a network stack, so the complexity and attack surface is much smaller than an actual node.