Skip to content

Conversation

@mkoura
Copy link
Collaborator

@mkoura mkoura commented Dec 15, 2025

Update the block production test to use mixed UTxO backends ("mem" and "disk") instead of mixed P2P/legacy topologies. The test now records the backend type in the database and test output, and the helper script sets the MIXED_UTXO_BACKENDS environment variable accordingly.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the block production test to use mixed UTxO backends (mem/disk) instead of mixed P2P/legacy network topologies. The test infrastructure now tracks and records the UTxO backend type for each pool node rather than its network topology configuration.

Key Changes:

  • Updated environment variable from MIXED_P2P=1 to MIXED_UTXO_BACKENDS="mem disk" with additional timeout configuration
  • Replaced topology-based logic with backend-based logic for pool node configuration tracking
  • Updated database schema to store backend information instead of topology information

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/test_block_production.sh Updated comments and environment variables to reference UTxO backends instead of P2P/legacy topologies; removed unused NODE_REV and CI_BYRON_CLUSTER variables
cardano_node_tests/tests/test_blocks.py Refactored backend determination logic, updated database schema from topology to backend tracking, and simplified pool backend assignment logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkoura mkoura force-pushed the test_block_prod_utxo_backends branch 2 times, most recently from 99bb642 to 506cc85 Compare December 15, 2025 14:42
@mkoura mkoura requested a review from Copilot December 15, 2025 15:38

This comment was marked as off-topic.

This comment was marked as resolved.

This comment was marked as resolved.

Update the block production test to use mixed UTxO backends ("mem" and
"disk") instead of mixed P2P/legacy topologies. The test now records
the backend type in the database and test output, and the helper
script sets the MIXED_UTXO_BACKENDS environment variable accordingly.
@mkoura mkoura force-pushed the test_block_prod_utxo_backends branch from ff7061d to f0255f6 Compare December 16, 2025 10:27
Add `block_production_graph.py` script to generate a bar chart of total
blocks per backend from an SQLite database. Update dependencies in
`pyproject.toml` and `poetry.lock` to include matplotlib and seaborn,
enabling statistical data visualization. Register the script as a CLI
entry point under `block-production-graph`.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

cardano_node_tests/tests/test_blocks.py:359

  • A new cursor is created inside _save_state on each call but the connection is not committed before closing the cursor in nested functions. While the commit is being called (line 358), if an exception occurs between cursor creation and commit, the cursor won't be closed properly. Consider using a context manager with with conn.cursor() as cur: instead of manually closing cursors to ensure proper resource cleanup.
            cur = conn.cursor()
            for pool_id_dec, num_blocks in blocks_before.items():
                pool_rec = pool_mapping[pool_id_dec]
                pool_idx = tp.cast(int, pool_rec["pool_idx"])
                cur.execute(
                    "INSERT INTO blocks VALUES (?, ?, ?, ?, ?, ?)",
                    (
                        rand,
                        curr_epoch - 1,
                        pool_rec["pool_id"],
                        pool_idx,
                        _get_pool_utxo_backend(pool_idx),
                        num_blocks,
                    ),
                )
            conn.commit()
            cur.close()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkoura mkoura merged commit a3e7595 into master Dec 16, 2025
10 checks passed
@mkoura mkoura deleted the test_block_prod_utxo_backends branch December 16, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants