Add additional pubring validation.
Add some comments and assertions.
Add PacketID recording and checking.