Use and enable span batches on your chain

Span batches

Span batches are an important feature that optimizes batch processing within the chain. This section provides an overview of span batches, instructions on how to enable them, and links to detailed design documents.

Overview

Span batches allow for efficient processing of multiple batches in a single operation, reducing overhead and improving performance. By grouping transactions together, span batches can help optimize the throughput of the network.

Enabling span batches

To enable span batches, follow these steps:

  1. Configuration:

    • Locate your chain configuration file.
    • Add or update the following settings to enable span batches:
    span_batches:
        enabled: true
        max_batch_size: <desired_max_batch_size>  # Set your desired maximum batch size
        batch_interval: <desired_batch_interval>  # Set your desired batch interval in seconds
  2. Deploy:

    • After updating the configuration, redeploy your chain node to apply the changes.
  3. Verify:

    • Check the logs to ensure that span batches are enabled and functioning correctly.
    • You should see log entries indicating that batches are being processed according to the configured settings.

Links to related pages

For more detailed information on the design and implementation of span batches, refer to the following resources: