1. A method comprising: in a network comprising a plurality of network nodes each configured to apply one or more service functions to traffic that passes through the respective network nodes, receiving at a network node packets encapsulated in a service header that includes information defining a variable set of context headers stacked into an association of metadata that is relevant to one or more service functions within a service path comprised of one or more network nodes; and at the network node, interpreting a forwarding state and a next-hop network node for the service path from the service header, and determining a service action or associated metadata from the set of context headers.