Overview
Viction operates with a fixed set of 150 masternodes that are elected through a democratic voting process by VIC token holders. This design balances decentralization with performance.Why 150 Masternodes?
- Optimal Performance: Enough nodes for decentralization without sacrificing speed
- Fast Consensus: Smaller validator set enables 2-second block times
- Economic Security: Requires significant stake to control network
- Manageable Coordination: Efficient communication and coordination
Masternode Roles
Block Production (M1)
As a block creator (M1), masternodes:- Propose new blocks when it’s their turn
- Select and order transactions from mempool
- Execute state transitions
- Sign blocks with their private key
- Broadcast blocks to the network
Block Validation (M2)
As a validator (M2), masternodes:- Verify blocks created by other masternodes
- Validate transaction execution and state changes
- Co-sign valid blocks
- Reject invalid blocks
- Report misbehavior
Every block requires both a creator (M1) and validator (M2) signature, providing enhanced security through double validation.
Masternode Selection
Election Process
-
Candidacy: Any address can become a masternode candidate by:
- Staking 50,000 VIC tokens
- Registering through the masternode smart contract
- Meeting technical requirements
-
Voting: VIC token holders vote for candidates:
- Vote weight proportional to VIC holdings
- Can vote for up to 30 candidates
- Votes can be changed at any time
- Selection: Top 150 candidates by vote weight become masternodes
- Epoch Activation: New masternode set takes effect at next epoch (every 900 blocks)
Voting Mechanics
From the masternode smart contract:- Minimum Stake: 50,000 VIC required to be a candidate
- Vote Decay: No vote decay - votes remain until withdrawn
- Instant Updates: Vote changes take effect in next epoch
- No Lock Period: Voters can withdraw votes anytime
Masternode Requirements
Technical Requirements
Hardware Specifications
Minimum Requirements:- CPU: 4 cores
- RAM: 16GB
- Storage: 500GB SSD
- Network: 100Mbps with low latency
- CPU: 8+ cores (high clock speed)
- RAM: 32GB+
- Storage: 1TB+ NVMe SSD
- Network: 1Gbps with redundant connections
- Backup Power: UPS for high availability
Software Requirements
- Operating System: Ubuntu 20.04+ or equivalent Linux distribution
- Viction Node: Latest stable release from GitHub
- Monitoring: Prometheus/Grafana recommended
- Security: Firewall, SSH hardening, key management
Network Configuration
Masternodes must configure the following ports:Running a Masternode
1. Initialize Account
2. Start Masternode
3. Register as Candidate
After node is synced, register through:- VicMaster web interface: https://vicmaster.xyz
- Direct smart contract interaction
Masternode Snapshots
The consensus engine maintains snapshots of the masternode set for efficient validation.Snapshot Structure
Fromconsensus/posv/snapshot.go:
Snapshot Updates
Snapshots are updated:- Every Block: Recent signers map updated
- Every Checkpoint: New masternode list applied
- Penalty Events: Penalized nodes removed from active set
Retrieving Masternode List
Fromconsensus/posv/posv.go:553-565:
Performance Expectations
Uptime Requirements
Masternodes should maintain:- 99%+ Uptime: Required to avoid penalties
- Low Latency: <100ms response time to network events
- Fast Sync: Quick synchronization after restarts
Block Production
Each masternode creates approximately:- 4 blocks per hour (150 masternodes, 2-second blocks)
- 96 blocks per day
- 35,040 blocks per year
Turn Frequency
With 150 masternodes and 2-second blocks:- Turn every 300 seconds (5 minutes)
- Block creation window: 2 seconds
- Validation duties: Continuous (as assigned M2)
Masternode Rewards
Block Rewards
Fromparams/config.go:
- Block Creator (M1): Receives portion for block production
- Validator (M2): Receives portion for validation
- Voters: Distributed proportionally to voting stake
- Foundation: Small percentage to development fund
Reward Distribution
Rewards are calculated and distributed every epoch (900 blocks):- Number of blocks successfully created
- Validation participation
- Total votes received
- Penalties (reduces rewards)
Annual Returns
Estimated returns for masternode operators:- Block Production: ~8,760,000 VIC distributed annually
- Your Share: Depends on votes received and performance
- ROI: Varies based on VIC price and voting weight
Actual returns depend on voting weight, network participation, and masternode performance. Check current rates at VicMaster.
Penalty System
Automatic Penalties
Masternodes are penalized for:- Missing Blocks: Failing to create block when it’s their turn
- Failed Validation: Not validating assigned blocks as M2
- Invalid Blocks: Creating blocks that fail validation
- Extended Downtime: Prolonged offline periods
Penalty Duration
From the consensus code:- Removed from active masternode set
- Cannot produce or validate blocks
- Do not receive rewards
- Excluded for 1-4 epochs depending on severity
Penalty Recovery
To recover from penalties:- Fix the underlying issue (hardware, network, software)
- Wait for penalty period to expire
- Automatically reinstated in next epoch
- Resume normal operation
Monitoring and Maintenance
Essential Monitoring
Monitor these metrics:- Block Production Rate: Should match expected rate (~96/day)
- Validation Success Rate: Should be >99%
- Peer Count: Should have 25+ active peers
- Sync Status: Always fully synced
- System Resources: CPU, RAM, disk, network usage
- Penalties: Track any penalties received
Recommended Tools
- Node Status: Built-in ethstats reporting
- Blockchain Explorer: VicScan
- Masternode Stats: VicMaster
- System Monitoring: Prometheus + Grafana
- Log Analysis: ELK Stack or similar
Maintenance Best Practices
- Regular Updates: Keep node software up-to-date
- Backup Keys: Securely backup keystore files
- Monitor Alerts: Set up alerting for issues
- Redundancy: Consider hot standby configuration
- Security Audits: Regular security reviews
- Documentation: Document your setup and procedures
Security Considerations
Key Management
- Private Keys: Never share or expose private keys
- Hardware Wallet: Consider using hardware wallet for signing
- Encrypted Keystore: Always use password-encrypted keystores
- Key Backup: Secure offline backup of keys
Network Security
- Firewall: Only open required ports (30303)
- SSH Hardening: Disable password auth, use key-only
- DDoS Protection: Consider DDoS mitigation service
- Access Control: Restrict access to authorized IPs only
Operational Security
- Separate Machines: Don’t run masternode on shared infrastructure
- Monitoring: 24/7 monitoring and alerting
- Incident Response: Have a plan for handling issues
- Update Process: Test updates in testnet first
Troubleshooting
Common Issues
Not Producing Blocks:- Check if node is fully synced
- Verify account is unlocked
- Confirm registration in masternode contract
- Check voting weight (must be in top 150)
- Review system logs for errors
- Check network connectivity and latency
- Verify system resources are sufficient
- Ensure clock is synchronized (NTP)
- Check firewall rules
- Verify port 30303 is open
- Review bootnode connectivity
- Check NAT configuration
Getting Help
- Documentation: https://docs.viction.xyz
- Telegram: Official Viction Telegram groups
- GitHub: Issue tracker
- Forum: Community support forum