Merge pull request #2956 from IntersectMBO/skip_tokens_on_testnet
feat(tests): skip token tests on long running testnets
feat(tests): skip token tests on long running testnets
The test parameter for using tokens is now conditionally skipped on long running testnets. This is to prevent leaving large amounts of ADA on UTxOs with tokens, which are not currently reclaimed.
fix(tests): reduce script_fund amounts in minting tests
Lowered script_fund values in various minting tests across Plutus V1, V2, and V3 to optimize resource usage. This change helps in minimizing the funds required for script execution, ensuring more efficient test runs.
feat(utils): add stake address re-registration
- Implemented `reregister_stake_addr` function to handle stake address re-registration and vote delegation. - Updated `deregister_stake_addr` to use the new re-registration function. - Adjusted transaction names and certificate names to include `rf_` prefix. - Improved batch processing logic in `return_funds_to_faucet` and `cleanup_addresses`.
feat: add skipif markers for testnet and local clusters
- Introduced SKIPIF_ON_TESTNET and SKIPIF_ON_LOCAL markers in common.py - Replaced existing skipif conditions with new markers in test files - Removed unused imports from test_native_tokens.py and test_staking_rewards.py
fix: correct logging of rewards in testnet cleanup
- Fixed incorrect variable used in logging uncleaned rewards in `testnet_cleanup_info.py`. - Updated logging format for rewards in `testnet_cleanup.py` to display in ADA.
Update query_utxo for db-sync 13.6.0.5
refactor(tests): remove testnets marker from token tests
fix(prepare_cluster_scripts): simplify scripts_dir assignment
These tests should not run on long running testnets, as they leave large amounts of ADA on UTxOs with tokens, which is not currently reclaimed.
Simplified the assignment of the scripts_dir variable by using a more concise expression. This change improves code readability and maintainability.
Further testnet cleanup improvements
- Adjusted the number of threads dynamically based on the number of files found in `cleanup_addresses` and `cleanup_certs` functions. - Ensured the number of threads does not exceed 10. - Updated the range for generating payment addresses in `cleanup_certs`.
- Updated batch indexing in defragment_utxos.py to start from 0 instead of 1 - Adjusted log messages and transaction names to reflect the correct batch number - Applied similar changes to testnet_cleanup.py for consistency
feat: improve logging with ADA conversion
utxo_view was dropped in release 13.6.0.5 of cardano-db-sync
- Updated logging in `testnet_cleanup_info.py` to include ADA conversion for balance and rewards. - Modified `testnet_cleanup.py` to log balance in ADA instead of Lovelace.
Updated `addresses_info` to log token presence along with balance. Replaced balance query with UTXO query and calculated balance from UTXOs. Added token presence check and updated log message accordingly.
Improve testnet cleanup