Fundamentals: How blockchains actually work