This is a PoC of utxo chat proposed by Tadge Dryja. A decentralized chat system that uses Bitcoin UTXOs for spam protection without bloating the blockchain.
-
Basic Message Validation
- UTXO verification through Bitcoin RPC
- Message signature verification (only p2pkh)
- Message size limits (10KB per UTXO) (not test!!!!)
-
Configuration
- JSON-based configuration
- RPC settings for Bitcoin node
- Node configuration (listen address, keys, UTXOs)
-
Basic Client/Server
- HTTP server for message reception (should we change it to wss or other protocol)
- Test client for sending messages
- In-memory message storage
-
UTXO Verification Improvements
- Proper verification of UTXO ownership
- Script validation for different UTXO types
- Better error handling and logging
-
P2P Network Layer
- Peer discovery mechanism
- Message propagation between nodes
- Connection management
- Peer health monitoring
-
Data Persistence
- Persistent storage for messages
- UTXO tracking
- Message history
- Copy the default configuration:
cp config/default.json config/config.json
- Edit
config/config.json
with your Bitcoin RPC settings:
{
"rpc": {
"host": "your-bitcoin-rpc-host",
"user": "your-rpc-username",
"pass": "your-rpc-password"
}
}
- Start the server:
go run main.go
- Test with client:
cd cmd/client
go run main.go -message "Your test message"
-
Priority 1: UTXO Verification
- Implement proper script validation
- Add support for different UTXO types
- Improve error handling
-
Priority 2: P2P Network
- Design peer discovery protocol
- Implement message propagation
- Add connection management
-
Priority 3: Storage
- Design database schema
- Implement persistent storage
- Add message history queries