Cryptocurrencies, led by bitcoin launched in 2009, have obtained wide attention due to the emerging Blockchain in recent years. Anonymous cryptocurrencies are highly essential since users want to preserve their privacy when conducting transactions. However, some users might misbehave with the cover of anonymity such as rampant trafficking and extortion. Thus, it is important to balance anonymity and accountability of anonymous cryptocurrencies. In this paper, we solve this issue by proposing a linkable group signature (LGS) for signing cryptocurrency transactions, which can be used to trace a payer's identity in consortium blockchain based anonymous cryptocurrencies, in case the payer tries illegal activities. A payer keeps anonymous if he/she behaves honestly. We prove that the proposed scheme achieves full-anonymity, full-traceability and linkability in the random oracle. Implementation of the proposed LGS scheme demonstrates its high efficiency thus, can be adopted in anonymous cryptocurrencies in reality.