How mawaaw/blockchain-example works
NoobChain is a small educational Java blockchain demo: its entry point builds and mines three local blocks, validates their hashes and links, then prints the chain as JSON. Block stores block data and performs proof of work; StringUtil provides hashing and formatting helpers. The excerpts show these calls, but also reveal a spelling mismatch: Block calls getDificultyString while StringUtil defines getDifficultyString, so that mining dependency is shown as unverified.
Main entry points: NoobChain.java Chain demo · Block.java Block and mining · StringUtil.java Hash and JSON helpers
Components 4
Demo
- Chain demo
NoobChain.java
Blockchain
- Block and mining
Block.java
Utilities
- Hash and JSON helpers
StringUtil.java
Other components
- Demo runner
Connections 7
- Demo runner → Chain demo: runs
README.md - Chain demo → Block and mining: creates and mines
NoobChain.java - Chain demo → Block and mining: validates hashes
NoobChain.java - Block and mining → Hash and JSON helpers: hashes data
Block.java - Block and mining → Hash and JSON helpers: requests target
Block.java - Chain demo → Hash and JSON helpers: formats output
NoobChain.java - Chain demo → Hash and JSON helpers: gets difficulty
NoobChain.java