Scalable infrastructure for digital currencies