Skip to main content

3 posts tagged with "conformance-testing"

View All Tags

Weekly Summary – May 19, 2025

· 2 min read
William Wolff
Architect

This week, the Leios team focused on improving simulation capabilities, enhancing transaction processing, and expanding the test coverage. The team also made significant progress in addressing transaction inclusion rates and developing a comprehensive conformance testing framework.

Simulation improvements

Rust simulation

  • Investigated and addressed poor transaction inclusion rates
  • Implemented 'late IB inclusion' extension to Full Leios, significantly improving transaction ledger inclusion odds
  • Identified and addressed issues with non-sharded input transactions causing excessive duplication
  • Made several key enhancements:
    • Enabled late IB inclusion by default
    • Fixed the off-by-one error in late IB inclusion logic
    • Added praos-fallback-enabled setting for throughput investigation
    • Improved transaction deduplication in Praos blocks.

Testing framework

Conformance testing

  • Developed a comprehensive catalog of potential conformance tests
  • Implemented a property-based testing suite for trace verification
  • Added both positive and negative test cases covering:
    • Genesis slot operations
    • Block production (RB, IB, EB)
    • Vote generation
    • Various production patterns (sporadic, noisy)
    • Invalid scenarios (equivocation, gaps)
  • Successfully verified golden traces against the Agda specification.

Documentation

Formal specification

  • Launched comprehensive web-based documentation for the Ouroboros Leios formal specification at leios.cardano-scaling.org/formal-spec
  • Enhanced documentation features:
    • Interactive exploration of Leios modules
    • Type linking between related components
    • Full text search capabilities
    • Improved accessibility of formal specification details.

Transaction lifecycle analysis

  • Conducted detailed analysis of transaction processing efficiency
  • Generated a cumulative probability model for transaction ledger inclusion
  • Analyzed the relationship between IB production rate and stage length
  • Created visualization of transaction-to-block inclusion probabilities.

transaction-to-block inclusion probabilities

Next steps

  • Continue monitoring and optimizing transaction inclusion rates
  • Expand conformance test coverage as the Agda specification evolves
  • Further investigate transaction sharding strategies
  • Refine transaction lifecycle model based on simulation results.

Weekly Summary – May 12, 2025

· 2 min read
William Wolff
Architect

This week, the team made significant progress on simulation improvements, trace verification, and a comprehensive analysis of Leios' transaction processing capacity.

Trace verification

  • Improved the trace verifier with better error handling and reporting
  • Added support for starting verification from non-initial states
  • Created manually curated test cases for the Leios trace verifier
  • Integrated the trace verifier into Nix infrastructure and CI builds
  • Removed deterministic conformance testing in favor of a trace-based approach.

Simulation improvements

Haskell simulation

  • Conducted an informal review assessing code quality, design, and implementation
  • Analyzed the simulation organization and identified areas for future improvement
  • Found that most prospective changes to the Leios protocol would only involve a small fraction of the codebase
  • Determined that adding memory pool and transactions would take approximately 100-200 hours of labor.

The review of the Haskell simulator was documented in detail in PR#353, covering its statistics, organization, code quality, design, implementation, and documentation aspects.

Rust simulation

  • Added tx-start-time and tx-stop-time parameters to avoid effects of slow starts or sudden terminations on transaction analysis
  • Created a new Leios variant full-without-ibs where endorser blocks directly reference transactions.

Documentation and analysis

The team ran higher excess-capacity simulations to test hypotheses about transaction inclusion. The transaction lifecycle simulations raised the question of whether duplicated transactions in IBs were preventing other transactions from ever being included. The team ran simulations with IBs produced at three times the normal rate to test this, providing ample space for transaction duplication.

Detailed analysis showed that transaction loss persisted despite increased capacity, indicating that other factors are preventing transactions from reaching the ledger. The results are documented in:

Weekly Summary – April 7, 2025

· 3 min read
William Wolff
Architect

This week, the team continued refining the protocol and its simulation capabilities, making significant progress in addressing various topics.

Simulation improvements

Haskell simulation

  • Started specifying a new relay protocol for IB header diffusion without the body
  • Improved the shared log format by removing redundancies and harmonizing naming
  • Added support for additional events required by conformance testing, including SlotEvent and NoBlockEvent
    • These events can be enabled using the --conformance-events flag with --shared-log-format.

Rust simulation

  • Updated traces to match the new standardized trace format
  • Fixed a critical bug in CPU scheduling where nodes were using more cores than allocated.

Analysis of workflow optimization

The team significantly improved the workflow for analyzing both Haskell and Rust simulations:

  • Replaced MongoDB with more efficient jq queries using map-reduce operations
  • Created reusable library functions for plotting with R
  • Revised and streamlined scripts for creating, executing, and analyzing simulations
  • Made the Jupyter notebook for analyses more generic and reusable
  • Successfully tested the new workflow on tag leios-2025w15.

These improvements will enable faster setup and execution of future simulation experiments, with quicker turnaround times for analysis. During this optimization work, several discrepancies between the Haskell and Rust simulations were identified and documented as GitHub issues for future investigation.

Edinburgh workshop recaps

The Edinburgh workshop documentation has been made available, covering key discussions and decisions:

Day 1 highlights

  • Explored ledger design options comparing labeled UTXOs (explicit shards) vs accounts (implicit shards) approaches
  • Discussed conformance testing strategies including QuickCheck dynamic and trace verification approaches
  • Analyzed critical edge cases for user onboarding and system properties.

Day 2 highlights

  • Conducted a detailed analysis of Leios node costs across different TPS levels
  • Key findings on resource usage:
    • At 10 TPS: 1.8x increase in egress and 6x increase in compute compared to Praos
    • At 1K TPS: significant scaling improvements with better resource efficiency
  • Provided recommendations for potential integration with Peras, particularly to optimize the voting mechanism
  • Discussed performance characteristics at both high and low throughput levels.

Day 3 highlights

  • Held an in-depth discussion on optimistic ledger state references, exploring three main approaches:
    1. RB reference: highest security but highest latency
    2. EB reference: balanced approach with medium security and latency
    3. EB-DAG: advanced approach using directed acyclic graph structure
  • Key advantages of the EB-DAG approach:
    • Achieves low latency while maintaining security
    • Provides strong inclusion guarantees for EBs
    • Enables efficient state management and reconstruction
    • Creates a complete, verifiable chain history
  • Discussed implementation considerations for state management and block ordering under the EB-DAG model.

For more information, please see the full workshop recaps in the Leios documentation.