Merge pull request #50 from m1ch1/master

Use the single-line format for protobuf message logging.
Synchronization phase
Merge pull request #40 from EasonLiao/sync_new

Implement phase 2: state synchronization