Self-written blockchain. From theory to practice.