James D’Angelo has an excellent series of tutorials on the inner workings of blockchains and cryptoledgers.
One of my favorites is by far his explanation of what a Merkle tree and Merkle root are, breaking them down step-by-step. He bases his code off a really cool blog post from Ken Shirriff: Bitcoin mining the hard way: the algorithms, protocols, and bytes
[Quick endorsement of Ken, I found several of his posts very helpful and cited a number of them in GCON.]