Data Structures and Protocols for Scalability and Security of Distributed Consensus