mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 20:11:03 +00:00
XXX: Strip pallet metadata to dedicated files
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Generated
+58
-34
@@ -300,7 +300,7 @@ checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -999,6 +999,16 @@ dependencies = [
|
|||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "frame-metadata"
|
||||||
|
version = "15.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"parity-scale-codec",
|
||||||
|
"scale-info 2.3.1",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-metadata"
|
name = "frame-metadata"
|
||||||
version = "15.0.0"
|
version = "15.0.0"
|
||||||
@@ -1007,8 +1017,7 @@ checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1565,12 +1574,12 @@ name = "integration-tests"
|
|||||||
version = "0.27.1"
|
version = "0.27.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_matches",
|
"assert_matches",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"futures",
|
"futures",
|
||||||
"hex",
|
"hex",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"regex",
|
"regex",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"sp-keyring",
|
"sp-keyring",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
@@ -2269,7 +2278,7 @@ dependencies = [
|
|||||||
"fixed-hash",
|
"fixed-hash",
|
||||||
"impl-codec",
|
"impl-codec",
|
||||||
"impl-serde",
|
"impl-serde",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uint",
|
"uint",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2592,26 +2601,34 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "scale-bits"
|
name = "scale-bits"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scale-decode"
|
name = "scale-decode"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-bits",
|
"scale-bits",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scale-info"
|
||||||
|
version = "2.3.1"
|
||||||
|
dependencies = [
|
||||||
|
"bitvec",
|
||||||
|
"cfg-if",
|
||||||
|
"derive_more",
|
||||||
|
"parity-scale-codec",
|
||||||
|
"scale-info-derive 2.3.1",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scale-info"
|
name = "scale-info"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
@@ -2622,8 +2639,17 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info-derive",
|
"scale-info-derive 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scale-info-derive"
|
||||||
|
version = "2.3.1"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro-crate",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2641,15 +2667,13 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "scale-value"
|
name = "scale-value"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"either",
|
"either",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-bits",
|
"scale-bits",
|
||||||
"scale-decode",
|
"scale-decode",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"yap",
|
"yap",
|
||||||
@@ -2923,7 +2947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "65e5d5ec374fc23f4e1b87219be18e01080d8a21a2dee3b49df8befeddbf5780"
|
checksum = "65e5d5ec374fc23f4e1b87219be18e01080d8a21a2dee3b49df8befeddbf5780"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"sp-io",
|
"sp-io",
|
||||||
@@ -2939,7 +2963,7 @@ dependencies = [
|
|||||||
"integer-sqrt",
|
"integer-sqrt",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
"sp-std",
|
"sp-std",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
@@ -2971,7 +2995,7 @@ dependencies = [
|
|||||||
"primitive-types",
|
"primitive-types",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex",
|
"regex",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"schnorrkel",
|
"schnorrkel",
|
||||||
"secp256k1",
|
"secp256k1",
|
||||||
"secrecy",
|
"secrecy",
|
||||||
@@ -3118,7 +3142,7 @@ dependencies = [
|
|||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"paste",
|
"paste",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
"sp-application-crypto",
|
"sp-application-crypto",
|
||||||
"sp-arithmetic",
|
"sp-arithmetic",
|
||||||
@@ -3228,7 +3252,7 @@ dependencies = [
|
|||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"schnellru",
|
"schnellru",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"sp-std",
|
"sp-std",
|
||||||
@@ -3247,7 +3271,7 @@ dependencies = [
|
|||||||
"impl-serde",
|
"impl-serde",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"parity-wasm",
|
"parity-wasm",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
"sp-core-hashing-proc-macro",
|
"sp-core-hashing-proc-macro",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
@@ -3290,7 +3314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "39c4a96e53621ae435981fb6037d8b0be7cf32fae627780094a94ef89f194715"
|
checksum = "39c4a96e53621ae435981fb6037d8b0be7cf32fae627780094a94ef89f194715"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"sp-arithmetic",
|
"sp-arithmetic",
|
||||||
@@ -3387,7 +3411,7 @@ dependencies = [
|
|||||||
"bitvec",
|
"bitvec",
|
||||||
"blake2",
|
"blake2",
|
||||||
"derivative",
|
"derivative",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"futures",
|
"futures",
|
||||||
"getrandom 0.2.8",
|
"getrandom 0.2.8",
|
||||||
"hex",
|
"hex",
|
||||||
@@ -3398,7 +3422,7 @@ dependencies = [
|
|||||||
"primitive-types",
|
"primitive-types",
|
||||||
"scale-bits",
|
"scale-bits",
|
||||||
"scale-decode",
|
"scale-decode",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"scale-value",
|
"scale-value",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -3420,7 +3444,7 @@ version = "0.27.1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 4.1.8",
|
"clap 4.1.8",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"hex",
|
"hex",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -3438,7 +3462,7 @@ version = "0.27.1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bitvec",
|
"bitvec",
|
||||||
"darling",
|
"darling",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"heck",
|
"heck",
|
||||||
"hex",
|
"hex",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
@@ -3446,7 +3470,7 @@ dependencies = [
|
|||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"subxt-metadata",
|
"subxt-metadata",
|
||||||
"syn",
|
"syn",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -3484,9 +3508,9 @@ version = "0.27.1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bitvec",
|
"bitvec",
|
||||||
"criterion",
|
"criterion",
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"sp-core-hashing",
|
"sp-core-hashing",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -3869,9 +3893,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
|||||||
name = "ui-tests"
|
name = "ui-tests"
|
||||||
version = "0.27.1"
|
version = "0.27.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-metadata",
|
"frame-metadata 15.0.0",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info 2.3.1",
|
||||||
"subxt",
|
"subxt",
|
||||||
"trybuild",
|
"trybuild",
|
||||||
]
|
]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -32,7 +32,7 @@ serde_json = "1.0.94"
|
|||||||
# hex encoded metadata to bytes
|
# hex encoded metadata to bytes
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
# actual metadata types
|
# actual metadata types
|
||||||
frame-metadata = { version = "15.0.0", features = ["v14", "std"] }
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata", features = ["v14", "std"] }
|
||||||
# decode bytes into the metadata types
|
# decode bytes into the metadata types
|
||||||
scale = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
|
scale = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
|
||||||
# generate the item mod for codegen
|
# generate the item mod for codegen
|
||||||
|
|||||||
+3
-3
@@ -15,12 +15,12 @@ description = "Generate an API for interacting with a substrate node from FRAME
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
||||||
darling = "0.14.3"
|
darling = "0.14.3"
|
||||||
frame-metadata = "15.0.0"
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata" }
|
||||||
heck = "0.4.1"
|
heck = "0.4.1"
|
||||||
proc-macro2 = "1.0.51"
|
proc-macro2 = "1.0.51"
|
||||||
quote = "1.0.8"
|
quote = "1.0.8"
|
||||||
syn = "1.0.109"
|
syn = "1.0.109"
|
||||||
scale-info = "2.0.0"
|
scale-info = { path = "/home/lexnv/workspace/scale-info" }
|
||||||
subxt-metadata = { version = "0.27.1", path = "../metadata" }
|
subxt-metadata = { version = "0.27.1", path = "../metadata" }
|
||||||
jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport", "http-client"] }
|
jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport", "http-client"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
@@ -29,5 +29,5 @@ thiserror = "1.0.39"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
|
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
|
||||||
scale-info = { version = "2.0.0", features = ["bit-vec"] }
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
pretty_assertions = "1.0.0"
|
pretty_assertions = "1.0.0"
|
||||||
|
|||||||
+3
-3
@@ -15,14 +15,14 @@ description = "Command line utilities for checking metadata compatibility betwee
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
||||||
frame-metadata = "15.0.0"
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata" }
|
||||||
scale-info = "2.0.0"
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
sp-core-hashing = "7.0.0"
|
sp-core-hashing = "7.0.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
|
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
|
||||||
criterion = "0.4"
|
criterion = "0.4"
|
||||||
scale-info = { version = "2.0.0", features = ["bit-vec"] }
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
# Without this, libtest cli opts interfere with criteron benches:
|
# Without this, libtest cli opts interfere with criteron benches:
|
||||||
|
|||||||
+102
-20
@@ -23,6 +23,7 @@ use std::{
|
|||||||
any::TypeId,
|
any::TypeId,
|
||||||
collections::{
|
collections::{
|
||||||
BTreeSet,
|
BTreeSet,
|
||||||
|
HashMap,
|
||||||
HashSet,
|
HashSet,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -40,14 +41,14 @@ pub enum StripError {
|
|||||||
fn collect_pallet_types(pallet: &PalletMetadata<PortableForm>) -> BTreeSet<u32> {
|
fn collect_pallet_types(pallet: &PalletMetadata<PortableForm>) -> BTreeSet<u32> {
|
||||||
let mut type_ids = BTreeSet::new();
|
let mut type_ids = BTreeSet::new();
|
||||||
|
|
||||||
println!("Collect");
|
// println!("Collect");
|
||||||
println!("Pallet is : {:?}", pallet);
|
// println!("Pallet is : {:?}", pallet);
|
||||||
|
|
||||||
if let Some(storage) = &pallet.storage {
|
if let Some(storage) = &pallet.storage {
|
||||||
println!("storage : {:?}", storage);
|
// println!("storage : {:?}", storage);
|
||||||
|
|
||||||
for entry in storage.entries.iter() {
|
for entry in storage.entries.iter() {
|
||||||
println!("Entry : {:?}", entry);
|
// println!("Entry : {:?}", entry);
|
||||||
|
|
||||||
match entry.ty {
|
match entry.ty {
|
||||||
StorageEntryType::Plain(ty) => {
|
StorageEntryType::Plain(ty) => {
|
||||||
@@ -165,30 +166,105 @@ pub fn keep_pallet<T: AsRef<str>>(
|
|||||||
// Collect type ids from the pallet.
|
// Collect type ids from the pallet.
|
||||||
let mut type_ids = collect_pallet_types(pallet);
|
let mut type_ids = collect_pallet_types(pallet);
|
||||||
|
|
||||||
println!("TypeIDs {:#?}", type_ids);
|
// Collect extrisic type IDs.
|
||||||
|
type_ids.insert(metadata.extrinsic.ty.id());
|
||||||
// println!("TypeIDs {:#?}", type_ids);
|
for signed in &metadata.extrinsic.signed_extensions {
|
||||||
|
type_ids.insert(signed.ty.id());
|
||||||
|
type_ids.insert(signed.additional_signed.id());
|
||||||
|
}
|
||||||
|
// Collect runtime type ID.
|
||||||
|
type_ids.insert(metadata.ty.id());
|
||||||
|
|
||||||
// Extend the type IDs with their dependencies
|
// Extend the type IDs with their dependencies
|
||||||
let registry = &metadata.types;
|
let registry = &metadata.types;
|
||||||
|
|
||||||
let mut result = BTreeSet::new();
|
let mut result = BTreeSet::new();
|
||||||
let mut visited = HashSet::new();
|
let mut visited = HashSet::new();
|
||||||
for id in type_ids.iter() {
|
for id in type_ids.iter() {
|
||||||
extend_type_id(registry, *id, &mut result, &mut visited)?;
|
extend_type_id(®istry, *id, &mut result, &mut visited)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
type_ids.extend(result.iter());
|
type_ids.extend(result.iter());
|
||||||
|
|
||||||
println!("TypeIDs Extended {:#?}", type_ids);
|
println!("TypeIDs {:#?}", type_ids);
|
||||||
|
|
||||||
|
let mut registry = registry.clone();
|
||||||
|
println!("old registry len: {}", registry.types().len());
|
||||||
|
let res = registry.retain(type_ids.clone()).unwrap();
|
||||||
|
println!("new registry len: {}", registry.types().len());
|
||||||
|
|
||||||
|
println!("Res is {:?}", res);
|
||||||
|
|
||||||
|
// Modify the metadata
|
||||||
|
let mut new_metadata = metadata.clone();
|
||||||
|
new_metadata.types = registry;
|
||||||
|
let mut pallet_metadata = pallet.clone();
|
||||||
|
if let Some(storage) = &mut pallet_metadata.storage {
|
||||||
|
for entry in storage.entries.iter_mut() {
|
||||||
|
match &mut entry.ty {
|
||||||
|
StorageEntryType::Plain(plain) => {
|
||||||
|
let new_id = res.get(&plain.id()).expect("Expected ID to exist");
|
||||||
|
*plain = (*new_id).into();
|
||||||
|
}
|
||||||
|
StorageEntryType::Map {
|
||||||
|
hashers,
|
||||||
|
key,
|
||||||
|
value,
|
||||||
|
} => {
|
||||||
|
let new_id = res.get(&key.id()).expect("Expected ID to exist");
|
||||||
|
*key = (*new_id).into();
|
||||||
|
|
||||||
|
let new_id = res.get(&value.id()).expect("Expected ID to exist");
|
||||||
|
*value = (*new_id).into();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(calls) = &mut pallet_metadata.calls {
|
||||||
|
let new_id = res.get(&calls.ty.id()).expect("Expected ID to exist");
|
||||||
|
calls.ty = (*new_id).into();
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(event) = &mut pallet_metadata.event {
|
||||||
|
let new_id = res.get(&event.ty.id()).expect("Expected ID to exist");
|
||||||
|
event.ty = (*new_id).into();
|
||||||
|
}
|
||||||
|
|
||||||
|
for constant in pallet_metadata.constants.iter_mut() {
|
||||||
|
let new_id = res.get(&constant.ty.id()).expect("Expected ID to exist");
|
||||||
|
constant.ty = (*new_id).into();
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(error) = &mut pallet_metadata.error {
|
||||||
|
let new_id = res.get(&error.ty.id()).expect("Expected ID to exist");
|
||||||
|
error.ty = (*new_id).into();
|
||||||
|
}
|
||||||
|
|
||||||
|
new_metadata.pallets = vec![pallet_metadata];
|
||||||
|
|
||||||
|
let new_id = res
|
||||||
|
.get(&new_metadata.extrinsic.ty.id())
|
||||||
|
.expect("Expected ID to exist");
|
||||||
|
new_metadata.extrinsic.ty = (*new_id).into();
|
||||||
|
|
||||||
|
for ext in new_metadata.extrinsic.signed_extensions.iter_mut() {
|
||||||
|
let new_id = res.get(&ext.ty.id()).expect("Expected ID to exist");
|
||||||
|
ext.ty = (*new_id).into();
|
||||||
|
|
||||||
|
let new_id = res
|
||||||
|
.get(&ext.additional_signed.id())
|
||||||
|
.expect("Expected ID to exist");
|
||||||
|
ext.additional_signed = (*new_id).into();
|
||||||
|
}
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Pallet [{}]\n stripped {} vs full {}\n",
|
"Stripped {number:>3} vs full {full} for pallet [{pallet}]",
|
||||||
pallet_name.as_ref(),
|
number = type_ids.len(),
|
||||||
type_ids.len(),
|
full = metadata.types.types().len(),
|
||||||
metadata.types.types().len()
|
pallet = pallet_name.as_ref(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(metadata)
|
Ok(new_metadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@@ -203,6 +279,7 @@ mod tests {
|
|||||||
use scale_info::meta_type;
|
use scale_info::meta_type;
|
||||||
use std::{
|
use std::{
|
||||||
fs,
|
fs,
|
||||||
|
io::Write,
|
||||||
path::Path,
|
path::Path,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,12 +298,17 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn strip_pallet() {
|
fn strip_pallet() {
|
||||||
let metadata = load_metadata();
|
let metadata = load_metadata();
|
||||||
|
use codec::Encode;
|
||||||
|
|
||||||
keep_pallet(metadata, "AuthorityDiscovery").unwrap();
|
for pallet in metadata.pallets.iter() {
|
||||||
|
let metadata = load_metadata();
|
||||||
|
let metadata = keep_pallet(metadata, &pallet.name).unwrap();
|
||||||
|
let meta: RuntimeMetadataPrefixed = metadata.into();
|
||||||
|
let bytes: Vec<u8> = meta.encode();
|
||||||
|
|
||||||
// for pallet in metadata.pallets.iter() {
|
let mut file =
|
||||||
// let metadata = load_metadata();
|
fs::File::create(format!("../artifacts/{}.scale", pallet.name)).unwrap();
|
||||||
// keep_pallet(metadata, &pallet.name).unwrap();
|
file.write_all(bytes.as_slice()).unwrap();
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -36,10 +36,10 @@ jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
|
||||||
scale-info = "2.0.0"
|
scale-info = { path = "/home/lexnv/workspace/scale-info" }
|
||||||
scale-value = "0.6.0"
|
scale-value = { version = "0.6.0", path = "/home/lexnv/workspace/scale-value" }
|
||||||
scale-bits = "0.3"
|
scale-bits = { version = "0.3.0", path = "/home/lexnv/workspace/scale-bits" }
|
||||||
scale-decode = "0.4.0"
|
scale-decode = {version = "0.4.0", path ="/home/lexnv/workspace/scale-decode" }
|
||||||
futures = { version = "0.3.26", default-features = false, features = ["std"] }
|
futures = { version = "0.3.26", default-features = false, features = ["std"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] }
|
jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] }
|
||||||
@@ -48,7 +48,7 @@ serde_json = { version = "1.0.94", features = ["raw_value"] }
|
|||||||
thiserror = "1.0.39"
|
thiserror = "1.0.39"
|
||||||
tracing = "0.1.34"
|
tracing = "0.1.34"
|
||||||
parking_lot = "0.12.0"
|
parking_lot = "0.12.0"
|
||||||
frame-metadata = "15.0.0"
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata" }
|
||||||
derivative = "2.2.0"
|
derivative = "2.2.0"
|
||||||
|
|
||||||
subxt-macro = { version = "0.27.1", path = "../macro" }
|
subxt-macro = { version = "0.27.1", path = "../macro" }
|
||||||
@@ -73,7 +73,7 @@ getrandom = { version = "0.2", features = ["js"] }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bitvec = "1"
|
bitvec = "1"
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
||||||
scale-info = { version = "2.0.0", features = ["bit-vec"] }
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
tokio = { version = "1.26", features = ["macros", "time", "rt-multi-thread"] }
|
tokio = { version = "1.26", features = ["macros", "time", "rt-multi-thread"] }
|
||||||
sp-core = { version = "18.0.0", default-features = false }
|
sp-core = { version = "18.0.0", default-features = false }
|
||||||
sp-runtime = "20.0.0"
|
sp-runtime = "20.0.0"
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ default = ["subxt/integration-tests"]
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assert_matches = "1.5.0"
|
assert_matches = "1.5.0"
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
||||||
frame-metadata = "15.0.0"
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata" }
|
||||||
futures = "0.3.26"
|
futures = "0.3.26"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
regex = "1.5.0"
|
regex = "1.5.0"
|
||||||
scale-info = { version = "2.0.0", features = ["bit-vec"] }
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
sp-core = { version = "18.0.0", default-features = false }
|
sp-core = { version = "18.0.0", default-features = false }
|
||||||
sp-keyring = "20.0.0"
|
sp-keyring = "20.0.0"
|
||||||
sp-runtime = "20.0.0"
|
sp-runtime = "20.0.0"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ publish = false
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
trybuild = "1.0.79"
|
trybuild = "1.0.79"
|
||||||
scale-info = { version = "2.3.0", features = ["bit-vec"] }
|
scale-info = { path = "/home/lexnv/workspace/scale-info", features = ["bit-vec"] }
|
||||||
frame-metadata = "15.0.0"
|
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata" }
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
|
||||||
subxt = { path = "../../subxt" }
|
subxt = { path = "../../subxt" }
|
||||||
|
|||||||
+658
@@ -0,0 +1,658 @@
|
|||||||
|
|
||||||
|
running 1 test
|
||||||
|
TypeIDs {
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
4,
|
||||||
|
6,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
11,
|
||||||
|
12,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
31,
|
||||||
|
37,
|
||||||
|
40,
|
||||||
|
41,
|
||||||
|
42,
|
||||||
|
46,
|
||||||
|
47,
|
||||||
|
48,
|
||||||
|
53,
|
||||||
|
54,
|
||||||
|
55,
|
||||||
|
59,
|
||||||
|
60,
|
||||||
|
65,
|
||||||
|
66,
|
||||||
|
71,
|
||||||
|
72,
|
||||||
|
76,
|
||||||
|
80,
|
||||||
|
83,
|
||||||
|
87,
|
||||||
|
92,
|
||||||
|
93,
|
||||||
|
95,
|
||||||
|
102,
|
||||||
|
104,
|
||||||
|
105,
|
||||||
|
106,
|
||||||
|
107,
|
||||||
|
109,
|
||||||
|
110,
|
||||||
|
111,
|
||||||
|
112,
|
||||||
|
120,
|
||||||
|
121,
|
||||||
|
122,
|
||||||
|
123,
|
||||||
|
124,
|
||||||
|
125,
|
||||||
|
126,
|
||||||
|
127,
|
||||||
|
128,
|
||||||
|
129,
|
||||||
|
130,
|
||||||
|
131,
|
||||||
|
132,
|
||||||
|
133,
|
||||||
|
134,
|
||||||
|
135,
|
||||||
|
136,
|
||||||
|
137,
|
||||||
|
138,
|
||||||
|
139,
|
||||||
|
140,
|
||||||
|
141,
|
||||||
|
142,
|
||||||
|
143,
|
||||||
|
144,
|
||||||
|
145,
|
||||||
|
146,
|
||||||
|
147,
|
||||||
|
148,
|
||||||
|
149,
|
||||||
|
150,
|
||||||
|
151,
|
||||||
|
152,
|
||||||
|
153,
|
||||||
|
154,
|
||||||
|
155,
|
||||||
|
156,
|
||||||
|
157,
|
||||||
|
158,
|
||||||
|
159,
|
||||||
|
160,
|
||||||
|
161,
|
||||||
|
162,
|
||||||
|
163,
|
||||||
|
164,
|
||||||
|
165,
|
||||||
|
166,
|
||||||
|
167,
|
||||||
|
168,
|
||||||
|
169,
|
||||||
|
170,
|
||||||
|
171,
|
||||||
|
172,
|
||||||
|
173,
|
||||||
|
174,
|
||||||
|
175,
|
||||||
|
176,
|
||||||
|
177,
|
||||||
|
178,
|
||||||
|
179,
|
||||||
|
180,
|
||||||
|
181,
|
||||||
|
182,
|
||||||
|
183,
|
||||||
|
184,
|
||||||
|
185,
|
||||||
|
186,
|
||||||
|
187,
|
||||||
|
188,
|
||||||
|
189,
|
||||||
|
190,
|
||||||
|
191,
|
||||||
|
192,
|
||||||
|
193,
|
||||||
|
194,
|
||||||
|
195,
|
||||||
|
196,
|
||||||
|
197,
|
||||||
|
198,
|
||||||
|
199,
|
||||||
|
200,
|
||||||
|
201,
|
||||||
|
202,
|
||||||
|
203,
|
||||||
|
204,
|
||||||
|
205,
|
||||||
|
206,
|
||||||
|
207,
|
||||||
|
208,
|
||||||
|
209,
|
||||||
|
210,
|
||||||
|
211,
|
||||||
|
212,
|
||||||
|
213,
|
||||||
|
214,
|
||||||
|
215,
|
||||||
|
216,
|
||||||
|
217,
|
||||||
|
218,
|
||||||
|
219,
|
||||||
|
220,
|
||||||
|
221,
|
||||||
|
222,
|
||||||
|
223,
|
||||||
|
224,
|
||||||
|
225,
|
||||||
|
226,
|
||||||
|
227,
|
||||||
|
228,
|
||||||
|
229,
|
||||||
|
230,
|
||||||
|
231,
|
||||||
|
232,
|
||||||
|
233,
|
||||||
|
234,
|
||||||
|
235,
|
||||||
|
236,
|
||||||
|
237,
|
||||||
|
238,
|
||||||
|
239,
|
||||||
|
240,
|
||||||
|
241,
|
||||||
|
242,
|
||||||
|
243,
|
||||||
|
244,
|
||||||
|
245,
|
||||||
|
246,
|
||||||
|
247,
|
||||||
|
248,
|
||||||
|
249,
|
||||||
|
250,
|
||||||
|
251,
|
||||||
|
252,
|
||||||
|
253,
|
||||||
|
254,
|
||||||
|
255,
|
||||||
|
256,
|
||||||
|
257,
|
||||||
|
258,
|
||||||
|
259,
|
||||||
|
260,
|
||||||
|
261,
|
||||||
|
262,
|
||||||
|
263,
|
||||||
|
264,
|
||||||
|
265,
|
||||||
|
266,
|
||||||
|
267,
|
||||||
|
268,
|
||||||
|
269,
|
||||||
|
270,
|
||||||
|
271,
|
||||||
|
272,
|
||||||
|
273,
|
||||||
|
274,
|
||||||
|
275,
|
||||||
|
276,
|
||||||
|
277,
|
||||||
|
278,
|
||||||
|
279,
|
||||||
|
280,
|
||||||
|
281,
|
||||||
|
282,
|
||||||
|
283,
|
||||||
|
284,
|
||||||
|
285,
|
||||||
|
286,
|
||||||
|
287,
|
||||||
|
288,
|
||||||
|
289,
|
||||||
|
290,
|
||||||
|
291,
|
||||||
|
292,
|
||||||
|
293,
|
||||||
|
294,
|
||||||
|
295,
|
||||||
|
296,
|
||||||
|
297,
|
||||||
|
298,
|
||||||
|
299,
|
||||||
|
300,
|
||||||
|
301,
|
||||||
|
302,
|
||||||
|
303,
|
||||||
|
304,
|
||||||
|
305,
|
||||||
|
306,
|
||||||
|
307,
|
||||||
|
308,
|
||||||
|
309,
|
||||||
|
310,
|
||||||
|
311,
|
||||||
|
312,
|
||||||
|
313,
|
||||||
|
314,
|
||||||
|
315,
|
||||||
|
316,
|
||||||
|
317,
|
||||||
|
318,
|
||||||
|
319,
|
||||||
|
320,
|
||||||
|
321,
|
||||||
|
322,
|
||||||
|
323,
|
||||||
|
324,
|
||||||
|
325,
|
||||||
|
326,
|
||||||
|
327,
|
||||||
|
328,
|
||||||
|
329,
|
||||||
|
330,
|
||||||
|
331,
|
||||||
|
332,
|
||||||
|
333,
|
||||||
|
334,
|
||||||
|
335,
|
||||||
|
336,
|
||||||
|
337,
|
||||||
|
338,
|
||||||
|
339,
|
||||||
|
340,
|
||||||
|
341,
|
||||||
|
342,
|
||||||
|
343,
|
||||||
|
344,
|
||||||
|
345,
|
||||||
|
346,
|
||||||
|
347,
|
||||||
|
348,
|
||||||
|
349,
|
||||||
|
350,
|
||||||
|
351,
|
||||||
|
352,
|
||||||
|
353,
|
||||||
|
354,
|
||||||
|
355,
|
||||||
|
356,
|
||||||
|
357,
|
||||||
|
358,
|
||||||
|
359,
|
||||||
|
360,
|
||||||
|
361,
|
||||||
|
362,
|
||||||
|
363,
|
||||||
|
364,
|
||||||
|
365,
|
||||||
|
366,
|
||||||
|
367,
|
||||||
|
368,
|
||||||
|
369,
|
||||||
|
370,
|
||||||
|
371,
|
||||||
|
372,
|
||||||
|
373,
|
||||||
|
374,
|
||||||
|
375,
|
||||||
|
376,
|
||||||
|
377,
|
||||||
|
378,
|
||||||
|
379,
|
||||||
|
380,
|
||||||
|
381,
|
||||||
|
542,
|
||||||
|
543,
|
||||||
|
744,
|
||||||
|
745,
|
||||||
|
746,
|
||||||
|
747,
|
||||||
|
748,
|
||||||
|
749,
|
||||||
|
750,
|
||||||
|
751,
|
||||||
|
752,
|
||||||
|
753,
|
||||||
|
754,
|
||||||
|
755,
|
||||||
|
}
|
||||||
|
New Mappings {
|
||||||
|
288: 206,
|
||||||
|
139: 44,
|
||||||
|
209: 113,
|
||||||
|
337: 264,
|
||||||
|
172: 72,
|
||||||
|
320: 243,
|
||||||
|
182: 82,
|
||||||
|
259: 176,
|
||||||
|
124: 23,
|
||||||
|
222: 139,
|
||||||
|
313: 232,
|
||||||
|
315: 235,
|
||||||
|
106: 237,
|
||||||
|
356: 283,
|
||||||
|
135: 36,
|
||||||
|
59: 109,
|
||||||
|
48: 115,
|
||||||
|
310: 229,
|
||||||
|
153: 58,
|
||||||
|
338: 265,
|
||||||
|
381: 133,
|
||||||
|
278: 196,
|
||||||
|
257: 174,
|
||||||
|
543: 312,
|
||||||
|
753: 308,
|
||||||
|
207: 108,
|
||||||
|
341: 268,
|
||||||
|
334: 261,
|
||||||
|
200: 100,
|
||||||
|
104: 239,
|
||||||
|
238: 156,
|
||||||
|
47: 114,
|
||||||
|
253: 170,
|
||||||
|
109: 253,
|
||||||
|
330: 254,
|
||||||
|
155: 4,
|
||||||
|
307: 225,
|
||||||
|
224: 142,
|
||||||
|
132: 31,
|
||||||
|
148: 15,
|
||||||
|
225: 143,
|
||||||
|
301: 217,
|
||||||
|
344: 271,
|
||||||
|
369: 296,
|
||||||
|
234: 152,
|
||||||
|
142: 48,
|
||||||
|
361: 288,
|
||||||
|
303: 220,
|
||||||
|
219: 131,
|
||||||
|
194: 94,
|
||||||
|
294: 212,
|
||||||
|
292: 210,
|
||||||
|
362: 289,
|
||||||
|
187: 87,
|
||||||
|
184: 84,
|
||||||
|
350: 277,
|
||||||
|
193: 93,
|
||||||
|
214: 123,
|
||||||
|
324: 247,
|
||||||
|
266: 183,
|
||||||
|
748: 315,
|
||||||
|
72: 45,
|
||||||
|
1: 12,
|
||||||
|
223: 141,
|
||||||
|
186: 86,
|
||||||
|
195: 95,
|
||||||
|
273: 190,
|
||||||
|
287: 205,
|
||||||
|
171: 71,
|
||||||
|
306: 224,
|
||||||
|
53: 134,
|
||||||
|
340: 267,
|
||||||
|
215: 124,
|
||||||
|
159: 6,
|
||||||
|
125: 24,
|
||||||
|
248: 165,
|
||||||
|
197: 97,
|
||||||
|
297: 213,
|
||||||
|
332: 256,
|
||||||
|
206: 107,
|
||||||
|
296: 17,
|
||||||
|
243: 161,
|
||||||
|
367: 294,
|
||||||
|
179: 79,
|
||||||
|
263: 180,
|
||||||
|
298: 214,
|
||||||
|
311: 230,
|
||||||
|
8: 33,
|
||||||
|
304: 221,
|
||||||
|
317: 240,
|
||||||
|
351: 278,
|
||||||
|
754: 319,
|
||||||
|
241: 159,
|
||||||
|
9: 34,
|
||||||
|
236: 154,
|
||||||
|
175: 75,
|
||||||
|
245: 18,
|
||||||
|
141: 47,
|
||||||
|
203: 104,
|
||||||
|
331: 255,
|
||||||
|
102: 233,
|
||||||
|
10: 21,
|
||||||
|
314: 234,
|
||||||
|
333: 257,
|
||||||
|
178: 78,
|
||||||
|
279: 197,
|
||||||
|
359: 286,
|
||||||
|
126: 25,
|
||||||
|
198: 98,
|
||||||
|
249: 166,
|
||||||
|
328: 251,
|
||||||
|
168: 68,
|
||||||
|
254: 171,
|
||||||
|
95: 226,
|
||||||
|
218: 130,
|
||||||
|
121: 19,
|
||||||
|
120: 132,
|
||||||
|
325: 248,
|
||||||
|
110: 258,
|
||||||
|
379: 306,
|
||||||
|
127: 26,
|
||||||
|
157: 0,
|
||||||
|
364: 291,
|
||||||
|
177: 77,
|
||||||
|
230: 148,
|
||||||
|
174: 74,
|
||||||
|
216: 125,
|
||||||
|
229: 147,
|
||||||
|
380: 307,
|
||||||
|
309: 228,
|
||||||
|
210: 117,
|
||||||
|
185: 85,
|
||||||
|
212: 121,
|
||||||
|
373: 300,
|
||||||
|
261: 178,
|
||||||
|
358: 285,
|
||||||
|
283: 201,
|
||||||
|
188: 88,
|
||||||
|
205: 106,
|
||||||
|
226: 144,
|
||||||
|
346: 273,
|
||||||
|
295: 8,
|
||||||
|
755: 320,
|
||||||
|
154: 59,
|
||||||
|
165: 65,
|
||||||
|
12: 14,
|
||||||
|
377: 304,
|
||||||
|
167: 67,
|
||||||
|
180: 80,
|
||||||
|
244: 162,
|
||||||
|
80: 191,
|
||||||
|
237: 155,
|
||||||
|
122: 20,
|
||||||
|
131: 30,
|
||||||
|
213: 122,
|
||||||
|
147: 10,
|
||||||
|
183: 83,
|
||||||
|
16: 43,
|
||||||
|
192: 92,
|
||||||
|
83: 119,
|
||||||
|
352: 279,
|
||||||
|
326: 249,
|
||||||
|
138: 1,
|
||||||
|
750: 317,
|
||||||
|
291: 209,
|
||||||
|
65: 127,
|
||||||
|
335: 262,
|
||||||
|
262: 179,
|
||||||
|
376: 303,
|
||||||
|
107: 238,
|
||||||
|
246: 163,
|
||||||
|
129: 28,
|
||||||
|
233: 151,
|
||||||
|
158: 3,
|
||||||
|
170: 70,
|
||||||
|
146: 52,
|
||||||
|
227: 145,
|
||||||
|
137: 38,
|
||||||
|
329: 252,
|
||||||
|
752: 309,
|
||||||
|
290: 208,
|
||||||
|
31: 321,
|
||||||
|
201: 101,
|
||||||
|
327: 250,
|
||||||
|
217: 126,
|
||||||
|
285: 203,
|
||||||
|
319: 242,
|
||||||
|
60: 110,
|
||||||
|
191: 91,
|
||||||
|
220: 136,
|
||||||
|
371: 298,
|
||||||
|
323: 246,
|
||||||
|
15: 42,
|
||||||
|
232: 150,
|
||||||
|
156: 60,
|
||||||
|
274: 192,
|
||||||
|
173: 73,
|
||||||
|
282: 200,
|
||||||
|
749: 316,
|
||||||
|
181: 81,
|
||||||
|
264: 181,
|
||||||
|
164: 64,
|
||||||
|
281: 199,
|
||||||
|
339: 266,
|
||||||
|
6: 9,
|
||||||
|
300: 216,
|
||||||
|
0: 11,
|
||||||
|
308: 227,
|
||||||
|
747: 314,
|
||||||
|
267: 184,
|
||||||
|
123: 22,
|
||||||
|
276: 194,
|
||||||
|
286: 204,
|
||||||
|
145: 51,
|
||||||
|
363: 290,
|
||||||
|
746: 310,
|
||||||
|
150: 55,
|
||||||
|
14: 41,
|
||||||
|
151: 56,
|
||||||
|
336: 263,
|
||||||
|
4: 2,
|
||||||
|
275: 193,
|
||||||
|
196: 96,
|
||||||
|
136: 37,
|
||||||
|
277: 195,
|
||||||
|
342: 269,
|
||||||
|
111: 259,
|
||||||
|
247: 164,
|
||||||
|
343: 270,
|
||||||
|
42: 103,
|
||||||
|
354: 281,
|
||||||
|
11: 39,
|
||||||
|
189: 89,
|
||||||
|
133: 32,
|
||||||
|
211: 118,
|
||||||
|
144: 50,
|
||||||
|
105: 120,
|
||||||
|
221: 138,
|
||||||
|
235: 153,
|
||||||
|
252: 169,
|
||||||
|
190: 90,
|
||||||
|
751: 318,
|
||||||
|
130: 29,
|
||||||
|
318: 241,
|
||||||
|
93: 5,
|
||||||
|
260: 177,
|
||||||
|
270: 187,
|
||||||
|
366: 293,
|
||||||
|
160: 7,
|
||||||
|
348: 275,
|
||||||
|
199: 99,
|
||||||
|
284: 202,
|
||||||
|
368: 295,
|
||||||
|
162: 62,
|
||||||
|
378: 305,
|
||||||
|
128: 27,
|
||||||
|
176: 76,
|
||||||
|
40: 140,
|
||||||
|
55: 137,
|
||||||
|
293: 211,
|
||||||
|
13: 40,
|
||||||
|
256: 173,
|
||||||
|
542: 311,
|
||||||
|
744: 322,
|
||||||
|
365: 292,
|
||||||
|
163: 63,
|
||||||
|
316: 236,
|
||||||
|
268: 185,
|
||||||
|
239: 157,
|
||||||
|
305: 222,
|
||||||
|
372: 299,
|
||||||
|
375: 302,
|
||||||
|
745: 313,
|
||||||
|
2: 13,
|
||||||
|
169: 69,
|
||||||
|
208: 112,
|
||||||
|
251: 168,
|
||||||
|
231: 149,
|
||||||
|
112: 260,
|
||||||
|
357: 284,
|
||||||
|
71: 129,
|
||||||
|
149: 53,
|
||||||
|
204: 105,
|
||||||
|
242: 160,
|
||||||
|
240: 158,
|
||||||
|
289: 207,
|
||||||
|
370: 297,
|
||||||
|
302: 219,
|
||||||
|
76: 54,
|
||||||
|
92: 223,
|
||||||
|
255: 172,
|
||||||
|
345: 272,
|
||||||
|
66: 128,
|
||||||
|
349: 276,
|
||||||
|
228: 146,
|
||||||
|
272: 189,
|
||||||
|
322: 245,
|
||||||
|
46: 116,
|
||||||
|
54: 135,
|
||||||
|
140: 46,
|
||||||
|
143: 49,
|
||||||
|
134: 35,
|
||||||
|
258: 175,
|
||||||
|
321: 244,
|
||||||
|
374: 301,
|
||||||
|
41: 16,
|
||||||
|
166: 66,
|
||||||
|
312: 231,
|
||||||
|
202: 102,
|
||||||
|
360: 287,
|
||||||
|
353: 280,
|
||||||
|
152: 57,
|
||||||
|
161: 61,
|
||||||
|
355: 282,
|
||||||
|
250: 167,
|
||||||
|
269: 186,
|
||||||
|
299: 215,
|
||||||
|
87: 218,
|
||||||
|
280: 198,
|
||||||
|
271: 188,
|
||||||
|
37: 111,
|
||||||
|
265: 182,
|
||||||
|
347: 274,
|
||||||
|
}
|
||||||
|
Res is Ok({288: 206, 139: 44, 209: 113, 337: 264, 172: 72, 320: 243, 182: 82, 259: 176, 124: 23, 222: 139, 313: 232, 315: 235, 106: 237, 356: 283, 135: 36, 59: 109, 48: 115, 310: 229, 153: 58, 338: 265, 381: 133, 278: 196, 257: 174, 543: 312, 753: 308, 207: 108, 341: 268, 334: 261, 200: 100, 104: 239, 238: 156, 47: 114, 253: 170, 109: 253, 330: 254, 155: 4, 307: 225, 224: 142, 132: 31, 148: 15, 225: 143, 301: 217, 344: 271, 369: 296, 234: 152, 142: 48, 361: 288, 303: 220, 219: 131, 194: 94, 294: 212, 292: 210, 362: 289, 187: 87, 184: 84, 350: 277, 193: 93, 214: 123, 324: 247, 266: 183, 748: 315, 72: 45, 1: 12, 223: 141, 186: 86, 195: 95, 273: 190, 287: 205, 171: 71, 306: 224, 53: 134, 340: 267, 215: 124, 159: 6, 125: 24, 248: 165, 197: 97, 297: 213, 332: 256, 206: 107, 296: 17, 243: 161, 367: 294, 179: 79, 263: 180, 298: 214, 311: 230, 8: 33, 304: 221, 317: 240, 351: 278, 754: 319, 241: 159, 9: 34, 236: 154, 175: 75, 245: 18, 141: 47, 203: 104, 331: 255, 102: 233, 10: 21, 314: 234, 333: 257, 178: 78, 279: 197, 359: 286, 126: 25, 198: 98, 249: 166, 328: 251, 168: 68, 254: 171, 95: 226, 218: 130, 121: 19, 120: 132, 325: 248, 110: 258, 379: 306, 127: 26, 157: 0, 364: 291, 177: 77, 230: 148, 174: 74, 216: 125, 229: 147, 380: 307, 309: 228, 210: 117, 185: 85, 212: 121, 373: 300, 261: 178, 358: 285, 283: 201, 188: 88, 205: 106, 226: 144, 346: 273, 295: 8, 755: 320, 154: 59, 165: 65, 12: 14, 377: 304, 167: 67, 180: 80, 244: 162, 80: 191, 237: 155, 122: 20, 131: 30, 213: 122, 147: 10, 183: 83, 16: 43, 192: 92, 83: 119, 352: 279, 326: 249, 138: 1, 750: 317, 291: 209, 65: 127, 335: 262, 262: 179, 376: 303, 107: 238, 246: 163, 129: 28, 233: 151, 158: 3, 170: 70, 146: 52, 227: 145, 137: 38, 329: 252, 752: 309, 290: 208, 31: 321, 201: 101, 327: 250, 217: 126, 285: 203, 319: 242, 60: 110, 191: 91, 220: 136, 371: 298, 323: 246, 15: 42, 232: 150, 156: 60, 274: 192, 173: 73, 282: 200, 749: 316, 181: 81, 264: 181, 164: 64, 281: 199, 339: 266, 6: 9, 300: 216, 0: 11, 308: 227, 747: 314, 267: 184, 123: 22, 276: 194, 286: 204, 145: 51, 363: 290, 746: 310, 150: 55, 14: 41, 151: 56, 336: 263, 4: 2, 275: 193, 196: 96, 136: 37, 277: 195, 342: 269, 111: 259, 247: 164, 343: 270, 42: 103, 354: 281, 11: 39, 189: 89, 133: 32, 211: 118, 144: 50, 105: 120, 221: 138, 235: 153, 252: 169, 190: 90, 751: 318, 130: 29, 318: 241, 93: 5, 260: 177, 270: 187, 366: 293, 160: 7, 348: 275, 199: 99, 284: 202, 368: 295, 162: 62, 378: 305, 128: 27, 176: 76, 40: 140, 55: 137, 293: 211, 13: 40, 256: 173, 542: 311, 744: 322, 365: 292, 163: 63, 316: 236, 268: 185, 239: 157, 305: 222, 372: 299, 375: 302, 745: 313, 2: 13, 169: 69, 208: 112, 251: 168, 231: 149, 112: 260, 357: 284, 71: 129, 149: 53, 204: 105, 242: 160, 240: 158, 289: 207, 370: 297, 302: 219, 76: 54, 92: 223, 255: 172, 345: 272, 66: 128, 349: 276, 228: 146, 272: 189, 322: 245, 46: 116, 54: 135, 140: 46, 143: 49, 134: 35, 258: 175, 321: 244, 374: 301, 41: 16, 166: 66, 312: 231, 202: 102, 360: 287, 353: 280, 152: 57, 161: 61, 355: 282, 250: 167, 269: 186, 299: 215, 87: 218, 280: 198, 271: 188, 37: 111, 265: 182, 347: 274})
|
||||||
|
Stripped 323 vs full 756 for pallet [AuthorityDiscovery]
|
||||||
|
test stripped::tests::strip_pallet ... ok
|
||||||
|
|
||||||
|
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out; finished in 0.01s
|
||||||
|
|
||||||
Reference in New Issue
Block a user