Skip to main content

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

ParameterValue
Block Time200ms
Blocks/Second5
Tx/Block (Target)20,000
Max TPS100,000

Realistic Throughput

ScenarioTPSNotes
Simple transfers50,000+Bank module only
Privacy transactions10,000ZK proof verification overhead
DEX swaps30,000AMM calculations
Mixed workload25,000Typical 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:

LanePriorityUse Case
OracleHighestPrice updates (protocol critical)
MEV-ProtectedHighEncrypted transactions
StandardMediumRegular transfers
Low PriorityLowBatch 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:

ResourceMinimumRecommended
CPU8 cores16+ cores
RAM32 GB64 GB
StorageNVMe SSDNVMe RAID
Network1 Gbps10 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

Next Steps