A Little Blockchain in Erlang
Questo articolo è disponibile in italiano
Erlang is one of the functional programming languages that allows you to build concurrent programs in a relatively simple way; its actor-based paradigm offers primitives to create processes and make them communicate with each other in a way that other languages do not.
Another peculiarity of Erlang, probably the most important one, is the possibility to update the code of a program without interrupting its execution. Here is an explanation of this functionality.
Among the softwares written in Erlang there is WhatsApp.
A blockchain, a word in vogue in recent years, is a data structure that provides guarantees on the authenticity of the data it contains. In fact, a blockchain is a chain of blocks of variable length: you can add blocks only at the top (or only at the bottom) of the chain but once added they can no longer be modified, but only read.
During my university career I had to implement a blockchain in Erlang. In this case it is a blockchain distributed on several nodes in a network, so algorithms have been implemented for the exchange of information between nodes (gossiping) and for the resolution of chain forks.
The entire project code, together with documentation on its operation, is available in this repository on GitHub.
Thanks to my colleague Lorenzo for the collaboration in the realization of this project.
Hi 👋, I'm Lorenzo 👨🏻💻
💼 Software developer
🎓 Master's degree in computer science
🤖 Artificial intelligence
🧠 Machine learning
📊 Data Analysis
🌐 Web development
📱 Android development
🇯🇵 Japanese culture
🥋 Martial arts