A lightweight, proof-of-work blockchain cryptocurrency written in Python with async networking. Features automatic updates, peer-to-peer networking, and efficient mining with dynamic difficulty adjustment.
- Async Networking: High-performance asynchronous I/O for peer-to-peer communication
- Proof-of-Work Mining: Memory-hard mining algorithm with dynamic difficulty
- Peer-to-Peer Networking: Decentralized network with automatic peer discovery
- Automatic Updates: Self-updating from GitHub releases
- Wallet System: Secure address generation and transaction management
- Incremental Sync: Efficient blockchain synchronization with chunked downloads
- Cross-Platform: Windows, Linux, and macOS support
- TCP Protocol: Simple, reliable network communication
- OS: Windows 10+, Linux (Ubuntu 18.04+, CentOS 7+), macOS 10.15+
- CPU: 32-bit processor with at least 2 cores
- RAM: 512 MB minimum, 1 GB recommended
- Storage: 100 MB free space for blockchain and binaries
- Network: Stable internet connection for peer-to-peer communication
- Python: Version 3.11 or later
- pip: Python package installer
- Git: For cloning the repository
- GitHub CLI (optional): For automated releases
- Open Ports: TCP port 6969 (configurable)
- Firewall: Allow outbound connections to peers
- Internet Access: Required for updates and peer discovery
# Clone repository
git clone https://github.com/Deenpro1/Owonero-python
cd Owonero-python
# Install Python dependencies
pip install -r requirements.txt
# Run the application
python src/main.py# Navigate to your Owonero directory
cd Owonero-python
# Pull latest changes
git pull origin main
# Update Python dependencies (if requirements.txt changed)
pip install -r requirements.txt --upgrade
# Restart your application
python src/main.py# Start daemon (network node)
python src/main.py -d -p 6969
# Or connect to existing network
python src/main.py -d -n existing-node.com:6969 -p 6969# Mine with 4 threads
python src/main.py -m -n localhost:6969 -t 4
# Mine to remote node
python src/main.py -m -n node.example.com:6969 -t 8# View balance and address
python src/main.pypython src/main.py -d [options]-d: Run as network daemon-p PORT: Listening port (default: 6969)-n HOST:PORT: Connect to existing node-peers "ADDR1,ADDR2": Initial peer addresses--no-init: Skip local blockchain, sync from peers--no-update: Skip automatic update check
python src/main.py -m [options]-m: Start mining-n HOST:PORT: Node to submit blocks to-w FILE: Wallet file (default: wallet.json)-t THREADS: Number of mining threads (default: 1)-b BLOCKS: Blocks to mine (0 = unlimited)
python src/main.py [options]-w FILE: Custom wallet file-tui: Launch terminal user interface
Owonero uses a simple TCP-based protocol. Connect using telnet or netcat:
# Connect to daemon
telnet localhost 6969
# Get blockchain height
getheight
42
# Get peer list
getpeers
["192.168.1.100:6969", "node.example.com:6969"]
# Add new peer
addpeer
192.168.1.101:6969
ok| Command | Description | Response |
|---|---|---|
getchain |
Full blockchain (JSON) | Blockchain JSON |
getheight |
Current block height | Integer |
getblocks START END |
Block range | Blocks JSON array |
submitblock |
Submit mined block | JSON payload required |
sendtx |
Submit transaction | JSON payload required |
getpeers |
Known peers list | JSON array |
addpeer |
Add peer | Address on next line |
removepeer |
Remove peer | Address on next line |
getwallet |
Wallet information | Address on next line |
sync |
Force sync | Initiates sync |
mineractive |
Report active miner | Miner address |
- Python 3.11+
- pip (Python package installer)
- Git
- PowerShell (Windows) or Bash (Linux/macOS)
# Clone with submodules
git clone --recursive https://github.com/Deenpro1/Owonero-python
cd Owonero-python
# Install dependencies
pip install -r requirements.txt
# Run the application
python src/main.pyOwonero uses GitHub Actions for automated building and releasing. The CI/CD pipeline:
- Triggers: On push to
master/mainbranch and pull requests - Platforms: Windows (AMD64, i386), Linux (AMD64, i386, ARM64)
- Artifacts: Binaries uploaded as workflow artifacts
- Releases: Automatic GitHub releases with zipped binaries
.github/workflows/build.yml- Main build workflow
You can also trigger builds manually:
- Go to Actions tab in GitHub
- Select Build Owonero workflow
- Click Run workflow
- Optionally specify a custom version
When running a daemon, access web stats at http://localhost:6767
- Monitor hashrate in mining output
- Adjust thread count with
-tflag - Higher difficulty requires more computational power
# Check daemon status
echo "getheight" | nc localhost 6969
# View connected peers
echo "getpeers" | nc localhost 6969- Private Keys: Never share your wallet files
- Network: Use firewall to restrict access to daemon port
- Updates: Automatic updates download from official GitHub releases
- Mining: Secure proof-of-work prevents double-spending
- Verify daemon is running:
netstat -an | grep 6969 - Check firewall settings
- Ensure correct host:port format
- Confirm connection to daemon
- Check wallet file exists:
ls wallet.json - Verify sufficient system resources
- Use
--no-initflag for clean sync - Check network connectivity
- Verify peer addresses are reachable
- Check internet connection
- Verify GitHub API access
- Use
--no-updateto skip updates
# Enable debug logging
OWONERO_LOG_LEVEL=debug python src/main.py -d
# Run with Python debugger
python -m pdb src/main.py -d- Check daemon logs for error messages
- Verify system meets minimum requirements
- Test network connectivity with ping/telnet
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes with tests
- Test thoroughly:
python -m pytest(if tests are added) - Submit a pull request
- Follow Python coding standards (PEP 8)
- Add tests for new features
- Update documentation
- Use meaningful commit messages
src/
βββ main.py # CLI and main entry point
βββ daemon.py # Async network daemon and peer management
βββ miner.py # Async mining logic and task management
βββ wallet.py # Wallet creation and management
βββ wallet_tui.py # Terminal user interface
βββ blockchain.py # Core blockchain logic
βββ web_stats.py # Async web statistics interface
βββ utils.py # Utility functions
requirements.txt # Python dependencies
build.ps1 # Cross-platform build script
README.md # This file
LICENSE # MIT License
This project is licensed under the MIT License - see the LICENSE file for details.
Educational Purpose Only
This software is for educational and experimental purposes. It is not intended for production use or real financial transactions. The developers are not responsible for any financial losses or security issues arising from its use.
- Not audited for security vulnerabilities
- No formal economic analysis
- Experimental consensus mechanism
- Limited scalability testing
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This README and inline code comments
Happy mining! βοΈ
