Skip to content

Legacy Service Settings

Related Topic: Legacy Service

Configuration Settings

Setting Type Default Environment Variable Usage
WorkingDir string "../../data" legacy_workingDir Data storage directory
ListenAddresses []string [] legacy_listen_addresses CRITICAL - Network interfaces for peer connections
ConnectPeers []string [] legacy_connect_peers Forced peer connections
OrphanEvictionDuration time.Duration 10m legacy_orphanEvictionDuration Orphan transaction retention
StoreBatcherSize int 1024 legacy_storeBatcherSize CRITICAL - Store operation batch size
StoreBatcherConcurrency int 32 legacy_storeBatcherConcurrency CRITICAL - Store operation parallelism
SpendBatcherSize int 1024 legacy_spendBatcherSize CRITICAL - Spend operation batch size
SpendBatcherConcurrency int 32 legacy_spendBatcherConcurrency CRITICAL - Spend operation parallelism
OutpointBatcherSize int 1024 legacy_outpointBatcherSize CRITICAL - Outpoint operation batch size
OutpointBatcherConcurrency int 32 legacy_outpointBatcherConcurrency Outpoint operation parallelism
PrintInvMessages bool false legacy_printInvMessages Debug logging for inventory messages
GRPCAddress string "" legacy_grpcAddress gRPC client connections
AllowBlockPriority bool false legacy_allowBlockPriority Block priority handling
GRPCListenAddress string "" legacy_grpcListenAddress gRPC server binding
SavePeers bool false legacy_savePeers Peer information persistence
AllowSyncCandidateFromLocalPeers bool false legacy_allowSyncCandidateFromLocalPeers CRITICAL - Local peer sync candidate selection
TempStore *url.URL "file://./data/tempstore" temp_store CRITICAL - Temporary storage location
PeerIdleTimeout time.Duration 125s legacy_peerIdleTimeout CRITICAL - Peer inactivity timeout
PeerProcessingTimeout time.Duration 3m legacy_peerProcessingTimeout CRITICAL - Message processing timeout

Configuration Dependencies

Peer Connection Management

  • ListenAddresses controls incoming connections (falls back to external IP:8333 if empty)
  • ConnectPeers forces outgoing connections to specific peers
  • SavePeers controls peer information persistence

Batch Processing Performance

  • Batch sizes and concurrency settings work together for memory and performance control
  • StoreBatcherSize * StoreBatcherConcurrency limits concurrent requests

Peer Timeout Management

  • PeerIdleTimeout set to 125s to accommodate 2-minute ping/pong intervals
  • PeerProcessingTimeout set to 3m for block processing (largest operations)

Sync Candidate Selection

  • When AllowSyncCandidateFromLocalPeers = false, only non-local peers can be sync candidates

Service Dependencies

Dependency Interface Usage
SubtreeStore blob.Store CRITICAL - Merkle subtree storage and verification
TempStore blob.Store CRITICAL - Temporary data storage during processing
UTXOStore utxo.Store CRITICAL - UTXO operations
BlockchainClient blockchain.ClientI CRITICAL - Blockchain operations and state queries
ValidatorClient validator.Interface CRITICAL - Transaction validation
SubtreeValidationClient subtreevalidation.ClientI CRITICAL - Subtree validation
BlockValidationClient blockvalidation.ClientI CRITICAL - Block validation
BlockAssemblyClient blockassembly.ClientI CRITICAL - Block assembly operations

Validation Rules

Setting Validation Impact
ListenAddresses Falls back to external IP:8333 if empty Network connectivity
PeerIdleTimeout Must accommodate ping/pong intervals Peer stability
PeerProcessingTimeout Must allow for block processing time Message handling

Configuration Examples

Basic Configuration

legacy_listen_addresses = "0.0.0.0:8333"
legacy_savePeers = false

Forced Peer Connections

legacy_connect_peers = "peer1.example.com:8333|peer2.example.com:8333"
legacy_allowSyncCandidateFromLocalPeers = false

Performance Tuning

legacy_storeBatcherSize = 2048
legacy_storeBatcherConcurrency = 64
legacy_spendBatcherSize = 2048
legacy_spendBatcherConcurrency = 64