Skip to content

Conversation

OlufemiAdeOlusile
Copy link
Collaborator

@OlufemiAdeOlusile OlufemiAdeOlusile commented Sep 3, 2025

This PR introduces explicit support for the transaction build-estimate command in stake pool creation, registration, delegation, and deregistration flows. It also replaces the legacy use_build_cmd flag with the more flexible build_method parameter across stake pool utilities and tests.

Key Changes

Utilities

  • Added _register_stake_pool_w_build_est and _create_stake_pool_w_build_est helper functions to handle stake pool registration using build-estimate.
  • Updated _create_register_pool, _create_register_pool_delegate_stake_tx, and _create_register_pool_tx_delegate_stake_tx to branch on build_method (BUILD, BUILD_RAW, BUILD_EST) instead of use_build_cmd.
  • Added defensive error handling for unsupported build methods.

Tests

  • Refactored stake pool test suite (TestStakePool) to use build_method.
  • Extended tests (test_stake_pool_metadata, test_create_stake_pool, test_deregister_stake_pool, test_update_stake_pool_metadata, test_update_stake_pool_parameters, test_pool_deregistration_not_registered) to support BUILD_EST.
  • Improved witness handling and transaction submission logic in build-estimate paths.

Test Run: https://github.com/IntersectMBO/cardano-node-tests/actions/runs/17446898448/job/49543468841
Test Run: https://github.com/IntersectMBO/cardano-node-tests/actions/runs/17478711486/job/49644613878

src_address=src_address,
tx_name=f"{temp_template}_reg_deleg",
tx_files=tx_files,
witness_count_add=len(tx_files.signing_key_files),
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are building, but not signing and submitting the tx.

@@ -144,8 +146,7 @@ def _register_stake_pool_w_build(
reward_account_vkey_file: A path to reward account vkey file (optional).
deposit: A deposit amount needed by the transaction (optional).
destination_dir: A path to directory for storing artifacts (optional).

Returns:
Returns:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The docstrings are supposed to follow one of the standard formats. We are using the google style format of docstrings. Please leave the Returns formatting as it was: blank line above, no blank line below.

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