RoadChain is a Layer-1 blockchain written from first principles in Python. No Ethereum fork, no Solidity, no framework. Every line of code — from elliptic curve cryptography to block validation — is original.
Python 3.12 · secp256k1 ECDSA · SHA-256 PoW · UTXO model
Most "new" blockchains are forks of existing codebases with cosmetic changes. RoadChain exists to prove that the core ideas — digital signatures, hash chains, consensus — can be implemented from first principles by a single engineer who understands the mathematics.
Elliptic Curve Digital Signature Algorithm implemented directly on the secp256k1 curve — the same curve Bitcoin uses. Key generation, signing, and verification written from the mathematical primitives. No OpenSSL dependency for core operations.
Block mining uses SHA-256 hashing with adjustable difficulty targeting. The difficulty adjustment algorithm maintains consistent block times as hashrate changes. Nonce search is parallelizable across cores.
Unspent Transaction Output model tracks coin ownership explicitly, like Bitcoin. Each transaction consumes previous outputs and creates new ones. Double-spend prevention through UTXO set management with O(1) lookup.
Every block contains a Merkle root of all transactions, enabling efficient verification of transaction inclusion without downloading the full block. Supports simplified payment verification for light clients.
Custom P2P protocol for block propagation, transaction broadcasting, and peer discovery. Gossip-based architecture with configurable fanout. Runs over TCP with optional WireGuard encryption.
Longest-chain-wins consensus with orphan block handling. Fork detection and resolution follows Nakamoto consensus rules. Chain reorganization is atomic — either it completes fully or rolls back entirely.
RoadChain's transaction signing is readable Python, not obfuscated framework calls. Here's how a transaction gets signed.
# RoadChain transaction signing — from first principles from roadchain.crypto import PrivateKey, sign_ecdsa from roadchain.tx import Transaction, TxInput, TxOutput # Create a transaction spending a previous output tx = Transaction( inputs=[TxInput(prev_hash=utxo.tx_hash, index=utxo.index)], outputs=[TxOutput(amount=50_000, pubkey_hash=recipient.hash160())] ) # Sign with secp256k1 ECDSA — our implementation, not OpenSSL signature = sign_ecdsa(private_key, tx.serialize()) tx.inputs[0].signature = signature tx.inputs[0].pubkey = private_key.public_key
| Language | Python 3.12, pure standard library + minimal deps |
| Consensus | Proof-of-Work (SHA-256), Nakamoto longest-chain |
| Signatures | ECDSA on secp256k1 (custom implementation) |
| Tx Model | UTXO (Unspent Transaction Output) |
| Block Size | 1 MB default, configurable |
| Block Time | 60s target with dynamic difficulty adjustment |
| Hashing | SHA-256 (block headers), RIPEMD-160 (addresses) |
| Network | Custom TCP P2P with gossip protocol |
| Storage | SQLite (blocks) + LevelDB (UTXO set) |
| License | Proprietary — BlackRoad OS, Inc. |