Keep track of the head and tail of the trace through each block.