Causal structure and quantum gravity