adds LogEntry type and derives lastLogTerm based on it