It's largely a matter of choiceu2014usually not your own choice, but your parents, when they register you and get your first national ID card (u8eabu4efdu8bc1). One of the major ethnicities is not even based on blood ancestry at all but on religion: Even if you have two Han parents, you can (if I understand it correctly) put yourself down as Hui if you consider yourself a Muslim. I don't believe anyone is asked to prove their ethnicity, though I guess I've seen my wife (who is Manchu, but only on her father's side) fill out forms where the ethnicity of parents is asked.