Add log compaction

Delete the comment mark before L116 to test.
StateMachine interface is not implemented.