code: def namedb_is_history_snapshot( history_snapshot ):
      
      
      # sanity check:  each mutate field in the operation must be defined in op_data, even if it's null.
      missing = []
  
      assert 'op' in history_snapshot.keys(), "BUG: no op given"
  
      opcode = op_get_opcode_name( history_snapshot['op'] )
      assert opcode is not None, "BUG: unrecognized op '%s'" % history_snapshot['op']
  
      consensus_fields = op_get_consensus_fields( opcode )
      for field in consensus_fields:
          if field not in history_snapshot.keys():
              missing.append( field )
  
      assert len(missing) == 0, ("BUG: operation '%s' is missing the following fields: %s" % (opcode, ",".join(missing)))
      return True
docs: Given a dict, verify that it is a history snapshot.
      It must have all consensus fields.
      Return True if so.
      Raise an exception of it doesn't.