From 8aa57171345bcabbbb88e03df344b96c24f0016d Mon Sep 17 00:00:00 2001 From: camfairchild Date: Mon, 20 Jan 2025 12:02:21 -0500 Subject: [PATCH 1/3] put owner cut in a pending --- Cargo.lock | 184 +++++------------- .../subtensor/src/coinbase/run_coinbase.rs | 9 +- pallets/subtensor/src/lib.rs | 3 + 3 files changed, 57 insertions(+), 139 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90c2fb86f..964c583e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1550,9 +1550,9 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] @@ -2187,9 +2187,9 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", - "impl-serde 0.4.0", + "impl-serde", "scale-info", "tiny-keccak", ] @@ -2220,12 +2220,12 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", - "impl-serde 0.4.0", - "primitive-types 0.12.2", + "impl-serde", + "primitive-types", "scale-info", - "uint 0.9.5", + "uint", ] [[package]] @@ -2269,7 +2269,7 @@ dependencies = [ "evm-runtime", "log", "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types", "rlp", "scale-info", "serde", @@ -2283,7 +2283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1da6cedc5cedb4208e59467106db0d1f50db01b920920589f8e672c02fdc04f" dependencies = [ "parity-scale-codec", - "primitive-types 0.12.2", + "primitive-types", "scale-info", "serde", ] @@ -2297,7 +2297,7 @@ dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types 0.12.2", + "primitive-types", ] [[package]] @@ -2309,7 +2309,7 @@ dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types 0.12.2", + "primitive-types", "sha3", ] @@ -2694,7 +2694,7 @@ version = "1.0.0-dev" source = "git+https://github.com/opentensor/frontier?rev=635bdac882#635bdac882333afed827053f31ef56ab739f7a2e" dependencies = [ "hex", - "impl-serde 0.4.0", + "impl-serde", "libsecp256k1", "log", "parity-scale-codec", @@ -3876,26 +3876,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-codec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-num-traits" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803d15461ab0dcc56706adf266158acbc44ccf719bf7d0af30705f58b90a4b8c" -dependencies = [ - "integer-sqrt", - "num-traits", - "uint 0.10.0", -] - [[package]] name = "impl-rlp" version = "0.3.0" @@ -3914,15 +3894,6 @@ dependencies = [ "serde", ] -[[package]] -name = "impl-serde" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -4459,7 +4430,7 @@ dependencies = [ "sha2 0.10.8", "smallvec", "thiserror", - "uint 0.9.5", + "uint", "unsigned-varint 0.7.2", "void", ] @@ -4921,7 +4892,7 @@ dependencies = [ "tokio-util", "tracing", "trust-dns-resolver", - "uint 0.9.5", + "uint", "unsigned-varint 0.8.0", "url", "webpki", @@ -6664,7 +6635,7 @@ dependencies = [ "lru 0.8.1", "parity-util-mem-derive", "parking_lot 0.12.3", - "primitive-types 0.12.2", + "primitive-types", "smallvec", "winapi", ] @@ -6906,7 +6877,7 @@ dependencies = [ "libc", "log", "polkavm-assembler", - "polkavm-common 0.9.0", + "polkavm-common", "polkavm-linux-raw", ] @@ -6928,28 +6899,13 @@ dependencies = [ "log", ] -[[package]] -name = "polkavm-common" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0dbafef4ab6ceecb4982ac3b550df430ef4f9fdbf07c108b7d4f91a0682fce" - [[package]] name = "polkavm-derive" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" dependencies = [ - "polkavm-derive-impl-macro 0.9.0", -] - -[[package]] -name = "polkavm-derive" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206caf322dfc02144510ad8360ff2051e5072f0874dcab3b410f78cdd52d0ebb" -dependencies = [ - "polkavm-derive-impl-macro 0.17.0", + "polkavm-derive-impl-macro", ] [[package]] @@ -6958,19 +6914,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" dependencies = [ - "polkavm-common 0.9.0", - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42565aed4adbc4034612d0b17dea8db3681fb1bd1aed040d6edc5455a9f478a1" -dependencies = [ - "polkavm-common 0.17.0", + "polkavm-common", "proc-macro2", "quote", "syn 2.0.90", @@ -6982,17 +6926,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ - "polkavm-derive-impl 0.9.0", - "syn 2.0.90", -] - -[[package]] -name = "polkavm-derive-impl-macro" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d9838e95241b0bce4fe269cdd4af96464160505840ed5a8ac8536119ba19e2" -dependencies = [ - "polkavm-derive-impl 0.17.0", + "polkavm-derive-impl", "syn 2.0.90", ] @@ -7006,7 +6940,7 @@ dependencies = [ "hashbrown 0.14.5", "log", "object 0.32.2", - "polkavm-common 0.9.0", + "polkavm-common", "regalloc2 0.9.3", "rustc-demangle", ] @@ -7143,23 +7077,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", - "impl-serde 0.4.0", + "impl-serde", "scale-info", - "uint 0.9.5", -] - -[[package]] -name = "primitive-types" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" -dependencies = [ - "fixed-hash", - "impl-codec 0.7.0", - "impl-num-traits", - "uint 0.10.0", + "uint", ] [[package]] @@ -9405,9 +9327,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] @@ -9442,9 +9364,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -9936,7 +9858,7 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", - "impl-serde 0.4.0", + "impl-serde", "itertools 0.11.0", "k256", "libsecp256k1", @@ -9946,7 +9868,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.12.2", + "primitive-types", "rand", "scale-info", "schnorrkel", @@ -9970,7 +9892,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -10066,7 +9988,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "proc-macro2", "quote", @@ -10076,7 +9998,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "environmental", "parity-scale-codec", @@ -10129,7 +10051,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.9.1", + "polkavm-derive", "rustversion", "secp256k1", "sp-core", @@ -10254,13 +10176,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.17.1", - "primitive-types 0.13.1", + "polkavm-derive", + "primitive-types", "sp-externalities 0.25.0", "sp-runtime-interface-proc-macro 17.0.0", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -10278,8 +10200,8 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.9.1", - "primitive-types 0.12.2", + "polkavm-derive", + "primitive-types", "sp-externalities 0.29.0", "sp-runtime-interface-proc-macro 18.0.0", "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-stable2409)", @@ -10292,7 +10214,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "Inflector", "expander", @@ -10394,14 +10316,14 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-stable [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ - "impl-serde 0.5.0", + "impl-serde", "parity-scale-codec", "ref-cast", "serde", @@ -10413,7 +10335,7 @@ name = "sp-storage" version = "21.0.0" source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ - "impl-serde 0.4.0", + "impl-serde", "parity-scale-codec", "ref-cast", "serde", @@ -10435,7 +10357,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "parity-scale-codec", "tracing", @@ -10505,7 +10427,7 @@ name = "sp-version" version = "37.0.0" source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-stable2409#87971b3e92721bdf10bf40b410eaae779d494ca0" dependencies = [ - "impl-serde 0.4.0", + "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", @@ -10531,7 +10453,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#44766de645c741fd03d159fca7f17cd6e99c33e3" +source = "git+https://github.com/paritytech/polkadot-sdk#8614dc0e055d06de4a3774ac1da0a422b33f34e2" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11705,18 +11627,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicode-bidi" version = "0.3.17" diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index a150df654..11ea4887f 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -225,6 +225,10 @@ impl Pallet { PendingEmission::::mutate(*netuid, |total| { *total = total.saturating_add(pending_alpha_emission.to_num::()); }); + // Accumulate the owner cut in pending. + PendingOwnerCut::::mutate(*netuid, |total| { + *total = total.saturating_add(owner_cut); + }); } // --- 5. Drain pending emission through the subnet based on tempo. @@ -251,8 +255,9 @@ impl Pallet { let pending_root_divs: u64 = PendingRootDivs::::get(netuid); PendingRootDivs::::insert(netuid, 0); - // 5.2.3 Get owner cut. - let owner_cut: u64 = *owner_cuts.get(&netuid).unwrap_or(&0); + // 5.2.3 Get owner cut and drain. + let owner_cut: u64 = PendingOwnerCut::::get(netuid); + PendingOwnerCut::::insert(netuid, 0); // 5.2.4 Drain pending root divs, alpha emission, and owner cut. Self::drain_pending_emission( diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 7f75568ba..4a2150f7f 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1097,6 +1097,9 @@ pub mod pallet { /// --- MAP ( netuid ) --> pending_root_emission pub type PendingRootDivs = StorageMap<_, Identity, u16, u64, ValueQuery, DefaultZeroU64>; #[pallet::storage] + /// --- MAP ( netuid ) --> pending_owner_cut + pub type PendingOwnerCut = StorageMap<_, Identity, u16, u64, ValueQuery, DefaultZeroU64>; + #[pallet::storage] /// --- MAP ( netuid ) --> blocks_since_last_step pub type BlocksSinceLastStep = StorageMap<_, Identity, u16, u64, ValueQuery, DefaultBlocksSinceLastStep>; From eef3ce637a1888286b00ef8386a7faa55d8d6edb Mon Sep 17 00:00:00 2001 From: camfairchild Date: Mon, 20 Jan 2025 14:49:25 -0500 Subject: [PATCH 2/3] move val prop to outside func --- pallets/subtensor/src/coinbase/run_coinbase.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 11ea4887f..259bf68cd 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -18,7 +18,11 @@ pub struct WeightsTlockPayload { } impl Pallet { - pub fn get_root_divs_in_alpha(netuid: u16, alpha_out_emission: I96F32) -> I96F32 { + pub fn get_root_divs_in_alpha( + netuid: u16, + alpha_out_emission: I96F32, + validator_proportion: I96F32, + ) -> I96F32 { // Get total TAO on root. let total_root_tao: I96F32 = I96F32::from_num(SubnetTAO::::get(0)); // Get total ALPHA on subnet. @@ -32,7 +36,8 @@ impl Pallet { // Get root proportion of alpha_out dividends. let root_divs_in_alpha: I96F32 = root_proportion .saturating_mul(alpha_out_emission) - .saturating_mul(I96F32::from_num(0.41)); + .saturating_mul(validator_proportion); // % of emission that goes to *all* validators. + // Return root_divs_in_alpha } @@ -207,9 +212,14 @@ impl Pallet { remaining_emission ); + // Validators get 50% of remaining emission. + let validator_proportion: I96F32 = I96F32::from_num(0.5); // Get proportion of alpha out emission as root divs. - let root_emission_in_alpha: I96F32 = - Self::get_root_divs_in_alpha(*netuid, I96F32::from_num(remaining_emission)); + let root_emission_in_alpha: I96F32 = Self::get_root_divs_in_alpha( + *netuid, + I96F32::from_num(remaining_emission), + validator_proportion, + ); // Subtract root divs from alpha divs. let pending_alpha_emission: I96F32 = I96F32::from_num(remaining_emission).saturating_sub(root_emission_in_alpha); From 01203b329539c81ecd4dded6c14332bf1fb0c70f Mon Sep 17 00:00:00 2001 From: camfairchild Date: Tue, 21 Jan 2025 15:52:45 -0500 Subject: [PATCH 3/3] add alpha swapped tracker --- .../subtensor/src/coinbase/run_coinbase.rs | 22 +++++++++++++++---- pallets/subtensor/src/lib.rs | 4 ++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 259bf68cd..e86c07c24 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -231,6 +231,10 @@ impl Pallet { PendingRootDivs::::mutate(*netuid, |total| { *total = total.saturating_add(root_emission_in_tao); }); + // Accumulate alpha that was swapped for the pending root divs. + PendingAlphaSwapped::::mutate(*netuid, |total| { + *total = total.saturating_add(root_emission_in_alpha.to_num::()); + }); // Accumulate alpha emission in pending. PendingEmission::::mutate(*netuid, |total| { *total = total.saturating_add(pending_alpha_emission.to_num::()); @@ -261,10 +265,14 @@ impl Pallet { let pending_emission: u64 = PendingEmission::::get(netuid); PendingEmission::::insert(netuid, 0); - // 5.2.2 Get and drain the subnet pending root divs. + // 5.2.2a Get and drain the subnet pending root divs. let pending_root_divs: u64 = PendingRootDivs::::get(netuid); PendingRootDivs::::insert(netuid, 0); + // 5.2.2b Get this amount as alpha that was swapped for pending root divs. + let pending_alpha_swapped: u64 = PendingAlphaSwapped::::get(netuid); + PendingAlphaSwapped::::insert(netuid, 0); + // 5.2.3 Get owner cut and drain. let owner_cut: u64 = PendingOwnerCut::::get(netuid); PendingOwnerCut::::insert(netuid, 0); @@ -274,6 +282,7 @@ impl Pallet { netuid, pending_emission, pending_root_divs, + pending_alpha_swapped, owner_cut, ); } else { @@ -287,19 +296,24 @@ impl Pallet { netuid: u16, pending_alpha_emission: u64, pending_root_divs: u64, + pending_alpha_swapped: u64, owner_cut: u64, ) { log::debug!( - "Draining pending alpha emission for netuid {:?}: {:?}, with pending root divs {:?}, and owner cut {:?}", + "Draining pending alpha emission for netuid {:?}: {:?}, with pending root divs {:?}, pending alpha swapped {:?}, and owner cut {:?}", netuid, pending_alpha_emission, pending_root_divs, + pending_alpha_swapped, owner_cut ); // Run the epoch() --> hotkey emission. - let hotkey_emission: Vec<(T::AccountId, u64, u64)> = - Self::epoch(netuid, pending_alpha_emission); + // Needs to run on the full emission to the subnet. + let hotkey_emission: Vec<(T::AccountId, u64, u64)> = Self::epoch( + netuid, + pending_alpha_emission.saturating_add(pending_alpha_swapped), + ); log::debug!( "Hotkey emission for netuid {:?}: {:?}", netuid, diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 4a2150f7f..1d2690503 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1097,6 +1097,10 @@ pub mod pallet { /// --- MAP ( netuid ) --> pending_root_emission pub type PendingRootDivs = StorageMap<_, Identity, u16, u64, ValueQuery, DefaultZeroU64>; #[pallet::storage] + /// --- MAP ( netuid ) --> pending_alpha_swapped + pub type PendingAlphaSwapped = + StorageMap<_, Identity, u16, u64, ValueQuery, DefaultZeroU64>; + #[pallet::storage] /// --- MAP ( netuid ) --> pending_owner_cut pub type PendingOwnerCut = StorageMap<_, Identity, u16, u64, ValueQuery, DefaultZeroU64>; #[pallet::storage]