Skip to content

A Layer 1 blockchain system that implements general state transition logic, block production, and tx validation for practicing purpose using Rust.

License

Notifications You must be signed in to change notification settings

Pyoyeongjong/pint-chain

Repository files navigation

pint-chain

Mini BlockChakin Layer 1 Project

Project Overview

  • Layer 1 Blockchain implemented in Rust
  • Account-based blockchain
  • Five main components: (Network, Consensus (BlockImporter + Miner), PayloadBuilder, Pool (TxPool + Validator), Provider (StateProvider + DB)) + RPC Server
  • Consensus Rule: Proof of Work (PoW)
  • Difficulty adjustment: doubled or halved every block
  • Fork Choice: Longest Chain Rule
  • P2P Discovery: initially boot node, if full then random peer from boot node
  • World module that describes the game field (not yet implemented)
  • RPC: HTTP Server–Client communication
  • Heavily inspired by reth
  • ECDSA + Signer Recovery (same as ethereum)

How to use

Run a node

cargo run -- --boot-node
cargo run -- --name A --port 30304 --rpc-port 8546 --miner-address 0534501c34f5a0f3fa43dc5d78e619be7edfa21a

Rpc connectioin

Use clients/rpc crate. Currently only responds with binary data (example included).

Execution examples

Boot_node: node start image Boot_node: connection with normal node a image

Normal node a: node start + p2p connection with boot_node + syncronizing with boot node image

TODO LIST

  1. Implement World (Whatever! maybe game?)
  2. Block Explorer

About

A Layer 1 blockchain system that implements general state transition logic, block production, and tx validation for practicing purpose using Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published