This project is working in progress. A tiny blockchain
In consensus module, we design and implements different consensus algorithm, and make them pluggable.
please read document
We use go-libp2p to implements network layer, including:
- peers discovering
- peers communication
- blocks transferring
- transactions transferring
- consensus information transferring
We decide to use Ed25519 cryptographic algorithm to identify peers and produce signature.
Ed25519 is a public-key signature system with several attractive features:
- Fast single-signature verification
- Even faster batch verification
- Very fast signing
- Fast key generation
- High security level
- Collision resilience
- so on...
The VM module is designed as pluggable modules.
At step 1, we will support EVM. And in the future version, we'll implement the below virtual machine step by step:
- eWasm
- Javascript VM
At this EVM version, developers are coding with solidity, which is widely used to develop Dapps.
After implementing the virtual machine based on WebAssembly, you can use any languages to write contracts.
LevelDB
In tinychain, we use Bucket tree to induce transactions and world state.
Bucket tree is a variant merkle tree with several features that are different from the common merkle tree:
- fix height of tree when initialize and will not be changed by the amount of transactions.
- low-cost to recompute the root hash when add or remove a kv pair to/from tree.
- customizable capacity and aggreation.
Eventhub in tinychain is extended from TypeMux
and feed
in Ethereum. We combine them and re-implement a new event hub to achieve a better performance and readability, and make the processing flow clearer.