Phase 9: CLI integration and full node #1

Open
opened 2026-02-21 09:30:21 +00:00 by Charon · 0 comments
Member

Context

Phases 0-8 are complete. The go-blockchain package is a fully functional library covering:

  • config/ — chain constants, hardfork schedule
  • types/ — cryptographic types, addresses, block/tx structs
  • wire/ — consensus-critical binary serialisation (bit-identical to C++)
  • difficulty/ — LWMA difficulty adjustment
  • crypto/ — CGo bridge (key ops, signatures, CLSAG, RandomX)
  • p2p/ — Levin protocol commands (handshake, sync, relay)
  • rpc/ — 11 daemon endpoints (JSON-RPC 2.0)
  • chain/ — block storage (go-store/SQLite) + RPC sync
  • consensus/ — structural, economic, PoW validation
  • wallet/ — mnemonic, scanning, signing, building, transfers
  • mining/ — solo RandomX PoW miner

All packages have >80% test coverage, pass -race, and are verified against the C++ testnet daemon.

What's missing

There is no binary entrypoint — everything is library code. The next phase should wire this into core/cli as subcommands.

Proposed scope

CLI commands

  • core blockchain sync — sync chain from daemon via RPC
  • core blockchain mine — run the solo miner
  • core blockchain wallet create — generate new wallet (mnemonic + keys)
  • core blockchain wallet scan — scan chain for owned outputs
  • core blockchain wallet balance — show balance
  • core blockchain wallet send — construct and broadcast a transaction
  • core blockchain info — query daemon info

Full node (stretch)

  • Combine P2P + chain + consensus into a standalone node that:
    • Accepts peer connections via Levin
    • Validates and stores blocks
    • Relays transactions
    • Runs the miner

This is a stretch goal — CLI integration alone is valuable.

Known limitations to address later

  • Single-threaded mining (CGo RandomX static global)
  • v2+ transaction serialisation (Zarcanum, stubbed)
  • Proof verification (BPPE/BGE/Zarcanum, returns "not implemented")
  • Stratum protocol (pool mining)
## Context Phases 0-8 are complete. The go-blockchain package is a fully functional library covering: - **config/** — chain constants, hardfork schedule - **types/** — cryptographic types, addresses, block/tx structs - **wire/** — consensus-critical binary serialisation (bit-identical to C++) - **difficulty/** — LWMA difficulty adjustment - **crypto/** — CGo bridge (key ops, signatures, CLSAG, RandomX) - **p2p/** — Levin protocol commands (handshake, sync, relay) - **rpc/** — 11 daemon endpoints (JSON-RPC 2.0) - **chain/** — block storage (go-store/SQLite) + RPC sync - **consensus/** — structural, economic, PoW validation - **wallet/** — mnemonic, scanning, signing, building, transfers - **mining/** — solo RandomX PoW miner All packages have >80% test coverage, pass `-race`, and are verified against the C++ testnet daemon. ## What's missing There is no binary entrypoint — everything is library code. The next phase should wire this into `core/cli` as subcommands. ## Proposed scope ### CLI commands - `core blockchain sync` — sync chain from daemon via RPC - `core blockchain mine` — run the solo miner - `core blockchain wallet create` — generate new wallet (mnemonic + keys) - `core blockchain wallet scan` — scan chain for owned outputs - `core blockchain wallet balance` — show balance - `core blockchain wallet send` — construct and broadcast a transaction - `core blockchain info` — query daemon info ### Full node (stretch) - Combine P2P + chain + consensus into a standalone node that: - Accepts peer connections via Levin - Validates and stores blocks - Relays transactions - Runs the miner This is a stretch goal — CLI integration alone is valuable. ## Known limitations to address later - Single-threaded mining (CGo RandomX static global) - v2+ transaction serialisation (Zarcanum, stubbed) - Proof verification (BPPE/BGE/Zarcanum, returns "not implemented") - Stratum protocol (pool mining)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: core/go-blockchain#1
No description provided.