From 5322803ad0133223f7f5ebdc2a5954bcf95d92b5 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Fri, 18 Jul 2025 19:45:48 +0200 Subject: [PATCH 1/3] Revert "Merge pull request #2975 from opentensor/fix/roman/fix-after-devnet-ready-update-fee" This reverts commit 9665972a3ee80d511a516b37a50356d9ade95faf, reversing changes made to 81e0a44ac54334c6788df156458155c9861bc60a. --- tests/e2e_tests/test_delegate.py | 2 +- tests/e2e_tests/test_stake_fee.py | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/e2e_tests/test_delegate.py b/tests/e2e_tests/test_delegate.py index 9fb4b9dd1a..4bd181ae2e 100644 --- a/tests/e2e_tests/test_delegate.py +++ b/tests/e2e_tests/test_delegate.py @@ -342,7 +342,7 @@ def test_nominator_min_required_stake( wallet=dave_wallet, hotkey_ss58=bob_wallet.hotkey.ss58_address, netuid=alice_subnet_netuid, - amount=Balance.from_tao(1000), + amount=Balance.from_tao(10_000), wait_for_inclusion=True, wait_for_finalization=True, ) diff --git a/tests/e2e_tests/test_stake_fee.py b/tests/e2e_tests/test_stake_fee.py index 049ee3cbe7..b20440c651 100644 --- a/tests/e2e_tests/test_stake_fee.py +++ b/tests/e2e_tests/test_stake_fee.py @@ -19,7 +19,7 @@ async def test_stake_fee_api(local_chain, subtensor, alice_wallet, bob_wallet): netuid = 2 root_netuid = 0 stake_amount = Balance.from_tao(100) # 100 TAO - min_stake_fee = Balance.from_tao(0.050354772) + min_stake_fee = Balance.from_tao(0.299076829) # Register subnet as Alice assert subtensor.register_subnet(alice_wallet), "Unable to register the subnet" @@ -32,9 +32,9 @@ async def test_stake_fee_api(local_chain, subtensor, alice_wallet, bob_wallet): coldkey_ss58=alice_wallet.coldkeypub.ss58_address, hotkey_ss58=alice_wallet.hotkey.ss58_address, ) - assert isinstance(stake_fee_0, Balance), "Stake fee should be a Balance object." + assert isinstance(stake_fee_0, Balance), "Stake fee should be a Balance object" assert stake_fee_0 == min_stake_fee, ( - "Stake fee should be equal the minimum stake fee." + "Stake fee should be equal the minimum stake fee" ) # Test unstake fee @@ -44,11 +44,9 @@ async def test_stake_fee_api(local_chain, subtensor, alice_wallet, bob_wallet): coldkey_ss58=alice_wallet.coldkeypub.ss58_address, hotkey_ss58=bob_wallet.hotkey.ss58_address, ) - assert isinstance(unstake_fee_root, Balance), ( - "Stake fee should be a Balance object." - ) - assert unstake_fee_root == min_stake_fee, ( - "Root unstake fee should be equal the minimum stake fee." + assert isinstance(unstake_fee_root, Balance), "Stake fee should be a Balance object" + assert unstake_fee_root == Balance.from_rao(299076829), ( + "Root unstake fee should be 0." ) # Test various stake movement scenarios From d9c6e16d90c654034d4062e557447279892bd669 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 Aug 2025 15:32:55 -0700 Subject: [PATCH 2/3] `actions/checkout@v4` should take all commits history --- .github/workflows/e2e-subtensor-tests.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index d56e9a726d..f2bbc542b8 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -32,6 +32,8 @@ jobs: steps: - name: Check-out repository under $GITHUB_WORKSPACE uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 @@ -147,6 +149,8 @@ jobs: steps: - name: Check-out repository uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 From 42d593d253646aeea99f86fedc1f07e8044172cb Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 28 Aug 2025 15:54:48 -0700 Subject: [PATCH 3/3] Checkout PR head instead of merge --- .github/workflows/e2e-subtensor-tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index f2bbc542b8..e88eb588f2 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -34,6 +34,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python uses: actions/setup-python@v5 @@ -151,6 +152,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5