-
Notifications
You must be signed in to change notification settings - Fork 29
Enable HF testing in protocol version 11 #3295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Move protocol version major number retrieval to a new utility function `get_protocol_version` in `clusterlib_utils.py`. Refactor all usages across the codebase to use this function instead of directly accessing the protocol parameters dictionary. This improves code readability and maintainability by reducing duplication and encapsulating the logic in one place.
There was a problem hiding this 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 enables testing for protocol version 11 (PV11) hard-fork scenarios in the Cardano node test suite. The changes make the test framework flexible enough to handle testing hard-forks from any protocol version to the next, rather than being hardcoded to specific versions.
Changes:
- Introduced a reusable utility function
get_protocol_version()to standardize protocol version retrieval across the codebase - Updated hard-fork tests to dynamically calculate target protocol versions and conditionally handle DRep voting based on the current protocol version
- Added support for experimental hard-fork features and Dijkstra genesis configuration in the upgrade testing pipeline
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src_docs/source/test_results/nightly_system_tests.rst | Updated documentation to reflect step-by-step upgrade process with PV10→PV11 hard-fork |
| cardano_node_tests/utils/clusterlib_utils.py | Added get_protocol_version() utility function for consistent protocol version retrieval |
| cardano_node_tests/utils/governance_setup.py | Refactored to use new get_protocol_version() utility |
| cardano_node_tests/tests/tests_plutus_v2/test_mint_secp256k1_raw.py | Refactored to use new get_protocol_version() utility |
| cardano_node_tests/tests/tests_plutus_v2/test_mint_secp256k1_build.py | Refactored to use new get_protocol_version() utility |
| cardano_node_tests/tests/tests_conway/test_hardfork.py | Made hard-fork test dynamic to support any protocol version transition with conditional DRep voting logic |
| cardano_node_tests/tests/tests_conway/conway_common.py | Refactored to use new get_protocol_version() utility |
| cardano_node_tests/tests/test_node_upgrade.py | Updated upgrade test to support dynamic protocol version targets and experimental hard-fork configuration |
| cardano_node_tests/tests/plutus_common.py | Refactored to use new get_protocol_version() utility |
| .github/node_upgrade_pytest.sh | Enhanced upgrade script with Dijkstra genesis support for step3 and improved configuration handling |
| .github/env_regression_dbsync | Enabled experimental hard-forks for regression testing with db-sync |
| .github/env_regression | Enabled experimental hard-forks for regression testing |
| .github/env_nightly_dbsync | Enabled experimental hard-forks for nightly testing with db-sync |
| .github/env_nightly_cli | Enabled experimental hard-forks for nightly CLI testing |
| .github/env_nightly | Enabled experimental hard-forks for nightly testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update the Conway hardfork test to dynamically determine the initial and target protocol versions instead of hardcoding them. Add checks for the experimental hard-forks flag in the cluster config. Adjust DRep voting logic and assertions to handle protocol version changes, ensuring compatibility with future protocol upgrades.
Refactor the `test_hardfork` test to dynamically determine the initial and target protocol versions instead of hardcoding them. Add checks to skip the test if the protocol version is already at or above the last known version, and if experimental hard-forks are not enabled. Adjust assertions and approval logic to use the determined protocol versions, improving test robustness and reusability across protocol upgrades.
Add ENABLE_EXPERIMENTAL=true to all nightly and regression environment files to ensure experimental features are enabled during CI runs. This prepares the test environments for upcoming hard-fork testing.
Extend the node upgrade pytest script to handle the Dijkstra era. This includes updating genesis file handling, hashes, and configuration generation for the new era. Also, improve DRY_RUN flag usage and ensure step1 binaries are initialized only when needed.
ae9993d to
f2d9673
Compare
There was a problem hiding this 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 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Clarify protocol version references in nightly upgrade test documentation. Specify "Conway protocol version 10" in step 1, add "cost model update" to step 2, and note "hard-fork to Conway protocol version 11" in step 3. Improves clarity of upgrade process and test coverage.
f2d9673 to
3b3cb9d
Compare
No description provided.