github.com/SakigamiYang/actor-block-chain ↗
A blockchain built using the Scala programming language and the actor model.
Open this visualization on its own page →
Contributors
1
Lines of Code
44
From
2020-10-04
To
2020-12-02
About SakigamiYang/actor-block-chain
ActorBlockChain is a blockchain implementation written in Scala that leverages the actor model for concurrent processing. The project demonstrates core blockchain concepts through a minimal but functional design that includes transactions, block mining, and distributed node operations.
The system implements a traditional proof-of-work consensus mechanism similar to Bitcoin's Hashcash algorithm, where miners must find hashes with a specified number of leading zeros to validate new blocks. The blockchain itself is a linked list of blocks, each containing transactions and cryptographically chained to the previous block using SHA-256 hashing. Transactions represent the movement of coins between entities and are collected into blocks before being added to the chain.
The Node component serves as the server implementation, exposing REST APIs for basic blockchain operations including submitting new transactions, viewing pending transactions, mining blocks, and querying the current blockchain state. The project is designed to be educational, demonstrating how the actor model can be applied to blockchain architecture, though the proof-of-work difficulty parameter is currently fixed at four leading zeros rather than being configurable.