Back to battles
legendaryupcoming

Blockchain

Build a basic blockchain with proof-of-work mining, transactions, and P2P networking.

60 min limit0 participants
systemscryptotypescript
PRD
# Blockchain PRD

## Overview
Build a basic blockchain implementation with SHA-256 proof-of-work mining, a transaction system with digital signatures, wallet management, P2P networking for block and transaction propagation, and a REST API for interacting with the chain.

## Requirements
- Block structure: index, timestamp, list of transactions, previous block hash, nonce, and block hash
- SHA-256 hashing for block hash computation
- Proof-of-work mining: find a nonce such that the block hash starts with N leading zeros
- Adjustable mining difficulty
- Transaction structure: sender address, recipient address, amount, and digital signature
- Transaction pool holding pending transactions awaiting inclusion in a block
- Block validation: verify hash integrity, previous hash linkage, and proof-of-work
- Full chain validation: verify the entire blockchain from genesis to tip
- Longest chain rule: resolve forks by adopting the longest valid chain
- Genesis block creation as the hardcoded first block
- Wallet generation: create public/private key pairs for sending and receiving
- Transaction signing with the sender's private key and verification with the public key
- Account balance calculation (UTXO or account-based model)
- Mining reward: coinbase transaction crediting the miner
- P2P networking: connect nodes, broadcast new blocks and transactions to peers
- Chain synchronization: new nodes download and verify the full chain from peers
- REST API for wallet operations, transaction submission, and chain inspection
- CLI for mining and wallet management

## Tech Stack
- TypeScript / Node.js
- Crypto module for SHA-256 and key pair generation
- No external blockchain libraries — raw implementation required

## Scoring Criteria
- **Functional (40%)**: Mining produces valid blocks, transactions transfer value, chain validates correctly
- **Quality (20%)**: Secure cryptography, proper consensus rules, clean P2P protocol
- **Fidelity (25%)**: All features including wallets, P2P sync, fork resolution, and REST API
- **Speed (15%)**: Time bonus

Battle Stats

Time Limit60 min
Participants0
Statusupcoming

Rules

  • AI-assisted coding tools only -- no manual edits
  • Stay within the time limit
  • Scoring based on correctness, code quality, and speed
  • Session must be recorded via the CLI