UTXO-Based Bitcoin‑Like Network with Central Server, Miner, Faucet & Wallet #25
+9,631
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the foundational architecture and code for a simplified Bitcoin‑style network, built on a UTXO model. It establishes four core services—central server, miner server, fund (faucet) server, and wallet server—as well as a Next.js frontend to interact with the network.
Key Components
Central WebSocket Server (
central-server/
)Miner Server (
miner-server/
)Mines new blocks using proof‑of‑work (adjustable difficulty)
Validates incoming blocks and transactions:
Syncs with central server on startup to catch up to the latest chain tip
Broadcasts newly mined blocks back to the central server
Fund (Faucet) Server (
faucet-server/
)Wallet Server (
wallet-server/
)Exposes REST endpoints to:
Submits signed transactions to the network via the central server
Next.js Frontend (
wallet-ui/
)User interface for:
Connects to wallet server over REST and listens to block events via WebSocket
Installation & Running Locally
Clone & Install
http://localhost:3000
to access the wallet interface.Testing
Block Propagation:
UTXO Validation:
Faucet Rate Limit:
Chain Reorg Handling:
Next Steps
Merging this PR will lay the groundwork for all subsequent feature development, including advanced transaction types, peer discovery, and production‑grade security improvements.