BSV blockchainBSV blockchain

Validator Service Settings

Related Topic: Validator Service

Configuration Settings

SettingTypeDefaultEnvironment VariableUsage
GRPCAddressstring“localhost:8081”validator_grpcAddressgRPC client connections
GRPCListenAddressstring“:8081”validator_grpcListenAddressCRITICAL - gRPC server binding, service only starts if not empty
SendBatchSizeint100validator_sendBatchSizeBatch processing size
SendBatchTimeoutint2validator_sendBatchTimeoutBatch processing timeout
SendBatchWorkersint10validator_sendBatchWorkersBatch worker thread count
BlockValidationDelayint0validator_blockvalidation_delayBlock validation delay
BlockValidationMaxRetriesint5validator_blockvalidation_maxRetriesBlock validation retry limit
BlockValidationRetrySleepstring“2s”validator_blockvalidation_retrySleepBlock validation retry delay
VerboseDebugboolfalsevalidator_verbose_debugCRITICAL - Debug logging control for validation operations
HTTPListenAddressstring""validator_httpListenAddressCRITICAL - HTTP server binding, health checks only run if not empty
HTTPAddress*url.URL""validator_httpAddressHTTP client connections
HTTPRateLimitint1024validator_httpRateLimitCRITICAL - HTTP request rate limiting
KafkaMaxMessageBytesint1048576validator_kafka_maxMessageBytesKafka message size limits
ConsensusRerunSlotsint1validator_consensusRerunSlotsMaximum concurrent consensus re-runs of policy script failures; with no free slot the tx is TxPolicy. 0 disables re-runs
UseLocalValidatorboolfalse (true in settings.conf)useLocalValidatorCRITICAL - Local vs remote validator deployment mode
HTTPBodyLimitstring100MBvalidator_httpBodyLimitMaximum HTTP request body size (prevents OOM on oversized requests)
TxMetaKafkaBatchSizeint1024validator_txmeta_kafka_batchSizeTransaction metadata Kafka batch size
TxMetaKafkaBatchTimeoutMsint5validator_txmeta_kafka_batchTimeoutMsTransaction metadata Kafka batch timeout (ms)
KafkaBackpressure.PauseQueueFillPercentint90validator_kafkaBackpressurePauseFillPercentPause the Kafka consumer when the block assembly ingest queue, or the held count against blockassembly_maxTransactionsInMemory, reaches this percentage of its reported limit. 0 disables both predicates
KafkaBackpressure.ResumeHeldPercentint80validator_kafkaBackpressureResumeHeldPercentResume a held-count pause once the held count falls to this percentage of the reported in-memory limit. The threshold is kept at least 1 and at least one below the pause threshold, so a small block does not toggle the consumer

Configuration Dependencies

gRPC Server Management

  • Service only starts if GRPCListenAddress is not empty
  • Health checks are conditional on gRPC server configuration

HTTP Server Management

  • HTTP server only starts if HTTPListenAddress is not empty
  • Rate limiting applied when HTTP server is enabled
  • Uses HTTPRateLimit for middleware configuration

Debug Logging

  • When VerboseDebug = true, provides detailed logging for validation operations
  • Controls logging in block assembly interactions

Batch Processing

  • SendBatchSize, SendBatchTimeout, and SendBatchWorkers work together
  • Controls transaction batch processing performance

Block Validation Retry Logic

  • BlockValidationMaxRetries, BlockValidationRetrySleep, and BlockValidationDelay control resilience
  • Manages block validation failure recovery

Service Dependencies

DependencyInterfaceUsage
UTXOStoreutxo.StoreCRITICAL - Transaction input validation and double-spend prevention
BlockchainClientblockchain.ClientICRITICAL - Blockchain operations and block data
BlockAssemblyClientblockassembly.ClientICRITICAL - Sending validated transactions to mining
ValidatorTxsConfig*url.URLCRITICAL - Kafka-based transaction validation messaging

Validation Rules

SettingValidationImpactWhen Checked
GRPCListenAddressService startup conditionalService availabilityDuring daemon startup
HTTPListenAddressHTTP server startup conditionalAPI availabilityDuring service initialization
VerboseDebugControls logging verbosityPerformance and diagnosticsDuring validation operations
HTTPRateLimitRate limiting enforcementResource protectionDuring HTTP middleware setup

Configuration Examples

Basic Configuration

validator_grpcListenAddress = ":8081"
validator_httpListenAddress = ":8834"

Performance Tuning

validator_sendBatchSize = 200
validator_sendBatchWorkers = 20
validator_httpRateLimit = 2048

Debug Configuration

validator_verbose_debug = true
validator_blockvalidation_maxRetries = 10