Blockchain Scalability and its Foundations in Distributed Systems