BSV blockchainBSV blockchain

UTXO Persister Service Settings

Related Topic: UTXO Persister Service

Configuration Settings

SettingTypeDefaultEnvironment VariableUsage
UTXOPersisterBufferSizestring“256KB”utxoPersister_buffer_sizeCRITICAL - Buffer size for UTXO file I/O operations
UTXOPersisterDirectbooltruedirectDirect I/O operations control

Configuration Dependencies

Buffer Management

  • UTXOPersisterBufferSize is parsed using bytesize.Parse()

  • Used for buffered I/O operations when reading/writing UTXO files

  • The default of 256KB applies to every consumer

  • The values below are the fallbacks used only when the configured value fails to parse, and they differ by consumer rather than by direction:

    • The file storer’s write buffer falls back to 128KB
    • The block persister’s subtree-data read buffer falls back to 128KB
    • The utxo-additions, utxo-deletions and previous-utxo-set read buffers fall back to 4096 bytes

I/O Operations

  • UTXOPersisterDirect controls direct I/O behavior
  • Affects how buffer operations are performed

Service Dependencies

DependencyInterfaceUsage
BlockStoreblob.StoreCRITICAL - UTXO set storage and retrieval
BlockchainClientblockchain.ClientICRITICAL - Blockchain operations and block notifications

Validation Rules

SettingValidationImpactWhen Checked
UTXOPersisterBufferSizeMust be valid byte size formatI/O performanceDuring service initialization
UTXOPersisterDirectControls I/O operation modePerformance behaviorDuring service initialization

Configuration Examples

Basic Configuration

utxoPersister_buffer_size = "256KB"
direct = true

Performance Tuning

utxoPersister_buffer_size = "1MB"
direct = true

Memory Constrained

utxoPersister_buffer_size = "1KB"
direct = false