https://github.com/fabricioricard/bigchain
๐ Revolutionary blockchain that rewards users for sharing bandwidth. First proof-of-bandwidth cryptocurrency with P2P mining and real-time rewards.
https://github.com/fabricioricard/bigchain
bandwidth-sharing bigchain bigfoot-connect blockchain cryptocurrency decentralized distributed-computing earning golang internet-sharing mining p2p-network peer-to-peer proof-of-work rewards
Last synced: 23 days ago
JSON representation
๐ Revolutionary blockchain that rewards users for sharing bandwidth. First proof-of-bandwidth cryptocurrency with P2P mining and real-time rewards.
- Host: GitHub
- URL: https://github.com/fabricioricard/bigchain
- Owner: fabricioricard
- License: mit
- Created: 2025-09-20T21:09:39.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2025-09-22T02:32:52.000Z (25 days ago)
- Last Synced: 2025-09-22T04:23:48.239Z (25 days ago)
- Topics: bandwidth-sharing, bigchain, bigfoot-connect, blockchain, cryptocurrency, decentralized, distributed-computing, earning, golang, internet-sharing, mining, p2p-network, peer-to-peer, proof-of-work, rewards
- Language: Go
- Homepage: https://bigfootconnect.tech/
- Size: 4.54 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ BIGchain - BIGFOOT Connect
**A first-of-its-kind blockchain that rewards users for sharing bandwidth!**
[](https://opensource.org/licenses/MIT)
[](https://golang.org/dl/)
[](#)## ๐ What is BIGchain?
BIGchain is a revolutionary blockchain that combines traditional cryptocurrency mining with **real bandwidth sharing rewards**. Users earn BIG tokens by:
- ๐๏ธ **Mining blocks** (Proof-of-Work) - Earn 50 BIG per block
- ๐ก **Sharing bandwidth** - Earn BIG based on data served to peers
- ๐ **Running P2P nodes** - Support the decentralized network## โจ Key Features
### ๐ฏ Unique Innovation
- **Proof-of-Bandwidth**: First blockchain to reward bandwidth sharing
- **Dual Rewards**: Mining + bandwidth sharing = double income
- **Real P2P Network**: True decentralized architecture### ๐ง Technical Features
- **Pure Go Implementation**: No external dependencies
- **Thread-Safe**: Concurrent mining and P2P operations
- **REST API**: HTTP endpoints for external integration
- **Auto-Discovery**: Peer discovery and blockchain sync
- **Real-Time Monitoring**: Live bandwidth statistics### ๐ฐ Economic Model
- **Mining Reward**: 50 BIG per block
- **Bandwidth Reward**: Dynamic based on MB/s ร time ร peers
- **Address Format**: All addresses start with "big"## ๐ Quick Start
### Prerequisites
- Go 1.21 or higher
- Open ports 8333 (P2P) and 8334 (Bandwidth)### Installation
```bash
# Clone the repository
git clone https://github.com/fabricioricard/BIGchain.git
cd BIGchain# Build
go build -o bigchain .# Run (Windows)
.\bigchain.exe# Run (Linux/Mac)
./bigchain
```### Using Make (Optional)
```bash
make build # Build the binary
make run # Run directly
make help # See all commands
```## ๐ Usage
### Interactive Commands
Once BIGchain is running, you can use these commands:
- `status` - Show blockchain status
- `balance` - Show your BIG token balance
- `send` - Send BIG tokens to another address
- `connect` - Connect to a peer node
- `peers` - Show connected peers count
- `bandwidth` - Show bandwidth sharing statistics
- `help` - Show all available commands
- `quit` - Exit the node### Example Session
```
BIGchain> status
=== BIGchain Status ===
Blocks: 5
Difficulty: 4
Is Mining: true
Node ID: big3fb0ee00539b9dd1ccb412a685150aa2
Latest Block Hash: abc123...BIGchain> balance
Your balance: 150.75 BIGBIGchain> send
Enter recipient address: big456...
Enter amount: 25.0
Transaction sent: 25.00 BIG to big456...
```## ๐ Network Ports
BIGchain uses three ports:
- **8333**: P2P network communication
- **8334**: Bandwidth sharing HTTP server
- **8080**: REST API (optional)### Bandwidth Sharing
Your node automatically serves data on port 8334:
- `http://your-ip:8334/status` - Node statistics
- `http://your-ip:8334/data/{id}` - Serve data to peers
- `POST http://your-ip:8334/upload` - Upload data for caching## ๐ REST API
BIGchain provides a REST API for external integration:
### Endpoints
- `GET /status` - Blockchain and network status
- `GET /balance?address=big123...` - Check balance
- `POST /transaction` - Submit new transaction
- `GET /mine?miner=big123...` - Mine a block
- `GET /chain` - Get full blockchain
- `GET /peers` - Get peer count
- `POST /connect` - Connect to peer### Example API Usage
```bash
# Check status
curl http://localhost:8080/status# Check balance
curl http://localhost:8080/balance?address=big123...# Send transaction
curl -X POST http://localhost:8080/transaction \
-H "Content-Type: application/json" \
-d '{
"from_address": "big123...",
"to_address": "big456...",
"amount": 10.5,
"tx_type": "transfer"
}'
```## ๐ป Architecture
### Core Components
- **blockchain.go** - Main blockchain logic and mining
- **block.go** - Block structure and hashing
- **transaction.go** - Transaction handling
- **bandwidth.go** - Bandwidth proof system
- **p2p.go** - Peer-to-peer network
- **bandwidth_monitor.go** - Real bandwidth monitoring
- **network.go** - REST API server
- **utils.go** - Utilities and persistence### Data Flow
```
User Activity โ Bandwidth Monitor โ Proof Generation โ Blockchain โ P2P Broadcast โ Network Rewards
```## ๐๏ธ Building from Source
### Standard Build
```bash
go build -o bigchain .
```### Production Build
```bash
make build-prod
```### Multi-Platform Build
```bash
make build-all
```This creates binaries for:
- Linux (AMD64, ARM64)
- Windows (AMD64)
- macOS (AMD64, ARM64)## ๐ณ Docker Support
### Build Docker Image
```bash
make docker
```### Run with Docker
```bash
make docker-run
```### Manual Docker Commands
```bash
docker build -t bigchain .
docker run -p 8333:8333 -p 8334:8334 -p 8080:8080 bigchain
```## ๐ค How to Earn BIG Tokens
### 1. Automatic Mining
- Keep your node running
- Automatic mining when transactions are available
- Earn 50 BIG per block mined### 2. Bandwidth Sharing
- Your node serves data to other peers
- Automatic bandwidth monitoring
- Rewards based on: `bandwidth ร time ร peers_served`### 3. Network Participation
- Connect to other nodes
- Help maintain network decentralization
- Receive transaction fees (future feature)## ๐ Connecting to the Network
### Join Existing Network
```
BIGchain> connect
Enter peer address (host:port): 192.168.1.100:8333
```### Share Your Node
Give others your address: `YOUR_IP:8333`### Network Growth
As more nodes join:
- Network becomes more decentralized
- More bandwidth sharing opportunities
- Higher earning potential## ๐ง Configuration
### Environment Variables
- `BIG_DIFFICULTY` - Mining difficulty (default: 4)
- `BIG_REWARD` - Mining reward (default: 50)
- `BIG_P2P_PORT` - P2P port (default: 8333)
- `BIG_BANDWIDTH_PORT` - Bandwidth port (default: 8334)### Config File
Create `config.json`:
```json
{
"mining_reward": 50.0,
"difficulty": 4,
"bandwidth_multiplier": 0.1,
"p2p_port": 8333,
"bandwidth_port": 8334
}
```## ๐งช Testing
### Run Tests
```bash
make test
```### Benchmark
```bash
make benchmark
```### Test Bandwidth Sharing
```bash
curl http://localhost:8334/status
curl http://localhost:8334/data/test123
```## ๐ Monitoring
### Real-Time Stats
- Use `bandwidth` command for live statistics
- Monitor `/status` endpoint
- Check blockchain growth with `status` command### Logging
BIGchain provides detailed logging:
- P2P connections
- Mining progress
- Bandwidth proofs
- Transaction processing## ๐ก๏ธ Security
### Best Practices
- Run on dedicated ports
- Use firewall rules for protection
- Regular blockchain backups
- Monitor peer connections### Backup Your Data
```bash
# Manual backup
cp blockchain.json backup_$(date +%Y%m%d).json# Automated backup (Linux/Mac)
make backup
```## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).
### Development Setup
```bash
make setup # Install dependencies and run checks
make format # Format code
make lint # Run linter
make test # Run tests
```### Reporting Issues
Please use GitHub Issues to report bugs or request features.## ๐ License
BIGchain is released under the MIT License. See [LICENSE](LICENSE) file for details.
## ๐ฏ Roadmap
### Phase 1 (Current)
- โ Core blockchain functionality
- โ P2P network
- โ Bandwidth sharing rewards
- โ Mining system### Phase 2 (Coming Soon)
- ๐ Enhanced peer discovery
- ๐ Mobile wallet app
- ๐ Block explorer web interface
- ๐ Smart contracts (basic)### Phase 3 (Future)
- ๐ Advanced smart contracts
- ๐ Decentralized storage
- ๐ Cross-chain bridges
- ๐ Governance system## ๐ Support
- **Documentation**: Check this README and inline code comments
- **Issues**: [GitHub Issues](https://github.com/fabricioricard/BIGchain/issues)
- **Discussions**: [GitHub Discussions](https://github.com/fabricioricard/BIGchain/discussions)## ๐ Why BIGchain?
BIGchain isn't just another cryptocurrency - it's a **new economic model** that:
1. **Rewards Real Value**: Bandwidth sharing provides actual utility
2. **Encourages Participation**: Multiple ways to earn rewards
3. **Builds Community**: P2P network grows through cooperation
4. **Innovates Technology**: First proof-of-bandwidth blockchain**Join the revolution! Start earning BIG tokens today!** ๐
---
**Made with โค๏ธ for the decentralized future**