Blockchain Protocol for Distributed Systems