Skip to content

Commit 8110422

Browse files
committed
Merge branch 'devnet-ready' into feat/leasing-precompiles
2 parents a382cc8 + 7e6e9a1 commit 8110422

File tree

20 files changed

+4
-425
lines changed

20 files changed

+4
-425
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ services:
7272
- --no-mdns
7373
- --bootnodes=/dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr
7474
- --sync=warp
75-
- --reserved-nodes=/dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr
76-
- --reserved-only
7775
- --database paritydb
7876
- --db-cache 4096
7977
- --trie-cache-size 2048
@@ -91,5 +89,3 @@ services:
9189
- --no-mdns
9290
- --bootnodes=/dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr
9391
- --pruning=archive
94-
- --reserved-nodes=/dns/bootnode.test.finney.opentensor.ai/tcp/30333/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr
95-
- --reserved-only

evm-tests/src/contracts/pureProxy.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

evm-tests/src/subtensor.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,6 @@ export async function setMaxChildkeyTake(api: TypedApi<typeof devnet>, take: num
353353
await waitForTransactionWithRetry(api, tx, alice)
354354
}
355355

356-
// use the alice as wrong mapped account to send extrinsic
357-
export async function setPureProxyAccount(api: TypedApi<typeof devnet>, address: string, account: string) {
358-
const alice = getAliceSigner()
359-
const call = api.tx.SubtensorModule.set_pure_proxy_account({
360-
address: ethAddressToH160(address),
361-
account
362-
})
363-
await waitForTransactionWithRetry(api, call, alice)
364-
}
365-
366356
// Swap coldkey to contract address
367357
export async function swapColdkey(
368358
api: TypedApi<typeof devnet>,

evm-tests/test/pure-proxy.precompile.test.ts

Lines changed: 0 additions & 130 deletions
This file was deleted.

pallets/admin-utils/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pallet-scheduler = { workspace = true }
4545
pallet-grandpa = { workspace = true }
4646
sp-std = { workspace = true }
4747
pallet-subtensor-swap = { workspace = true }
48-
pallet-evm = { workspace = true }
4948
pallet-crowdloan = { workspace = true, default-features = false }
5049
pallet-preimage = { workspace = true, default-features = false }
5150

@@ -59,7 +58,6 @@ std = [
5958
"log/std",
6059
"pallet-balances/std",
6160
"pallet-drand/std",
62-
"pallet-evm/std",
6361
"pallet-evm-chain-id/std",
6462
"pallet-grandpa/std",
6563
"pallet-scheduler/std",
@@ -86,7 +84,6 @@ runtime-benchmarks = [
8684
"frame-system/runtime-benchmarks",
8785
"pallet-balances/runtime-benchmarks",
8886
"pallet-drand/runtime-benchmarks",
89-
"pallet-evm/runtime-benchmarks",
9087
"pallet-grandpa/runtime-benchmarks",
9188
"pallet-scheduler/runtime-benchmarks",
9289
"pallet-subtensor/runtime-benchmarks",
@@ -100,7 +97,6 @@ try-runtime = [
10097
"frame-system/try-runtime",
10198
"pallet-balances/try-runtime",
10299
"pallet-drand/try-runtime",
103-
"pallet-evm/try-runtime",
104100
"pallet-evm-chain-id/try-runtime",
105101
"pallet-grandpa/try-runtime",
106102
"pallet-scheduler/try-runtime",

pallets/admin-utils/src/tests/mock.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ use sp_weights::Weight;
2222
use subtensor_runtime_common::NetUid;
2323

2424
type Block = frame_system::mocking::MockBlock<Test>;
25-
26-
pub struct DummyAddressMap;
27-
28-
impl pallet_evm::AddressMapping<AccountId> for DummyAddressMap {
29-
fn into_account_id(address: sp_core::H160) -> AccountId {
30-
let account = pallet_evm::HashedAddressMapping::<BlakeTwo256>::into_account_id(address);
31-
U256::from_big_endian(account.as_ref())
32-
}
33-
}
3425
// Configure a mock runtime to test the pallet.
3526
frame_support::construct_runtime!(
3627
pub enum Test {
@@ -230,7 +221,6 @@ impl pallet_subtensor::Config for Test {
230221
type SwapInterface = Swap;
231222
type KeySwapOnSubnetCost = InitialKeySwapOnSubnetCost;
232223
type HotkeySwapOnSubnetInterval = HotkeySwapOnSubnetInterval;
233-
type AddressMapping = DummyAddressMap;
234224
type ProxyInterface = ();
235225
type LeaseDividendsDistributionInterval = LeaseDividendsDistributionInterval;
236226
}

pallets/subtensor/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ subtensor-runtime-common = { workspace = true, features = ["approx"] }
4949

5050
pallet-collective = { version = "4.0.0-dev", default-features = false, path = "../collective" }
5151
pallet-drand = { path = "../drand", default-features = false }
52-
pallet-evm = { workspace = true }
5352
pallet-membership = { workspace = true }
5453
hex-literal = { workspace = true }
5554
num-traits = { version = "0.2.19", default-features = false, features = [
@@ -93,7 +92,6 @@ std = [
9392
"pallet-balances/std",
9493
"pallet-collective/std",
9594
"pallet-drand/std",
96-
"pallet-evm/std",
9795
"pallet-membership/std",
9896
"pallet-preimage/std",
9997
"pallet-scheduler/std",
@@ -136,7 +134,6 @@ runtime-benchmarks = [
136134
"frame-system/runtime-benchmarks",
137135
"pallet-balances/runtime-benchmarks",
138136
"pallet-collective/runtime-benchmarks",
139-
"pallet-evm/runtime-benchmarks",
140137
"pallet-drand/runtime-benchmarks",
141138
"pallet-membership/runtime-benchmarks",
142139
"pallet-preimage/runtime-benchmarks",
@@ -152,7 +149,6 @@ try-runtime = [
152149
"frame-support/try-runtime",
153150
"frame-system/try-runtime",
154151
"pallet-balances/try-runtime",
155-
"pallet-evm/try-runtime",
156152
"pallet-membership/try-runtime",
157153
"pallet-preimage/try-runtime",
158154
"pallet-scheduler/try-runtime",

pallets/subtensor/src/benchmarks.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use frame_benchmarking::v2::*;
99
use frame_support::{StorageDoubleMap, assert_ok};
1010
use frame_system::{RawOrigin, pallet_prelude::BlockNumberFor};
1111
pub use pallet::*;
12-
use sp_core::{H160, H256};
12+
use sp_core::H256;
1313
use sp_runtime::{
1414
BoundedVec, Percent,
1515
traits::{BlakeTwo256, Hash},
@@ -20,7 +20,6 @@ use subtensor_runtime_common::{AlphaCurrency, NetUid};
2020
#[frame_benchmarking::v2::benchmarks]
2121
mod pallet_benchmarks {
2222
use super::*;
23-
use pallet_evm::AddressMapping;
2423

2524
#[benchmark]
2625
fn register() {
@@ -1382,16 +1381,6 @@ mod pallet_benchmarks {
13821381
_(RawOrigin::Signed(coldkey), hotkey);
13831382
}
13841383

1385-
#[benchmark]
1386-
fn set_pure_proxy_account() {
1387-
let address: H160 = H160::zero();
1388-
let mapped_account = T::AddressMapping::into_account_id(address);
1389-
let proxy_account: T::AccountId = account("A", 0, 7);
1390-
1391-
#[extrinsic_call]
1392-
_(RawOrigin::Signed(mapped_account), address, proxy_account);
1393-
}
1394-
13951384
#[benchmark]
13961385
fn remove_stake_full_limit() {
13971386
let netuid = NetUid::from(1);

pallets/subtensor/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,11 +1717,6 @@ pub mod pallet {
17171717
pub type AssociatedEvmAddress<T: Config> =
17181718
StorageDoubleMap<_, Twox64Concat, NetUid, Twox64Concat, u16, (H160, u64), OptionQuery>;
17191719

1720-
#[pallet::storage]
1721-
/// --- MAP (H160) --> T::AccountId
1722-
pub type PureProxyAccount<T: Config> =
1723-
StorageMap<_, Twox64Concat, H160, T::AccountId, OptionQuery>;
1724-
17251720
/// ========================
17261721
/// ==== Subnet Leasing ====
17271722
/// ========================

0 commit comments

Comments
 (0)