From a8305a3cec33f6d64844b3a25e6f9b45d2df845a Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 9 Mar 2026 09:50:45 -0700 Subject: [PATCH 1/5] cap mev shield txs era to 8 --- bittensor_cli/src/bittensor/subtensor_interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index e3507d30..09136ca0 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -1249,6 +1249,9 @@ async def create_signed(call_to_sign, n): ) inner_hash = "" if mev_protection: + max_mev_era = 8 + if era is None or era["period"] > max_mev_era: + era = {"period": max_mev_era} next_nonce = await self.substrate.get_account_next_index( keypair.ss58_address ) From 696750b9fe1b909d2730ee46000ec850bb7b3aeb Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 9 Mar 2026 11:01:56 -0700 Subject: [PATCH 2/5] increase init time --- tests/e2e_tests/test_coldkey_swap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e_tests/test_coldkey_swap.py b/tests/e2e_tests/test_coldkey_swap.py index 276d709a..13046998 100644 --- a/tests/e2e_tests/test_coldkey_swap.py +++ b/tests/e2e_tests/test_coldkey_swap.py @@ -35,7 +35,7 @@ def test_coldkey_swap_with_stake(local_chain, wallet_setup): _, wallet_bob, path_bob, exec_command_bob = wallet_setup(wallet_path_bob) _, wallet_new, path_new, _ = wallet_setup(wallet_path_new) netuid = 2 - time.sleep(12) + time.sleep(24) # Create a new subnet by Bob create_sn = exec_command_bob( command="subnets", @@ -240,7 +240,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): _, wallet_bob, path_bob, exec_command_bob = wallet_setup(wallet_path_bob) _, wallet_new, _, _ = wallet_setup(wallet_path_new) - time.sleep(12) + time.sleep(24) # Create subnet, start, and stake on it create_sn = exec_command_bob( command="subnets", From 1e2a59546780ef0f9ef63959f41285892e234a7e Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 9 Mar 2026 14:16:55 -0700 Subject: [PATCH 3/5] remove mev_shield tx in fast blocks --- tests/e2e_tests/test_coldkey_swap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e_tests/test_coldkey_swap.py b/tests/e2e_tests/test_coldkey_swap.py index 13046998..c770244b 100644 --- a/tests/e2e_tests/test_coldkey_swap.py +++ b/tests/e2e_tests/test_coldkey_swap.py @@ -272,6 +272,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): "Created for e2e coldkey swap dispute test", "--no-prompt", "--json-output", + "--no-mev-protection", ], ) create_payload = json.loads(create_sn.stdout) @@ -403,6 +404,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): "--new-coldkey", wallet_new.coldkeypub.ss58_address, "--no-prompt", + "--no-mev-protection", ], ) assert "ColdkeySwapDisputed" in execute.stderr, execute.stderr From f6688e09adcd013bae73102b59b47be0639695bb Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 9 Mar 2026 14:17:44 -0700 Subject: [PATCH 4/5] revert time --- tests/e2e_tests/test_coldkey_swap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e_tests/test_coldkey_swap.py b/tests/e2e_tests/test_coldkey_swap.py index c770244b..b91fb543 100644 --- a/tests/e2e_tests/test_coldkey_swap.py +++ b/tests/e2e_tests/test_coldkey_swap.py @@ -35,7 +35,7 @@ def test_coldkey_swap_with_stake(local_chain, wallet_setup): _, wallet_bob, path_bob, exec_command_bob = wallet_setup(wallet_path_bob) _, wallet_new, path_new, _ = wallet_setup(wallet_path_new) netuid = 2 - time.sleep(24) + time.sleep(12) # Create a new subnet by Bob create_sn = exec_command_bob( command="subnets", @@ -240,7 +240,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): _, wallet_bob, path_bob, exec_command_bob = wallet_setup(wallet_path_bob) _, wallet_new, _, _ = wallet_setup(wallet_path_new) - time.sleep(24) + time.sleep(12) # Create subnet, start, and stake on it create_sn = exec_command_bob( command="subnets", From 5cedee12a9d0d1d3fe5488954e975060f67139bf Mon Sep 17 00:00:00 2001 From: ibraheem-latent Date: Mon, 9 Mar 2026 14:17:58 -0700 Subject: [PATCH 5/5] dont force era on every mev tx --- bittensor_cli/src/bittensor/subtensor_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index 09136ca0..383e7f43 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -1250,7 +1250,7 @@ async def create_signed(call_to_sign, n): inner_hash = "" if mev_protection: max_mev_era = 8 - if era is None or era["period"] > max_mev_era: + if era is not None and era["period"] > max_mev_era: era = {"period": max_mev_era} next_nonce = await self.substrate.get_account_next_index( keypair.ss58_address