Deadly violence erupted around a controversial vote held in Venezuela on Sunday, with a candidate to the assembly being elected shot dead in his home and troops firing weapons to clear protesters in Caracas.