From 1e5b84d49b69fe32834a2766f7e20fdb9f146d80 Mon Sep 17 00:00:00 2001 From: Oleksandr Romanov Date: Fri, 7 Nov 2025 12:17:03 +0200 Subject: [PATCH 1/3] add: mark tests for xray --- e2e-tests/tests/committee/test_blocks.py | 7 ++++--- e2e-tests/tests/committee/test_committee.py | 1 + .../test_block_production_log.py | 2 ++ .../test_delegator_journey.py | 1 + .../delegator_rewards/test_spo_journey.py | 6 ++++++ .../smart_contracts/test_get_insert_remove.py | 12 ++++++++++++ .../smart_contracts/test_update.py | 12 ++++++++++++ .../tests/governed_map/test_observability.py | 10 ++++++++++ .../tests/reserve/test_main_chain_setup.py | 5 ++++- .../tests/reserve/test_reserve_management.py | 19 +++++++++++++++++++ 10 files changed, 71 insertions(+), 4 deletions(-) diff --git a/e2e-tests/tests/committee/test_blocks.py b/e2e-tests/tests/committee/test_blocks.py index 6c029cc075..b98bf69058 100644 --- a/e2e-tests/tests/committee/test_blocks.py +++ b/e2e-tests/tests/committee/test_blocks.py @@ -9,6 +9,7 @@ @mark.xdist_group("faucet_tx") @mark.ci @mark.staging +@mark.test_key('ETCM-12429') def test_block_producer_can_update_their_metadata(genesis_utxo, api: BlockchainApi, get_wallet: Wallet, write_file): logger.info("Signing block producer metadata...") skey, vkey_hex, vkey_hash = api.cardano_cli.generate_cross_chain_keys() @@ -64,11 +65,11 @@ def test_block_producer_can_update_their_metadata(genesis_utxo, api: BlockchainA @mark.xdist_group("faucet_tx") @mark.ci @mark.staging +@mark.test_key('ETCM-12430') def test_block_producer_can_delete_their_metadata(genesis_utxo, api: BlockchainApi, get_wallet: Wallet, write_file): logger.info("Signing block producer metadata...") skey, vkey_hex, vkey_hash = api.cardano_cli.generate_cross_chain_keys() - logger.info("Starting upsert") metadata = { "url": "http://test.example", @@ -106,10 +107,10 @@ def test_block_producer_can_delete_their_metadata(genesis_utxo, api: BlockchainA logger.info(f"Public key: {vkey_hex}") storage_metadata = api.get_block_producer_metadata(vkey_hash) - assert storage_metadata == None, "Block producer metadata not deleted from storage" + assert storage_metadata is None, "Block producer metadata not deleted from storage" rpc_metadata = api.partner_chain_rpc.partner_chain_get_block_producer_metadata(vkey_hex).result - assert rpc_metadata == None, "RPC returned block producer metadata after deletion" + assert rpc_metadata is None, "RPC returned block producer metadata after deletion" @mark.skip_on_new_chain diff --git a/e2e-tests/tests/committee/test_committee.py b/e2e-tests/tests/committee/test_committee.py index 860a588a3f..936b121740 100644 --- a/e2e-tests/tests/committee/test_committee.py +++ b/e2e-tests/tests/committee/test_committee.py @@ -80,6 +80,7 @@ def _t_candidates_seats(pc_epoch): @mark.xdist_group("governance_action") @mark.usefixtures("governance_skey_with_cli") + @mark.test_key('ETCM-9013') def test_update_d_param( self, genesis_utxo, diff --git a/e2e-tests/tests/delegator_rewards/test_block_production_log.py b/e2e-tests/tests/delegator_rewards/test_block_production_log.py index 6381c0939d..6a7f8f06cf 100644 --- a/e2e-tests/tests/delegator_rewards/test_block_production_log.py +++ b/e2e-tests/tests/delegator_rewards/test_block_production_log.py @@ -1,8 +1,10 @@ from src.blockchain_api import BlockchainApi from config.api_config import ApiConfig import logging +from pytest import mark +@mark.test_key('ETCM-8358') def test_block_production_log_pallet(api: BlockchainApi, config: ApiConfig): block = api.get_block() block_no = block["header"]["number"] diff --git a/e2e-tests/tests/delegator_rewards/test_delegator_journey.py b/e2e-tests/tests/delegator_rewards/test_delegator_journey.py index e10a9fc501..9b945580e4 100644 --- a/e2e-tests/tests/delegator_rewards/test_delegator_journey.py +++ b/e2e-tests/tests/delegator_rewards/test_delegator_journey.py @@ -4,6 +4,7 @@ @mark.xdist_group("faucet_tx") +@mark.test_key('ETCM-8359') def test_delegator_can_associate_pc_address(genesis_utxo, api: BlockchainApi, new_wallet: Wallet, get_wallet: Wallet): logging.info("Signing address association...") stake_skey, stake_vkey = api.cardano_cli.generate_stake_keys() diff --git a/e2e-tests/tests/delegator_rewards/test_spo_journey.py b/e2e-tests/tests/delegator_rewards/test_spo_journey.py index 4e86e6d491..fffa7535bc 100644 --- a/e2e-tests/tests/delegator_rewards/test_spo_journey.py +++ b/e2e-tests/tests/delegator_rewards/test_spo_journey.py @@ -113,6 +113,7 @@ def _count_blocks(mc_epoch, producer): @mark.dependency(name="participation_data") @mark.xdist_group("block_participation") @mark.staging +@mark.test_key("ETCM-12432") def test_block_participation_data_is_not_empty(block_participation): assert block_participation assert block_participation["up_to_moment"] @@ -122,6 +123,7 @@ def test_block_participation_data_is_not_empty(block_participation): @mark.dependency(name="pro_bono_participation") @mark.xdist_group("block_participation") @mark.staging +@mark.test_key("ETCM-12433") def test_pro_bono_participation( mc_epochs: range, api: BlockchainApi, initial_pc_epoch_included, count_blocks: int, block_participation ): @@ -156,6 +158,7 @@ def test_pro_bono_participation( @mark.dependency(name="spo_participation") @mark.xdist_group("block_participation") @mark.staging +@mark.test_key("ETCM-12434") def test_spo_participation( mc_epochs: range, api: BlockchainApi, count_blocks: int, block_participation, db_sync: Session ): @@ -205,6 +208,7 @@ def test_spo_participation( @mark.dependency(depends=["pro_bono_participation", "spo_participation"]) @mark.xdist_group("block_participation") @mark.staging +@mark.test_key("ETCM-12435") def test_no_unexpected_producers(block_participation): assert not block_participation["producer_participation"], "Unexpected producer participation data" @@ -222,10 +226,12 @@ def set_margin_fee(self, api: BlockchainApi, get_wallet: Wallet, random_margin_f result = api.set_block_producer_margin_fee(random_margin_fee, wallet=get_wallet) return result + @mark.test_key("ETCM-12436") def test_set_margin_fee(self, set_margin_fee: Transaction): logging.info(f"Margin fee set: {set_margin_fee}") assert set_margin_fee._receipt.is_success + @mark.test_key("ETCM-12437") def test_get_margin_fee(self, api: BlockchainApi, get_wallet: Wallet, random_margin_fee): response = api.partner_chain_rpc.partner_chain_get_block_producer_fees() account_id = get_wallet.address diff --git a/e2e-tests/tests/governed_map/smart_contracts/test_get_insert_remove.py b/e2e-tests/tests/governed_map/smart_contracts/test_get_insert_remove.py index 13ff1bb65b..fcad204b17 100644 --- a/e2e-tests/tests/governed_map/smart_contracts/test_get_insert_remove.py +++ b/e2e-tests/tests/governed_map/smart_contracts/test_get_insert_remove.py @@ -7,26 +7,31 @@ @mark.staging class TestGet: + @mark.test_key("ETCM-10357") def test_insert_returncode(self, insert_data): assert 0 == insert_data.returncode @mark.usefixtures("insert_data") + @mark.test_key("ETCM-10358") def test_get_returncode(self, api: BlockchainApi, genesis_utxo, random_key): result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert 0 == result.returncode @mark.usefixtures("insert_data") + @mark.test_key("ETCM-10359") def test_get_value(self, api: BlockchainApi, genesis_utxo, random_key, random_value): result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) value = hex_bytes_to_string(result.json) assert random_value == value, "Data mismatch in governed map retrieval" + @mark.test_key("ETCM-10360") def test_get_non_existent_key(self, api: BlockchainApi, genesis_utxo): result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, "non_existent_key") assert {} == result.json assert 0 == result.returncode @mark.usefixtures("insert_data") + @mark.test_key("ETCM-10361") def test_list_whole_map(self, api: BlockchainApi, genesis_utxo, random_key, random_value): result = api.partner_chains_node.smart_contracts.governed_map.list(genesis_utxo) expected_value = string_to_hex_bytes(random_value) @@ -51,11 +56,13 @@ def insert_twice_with_different_value( result = api.partner_chains_node.smart_contracts.governed_map.insert(genesis_utxo, random_key, hex_data, payment_key) return result + @mark.test_key("ETCM-10362") def test_insert_with_the_same_value(self, insert_twice_with_the_same_value): result = insert_twice_with_the_same_value assert 0 == result.returncode assert {} == result.json + @mark.test_key("ETCM-10363") def test_value_remains_the_same( self, api: BlockchainApi, insert_twice_with_the_same_value, genesis_utxo, random_key, random_value ): @@ -63,11 +70,13 @@ def test_value_remains_the_same( value = hex_bytes_to_string(get_result.json) assert random_value == value + @mark.test_key("ETCM-10364") def test_insert_with_different_value(self, insert_twice_with_different_value): result = insert_twice_with_different_value assert 1 == result.returncode assert "There is already a value stored for key" in result.stderr + @mark.test_key("ETCM-10365") def test_value_was_not_updated( self, api: BlockchainApi, insert_twice_with_different_value, genesis_utxo, random_key, random_value ): @@ -84,14 +93,17 @@ def remove_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, result = api.partner_chains_node.smart_contracts.governed_map.remove(genesis_utxo, random_key, payment_key) return result + @mark.test_key("ETCM-10366") def test_remove_returncode(self, remove_data): assert 0 == remove_data.returncode + @mark.test_key("ETCM-10367") def test_get_after_remove(self, api: BlockchainApi, remove_data, genesis_utxo, random_key): result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert {} == result.json assert 0 == result.returncode + @mark.test_key("ETCM-10368") def test_remove_non_existent_key(self, api: BlockchainApi, genesis_utxo, payment_key): result = api.partner_chains_node.smart_contracts.governed_map.remove(genesis_utxo, "non_existent_key", payment_key) assert 0 == result.returncode diff --git a/e2e-tests/tests/governed_map/smart_contracts/test_update.py b/e2e-tests/tests/governed_map/smart_contracts/test_update.py index 1eadfa8427..04a6207aa9 100644 --- a/e2e-tests/tests/governed_map/smart_contracts/test_update.py +++ b/e2e-tests/tests/governed_map/smart_contracts/test_update.py @@ -17,9 +17,11 @@ def update_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, ) return result + @mark.test_key("ETCM-10369") def test_update_returncode(self, update_data): assert update_data.returncode == 0 + @mark.test_key("ETCM-10370") def test_update_value(self, api: BlockchainApi, genesis_utxo, random_key, new_value_hex_bytes): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert new_value_hex_bytes == get_result.json, "Data mismatch after update in governed map retrieval" @@ -37,10 +39,12 @@ def update_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, ) return result + @mark.test_key("ETCM-10371") def test_update_response(self, update_data): assert update_data.returncode == 0 assert update_data.json == {} + @mark.test_key("ETCM-10372") def test_value_remains_the_same(self, api: BlockchainApi, genesis_utxo, random_key, random_value): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert string_to_hex_bytes(random_value) == get_result.json @@ -59,9 +63,11 @@ def update_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, ) return result + @mark.test_key("ETCM-10373") def test_update_returncode(self, update_data): assert update_data.returncode == 0 + @mark.test_key("ETCM-10374") def test_update_value(self, api: BlockchainApi, genesis_utxo, random_key, new_value_hex_bytes): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert new_value_hex_bytes == get_result.json, "Data mismatch after update in governed map retrieval" @@ -80,10 +86,12 @@ def update_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, ) return result + @mark.test_key("ETCM-10375") def test_update_response(self, update_data): assert update_data.returncode == 0 assert update_data.json == {} + @mark.test_key("ETCM-10376") def test_value_remains_the_same(self, api: BlockchainApi, genesis_utxo, random_key, random_value): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert string_to_hex_bytes(random_value) == get_result.json @@ -102,10 +110,12 @@ def update_data(self, api: BlockchainApi, insert_data, genesis_utxo, random_key, ) return result + @mark.test_key("ETCM-10377") def test_update_returncode_and_message(self, update_data, random_key): assert update_data.returncode == 1 assert f"Value for key '{random_key}' is set to a different value than expected" in update_data.stderr + @mark.test_key("ETCM-10378") def test_update_value(self, api: BlockchainApi, genesis_utxo, random_key, random_value): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert ( @@ -125,9 +135,11 @@ def update_data(self, api: BlockchainApi, genesis_utxo, random_key, new_value_he ) return result + @mark.test_key("ETCM-10379") def test_update_returncode(self, update_data): assert update_data.returncode == 1 + @mark.test_key("ETCM-10380") def test_update_value(self, api: BlockchainApi, genesis_utxo, random_key): get_result = api.partner_chains_node.smart_contracts.governed_map.get(genesis_utxo, random_key) assert {} == get_result.json diff --git a/e2e-tests/tests/governed_map/test_observability.py b/e2e-tests/tests/governed_map/test_observability.py index 58a090de5d..29f83c4840 100644 --- a/e2e-tests/tests/governed_map/test_observability.py +++ b/e2e-tests/tests/governed_map/test_observability.py @@ -33,14 +33,17 @@ def observe_governed_map_initialization(api: BlockchainApi, set_governed_map_scr class TestInitializeMap: + @mark.test_key("ETCM-10381") def test_set_main_chain_scripts(self, set_governed_map_scripts): tx = set_governed_map_scripts assert tx._receipt.is_success, f"Failed to set new governed map address: {tx._receipt.error_message}" + @mark.test_key("ETCM-10382") def test_governed_map_initialization(self, observe_governed_map_initialization): logging.info(f"Governed Map initialized: {observe_governed_map_initialization}") assert observe_governed_map_initialization + @mark.test_key("ETCM-10383") def test_map_is_equal_to_main_chain_data(self, api: BlockchainApi, genesis_utxo, wait_until, config: ApiConfig): smart_contracts_list = api.partner_chains_node.smart_contracts.governed_map.list(genesis_utxo) current_mc_block = api.get_mc_block() @@ -56,12 +59,14 @@ def test_map_is_equal_to_main_chain_data(self, api: BlockchainApi, genesis_utxo, class TestObserveMapChanges: + @mark.test_key("ETCM-10384") def test_new_data_is_observed(self, insert_data, api: BlockchainApi, random_key, random_value): registered_change = api.subscribe_governed_map_change(key_value=(random_key, random_value)) logging.info(f"Registered change: {registered_change}") actual_value = api.get_governed_map_key(random_key) assert random_value == actual_value + @mark.test_key("ETCM-10385") def test_updated_data_is_observed( self, insert_data, api: BlockchainApi, genesis_utxo, random_key, new_value_hex_bytes, payment_key, new_value ): @@ -71,6 +76,7 @@ def test_updated_data_is_observed( actual_value = api.get_governed_map_key(random_key) assert new_value == actual_value + @mark.test_key("ETCM-10386") def test_removed_data_is_observed(self, insert_data, api: BlockchainApi, genesis_utxo, random_key, payment_key): api.partner_chains_node.smart_contracts.governed_map.remove(genesis_utxo, random_key, payment_key) registered_change = api.subscribe_governed_map_change(key_value=(random_key, None)) @@ -107,18 +113,22 @@ def observe_governed_map_reinitialization(self, api: BlockchainApi, set_new_gove result = api.subscribe_governed_map_initialization() return result + @mark.test_key("ETCM-10387") def test_set_new_governed_map_address(self, set_new_governed_map_scripts): tx = set_new_governed_map_scripts assert tx._receipt.is_success, f"Failed to set new governed map address: {tx._receipt.error_message}" + @mark.test_key("ETCM-10388") def test_governed_map_was_reinitialized(self, observe_governed_map_reinitialization): logging.info(f"Governed Map reinitialized: {observe_governed_map_reinitialization}") assert observe_governed_map_reinitialization + @mark.test_key("ETCM-10389") def test_observed_map_is_empty_after_changing_address(self, api: BlockchainApi): observed_map = api.get_governed_map() assert {} == observed_map, "Observed map is not empty after changing address" + @mark.test_key("ETCM-10390") def test_revert_map_to_previous_address( self, api: BlockchainApi, addresses, policy_ids, insert_data_and_wait_until_observed, sudo ): diff --git a/e2e-tests/tests/reserve/test_main_chain_setup.py b/e2e-tests/tests/reserve/test_main_chain_setup.py index 063310ffd9..b35408ca35 100644 --- a/e2e-tests/tests/reserve/test_main_chain_setup.py +++ b/e2e-tests/tests/reserve/test_main_chain_setup.py @@ -7,10 +7,11 @@ pytestmark = [mark.xdist_group(name="governance_action")] +@mark.test_key("ETCM-12438") def test_enough_funds_for_minting(transaction_input): assert transaction_input(), "Not enough funds to mint token" - +@mark.test_key("ETCM-12439") def test_mint_tokens_for_reserve( api: BlockchainApi, governance_address: str, reserve_asset_id, mint_token, wait_until, config: ApiConfig ): @@ -24,9 +25,11 @@ def test_mint_tokens_for_reserve( ) +@mark.test_key("ETCM-12440") def test_enough_funds_for_tx_with_reference_script(transaction_input): assert transaction_input(), "Not enough funds to pay for transaction with reference script" +@mark.test_key("ETCM-12441") def test_attach_v_function_as_reference_script(v_function: VFunction): assert v_function.reference_utxo, "V-function reference UTXO is not set" diff --git a/e2e-tests/tests/reserve/test_reserve_management.py b/e2e-tests/tests/reserve/test_reserve_management.py index fa085b0127..7d021d899d 100644 --- a/e2e-tests/tests/reserve/test_reserve_management.py +++ b/e2e-tests/tests/reserve/test_reserve_management.py @@ -75,6 +75,7 @@ def circulation_supply_initial_balance(create_reserve, api: BlockchainApi, reser class TestInitReserve: + @mark.test_key("ETCM-12442") def test_init_reserve(self, init_reserve): response = init_reserve assert response.returncode == 0 @@ -83,15 +84,18 @@ def test_init_reserve(self, init_reserve): class TestCreateReserve: + @mark.test_key("ETCM-12443") def test_enough_tokens_to_create_reserve(self, native_token_initial_balance): assert native_token_initial_balance >= INITIAL_RESERVE_DEPOSIT + @mark.test_key("ETCM-12444") def test_create_reserve(self, create_reserve): response = create_reserve assert response.returncode == 0 assert response.json @mark.usefixtures("create_reserve") + @mark.test_key("ETCM-12445") def test_native_token_balance_is_smaller_by_initial_deposit( self, native_token_initial_balance, api: BlockchainApi, reserve_asset_id, governance_address ): @@ -99,6 +103,7 @@ def test_native_token_balance_is_smaller_by_initial_deposit( assert native_token_initial_balance - INITIAL_RESERVE_DEPOSIT == native_token_current_balance @mark.usefixtures("create_reserve") + @mark.test_key("ETCM-12446") def test_reserve_balance_is_equal_to_initial_deposit(self, api: BlockchainApi, reserve_asset_id, addresses): reserve_balance = api.get_mc_balance(addresses["ReserveValidator"], reserve_asset_id) assert INITIAL_RESERVE_DEPOSIT == reserve_balance @@ -128,11 +133,13 @@ def release_funds( ) return response + @mark.test_key("ETCM-12447") def test_release_funds(self, release_funds): response = release_funds assert response.returncode == 0 assert response.json + @mark.test_key("ETCM-12448") def test_circulation_supply_balance_after_release( self, circulation_supply_initial_balance, @@ -144,12 +151,14 @@ def test_circulation_supply_balance_after_release( circulation = api.get_mc_balance(addresses["IlliquidCirculationSupplyValidator"], reserve_asset_id) assert circulation_supply_initial_balance + amount_to_release == circulation + @mark.test_key("ETCM-12449") def test_reserve_balance_after_release( self, reserve_initial_balance, amount_to_release, api: BlockchainApi, reserve_asset_id, addresses ): reserve_balance = api.get_mc_balance(addresses["ReserveValidator"], reserve_asset_id) assert reserve_initial_balance - amount_to_release == reserve_balance + @mark.test_key("ETCM-12450") def test_observe_released_funds(self, api: BlockchainApi, amount_to_release): observed_transfers = api.subscribe_token_transfer() assert observed_transfers["reserve"] == amount_to_release @@ -175,17 +184,20 @@ def deposit_funds(self, native_token_balance, amount_to_deposit, api: Blockchain ) return response + @mark.test_key("ETCM-9525") def test_deposit_funds(self, deposit_funds): response = deposit_funds assert response.returncode == 0 assert response.json + @mark.test_key("ETCM-10404") def test_reserve_balance_after_deposit( self, reserve_initial_balance, amount_to_deposit, api: BlockchainApi, reserve_asset_id, addresses ): reserve_balance = api.get_mc_balance(addresses["ReserveValidator"], reserve_asset_id) assert reserve_initial_balance + amount_to_deposit == reserve_balance + @mark.test_key("ETCM-10405") def test_native_token_balance_after_deposit( self, native_token_balance, @@ -214,11 +226,13 @@ def update_v_function(self, create_reserve, new_v_function: VFunction, api: Bloc ) return response + @mark.test_key("ETCM-10406") def test_update_v_function(self, update_v_function): response = update_v_function assert response.returncode == 0 assert response.json + @mark.test_key("ETCM-10407") def test_release_funds_with_updated_v_function(self, api: BlockchainApi, new_v_function: VFunction, genesis_utxo, payment_key): response = api.partner_chains_node.smart_contracts.reserve.release( genesis_utxo, @@ -229,6 +243,7 @@ def test_release_funds_with_updated_v_function(self, api: BlockchainApi, new_v_f assert response.returncode == 0 assert response.json + @mark.test_key("ETCM-12451") def test_release_funds_with_old_v_function(self, api: BlockchainApi, v_function: VFunction, genesis_utxo, payment_key): response = api.partner_chains_node.smart_contracts.reserve.release( genesis_utxo, @@ -314,6 +329,7 @@ def _execute_bridge_deposit( @mark.usefixtures("create_bridge_utxos") @mark.bridge + @mark.test_key("ETCM-12452") def test_lock_without_spending_ics_utxo( self, api: BlockchainApi, @@ -347,6 +363,7 @@ def test_lock_without_spending_ics_utxo( @mark.usefixtures("create_bridge_utxos") @mark.bridge + @mark.test_key("ETCM-12453") def test_lock_with_spending_ics_utxo( self, api: BlockchainApi, @@ -385,11 +402,13 @@ def handover_reserve(self, create_reserve, api: BlockchainApi, genesis_utxo, pay response = api.partner_chains_node.smart_contracts.reserve.handover(genesis_utxo, payment_key) return response + @mark.test_key("ETCM-10410") def test_handover_reserve(self, handover_reserve): response = handover_reserve assert response.returncode == 0 assert response.json + @mark.test_key("ETCM-10411") def test_reserve_balance_after_handover(self, api: BlockchainApi, reserve_asset_id, addresses): reserve_balance = api.get_mc_balance(addresses["ReserveValidator"], reserve_asset_id) assert reserve_balance == 0 From b773a0eb60578f6f732d8eef4baec0dccce999b3 Mon Sep 17 00:00:00 2001 From: Oleksandr Romanov Date: Fri, 7 Nov 2025 14:08:23 +0200 Subject: [PATCH 2/3] fix: clean redundant methods for docs --- e2e-tests/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/e2e-tests/README.md b/e2e-tests/README.md index f9a6ca5d2f..ee16477fba 100644 --- a/e2e-tests/README.md +++ b/e2e-tests/README.md @@ -66,7 +66,7 @@ pytest -rP -v --blockchain substrate --env local --log-cli-level debug -vv -s -m #### Run tests on the staging environment ```bash -pytest -rP -v --blockchain substrate --env staging --log-cli-level debug -vv -s -m "not probability" +pytest -rP -v --blockchain substrate --env staging --decrypt --log-cli-level debug -vv -s -m "not probability" ``` #### Run multisig governance tests @@ -173,20 +173,20 @@ All test layers upload full logs, metrics, and test reports to GitHub Artifacts #### **Delegator Rewards Tests** -| Test Name | Function | Purpose | Expected Result | Why This Test Matters | How Test is Run / RPC Example | -|:---------|:---------|:--------|:----------------|:----------------------|:------------------------------| -| Delegator Address Association | `test_delegator_can_associate_pc_address` | Bind stake address to sidechain | Association confirmed with valid signature | Enables rewards routing | `curl -d '{"jsonrpc":"2.0","method":"sidechain_getAddressAssociation","params":[stake_key_hash],"id":1}' http://localhost:9933` with signature validation | -| Block Production Log Pallet | `test_block_production_log_pallet` | Verify block production log is populated | Log entries match expected authors with correct SPO mapping | Ensures accurate block authorship tracking | `curl -d '{"jsonrpc":"2.0","method":"sidechain_getBlockProductionLog","params":[block_hash],"id":1}' http://localhost:9933` with SPO validation | +| Test Name | Function | Purpose | Expected Result | Why This Test Matters | +|:---------|:---------|:--------|:----------------|:----------------------| +| Delegator Address Association | `test_delegator_can_associate_pc_address` | Bind stake address to sidechain | Association confirmed with valid signature | Enables rewards routing | +| Block Production Log Pallet | `test_block_production_log_pallet` | Verify block production log is populated | Log entries match expected authors with correct SPO mapping | Ensures accurate block authorship tracking | #### **Smart Contract Tests** -| Test Name | Function | Purpose | Expected Result | Why This Test Matters | How Test is Run / RPC Example | -|:---------|:---------|:--------|:----------------|:----------------------|:------------------------------| -| Init Reserve | `test_init_reserve` | Deploy reserve contracts | Contracts deployed with validator and policy scripts | Bootstraps economic layer | `curl -d '{"jsonrpc":"2.0","method":"sidechain_initReserve","params":[payment_key],"id":1}' http://localhost:9933` with script validation | -| Create Reserve | `test_create_reserve` | Initialize reserve with funds | Reserve funded with correct initial deposit | Starts token issuance | `curl -d '{"jsonrpc":"2.0","method":"sidechain_createReserve","params":[v_function_hash,initial_deposit,token,payment_key],"id":1}' http://localhost:9933` with balance validation | -| Release Funds | `test_release_funds` | Move tokens to circulation | Tokens released with correct reference UTXO | Enables token spending | `curl -d '{"jsonrpc":"2.0","method":"sidechain_releaseFunds","params":[reference_utxo,amount,payment_key],"id":1}' http://localhost:9933` with UTXO validation | -| Deposit Funds | `test_deposit_funds` | Return tokens to reserve | Tokens deposited with correct amount | Supports token locking | `curl -d '{"jsonrpc":"2.0","method":"sidechain_depositFunds","params":[amount,payment_key],"id":1}' http://localhost:9933` with balance validation | -| Handover Reserve | `test_handover_reserve` | Transfer entire reserve | Reserve transferred with zero balance | Handles lifecycle events | `curl -d '{"jsonrpc":"2.0","method":"sidechain_handoverReserve","params":[payment_key],"id":1}' http://localhost:9933` with balance validation | +| Test Name | Function | Purpose | Expected Result | Why This Test Matters | +|:---------|:---------|:--------|:----------------|:----------------------| +| Init Reserve | `test_init_reserve` | Deploy reserve contracts | Contracts deployed with validator and policy scripts | Bootstraps economic layer | +| Create Reserve | `test_create_reserve` | Initialize reserve with funds | Reserve funded with correct initial deposit | Starts token issuance | +| Release Funds | `test_release_funds` | Move tokens to circulation | Tokens released with correct reference UTXO | Enables token spending | +| Deposit Funds | `test_deposit_funds` | Return tokens to reserve | Tokens deposited with correct amount | Supports token locking | +| Handover Reserve | `test_handover_reserve` | Transfer entire reserve | Reserve transferred with zero balance | Handles lifecycle events | For more details on how to implement Native Token Reserve Management in a partner chain, refer to the [Native Token Migration Guide](docs/developer-guides/native-token-migration-guide.md) From 7c6f53df7b78a98f14c69260fc8032bb0061601f Mon Sep 17 00:00:00 2001 From: Oleksandr Romanov Date: Fri, 7 Nov 2025 14:57:05 +0200 Subject: [PATCH 3/3] fix: link to bridge documentation --- docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 726a9e971c..829c55bd76 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -1299,7 +1299,7 @@ mechanism. #### Native Token Reserve Management Please refer to -[native-token-reserve-management.md](./developer-guides/native-token-reserve-management.md) for +[native-token-reserve-management.md](./developer-guides/bridge-and-reserve.md) for details on how to setting up and maintaining a native token reserve on Cardano to be used with a partner chain.