Skip to content

Amarifields/crypto-ledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Crypto Ledger

A compact C++ console application that simulates a simple blockchain ledger. Each block records an index, UTC timestamp, previous hash, current hash, difficulty, and nonce. The program assembles a small chain, validates it, and prints a readable ledger view.

Features

  • Simple proof-of-work with configurable difficulty
  • Genesis block creation and sequential block appends
  • Hash and previous-link validation across the chain
  • Clean console output suitable for demos and quick evaluations

Build

Requirements:

  • C++17-capable compiler (GCC, Clang, MSVC)

Examples:

  • GCC/Clang: g++ -std=c++17 -O2 -o crypto-ledger main.cpp
  • MSVC (Developer Prompt): cl /std:c++17 /O2 main.cpp

Run

./crypto-ledger

Output

  • A short chain with sample entries
  • Per-block details: index, time, previous hash, hash, difficulty, nonce, and payload
  • A validation summary of the chain state

Notes

The implementation is intentionally self-contained with no third-party dependencies, focusing on the data model and ledger flow. It is not intended for production use.

About

minimal blockchain ledger that chains blocks with hashes and timestamps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages