Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
86b6f0c
Revert "Update base call filter"
shamil-gadelshin Feb 24, 2026
7d5626d
Bump spec version.
shamil-gadelshin Feb 24, 2026
9e17b0e
cargo fmt
sam0x17 Feb 24, 2026
818647f
bump spec
sam0x17 Feb 24, 2026
e9cda43
bump spec
sam0x17 Feb 24, 2026
996b98d
Revert "Merge pull request #2290 from opentensor/feat/balancer_swap"
gztensor Feb 25, 2026
9ef6ba3
Cleanup merge
gztensor Feb 25, 2026
f2fa6be
Merge pull request #2461 from opentensor/revert/balancer
sam0x17 Feb 25, 2026
f499bd5
Merge origin/main into devnet-ready (compat merge, keep devnet-ready …
sam0x17 Feb 26, 2026
969a245
auto-update benchmark weights
github-actions[bot] Feb 26, 2026
99eabe9
bump spec to 385
sam0x17 Feb 26, 2026
d72581d
Merge pull request #2466 from opentensor/fix-devnet-ready-feb-26-2026
sam0x17 Feb 26, 2026
6850499
commit Cargo.lock changes
sam0x17 Feb 26, 2026
db46280
Merge remote-tracking branch 'origin/devnet-ready' into revert-call-f…
sam0x17 Feb 26, 2026
14b813a
added evm_context to common
l0r1s Feb 24, 2026
f67ae84
bump CI
sam0x17 Feb 26, 2026
c81103d
leverage evm_context in precompiles
l0r1s Feb 26, 2026
a353761
update psdk/frontier to dispatch guard rev
l0r1s Feb 26, 2026
6ec7cf8
add noop dispatch guard to runtime
l0r1s Feb 26, 2026
4620842
Merge branch 'devnet' into dispatch-guard
l0r1s Feb 26, 2026
683ef89
Merge branch 'testnet' into dispatch-guard
l0r1s Feb 26, 2026
b6c5aa5
Merge pull request #2457 from opentensor/revert-call-filter
sam0x17 Feb 26, 2026
7c711a4
Merge pull request #2467 from opentensor/dispatch-guard
sam0x17 Feb 26, 2026
77d8587
remove CheckColdkeySwap tx extension
l0r1s Feb 26, 2026
061c84b
added new errors to the subtensor pallet
l0r1s Feb 26, 2026
0b0c61a
added CheckColdkeySwap dispatch guard and tests
l0r1s Feb 26, 2026
a764147
wire CheckColdkeySwap dispatch guard in the runtime
l0r1s Feb 26, 2026
fd4337a
remove unused errors from tx etc and deprecate old error
l0r1s Feb 26, 2026
7b19064
cargo fmt
l0r1s Feb 26, 2026
ae16032
fix import
l0r1s Feb 26, 2026
4a8795f
Error::ColdkeySwapActive to ColdkeySwapAnnounced
l0r1s Feb 26, 2026
f88e095
cargo fmt
l0r1s Feb 26, 2026
f05505d
fix failing test
l0r1s Feb 26, 2026
80bc2ad
fix test
l0r1s Feb 26, 2026
0ec8c10
Merge pull request #2468 from opentensor/coldkey-swap-dispatch-guard
sam0x17 Feb 27, 2026
8cc84fa
fix ink contract test
open-junius Feb 27, 2026
b2e200f
Merge pull request #2469 from opentensor/fix-ink-contract-test
sam0x17 Feb 27, 2026
8dee4c6
added set_real_pays_fee extrinsic and tests
l0r1s Feb 27, 2026
c558c47
updated the ChargeTxPaymentWrapper to handle RealPaysFee for proxies
l0r1s Feb 27, 2026
abc0baf
do not handle proxy_announced + memoize storage read
l0r1s Feb 27, 2026
cbad8e6
added tests
l0r1s Feb 27, 2026
8578ad3
added additional weights to extension
l0r1s Feb 27, 2026
f22315d
cargo fmt
l0r1s Feb 27, 2026
4ec43ec
add missing import
l0r1s Feb 27, 2026
e8436a1
added pallet proxy to benchmarks
l0r1s Feb 27, 2026
57e2796
benchmark the proxy pallet with new extrinsic
l0r1s Feb 27, 2026
eb4072c
fix missing imports
l0r1s Feb 27, 2026
727243f
fix zepter check
l0r1s Feb 27, 2026
2423d5c
Use mortal era for all transactions
gztensor Feb 27, 2026
0c3ad43
Revert "Use mortal era for all transactions"
gztensor Feb 27, 2026
9d0d787
Fix benchmarks
ales-otf Feb 27, 2026
3a5e808
auto-update benchmark weights
github-actions[bot] Mar 2, 2026
6bbda12
Trigger CI
ales-otf Mar 2, 2026
4cd4847
Fix benchmarks #2471
ales-otf Mar 2, 2026
2137bff
Merge branch 'devnet-ready' into proxy-real-pays
l0r1s Mar 2, 2026
6193395
Merge pull request #2470 from opentensor/proxy-real-pays
sam0x17 Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/e2e.yml

This file was deleted.

925 changes: 459 additions & 466 deletions Cargo.lock

Large diffs are not rendered by default.

462 changes: 132 additions & 330 deletions Cargo.toml

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions chain-extensions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use sp_runtime::{
traits::{BlakeTwo256, Convert, IdentityLookup},
};
use sp_std::{cell::RefCell, cmp::Ordering, sync::OnceLock};
use subtensor_runtime_common::{AlphaCurrency, NetUid, TaoCurrency};
use subtensor_runtime_common::{AlphaCurrency, AuthorshipInfo, NetUid, TaoCurrency};

type Block = frame_system::mocking::MockBlock<Test>;

Expand Down Expand Up @@ -262,6 +262,14 @@ parameter_types! {
pub const AnnouncementDepositFactor: Balance = 1;
}

pub struct MockAuthorshipProvider;

impl AuthorshipInfo<U256> for MockAuthorshipProvider {
fn author() -> Option<U256> {
Some(U256::from(12345u64))
}
}

parameter_types! {
pub const InitialMinAllowedWeights: u16 = 0;
pub const InitialEmissionValue: u16 = 0;
Expand Down Expand Up @@ -325,9 +333,8 @@ parameter_types! {
pub const InitialAlphaLow: u16 = 45875; // Represents 0.7 as per the production default
pub const InitialLiquidAlphaOn: bool = false; // Default value for LiquidAlphaOn
pub const InitialYuma3On: bool = false; // Default value for Yuma3On
// pub const InitialNetworkMaxStake: u64 = u64::MAX; // (DEPRECATED)
pub const InitialColdkeySwapScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialColdkeySwapRescheduleDuration: u64 = 24 * 60 * 60 / 12; // Default as 1 day
pub const InitialColdkeySwapAnnouncementDelay: u64 = 50;
pub const InitialColdkeySwapReannouncementDelay: u64 = 10;
pub const InitialDissolveNetworkScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialTaoWeight: u64 = 0; // 100% global weight.
pub const InitialEmaPriceHalvingPeriod: u64 = 201_600_u64; // 4 weeks
Expand Down Expand Up @@ -397,8 +404,8 @@ impl pallet_subtensor::Config for Test {
type LiquidAlphaOn = InitialLiquidAlphaOn;
type Yuma3On = InitialYuma3On;
type Preimages = Preimage;
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration;
type InitialColdkeySwapRescheduleDuration = InitialColdkeySwapRescheduleDuration;
type InitialColdkeySwapAnnouncementDelay = InitialColdkeySwapAnnouncementDelay;
type InitialColdkeySwapReannouncementDelay = InitialColdkeySwapReannouncementDelay;
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration;
type InitialTaoWeight = InitialTaoWeight;
type InitialEmaPriceHalvingPeriod = InitialEmaPriceHalvingPeriod;
Expand All @@ -412,6 +419,7 @@ impl pallet_subtensor::Config for Test {
type MaxImmuneUidsPercentage = MaxImmuneUidsPercentage;
type CommitmentsInterface = CommitmentsI;
type EvmKeyAssociateRateLimit = EvmKeyAssociateRateLimit;
type AuthorshipProvider = MockAuthorshipProvider;
}

// Swap-related parameter types
Expand Down
2 changes: 2 additions & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { workspace = true, features = ["derive"] }
environmental.workspace = true
frame-support.workspace = true
scale-info.workspace = true
serde.workspace = true
Expand All @@ -31,6 +32,7 @@ approx = ["dep:approx"]
fast-runtime = []
std = [
"codec/std",
"environmental/std",
"frame-support/std",
"scale-info/std",
"serde/std",
Expand Down
47 changes: 47 additions & 0 deletions common/src/evm_context.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
environmental::environmental!(IN_EVM: bool);

/// Returns `true` if the current dispatch originated from an EVM precompile.
pub fn is_in_evm() -> bool {
IN_EVM::with(|v| *v).unwrap_or(false)
}

/// Executes `f` within an EVM context, making `is_in_evm()` return `true`
/// for the duration of the closure. Uses `using_once` so nested calls
/// reuse the already-set value instead of building a stack.
pub fn with_evm_context<R>(f: impl FnOnce() -> R) -> R {
IN_EVM::using_once(&mut true, f)
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn is_in_evm_returns_false_by_default() {
assert!(!is_in_evm());
}

#[test]
fn with_evm_context_sets_flag() {
with_evm_context(|| {
assert!(is_in_evm());
});
}

#[test]
fn flag_clears_after_evm_context() {
with_evm_context(|| {});
assert!(!is_in_evm());
}

#[test]
fn nested_evm_context_stays_true() {
with_evm_context(|| {
with_evm_context(|| {
assert!(is_in_evm());
});
// Still true after inner context exits thanks to using_once.
assert!(is_in_evm());
});
}
}
8 changes: 8 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ use sp_runtime::{
use subtensor_macros::freeze_struct;

pub use currency::*;
pub use evm_context::*;

mod currency;
mod evm_context;

/// Balance of an account.
pub type Balance = u64;
Expand Down Expand Up @@ -260,6 +262,12 @@ pub trait BalanceOps<AccountId> {
) -> Result<AlphaCurrency, DispatchError>;
}

/// Allows to query the current block author
pub trait AuthorshipInfo<AccountId> {
/// Return the current block author
fn author() -> Option<AccountId>;
}

pub mod time {
use super::*;

Expand Down
2 changes: 0 additions & 2 deletions contract-tests/bittensor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ edition = "2021"
ink = { version = "5.1.1", default-features = false }
parity-scale-codec = { version = "3.0.0", default-features = false }
serde = { version = "1.0.228", default-features = false }
subtensor-runtime-common = { path = "../../common", default-features = false }
[dev-dependencies]
ink_e2e = { version = "5.1.1" }

Expand All @@ -23,7 +22,6 @@ std = [
"ink/std",
"parity-scale-codec/std",
"serde/std",
"subtensor-runtime-common/std",
]

ink-as-dependency = []
Expand Down
Loading
Loading