From 216abd500608ae82eee2ea0c76099c9b80ce1931 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Mon, 1 Dec 2025 14:21:13 -0500 Subject: [PATCH 1/3] no paying tx fee in alpha --- pallets/transaction-fee/src/lib.rs | 28 ++++++++++++++-------------- runtime/src/lib.rs | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pallets/transaction-fee/src/lib.rs b/pallets/transaction-fee/src/lib.rs index 89326457f6..9bc5497f47 100644 --- a/pallets/transaction-fee/src/lib.rs +++ b/pallets/transaction-fee/src/lib.rs @@ -327,12 +327,12 @@ where ) { Ok(imbalance) => Ok(Some(WithdrawnFee::Tao(imbalance))), Err(_) => { - let alpha_vec = Self::fees_in_alpha::(who, call); - if !alpha_vec.is_empty() { - let fee_u64: u64 = fee.into(); - OU::withdraw_in_alpha(who, &alpha_vec, fee_u64); - return Ok(Some(WithdrawnFee::Alpha)); - } + // let alpha_vec = Self::fees_in_alpha::(who, call); + // if !alpha_vec.is_empty() { + // let fee_u64: u64 = fee.into(); + // OU::withdraw_in_alpha(who, &alpha_vec, fee_u64); + // return Ok(Some(WithdrawnFee::Alpha)); + // } Err(InvalidTransaction::Payment.into()) } } @@ -353,14 +353,14 @@ where match F::can_withdraw(who, fee) { WithdrawConsequence::Success => Ok(()), _ => { - // Fallback to fees in Alpha if possible - let alpha_vec = Self::fees_in_alpha::(who, call); - if !alpha_vec.is_empty() { - let fee_u64: u64 = fee.into(); - if OU::can_withdraw_in_alpha(who, &alpha_vec, fee_u64) { - return Ok(()); - } - } + // // Fallback to fees in Alpha if possible + // let alpha_vec = Self::fees_in_alpha::(who, call); + // if !alpha_vec.is_empty() { + // let fee_u64: u64 = fee.into(); + // if OU::can_withdraw_in_alpha(who, &alpha_vec, fee_u64) { + // return Ok(()); + // } + // } Err(InvalidTransaction::Payment.into()) } } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 2171708685..8f46d2d8e2 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -220,7 +220,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 348, + spec_version: 349, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 32e64ccf172e3e8389185e9a94dde76ad0eab207 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Mon, 1 Dec 2025 14:44:16 -0500 Subject: [PATCH 2/3] chore: clippy --- pallets/transaction-fee/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/transaction-fee/src/lib.rs b/pallets/transaction-fee/src/lib.rs index 9bc5497f47..fc2a16a409 100644 --- a/pallets/transaction-fee/src/lib.rs +++ b/pallets/transaction-fee/src/lib.rs @@ -308,7 +308,7 @@ where fn withdraw_fee( who: &AccountIdOf, - call: &CallOf, + _call: &CallOf, _dispatch_info: &DispatchInfoOf>, fee: Self::Balance, _tip: Self::Balance, @@ -340,7 +340,7 @@ where fn can_withdraw_fee( who: &AccountIdOf, - call: &CallOf, + _call: &CallOf, _dispatch_info: &DispatchInfoOf>, fee: Self::Balance, _tip: Self::Balance, From 29c31cb8514e80295094e8fa006686d7fde65464 Mon Sep 17 00:00:00 2001 From: camfairchild Date: Mon, 1 Dec 2025 16:23:52 -0500 Subject: [PATCH 3/3] ignore tests from removed section --- pallets/transaction-fee/src/tests/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pallets/transaction-fee/src/tests/mod.rs b/pallets/transaction-fee/src/tests/mod.rs index 14e138b1d4..b6697e87f0 100644 --- a/pallets/transaction-fee/src/tests/mod.rs +++ b/pallets/transaction-fee/src/tests/mod.rs @@ -74,6 +74,7 @@ fn test_remove_stake_fees_tao() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_fees_alpha --exact --show-output #[test] +#[ignore] fn test_remove_stake_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -142,6 +143,7 @@ fn test_remove_stake_fees_alpha() { // // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_root --exact --show-output #[test] +#[ignore] fn test_remove_stake_root() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -200,6 +202,7 @@ fn test_remove_stake_root() { // // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_completely_root --exact --show-output #[test] +#[ignore] fn test_remove_stake_completely_root() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -251,6 +254,7 @@ fn test_remove_stake_completely_root() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_completely_fees_alpha --exact --show-output #[test] +#[ignore] fn test_remove_stake_completely_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -381,6 +385,7 @@ fn test_remove_stake_not_enough_balance_for_fees() { // // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_edge_alpha --exact --show-output #[test] +#[ignore] fn test_remove_stake_edge_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -519,6 +524,7 @@ fn test_remove_stake_failing_transaction_tao_fees() { // // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_failing_transaction_alpha_fees --exact --show-output #[test] +#[ignore] fn test_remove_stake_failing_transaction_alpha_fees() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -584,6 +590,7 @@ fn test_remove_stake_failing_transaction_alpha_fees() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_remove_stake_limit_fees_alpha --exact --show-output #[test] +#[ignore] fn test_remove_stake_limit_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -651,6 +658,7 @@ fn test_remove_stake_limit_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_unstake_all_fees_alpha --exact --show-output #[test] +#[ignore] fn test_unstake_all_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -723,6 +731,7 @@ fn test_unstake_all_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_unstake_all_alpha_fees_alpha --exact --show-output #[test] +#[ignore] fn test_unstake_all_alpha_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -790,6 +799,7 @@ fn test_unstake_all_alpha_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_move_stake_fees_alpha --exact --show-output #[test] +#[ignore] fn test_move_stake_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -861,6 +871,7 @@ fn test_move_stake_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_transfer_stake_fees_alpha --exact --show-output #[test] +#[ignore] fn test_transfer_stake_fees_alpha() { new_test_ext().execute_with(|| { let destination_coldkey = U256::from(100000); @@ -933,6 +944,7 @@ fn test_transfer_stake_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_swap_stake_fees_alpha --exact --show-output #[test] +#[ignore] fn test_swap_stake_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -1003,6 +1015,7 @@ fn test_swap_stake_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_swap_stake_limit_fees_alpha --exact --show-output #[test] +#[ignore] fn test_swap_stake_limit_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -1075,6 +1088,7 @@ fn test_swap_stake_limit_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_burn_alpha_fees_alpha --exact --show-output #[test] +#[ignore] fn test_burn_alpha_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO; @@ -1136,6 +1150,7 @@ fn test_burn_alpha_fees_alpha() { // cargo test --package subtensor-transaction-fee --lib -- tests::test_recycle_alpha_fees_alpha --exact --show-output #[test] +#[ignore] fn test_recycle_alpha_fees_alpha() { new_test_ext().execute_with(|| { let stake_amount = TAO;