Consensus & Throughput
RP1 achieves high throughput through optimized CometBFT consensus parameters and parallel transaction execution.
Consensus Parameters
Default Configuration (Low Latency Network)
// 200ms total block time
TimeoutPropose: 100ms // Wait for block proposal
TimeoutPrevote: 50ms // Prevote voting round
TimeoutPrecommit: 50ms // Precommit voting round
SkipTimeoutCommit: true // No delay between blocks
Total Block Time: ~200ms
Production Configuration (Geo-Distributed)
// 600ms total block time for global validators
TimeoutPropose: 200ms
TimeoutPrevote: 100ms
TimeoutPrecommit: 100ms
TimeoutCommit: 200ms
SkipTimeoutCommit: false
Total Block Time: ~600ms
Throughput Analysis
Theoretical Maximum
| Parameter | Value |
|---|---|
| Block Time | 200ms |
| Blocks/Second | 5 |
| Tx/Block (Target) | 20,000 |
| Max TPS | 100,000 |
Realistic Throughput
| Scenario | TPS | Notes |
|---|---|---|
| Simple transfers | 50,000+ | Bank module only |
| Privacy transactions | 10,000 | ZK proof verification overhead |
| DEX swaps | 30,000 | AMM calculations |
| Mixed workload | 25,000 | Typical production |
Instant Finality
Unlike probabilistic finality chains (Bitcoin, Ethereum PoW), RP1 provides instant finality:
Block N proposed → Prevotes (2/3+) → Precommits (2/3+) → Block N FINAL
└────────────────────────────────────┘
~200-600ms total
No reorgs. No confirmations needed. Final is final.
Consensus Flow
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Proposer │────▶│ Prevote │────▶│ Precommit │
│ (100ms) │ │ (50ms) │ │ (50ms) │
└─────────────┘ └─────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
Block built 2/3+ prevotes 2/3+ precommits
from mempool received received
│
▼
┌─────────────────┐
│ Block Committed│
│ (FINAL) │
└─────────────────┘
Parallel Execution
RP1 executes independent transactions in parallel:
// Transaction dependency analysis
tx1: A → B (1000 tokens) // Group 1
tx2: C → D (500 tokens) // Group 2 (independent, parallel)
tx3: B → E (200 tokens) // Group 1 (depends on tx1)
// Execution order:
// [tx1, tx2] execute in parallel
// [tx3] executes after tx1 completes
Mempool Lanes
Transactions are prioritized by type:
| Lane | Priority | Use Case |
|---|---|---|
| Oracle | Highest | Price updates (protocol critical) |
| MEV-Protected | High | Encrypted transactions |
| Standard | Medium | Regular transfers |
| Low Priority | Low | Batch operations |
// Lane configuration
type LaneConfig struct {
MaxBlockSpace: 0.3, // Max 30% of block per lane
MaxTxs: 1000, // Max transactions per lane
}
Validator Requirements
For optimal consensus performance:
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 8 cores | 16+ cores |
| RAM | 32 GB | 64 GB |
| Storage | NVMe SSD | NVMe RAID |
| Network | 1 Gbps | 10 Gbps |
| Latency to peers | <100ms | <50ms |
Benchmarks
Tested on c5.4xlarge (16 vCPU, 32GB RAM):
BenchmarkSendTransfer-16 50000 23000 ns/op
BenchmarkPrivacyShield-16 10000 150000 ns/op
BenchmarkDEXSwap-16 30000 35000 ns/op
BenchmarkOracleUpdate-16 100000 8000 ns/op
Configuration
app.toml
[mempool]
max_txs = 10000
max_tx_bytes = 1048576
cache_size = 100000
[state-sync]
snapshot_interval = 1000
snapshot_keep_recent = 2
config.toml
[consensus]
timeout_propose = "100ms"
timeout_propose_delta = "10ms"
timeout_prevote = "50ms"
timeout_prevote_delta = "10ms"
timeout_precommit = "50ms"
timeout_precommit_delta = "10ms"
timeout_commit = "100ms"
skip_timeout_commit = true