fix: Add workspace dependencies for vendored pezkuwi-subxt and zombienet-sdk

- Add all missing workspace dependencies required by vendor crates
- Include external crates: scale-*, sp-core, sc-chain-spec, kube, etc.
- Include subxt dependencies: smoldot, web-time, wasm-bindgen, etc.
- Regenerate umbrella crate with updated dependencies
- Apply zepter std feature propagation fixes to vendor crates
- Apply rustfmt formatting to vendor and pezframe files
This commit is contained in:
2025-12-23 00:18:55 +03:00
parent 62674ce919
commit e808130d44
132 changed files with 1019 additions and 682 deletions
Generated
+162 -100
View File
@@ -2333,7 +2333,7 @@ dependencies = [
"pezsp-consensus-babe",
"pezsp-consensus-grandpa",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-debug-derive",
"pezsp-externalities",
"pezsp-genesis-builder",
@@ -5683,6 +5683,7 @@ dependencies = [
"scale-info",
"scale-info-legacy",
"scale-type-resolver",
"serde_yaml",
"sp-crypto-hashing",
"thiserror 2.0.17",
]
@@ -5723,7 +5724,7 @@ dependencies = [
"log",
"parity-scale-codec",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"pezsp-state-machine",
@@ -5927,7 +5928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
dependencies = [
"gloo-timers 0.2.6",
"send_wrapper",
"send_wrapper 0.4.0",
]
[[package]]
@@ -7737,7 +7738,7 @@ dependencies = [
"rand 0.8.5",
"rustls 0.21.12",
"rustls-pemfile",
"secrecy 0.8.0",
"secrecy",
"serde",
"serde_json",
"serde_yaml",
@@ -10468,7 +10469,7 @@ dependencies = [
"pezsp-blockchain",
"pezsp-consensus",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-inherents",
"pezsp-keyring",
"pezsp-runtime",
@@ -11475,7 +11476,7 @@ dependencies = [
"pezsc-client-api",
"pezsc-consensus-babe",
"pezsc-network-types",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-inherents",
"pezsp-runtime",
"pezsp-state-machine",
@@ -11584,7 +11585,7 @@ dependencies = [
"pezsp-consensus-babe",
"pezsp-consensus-slots",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-externalities",
"pezsp-inherents",
"pezsp-io",
@@ -12301,6 +12302,16 @@ dependencies = [
"scale-info",
]
[[package]]
name = "pezframe-metadata"
version = "23.0.1"
dependencies = [
"cfg-if",
"parity-scale-codec",
"scale-info",
"serde",
]
[[package]]
name = "pezframe-metadata-hash-extension"
version = "0.1.0"
@@ -12364,7 +12375,7 @@ dependencies = [
"pezsp-api",
"pezsp-arithmetic",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-crypto-hashing-proc-macro",
"pezsp-debug-derive",
"pezsp-genesis-builder",
@@ -12402,7 +12413,7 @@ dependencies = [
"pezframe-support",
"pezframe-support-procedural-tools",
"pezframe-system",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-metadata-ir",
"pezsp-runtime",
@@ -12832,7 +12843,7 @@ dependencies = [
"pezsp-authority-discovery",
"pezsp-consensus-babe",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-keyring",
"pezsp-keystore",
"pezsp-tracing",
@@ -13254,7 +13265,7 @@ dependencies = [
"pezsc-executor-common",
"pezsc-executor-wasmtime",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-externalities",
"pezsp-io",
"pezsp-tracing",
@@ -13800,7 +13811,7 @@ dependencies = [
"pezsp-application-crypto",
"pezsp-arithmetic",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-inherents",
"pezsp-io",
"pezsp-keyring",
@@ -13825,7 +13836,7 @@ dependencies = [
[[package]]
name = "pezkuwi-sdk"
version = "0.0.0"
version = "0.1.0"
dependencies = [
"asset-test-pezutils",
"assets-common",
@@ -13898,6 +13909,7 @@ dependencies = [
"pezframe-election-provider-solution-type",
"pezframe-election-provider-support",
"pezframe-executive",
"pezframe-metadata",
"pezframe-metadata-hash-extension",
"pezframe-support",
"pezframe-support-procedural",
@@ -13952,8 +13964,19 @@ dependencies = [
"pezkuwi-runtime-teyrchains",
"pezkuwi-sdk-frame",
"pezkuwi-service",
"pezkuwi-ss58-registry",
"pezkuwi-statement-distribution",
"pezkuwi-statement-table",
"pezkuwi-subxt",
"pezkuwi-subxt-codegen",
"pezkuwi-subxt-core",
"pezkuwi-subxt-lightclient",
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-rpcs",
"pezkuwi-subxt-signer",
"pezkuwi-subxt-utils-fetchmetadata",
"pezkuwi-subxt-utils-stripmetadata",
"pezkuwi-teyrchain-primitives",
"pezmmr-gadget",
"pezmmr-rpc",
@@ -14043,7 +14066,6 @@ dependencies = [
"pezpallet-revive-proc-macro",
"pezpallet-revive-uapi",
"pezpallet-root-offences",
"pezpallet-root-testing",
"pezpallet-safe-mode",
"pezpallet-salary",
"pezpallet-scheduler",
@@ -14154,7 +14176,7 @@ dependencies = [
"pezsp-core-hashing",
"pezsp-core-hashing-proc-macro",
"pezsp-crypto-ec-utils",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-crypto-hashing-proc-macro",
"pezsp-database",
"pezsp-debug-derive",
@@ -14172,7 +14194,6 @@ dependencies = [
"pezsp-offchain",
"pezsp-panic-handler",
"pezsp-rpc",
"pezsp-runtime",
"pezsp-runtime-interface",
"pezsp-runtime-interface-proc-macro",
"pezsp-session",
@@ -14204,6 +14225,12 @@ dependencies = [
"xcm-pez-procedural",
"xcm-pez-simulator",
"xcm-runtime-pezapis",
"zombienet-configuration",
"zombienet-orchestrator",
"zombienet-prom-metrics-parser",
"zombienet-provider",
"zombienet-sdk",
"zombienet-support",
]
[[package]]
@@ -14605,14 +14632,17 @@ dependencies = [
[[package]]
name = "pezkuwi-subxt"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"assert_matches",
"async-trait",
"bitvec",
"derive-where",
"either",
"frame-metadata",
"futures",
"hex",
"http-body 1.0.1",
"hyper 1.8.1",
"jsonrpsee",
"parity-scale-codec",
"pezkuwi-subxt-core",
@@ -14620,7 +14650,11 @@ dependencies = [
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-rpcs",
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
"pezkuwi-subxt-signer",
"pezsp-core",
"pezsp-crypto-hashing",
"pezsp-keyring",
"pezsp-runtime",
"primitive-types 0.13.1",
"scale-bits",
"scale-decode",
@@ -14629,10 +14663,12 @@ dependencies = [
"scale-value",
"serde",
"serde_json",
"thiserror 2.0.17",
"thiserror 1.0.69",
"tokio",
"tokio-util",
"tower 0.4.13",
"tracing",
"tracing-subscriber 0.3.22",
"url",
"wasm-bindgen-futures",
"web-time",
@@ -14641,8 +14677,9 @@ dependencies = [
[[package]]
name = "pezkuwi-subxt-codegen"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"frame-metadata",
"getrandom 0.2.16",
"heck 0.5.0",
"parity-scale-codec",
"pezkuwi-subxt-metadata",
@@ -14651,26 +14688,31 @@ dependencies = [
"scale-info",
"scale-typegen",
"syn 2.0.111",
"thiserror 2.0.17",
"thiserror 1.0.69",
]
[[package]]
name = "pezkuwi-subxt-core"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"assert_matches",
"base58",
"bitvec",
"blake2 0.10.6",
"derive-where",
"frame-decode",
"frame-metadata",
"hashbrown 0.14.5",
"hashbrown 0.15.5",
"hex",
"impl-serde",
"keccak-hash",
"parity-scale-codec",
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
"pezkuwi-subxt-signer",
"pezsp-core",
"pezsp-crypto-hashing",
"pezsp-keyring",
"primitive-types 0.13.1",
"scale-bits",
"scale-decode",
@@ -14679,36 +14721,49 @@ dependencies = [
"scale-value",
"serde",
"serde_json",
"thiserror 2.0.17",
"thiserror 1.0.69",
"tracing",
]
[[package]]
name = "pezkuwi-subxt-lightclient"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"futures",
"futures-timer",
"futures-util",
"getrandom 0.2.16",
"js-sys",
"pin-project",
"send_wrapper 0.6.0",
"serde",
"serde_json",
"smoldot",
"smoldot-light",
"thiserror 2.0.17",
"thiserror 1.0.69",
"tokio",
"tokio-stream",
"tracing",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"web-time",
]
[[package]]
name = "pezkuwi-subxt-macro"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"darling 0.20.11",
"parity-scale-codec",
"pezkuwi-subxt-codegen",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-utils-fetchmetadata",
"pezsc-executor",
"pezsc-executor-common",
"pezsp-io",
"pezsp-maybe-compressed-blob",
"pezsp-state-machine",
"proc-macro-error2",
"quote 1.0.42",
"scale-typegen",
@@ -14718,29 +14773,33 @@ dependencies = [
[[package]]
name = "pezkuwi-subxt-metadata"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"bitvec",
"criterion",
"frame-decode",
"frame-metadata",
"hashbrown 0.14.5",
"hashbrown 0.15.5",
"parity-scale-codec",
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
"pezkuwi-subxt-codegen",
"pezsp-crypto-hashing",
"scale-info",
"scale-info-legacy",
"scale-type-resolver",
"thiserror 2.0.17",
"thiserror 1.0.69",
]
[[package]]
name = "pezkuwi-subxt-rpcs"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"derive-where",
"finito",
"frame-metadata",
"futures",
"getrandom 0.2.16",
"hex",
"http-body 1.0.1",
"hyper 1.8.1",
"impl-serde",
"jsonrpsee",
"parity-scale-codec",
@@ -14749,50 +14808,69 @@ dependencies = [
"primitive-types 0.13.1",
"serde",
"serde_json",
"thiserror 2.0.17",
"thiserror 1.0.69",
"tokio",
"tokio-util",
"tower 0.4.13",
"tracing",
"url",
"wasm-bindgen-futures",
]
[[package]]
name = "pezkuwi-subxt-signer"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"base64 0.22.1",
"bip32",
"bip39",
"cfg-if",
"crypto_secretbox",
"getrandom 0.2.16",
"hex",
"hex-literal",
"hmac 0.12.1",
"keccak-hash",
"parity-scale-codec",
"pbkdf2",
"pezkuwi-subxt-core",
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
"pezsp-core",
"pezsp-crypto-hashing",
"pezsp-keyring",
"proptest",
"regex",
"schnorrkel 0.11.5",
"scrypt",
"secp256k1 0.30.0",
"secrecy 0.10.3",
"secp256k1 0.28.2",
"secrecy",
"serde",
"serde_json",
"sha2 0.10.9",
"thiserror 2.0.17",
"thiserror 1.0.69",
"zeroize",
]
[[package]]
name = "pezkuwi-subxt-utils-fetchmetadata"
version = "0.44.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-subxt?branch=main#0e696a8159057fb01632ce1030acc359d2389f44"
dependencies = [
"frame-metadata",
"hex",
"jsonrpsee",
"parity-scale-codec",
"thiserror 2.0.17",
"thiserror 1.0.69",
"tokio",
"url",
]
[[package]]
name = "pezkuwi-subxt-utils-stripmetadata"
version = "0.44.0"
dependencies = [
"either",
"frame-metadata",
"parity-scale-codec",
"scale-info",
]
[[package]]
@@ -15349,7 +15427,7 @@ dependencies = [
"pezpallet-collective",
"pezpallet-identity",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"scale-info",
@@ -16676,7 +16754,7 @@ dependencies = [
"pezframe-system",
"pezsp-arithmetic",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"pezsp-tracing",
@@ -17373,7 +17451,7 @@ dependencies = [
"pezsc-service",
"pezsp-arithmetic",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-rpc",
"pezsp-runtime",
@@ -17495,7 +17573,7 @@ dependencies = [
"pezframe-system",
"pezsp-consensus-sassafras",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"scale-info",
@@ -17599,7 +17677,7 @@ dependencies = [
"pezframe-system",
"pezpallet-balances",
"pezsp-arithmetic",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"rand_chacha 0.3.1",
@@ -18635,7 +18713,7 @@ dependencies = [
"pezsp-blockchain",
"pezsp-consensus-babe",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-genesis-builder",
"pezsp-io",
"pezsp-keyring",
@@ -18855,7 +18933,7 @@ dependencies = [
"pezsp-consensus-babe",
"pezsp-consensus-slots",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-inherents",
"pezsp-keyring",
"pezsp-keystore",
@@ -19002,7 +19080,7 @@ dependencies = [
"pezsp-consensus",
"pezsp-consensus-grandpa",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-keyring",
"pezsp-keystore",
"pezsp-runtime",
@@ -19141,7 +19219,7 @@ dependencies = [
"pezsc-tracing",
"pezsp-api",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-externalities",
"pezsp-io",
"pezsp-maybe-compressed-blob",
@@ -19298,7 +19376,7 @@ dependencies = [
"pezsp-blockchain",
"pezsp-consensus",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-runtime",
"pezsp-tracing",
"pin-project",
@@ -19577,7 +19655,7 @@ dependencies = [
"pezsp-blockchain",
"pezsp-consensus",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-keystore",
"pezsp-offchain",
"pezsp-rpc",
@@ -19700,7 +19778,7 @@ dependencies = [
"pezsc-executor",
"pezsc-executor-common",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-state-machine",
"pezsp-version",
@@ -19880,7 +19958,7 @@ dependencies = [
"log",
"pezsc-telemetry",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"rand 0.8.5",
@@ -19978,7 +20056,7 @@ dependencies = [
"pezsp-blockchain",
"pezsp-consensus",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-runtime",
"pezsp-tracing",
"pezsp-transaction-pool",
@@ -20127,7 +20205,7 @@ dependencies = [
"hex-literal",
"parity-scale-codec",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-runtime",
"pezsp-tracing",
"scale-info",
@@ -20606,7 +20684,7 @@ dependencies = [
"integer-sqrt",
"num-traits",
"parity-scale-codec",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"primitive-types 0.13.1",
"rand 0.8.5",
"scale-info",
@@ -20717,7 +20795,7 @@ dependencies = [
"pezsp-api",
"pezsp-application-crypto",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-keystore",
"pezsp-mmr-primitives",
@@ -20807,7 +20885,7 @@ dependencies = [
"parking_lot 0.12.5",
"paste",
"pezkuwi-ss58-registry",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-debug-derive",
"pezsp-externalities",
"pezsp-std",
@@ -20818,7 +20896,7 @@ dependencies = [
"scale-info",
"schnorrkel 0.11.5",
"secp256k1 0.28.2",
"secrecy 0.8.0",
"secrecy",
"serde",
"serde_json",
"sha2 0.10.9",
@@ -20841,7 +20919,7 @@ dependencies = [
name = "pezsp-core-hashing"
version = "15.0.0"
dependencies = [
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
]
[[package]]
@@ -20884,24 +20962,11 @@ dependencies = [
"twox-hash 1.6.3",
]
[[package]]
name = "pezsp-crypto-hashing"
version = "0.1.0"
source = "git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main#7cbb4eb7359970576a2f239d21e0a7cc494f16d0"
dependencies = [
"blake2b_simd",
"byteorder",
"digest 0.10.7",
"sha2 0.10.9",
"sha3",
"twox-hash 1.6.3",
]
[[package]]
name = "pezsp-crypto-hashing-proc-macro"
version = "0.1.0"
dependencies = [
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"quote 1.0.42",
"syn 2.0.111",
]
@@ -20967,7 +21032,7 @@ dependencies = [
"log",
"parity-scale-codec",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-externalities",
"pezsp-keystore",
"pezsp-runtime-interface",
@@ -21262,7 +21327,7 @@ dependencies = [
"pezsp-api",
"pezsp-application-crypto",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-externalities",
"pezsp-runtime",
"pezsp-runtime-interface",
@@ -24472,15 +24537,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "secrecy"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a"
dependencies = [
"zeroize",
]
[[package]]
name = "security-framework"
version = "2.11.1"
@@ -24575,6 +24631,12 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]]
name = "send_wrapper"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
[[package]]
name = "serde"
version = "1.0.228"
@@ -25292,7 +25354,7 @@ dependencies = [
"scale-info",
"schnorrkel 0.11.5",
"secp256k1 0.28.2",
"secrecy 0.8.0",
"secrecy",
"serde",
"sha2 0.10.9",
"sp-crypto-hashing",
@@ -29038,7 +29100,7 @@ dependencies = [
"pezsp-arithmetic",
"pezsp-consensus-aura",
"pezsp-core",
"pezsp-crypto-hashing 0.1.0",
"pezsp-crypto-hashing",
"pezsp-io",
"pezsp-runtime",
"pezsp-tracing",
@@ -29552,8 +29614,7 @@ dependencies = [
[[package]]
name = "zombienet-configuration"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"anyhow",
"lazy_static",
@@ -29572,8 +29633,7 @@ dependencies = [
[[package]]
name = "zombienet-orchestrator"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"anyhow",
"async-trait",
@@ -29582,6 +29642,7 @@ dependencies = [
"futures",
"glob-match",
"hex",
"lazy_static",
"libp2p",
"libsecp256k1",
"multiaddr 0.18.2",
@@ -29597,6 +29658,7 @@ dependencies = [
"sp-core",
"thiserror 1.0.69",
"tokio",
"toml 0.8.23",
"tracing",
"uuid",
"zombienet-configuration",
@@ -29607,8 +29669,7 @@ dependencies = [
[[package]]
name = "zombienet-prom-metrics-parser"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"pest",
"pest_derive",
@@ -29617,8 +29678,7 @@ dependencies = [
[[package]]
name = "zombienet-provider"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"anyhow",
"async-trait",
@@ -29648,15 +29708,18 @@ dependencies = [
[[package]]
name = "zombienet-sdk"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"async-trait",
"futures",
"k8s-openapi",
"kube",
"lazy_static",
"pezkuwi-subxt",
"pezkuwi-subxt-signer",
"serde_json",
"tokio",
"tracing-subscriber 0.3.22",
"zombienet-configuration",
"zombienet-orchestrator",
"zombienet-provider",
@@ -29665,8 +29728,7 @@ dependencies = [
[[package]]
name = "zombienet-support"
version = "0.4.3"
source = "git+https://github.com/pezkuwichain/pezkuwi-zombienet-sdk?branch=main#e2c356521dd8541ef997ad2ef6ebdb25af96c980"
version = "0.44.0"
dependencies = [
"anyhow",
"async-trait",
+47 -2
View File
@@ -161,7 +161,6 @@ members = [
"bizinikiwi/pezframe/message-queue",
"bizinikiwi/pezframe/meta-tx",
"bizinikiwi/pezframe/metadata-hash-extension",
"bizinikiwi/pezframe/pezframe-metadata",
"bizinikiwi/pezframe/migrations",
"bizinikiwi/pezframe/mixnet",
"bizinikiwi/pezframe/multi-asset-bounties",
@@ -183,6 +182,7 @@ members = [
"bizinikiwi/pezframe/paged-list/fuzzer",
"bizinikiwi/pezframe/parameters",
"bizinikiwi/pezframe/people",
"bizinikiwi/pezframe/pezframe-metadata",
"bizinikiwi/pezframe/preimage",
"bizinikiwi/pezframe/proxy",
"bizinikiwi/pezframe/ranked-collective",
@@ -619,10 +619,10 @@ members = [
# Vendored pezkuwi-zombienet-sdk crates
"vendor/pezkuwi-zombienet-sdk/crates/configuration",
"vendor/pezkuwi-zombienet-sdk/crates/orchestrator",
"vendor/pezkuwi-zombienet-sdk/crates/prom-metrics-parser",
"vendor/pezkuwi-zombienet-sdk/crates/provider",
"vendor/pezkuwi-zombienet-sdk/crates/sdk",
"vendor/pezkuwi-zombienet-sdk/crates/support",
"vendor/pezkuwi-zombienet-sdk/crates/prom-metrics-parser",
]
default-members = [
@@ -716,8 +716,11 @@ async-trait = { version = "0.1.88" }
asynchronous-codec = { version = "0.6" }
backoff = { version = "0.4" }
backtrace = { version = "0.3.71" }
base58 = { version = "0.2.0" }
base64 = { version = "0.22.1", default-features = false }
binary-merkle-tree = { path = "bizinikiwi/utils/binary-merkle-tree", default-features = false }
bincode = { version = "1.3.3" }
bip32 = { version = "0.5.2", default-features = false }
bip39 = { version = "2.2.0", default-features = false }
bitflags = { version = "1.3.2" }
bitvec = { version = "1.0.1", default-features = false }
@@ -767,6 +770,7 @@ color-eyre = { version = "0.6.3", default-features = false }
color-print = { version = "0.3.4" }
colored = { version = "2.0.4" }
comfy-table = { version = "7.1.4", default-features = false }
configuration = { package = "zombienet-configuration", path = "vendor/pezkuwi-zombienet-sdk/crates/configuration" }
console = { version = "0.15.8" }
const-hex = { version = "1.10.0", default-features = false }
coretime-pezkuwichain-emulated-chain = { path = "pezcumulus/teyrchains/integration-tests/emulated/chains/teyrchains/coretime/coretime-pezkuwichain" }
@@ -775,7 +779,9 @@ coretime-zagros-emulated-chain = { path = "pezcumulus/teyrchains/integration-tes
coretime-zagros-runtime = { path = "pezcumulus/teyrchains/runtimes/coretime/coretime-zagros" }
cpu-time = { version = "1.0.0" }
criterion = { version = "0.5.1", default-features = false }
crypto_secretbox = { version = "0.1.1", default-features = false }
curve25519-dalek = { version = "4.1.3" }
darling = { version = "0.20.10" }
derive-syn-parse = { version = "0.2.0" }
derive-where = { version = "1.2.7" }
derive_more = { version = "0.99.17", default-features = false }
@@ -794,16 +800,19 @@ enumn = { version = "0.1.13" }
env_filter = { version = "0.1.3" }
env_logger = { version = "0.11.2" }
environmental = { version = "1.1.4", default-features = false }
erased-serde = { version = "0.4" }
ethabi = { version = "2.0.0", default-features = false, package = "ethabi-decode" }
ethbloom = { version = "0.14.1", default-features = false }
ethereum-types = { version = "0.15.1", default-features = false }
exit-future = { version = "0.2.0" }
expander = { version = "2.0.0" }
fancy-regex = { version = "0.14.0" }
fatality = { version = "0.1.1" }
fdlimit = { version = "0.3.0" }
femme = { version = "2.2.1" }
filetime = { version = "0.2.16" }
finality-grandpa = { version = "0.16.3", default-features = false }
finito = { version = "0.1.0", default-features = false }
first-pezpallet = { package = "pezkuwi-sdk-docs-first-pezpallet", path = "docs/sdk/packages/guides/first-pezpallet", default-features = false }
first-runtime = { package = "pezkuwi-sdk-docs-first-runtime", path = "docs/sdk/packages/guides/first-runtime", default-features = false }
flate2 = { version = "1.0" }
@@ -812,6 +821,7 @@ foldhash = { version = "0.1.5", default-features = false }
forwarded-header-value = { version = "0.1.1" }
fraction = { version = "0.13.1" }
frame = { path = "bizinikiwi/pezframe", default-features = false, package = "pezkuwi-sdk-frame" }
frame-decode = { version = "0.15.0", default-features = false }
frame-metadata = { version = "23.0.0", default-features = false }
frame-storage-access-test-runtime = { path = "bizinikiwi/utils/pezframe/storage-access-test-runtime", default-features = false }
fs4 = { version = "0.7.0" }
@@ -820,8 +830,10 @@ futures = { version = "0.3.31" }
futures-timer = { version = "3.0.2" }
futures-util = { version = "0.3.30", default-features = false }
gethostname = { version = "0.2.3" }
getrandom = { version = "0.2", default-features = false }
git2 = { version = "0.20.0", default-features = false }
glob = { version = "0.3" }
glob-match = { version = "0.2.1" }
glutton-zagros-runtime = { path = "pezcumulus/teyrchains/runtimes/glutton/glutton-zagros" }
governor = { version = "0.6.0" }
gum = { path = "pezkuwi/node/gum", default-features = false, package = "pez-tracing-gum" }
@@ -830,6 +842,7 @@ handlebars = { version = "5.1.0" }
hash-db = { version = "0.16.0", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
hashbrown = "0.15.3"
heck = { version = "0.5.0" }
hex = { version = "0.4.3", default-features = false }
hex-literal = { version = "0.4.1", default-features = false }
hkdf = { version = "0.12.0" }
@@ -860,15 +873,20 @@ is_executable = { version = "1.0.1" }
isahc = { version = "1.2" }
itertools = { version = "0.11" }
jobserver = { version = "0.1.26" }
js-sys = { version = "0.3.70" }
jsonpath_lib = { version = "0.3" }
jsonrpsee = { version = "0.24.10" }
jsonrpsee-core = { version = "0.24.10" }
k256 = { version = "0.13.4", default-features = false }
k8s-openapi = { version = "0.20.0", features = ["v1_28"] }
keccak-hash = { version = "0.11.0", default-features = false }
kube = { version = "0.87.1" }
kvdb = { version = "0.13.0" }
kvdb-memorydb = { version = "0.13.0" }
kvdb-rocksdb = { version = "0.21.0" }
kvdb-shared-tests = { version = "0.11.0" }
landlock = { version = "0.3.0" }
lazy_static = { version = "1.5" }
libc = { version = "0.2.155" }
libfuzzer-sys = { version = "0.4" }
libp2p = { version = "0.54.1" }
@@ -909,6 +927,7 @@ num-traits = { version = "0.2.17", default-features = false }
num_cpus = { version = "1.13.1" }
once_cell = { version = "1.21.3" }
orchestra = { version = "0.4.0", default-features = false }
orchestrator = { package = "zombienet-orchestrator", path = "vendor/pezkuwi-zombienet-sdk/crates/orchestrator" }
pez-chain-spec-guide-runtime = { path = "docs/sdk/src/reference_docs/chain_spec_runtime" }
pez-equivocation-detector = { path = "pezbridges/relays/equivocation" }
pez-ethereum-standards = { path = "bizinikiwi/primitives/pez-ethereum-standards" }
@@ -1143,6 +1162,8 @@ people-pezkuwichain-emulated-chain = { path = "pezcumulus/teyrchains/integration
people-pezkuwichain-runtime = { path = "pezcumulus/teyrchains/runtimes/people/people-pezkuwichain" }
people-zagros-emulated-chain = { path = "pezcumulus/teyrchains/integration-tests/emulated/chains/teyrchains/people/people-zagros" }
people-zagros-runtime = { path = "pezcumulus/teyrchains/runtimes/people/people-zagros" }
pest = { version = "2.7" }
pest_derive = { version = "2.7" }
pez-penpal-emulated-chain = { path = "pezcumulus/teyrchains/integration-tests/emulated/chains/teyrchains/testing/penpal" }
pez-penpal-runtime = { path = "pezcumulus/teyrchains/runtimes/testing/penpal" }
pez-revive-dev-node = { path = "bizinikiwi/pezframe/revive/dev-node/node" }
@@ -1394,15 +1415,18 @@ primitive-types = { version = "0.13.1", default-features = false, features = [
"num-traits",
] }
proc-macro-crate = { version = "3.0.0" }
proc-macro-error2 = { version = "2.0.0" }
proc-macro-warning = { version = "1.0.0", default-features = false }
proc-macro2 = { version = "1.0.86" }
procfs = { version = "0.16.0" }
prom-metrics-parser = { package = "zombienet-prom-metrics-parser", path = "vendor/pezkuwi-zombienet-sdk/crates/prom-metrics-parser" }
prometheus = { version = "0.13.0", default-features = false }
prometheus-endpoint = { path = "bizinikiwi/utils/prometheus", default-features = false, package = "bizinikiwi-prometheus-endpoint" }
prometheus-parse = { version = "0.2.2" }
proptest = { version = "1" }
prost = { version = "0.12.4" }
prost-build = { version = "0.13.2" }
provider = { package = "zombienet-provider", path = "vendor/pezkuwi-zombienet-sdk/crates/provider" }
pyroscope = { version = "0.5.8" }
pyroscope_pprofrs = { version = "0.2.8" }
quick_cache = { version = "0.3" }
@@ -1419,6 +1443,7 @@ regex = { version = "1.10.2" }
relay-bizinikiwi-client = { path = "pezbridges/relays/client-bizinikiwi" }
relay-utils = { path = "pezbridges/relays/utils" }
remote-externalities = { path = "bizinikiwi/utils/pezframe/remote-externalities", default-features = false, package = "frame-remote-externalities" }
reqwest = { version = "0.12.9" }
revm = { version = "27.0.2", default-features = false }
ripemd = { version = "0.1.3", default-features = false }
rlp = { version = "0.6.1", default-features = false }
@@ -1436,13 +1461,23 @@ rustls = { version = "0.23.18", default-features = false, features = [
rustversion = { version = "1.0.17" }
rusty-fork = { version = "0.3.0", default-features = false }
safe-mix = { version = "1.0", default-features = false }
sc-chain-spec = { version = "46.0.0", default-features = false }
scale-bits = { version = "0.7.0", default-features = false }
scale-decode = { version = "0.16.2", default-features = false }
scale-encode = { version = "0.10.0", default-features = false }
scale-info = { version = "2.11.6", default-features = false }
scale-info-legacy = { version = "0.4.0", default-features = false }
scale-type-resolver = { version = "0.2.0" }
scale-typegen = { version = "0.12.0" }
scale-value = { version = "0.18.1", default-features = false }
schemars = { version = "1.1.0", default-features = false }
schnellru = { version = "0.2.3" }
schnorrkel = { version = "0.11.4", default-features = false }
scrypt = { version = "0.11.0", default-features = false }
seccompiler = { version = "0.4.0" }
secp256k1 = { version = "0.28.0", default-features = false }
secrecy = { version = "0.8.0", default-features = false }
send_wrapper = { version = "0.6.0" }
serde = { version = "1.0.214", default-features = false }
serde-big-array = { version = "0.3.2" }
serde_derive = { version = "1.0.117" }
@@ -1459,8 +1494,11 @@ shlex = { version = "1.3.0" }
simple-mermaid = { version = "0.1.1" }
slotmap = { version = "1.0" }
smallvec = { version = "1.11.0", default-features = false }
smoldot = { version = "0.20.0", default-features = false }
smoldot-light = { version = "0.18.0", default-features = false }
snowpezbridge-runtime-common = { path = "pezbridges/snowbridge/runtime/runtime-common", default-features = false }
soketto = { version = "0.8.0" }
sp-core = { version = "38.1.0" }
spinners = { version = "4.1.1" }
sqlx = { version = "0.8.2" }
ss58-registry = { path = "vendor/ss58-registry", package = "pezkuwi-ss58-registry", default-features = false }
@@ -1480,6 +1518,7 @@ pezkuwi-subxt-rpcs = { path = "vendor/pezkuwi-subxt/rpcs", default-features = fa
pezkuwi-subxt-signer = { path = "vendor/pezkuwi-subxt/signer", default-features = false }
pezkuwi-subxt-utils-fetchmetadata = { path = "vendor/pezkuwi-subxt/utils/fetch-metadata", default-features = false }
pezkuwi-subxt-utils-stripmetadata = { path = "vendor/pezkuwi-subxt/utils/strip-metadata" }
support = { package = "zombienet-support", path = "vendor/pezkuwi-zombienet-sdk/crates/support" }
syn = { version = "2.0.87" }
sysinfo = { version = "0.30" }
tar = { version = "0.4" }
@@ -1532,17 +1571,23 @@ twox-hash = { version = "1.6.3", default-features = false }
txtesttool = { path = "bizinikiwi/utils/txtesttool", default-features = false, package = "bizinikiwi-txtesttool" }
unsigned-varint = { version = "0.7.2" }
url = { version = "2.5.4" }
uuid = { version = "1.4" }
verifiable = { version = "0.1", default-features = false }
void = { version = "1.0.2" }
w3f-bls = { version = "0.1.9", default-features = false }
wait-timeout = { version = "0.2" }
walkdir = { version = "2.5.0" }
wasm-bindgen = { version = "0.2.93" }
wasm-bindgen-futures = { version = "0.4.43" }
wasm-bindgen-test = { version = "0.3.24" }
wasm-instrument = { version = "0.4", default-features = false }
wasm-opt = { version = "0.116" }
wasm-timer = { version = "0.2.5" }
wasmi = { version = "0.32.3", default-features = false }
wasmtime = { version = "35.0.0", default-features = false }
wat = { version = "1.0.0" }
web-sys = { version = "0.3.70" }
web-time = { version = "1.1", default-features = false }
x25519-dalek = { version = "2.0" }
xcm = { path = "pezkuwi/xcm", default-features = false, package = "pezstaging-xcm" }
xcm-builder = { path = "pezkuwi/xcm/xcm-builder", default-features = false, package = "pezstaging-xcm-builder" }
@@ -64,12 +64,7 @@ impl RuntimeMetadataV14 {
let pezpallets = registry.map_into_portable(pezpallets);
let extrinsic = extrinsic.into_portable(&mut registry);
let ty = registry.register_type(&runtime_type);
Self {
types: registry.into(),
pezpallets,
extrinsic,
ty,
}
Self { types: registry.into(), pezpallets, extrinsic, ty }
}
}
@@ -298,11 +293,7 @@ impl IntoPortable for StorageEntryType {
fn into_portable(self, registry: &mut Registry) -> Self::Output {
match self {
Self::Plain(plain) => StorageEntryType::Plain(registry.register_type(&plain)),
Self::Map {
hashers,
key,
value,
} => StorageEntryType::Map {
Self::Map { hashers, key, value } => StorageEntryType::Map {
hashers,
key: registry.register_type(&key),
value: registry.register_type(&value),
@@ -328,9 +319,7 @@ impl IntoPortable for PezpalletCallMetadata {
type Output = PezpalletCallMetadata<PortableForm>;
fn into_portable(self, registry: &mut Registry) -> Self::Output {
PezpalletCallMetadata {
ty: registry.register_type(&self.ty),
}
PezpalletCallMetadata { ty: registry.register_type(&self.ty) }
}
}
@@ -353,9 +342,7 @@ impl IntoPortable for PezpalletEventMetadata {
type Output = PezpalletEventMetadata<PortableForm>;
fn into_portable(self, registry: &mut Registry) -> Self::Output {
PezpalletEventMetadata {
ty: registry.register_type(&self.ty),
}
PezpalletEventMetadata { ty: registry.register_type(&self.ty) }
}
}
@@ -411,9 +398,7 @@ impl IntoPortable for PezpalletErrorMetadata {
type Output = PezpalletErrorMetadata<PortableForm>;
fn into_portable(self, registry: &mut Registry) -> Self::Output {
PezpalletErrorMetadata {
ty: registry.register_type(&self.ty),
}
PezpalletErrorMetadata { ty: registry.register_type(&self.ty) }
}
}
@@ -27,9 +27,9 @@ use scale_info::{
};
pub use super::v14::{
PezpalletCallMetadata, PezpalletConstantMetadata, PezpalletErrorMetadata, PezpalletEventMetadata,
PezpalletStorageMetadata, StorageEntryMetadata, StorageEntryModifier, StorageEntryType,
StorageHasher,
PezpalletCallMetadata, PezpalletConstantMetadata, PezpalletErrorMetadata,
PezpalletEventMetadata, PezpalletStorageMetadata, StorageEntryMetadata, StorageEntryModifier,
StorageEntryType, StorageHasher,
};
/// Latest runtime metadata
@@ -82,15 +82,7 @@ impl RuntimeMetadataV15 {
let outer_enums = outer_enums.into_portable(&mut registry);
let custom = custom.into_portable(&mut registry);
Self {
types: registry.into(),
pezpallets,
extrinsic,
ty,
apis,
outer_enums,
custom,
}
Self { types: registry.into(), pezpallets, extrinsic, ty, apis, outer_enums, custom }
}
}
@@ -343,10 +335,7 @@ impl IntoPortable for CustomValueMetadata {
type Output = CustomValueMetadata<PortableForm>;
fn into_portable(self, registry: &mut Registry) -> Self::Output {
CustomValueMetadata {
ty: registry.register_type(&self.ty),
value: self.value,
}
CustomValueMetadata { ty: registry.register_type(&self.ty), value: self.value }
}
}
@@ -27,7 +27,7 @@ use scale_info::{
};
// These types have not changed, so we re-export from our v14/v15 definitions:
pub use super::v14::{StorageEntryModifier, StorageEntryType, StorageHasher, StorageEntryMetadata};
pub use super::v14::{StorageEntryMetadata, StorageEntryModifier, StorageEntryType, StorageHasher};
pub use super::v15::{CustomMetadata, CustomValueMetadata, OuterEnums};
/// The metadata for a method or function parameter. This is identical to
@@ -80,14 +80,7 @@ impl RuntimeMetadataV16 {
let outer_enums = outer_enums.into_portable(&mut registry);
let custom = custom.into_portable(&mut registry);
Self {
types: registry.into(),
pezpallets,
extrinsic,
apis,
outer_enums,
custom,
}
Self { types: registry.into(), pezpallets, extrinsic, apis, outer_enums, custom }
}
}
@@ -528,7 +521,7 @@ impl IntoPortable for ItemDeprecationInfo {
let note = note.into_portable(registry);
let since = since.map(|x| x.into_portable(registry));
ItemDeprecationInfo::Deprecated { note, since }
}
},
}
}
}
@@ -565,10 +558,7 @@ impl IntoPortable for EnumDeprecationInfo {
type Output = EnumDeprecationInfo<PortableForm>;
fn into_portable(self, registry: &mut Registry) -> Self::Output {
let entries = self
.0
.into_iter()
.map(|(k, entry)| (k, entry.into_portable(registry)));
let entries = self.0.into_iter().map(|(k, entry)| (k, entry.into_portable(registry)));
EnumDeprecationInfo(entries.collect())
}
}
@@ -606,7 +596,7 @@ impl IntoPortable for VariantDeprecationInfo {
let note = note.into_portable(registry);
let since = since.map(|x| x.into_portable(registry));
VariantDeprecationInfo::Deprecated { note, since }
}
},
Self::DeprecatedWithoutNote => VariantDeprecationInfo::DeprecatedWithoutNote,
}
}
+118 -18
View File
@@ -1,5 +1,6 @@
[package]
name = "pezkuwi-sdk"
version = "0.1.0"
description = "Pezkuwi SDK umbrella crate."
license = "Apache-2.0"
@@ -45,6 +46,7 @@ std = [
"pezframe-election-provider-support?/std",
"pezframe-executive?/std",
"pezframe-metadata-hash-extension?/std",
"pezframe-metadata?/std",
"pezframe-support-procedural?/std",
"pezframe-support?/std",
"pezframe-system-benchmarking?/std",
@@ -56,6 +58,10 @@ std = [
"pezkuwi-runtime-metrics?/std",
"pezkuwi-runtime-teyrchains?/std",
"pezkuwi-sdk-frame?/std",
"pezkuwi-ss58-registry?/std",
"pezkuwi-subxt-core?/std",
"pezkuwi-subxt-metadata?/std",
"pezkuwi-subxt-signer?/std",
"pezkuwi-teyrchain-primitives?/std",
"pezpallet-alliance?/std",
"pezpallet-asset-conversion-ops?/std",
@@ -139,7 +145,6 @@ std = [
"pezpallet-remark?/std",
"pezpallet-revive?/std",
"pezpallet-root-offences?/std",
"pezpallet-root-testing?/std",
"pezpallet-safe-mode?/std",
"pezpallet-salary?/std",
"pezpallet-scheduler?/std",
@@ -205,7 +210,6 @@ std = [
"pezsp-npos-elections?/std",
"pezsp-offchain?/std",
"pezsp-runtime-interface?/std",
"pezsp-runtime?/std",
"pezsp-session?/std",
"pezsp-staking?/std",
"pezsp-state-machine?/std",
@@ -432,7 +436,6 @@ runtime-benchmarks = [
"pezpallet-remark?/runtime-benchmarks",
"pezpallet-revive?/runtime-benchmarks",
"pezpallet-root-offences?/runtime-benchmarks",
"pezpallet-root-testing?/runtime-benchmarks",
"pezpallet-safe-mode?/runtime-benchmarks",
"pezpallet-salary?/runtime-benchmarks",
"pezpallet-scheduler?/runtime-benchmarks",
@@ -531,7 +534,6 @@ runtime-benchmarks = [
"pezsp-npos-elections?/runtime-benchmarks",
"pezsp-offchain?/runtime-benchmarks",
"pezsp-runtime-interface?/runtime-benchmarks",
"pezsp-runtime?/runtime-benchmarks",
"pezsp-session?/runtime-benchmarks",
"pezsp-staking?/runtime-benchmarks",
"pezsp-state-machine?/runtime-benchmarks",
@@ -653,7 +655,6 @@ try-runtime = [
"pezpallet-remark?/try-runtime",
"pezpallet-revive?/try-runtime",
"pezpallet-root-offences?/try-runtime",
"pezpallet-root-testing?/try-runtime",
"pezpallet-safe-mode?/try-runtime",
"pezpallet-salary?/try-runtime",
"pezpallet-scheduler?/try-runtime",
@@ -685,11 +686,12 @@ try-runtime = [
"pezpallet-xcm?/try-runtime",
"pezstaging-teyrchain-info?/try-runtime",
"teyrchains-common?/try-runtime",
"pezsp-runtime?/try-runtime"
]
serde = [
"bp-pezkuwi-core?/serde",
"pezframe-benchmarking?/serde",
"pezframe-metadata?/serde",
"pezkuwi-subxt-signer?/serde",
"pezpallet-asset-tx-payment?/serde",
"pezpallet-beefy-mmr?/serde",
"pezpallet-beefy?/serde",
@@ -724,7 +726,6 @@ serde = [
"pezsp-storage?/serde",
"pezsp-version?/serde",
"pezsp-weights?/serde",
"pezsp-runtime?/serde"
]
experimental = [
"pezframe-support-procedural?/experimental",
@@ -777,6 +778,7 @@ runtime-full = [
"pezframe-election-provider-solution-type",
"pezframe-election-provider-support",
"pezframe-executive",
"pezframe-metadata",
"pezframe-metadata-hash-extension",
"pezframe-support",
"pezframe-support-procedural",
@@ -790,6 +792,11 @@ runtime-full = [
"pezkuwi-runtime-metrics",
"pezkuwi-runtime-teyrchains",
"pezkuwi-sdk-frame",
"pezkuwi-ss58-registry",
"pezkuwi-subxt-core",
"pezkuwi-subxt-macro",
"pezkuwi-subxt-metadata",
"pezkuwi-subxt-signer",
"pezkuwi-teyrchain-primitives",
"pezpallet-alliance",
"pezpallet-asset-conversion",
@@ -876,7 +883,6 @@ runtime-full = [
"pezpallet-revive-proc-macro",
"pezpallet-revive-uapi",
"pezpallet-root-offences",
"pezpallet-root-testing",
"pezpallet-safe-mode",
"pezpallet-salary",
"pezpallet-scheduler",
@@ -975,6 +981,7 @@ runtime = [
"pezframe-election-provider-solution-type",
"pezframe-election-provider-support",
"pezframe-executive",
"pezframe-metadata",
"pezframe-metadata-hash-extension",
"pezframe-support",
"pezframe-support-procedural",
@@ -984,6 +991,7 @@ runtime = [
"pezframe-system-rpc-runtime-api",
"pezkuwi-sdk-frame",
"pezkuwi-sdk-frame?/runtime",
"pezkuwi-subxt?/runtime",
]
node = [
"asset-test-pezutils",
@@ -1061,6 +1069,12 @@ node = [
"pezkuwi-service",
"pezkuwi-statement-distribution",
"pezkuwi-statement-table",
"pezkuwi-subxt",
"pezkuwi-subxt-codegen",
"pezkuwi-subxt-lightclient",
"pezkuwi-subxt-rpcs",
"pezkuwi-subxt-utils-fetchmetadata",
"pezkuwi-subxt-utils-stripmetadata",
"pezmmr-gadget",
"pezmmr-rpc",
"pezpallet-contracts-mock-network",
@@ -1133,6 +1147,12 @@ node = [
"teyrchains-runtimes-test-utils",
"xcm-pez-emulator",
"xcm-pez-simulator",
"zombienet-configuration",
"zombienet-orchestrator",
"zombienet-prom-metrics-parser",
"zombienet-provider",
"zombienet-sdk",
"zombienet-support",
]
tuples-96 = [
"pezframe-support-procedural?/tuples-96",
@@ -1346,6 +1366,11 @@ default-features = false
optional = true
path = "../bizinikiwi/pezframe/executive"
[dependencies.pezframe-metadata]
default-features = false
optional = true
path = "../bizinikiwi/pezframe/pezframe-metadata"
[dependencies.pezframe-metadata-hash-extension]
default-features = false
optional = true
@@ -1411,6 +1436,31 @@ default-features = false
optional = true
path = "../bizinikiwi/pezframe"
[dependencies.pezkuwi-ss58-registry]
default-features = false
optional = true
path = "../vendor/ss58-registry"
[dependencies.pezkuwi-subxt-core]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/core"
[dependencies.pezkuwi-subxt-macro]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/macro"
[dependencies.pezkuwi-subxt-metadata]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/metadata"
[dependencies.pezkuwi-subxt-signer]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/signer"
[dependencies.pezkuwi-teyrchain-primitives]
default-features = false
optional = true
@@ -1841,11 +1891,6 @@ default-features = false
optional = true
path = "../bizinikiwi/pezframe/root-offences"
[dependencies.pezpallet-root-testing]
default-features = false
optional = true
path = "../bizinikiwi/pezframe/root-testing"
[dependencies.pezpallet-safe-mode]
default-features = false
optional = true
@@ -2176,11 +2221,6 @@ default-features = false
optional = true
path = "../bizinikiwi/primitives/offchain"
[dependencies.pezsp-runtime]
default-features = false
optional = true
path = "../bizinikiwi/primitives/runtime"
[dependencies.pezsp-runtime-interface]
default-features = false
optional = true
@@ -2681,6 +2721,36 @@ default-features = false
optional = true
path = "../pezkuwi/statement-table"
[dependencies.pezkuwi-subxt]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/subxt"
[dependencies.pezkuwi-subxt-codegen]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/codegen"
[dependencies.pezkuwi-subxt-lightclient]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/lightclient"
[dependencies.pezkuwi-subxt-rpcs]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/rpcs"
[dependencies.pezkuwi-subxt-utils-fetchmetadata]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/utils/fetch-metadata"
[dependencies.pezkuwi-subxt-utils-stripmetadata]
default-features = false
optional = true
path = "../vendor/pezkuwi-subxt/utils/strip-metadata"
[dependencies.pezmmr-gadget]
default-features = false
optional = true
@@ -3036,6 +3106,36 @@ default-features = false
optional = true
path = "../pezkuwi/xcm/xcm-pez-simulator"
[dependencies.zombienet-configuration]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/configuration"
[dependencies.zombienet-orchestrator]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/orchestrator"
[dependencies.zombienet-prom-metrics-parser]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/prom-metrics-parser"
[dependencies.zombienet-provider]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/provider"
[dependencies.zombienet-sdk]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/sdk"
[dependencies.zombienet-support]
default-features = false
optional = true
path = "../vendor/pezkuwi-zombienet-sdk/crates/support"
[package.metadata.docs.rs]
features = ["node", "runtime-full"]
targets = ["x86_64-unknown-linux-gnu"]
+110 -80
View File
@@ -51,8 +51,7 @@ pub use bizinikiwi_rpc_client;
#[cfg(feature = "bizinikiwi-state-trie-migration-rpc")]
pub use bizinikiwi_state_trie_migration_rpc;
/// Bizinikiwi utility: A library and CLI tool for sending transactions to Pezkuwi blockchain,
/// enabling developers to test and monitor transaction scenarios.
/// Bizinikiwi utility: A library and CLI tool for sending transactions to Pezkuwi blockchain, enabling developers to test and monitor transaction scenarios.
#[cfg(feature = "bizinikiwi-txtesttool")]
pub use bizinikiwi_txtesttool;
@@ -96,8 +95,7 @@ pub use bp_xcm_bridge_hub_router;
#[cfg(feature = "bridge-hub-common")]
pub use bridge_hub_common;
/// An externalities provided environment that can load itself from remote nodes or cached
/// files.
/// An externalities provided environment that can load itself from remote nodes or cached files.
#[cfg(feature = "frame-remote-externalities")]
pub use frame_remote_externalities;
@@ -105,8 +103,7 @@ pub use frame_remote_externalities;
#[cfg(feature = "pez-ethereum-standards")]
pub use pez_ethereum_standards;
/// Utility library for managing tree-like ordered data with logic for pruning the tree while
/// finalizing nodes.
/// Utility library for managing tree-like ordered data with logic for pruning the tree while finalizing nodes.
#[cfg(feature = "pez-fork-tree")]
pub use pez_fork_tree;
@@ -118,8 +115,7 @@ pub use pez_generate_bags;
#[cfg(feature = "pez-slot-range-helper")]
pub use pez_slot_range_helper;
/// Generate and restore keys for Bizinikiwi based chains such as Pezkuwi, Kusama and a growing
/// number of teyrchains and Bizinikiwi based projects.
/// Generate and restore keys for Bizinikiwi based chains such as Pezkuwi, Kusama and a growing number of teyrchains and Bizinikiwi based projects.
#[cfg(feature = "pez-subkey")]
pub use pez_subkey;
@@ -127,8 +123,7 @@ pub use pez_subkey;
#[cfg(feature = "pez-tracing-gum")]
pub use pez_tracing_gum;
/// Generate an overseer including builder pattern and message wrapper from a single annotated
/// struct definition.
/// Generate an overseer including builder pattern and message wrapper from a single annotated struct definition.
#[cfg(feature = "pez-tracing-gum-proc-macro")]
pub use pez_tracing_gum_proc_macro;
@@ -140,8 +135,7 @@ pub use pezbp_runtime;
#[cfg(feature = "pezbridge-hub-test-utils")]
pub use pezbridge_hub_test_utils;
/// Common types and functions that may be used by bizinikiwi-based runtimes of all bridged
/// chains.
/// Common types and functions that may be used by bizinikiwi-based runtimes of all bridged chains.
#[cfg(feature = "pezbridge-runtime-common")]
pub use pezbridge_runtime_common;
@@ -185,8 +179,7 @@ pub use pezcumulus_client_pov_recovery;
#[cfg(feature = "pezcumulus-client-service")]
pub use pezcumulus_client_service;
/// Inherent that needs to be present in every teyrchain block. Contains messages and a relay
/// chain storage-proof.
/// Inherent that needs to be present in every teyrchain block. Contains messages and a relay chain storage-proof.
#[cfg(feature = "pezcumulus-client-teyrchain-inherent")]
pub use pezcumulus_client_teyrchain_inherent;
@@ -246,8 +239,7 @@ pub use pezcumulus_primitives_proof_size_hostfunction;
#[cfg(feature = "pezcumulus-primitives-storage-weight-reclaim")]
pub use pezcumulus_primitives_storage_weight_reclaim;
/// Inherent that needs to be present in every teyrchain block. Contains messages and a relay
/// chain storage-proof.
/// Inherent that needs to be present in every teyrchain block. Contains messages and a relay chain storage-proof.
#[cfg(feature = "pezcumulus-primitives-teyrchain-inherent")]
pub use pezcumulus_primitives_teyrchain_inherent;
@@ -303,6 +295,10 @@ pub use pezframe_election_provider_support;
#[cfg(feature = "pezframe-executive")]
pub use pezframe_executive;
/// Metadata types for Kurdistan SDK runtimes.
#[cfg(feature = "pezframe-metadata")]
pub use pezframe_metadata;
/// FRAME signed extension for verifying the metadata hash.
#[cfg(feature = "pezframe-metadata-hash-extension")]
pub use pezframe_metadata_hash_extension;
@@ -335,23 +331,19 @@ pub use pezframe_system_benchmarking;
#[cfg(feature = "pezframe-system-rpc-runtime-api")]
pub use pezframe_system_rpc_runtime_api;
/// Pezkuwi Approval Distribution subsystem for the distribution of assignments and approvals
/// for approval checks on candidates over the network.
/// Pezkuwi Approval Distribution subsystem for the distribution of assignments and approvals for approval checks on candidates over the network.
#[cfg(feature = "pezkuwi-approval-distribution")]
pub use pezkuwi_approval_distribution;
/// Pezkuwi Bitfiled Distribution subsystem, which gossips signed availability bitfields used
/// to compactly determine which backed candidates are available or not based on a 2/3+ quorum.
/// Pezkuwi Bitfiled Distribution subsystem, which gossips signed availability bitfields used to compactly determine which backed candidates are available or not based on a 2/3+ quorum.
#[cfg(feature = "pezkuwi-availability-bitfield-distribution")]
pub use pezkuwi_availability_bitfield_distribution;
/// The Availability Distribution subsystem. Requests the required availability data. Also
/// distributes availability data and chunks to requesters.
/// The Availability Distribution subsystem. Requests the required availability data. Also distributes availability data and chunks to requesters.
#[cfg(feature = "pezkuwi-availability-distribution")]
pub use pezkuwi_availability_distribution;
/// The Availability Recovery subsystem. Handles requests for recovering the availability data
/// of included candidates.
/// The Availability Recovery subsystem. Handles requests for recovering the availability data of included candidates.
#[cfg(feature = "pezkuwi-availability-recovery")]
pub use pezkuwi_availability_recovery;
@@ -367,8 +359,7 @@ pub use pezkuwi_collator_protocol;
#[cfg(feature = "pezkuwi-core-primitives")]
pub use pezkuwi_core_primitives;
/// Pezkuwi Dispute Distribution subsystem, which ensures all concerned validators are aware of
/// a dispute and have the relevant votes.
/// Pezkuwi Dispute Distribution subsystem, which ensures all concerned validators are aware of a dispute and have the relevant votes.
#[cfg(feature = "pezkuwi-dispute-distribution")]
pub use pezkuwi_dispute_distribution;
@@ -376,8 +367,7 @@ pub use pezkuwi_dispute_distribution;
#[cfg(feature = "pezkuwi-erasure-coding")]
pub use pezkuwi_erasure_coding;
/// Pezkuwi Gossip Support subsystem. Responsible for keeping track of session changes and
/// issuing a connection request to the relevant validators on every new session.
/// Pezkuwi Gossip Support subsystem. Responsible for keeping track of session changes and issuing a connection request to the relevant validators on every new session.
#[cfg(feature = "pezkuwi-gossip-support")]
pub use pezkuwi_gossip_support;
@@ -397,13 +387,11 @@ pub use pezkuwi_node_core_approval_voting;
#[cfg(feature = "pezkuwi-node-core-approval-voting-parallel")]
pub use pezkuwi_node_core_approval_voting_parallel;
/// The Availability Store subsystem. Wrapper over the DB that stores availability data and
/// chunks.
/// The Availability Store subsystem. Wrapper over the DB that stores availability data and chunks.
#[cfg(feature = "pezkuwi-node-core-av-store")]
pub use pezkuwi_node_core_av_store;
/// The Candidate Backing Subsystem. Tracks teyrchain candidates that can be backed, as well as
/// the issuance of statements about candidates.
/// The Candidate Backing Subsystem. Tracks teyrchain candidates that can be backed, as well as the issuance of statements about candidates.
#[cfg(feature = "pezkuwi-node-core-backing")]
pub use pezkuwi_node_core_backing;
@@ -411,13 +399,11 @@ pub use pezkuwi_node_core_backing;
#[cfg(feature = "pezkuwi-node-core-bitfield-signing")]
pub use pezkuwi_node_core_bitfield_signing;
/// Pezkuwi crate that implements the Candidate Validation subsystem. Handles requests to
/// validate candidates according to a PVF.
/// Pezkuwi crate that implements the Candidate Validation subsystem. Handles requests to validate candidates according to a PVF.
#[cfg(feature = "pezkuwi-node-core-candidate-validation")]
pub use pezkuwi_node_core_candidate_validation;
/// The Chain API subsystem provides access to chain related utility functions like block
/// number to hash conversions.
/// The Chain API subsystem provides access to chain related utility functions like block number to hash conversions.
#[cfg(feature = "pezkuwi-node-core-chain-api")]
pub use pezkuwi_node_core_chain_api;
@@ -433,33 +419,27 @@ pub use pezkuwi_node_core_dispute_coordinator;
#[cfg(feature = "pezkuwi-node-core-prospective-teyrchains")]
pub use pezkuwi_node_core_prospective_teyrchains;
/// Responsible for assembling a relay chain block from a set of available teyrchain
/// candidates.
/// Responsible for assembling a relay chain block from a set of available teyrchain candidates.
#[cfg(feature = "pezkuwi-node-core-provisioner")]
pub use pezkuwi_node_core_provisioner;
/// Pezkuwi crate that implements the PVF validation host. Responsible for coordinating
/// preparation and execution of PVFs.
/// Pezkuwi crate that implements the PVF validation host. Responsible for coordinating preparation and execution of PVFs.
#[cfg(feature = "pezkuwi-node-core-pvf")]
pub use pezkuwi_node_core_pvf;
/// Pezkuwi crate that implements the PVF pre-checking subsystem. Responsible for checking and
/// voting for PVFs that are pending approval.
/// Pezkuwi crate that implements the PVF pre-checking subsystem. Responsible for checking and voting for PVFs that are pending approval.
#[cfg(feature = "pezkuwi-node-core-pvf-checker")]
pub use pezkuwi_node_core_pvf_checker;
/// Pezkuwi crate that contains functionality related to PVFs that is shared by the PVF host
/// and the PVF workers.
/// Pezkuwi crate that contains functionality related to PVFs that is shared by the PVF host and the PVF workers.
#[cfg(feature = "pezkuwi-node-core-pvf-common")]
pub use pezkuwi_node_core_pvf_common;
/// Pezkuwi crate that contains the logic for executing PVFs. Used by the
/// pezkuwi-execute-worker binary.
/// Pezkuwi crate that contains the logic for executing PVFs. Used by the pezkuwi-execute-worker binary.
#[cfg(feature = "pezkuwi-node-core-pvf-execute-worker")]
pub use pezkuwi_node_core_pvf_execute_worker;
/// Pezkuwi crate that contains the logic for preparing PVFs. Used by the
/// pezkuwi-prepare-worker binary.
/// Pezkuwi crate that contains the logic for preparing PVFs. Used by the pezkuwi-prepare-worker binary.
#[cfg(feature = "pezkuwi-node-core-pvf-prepare-worker")]
pub use pezkuwi_node_core_pvf_prepare_worker;
@@ -535,6 +515,10 @@ pub use pezkuwi_sdk_frame;
#[cfg(feature = "pezkuwi-service")]
pub use pezkuwi_service;
/// Registry of known SS58 address types - PezkuwiChain fork.
#[cfg(feature = "pezkuwi-ss58-registry")]
pub use pezkuwi_ss58_registry;
/// Statement Distribution Subsystem.
#[cfg(feature = "pezkuwi-statement-distribution")]
pub use pezkuwi_statement_distribution;
@@ -543,6 +527,46 @@ pub use pezkuwi_statement_distribution;
#[cfg(feature = "pezkuwi-statement-table")]
pub use pezkuwi_statement_table;
/// Submit extrinsics (transactions) to a Pezkuwi/Bizinikiwi node via RPC.
#[cfg(feature = "pezkuwi-subxt")]
pub use pezkuwi_subxt;
/// Generate an API for interacting with a Pezkuwi/Bizinikiwi node from FRAME metadata.
#[cfg(feature = "pezkuwi-subxt-codegen")]
pub use pezkuwi_subxt_codegen;
/// A no-std compatible subset of Subxt's functionality.
#[cfg(feature = "pezkuwi-subxt-core")]
pub use pezkuwi_subxt_core;
/// Light Client for chain interaction.
#[cfg(feature = "pezkuwi-subxt-lightclient")]
pub use pezkuwi_subxt_lightclient;
/// Generate types and helpers for interacting with Bizinikiwi runtimes.
#[cfg(feature = "pezkuwi-subxt-macro")]
pub use pezkuwi_subxt_macro;
/// Command line utilities for checking metadata compatibility between nodes.
#[cfg(feature = "pezkuwi-subxt-metadata")]
pub use pezkuwi_subxt_metadata;
/// Make RPC calls to Bizinikiwi based nodes.
#[cfg(feature = "pezkuwi-subxt-rpcs")]
pub use pezkuwi_subxt_rpcs;
/// Sign extrinsics to be submitted by Subxt.
#[cfg(feature = "pezkuwi-subxt-signer")]
pub use pezkuwi_subxt_signer;
/// subxt utility to fetch metadata.
#[cfg(feature = "pezkuwi-subxt-utils-fetchmetadata")]
pub use pezkuwi_subxt_utils_fetchmetadata;
/// subxt utility to strip metadata.
#[cfg(feature = "pezkuwi-subxt-utils-stripmetadata")]
pub use pezkuwi_subxt_utils_stripmetadata;
/// Types and utilities for creating and working with teyrchains.
#[cfg(feature = "pezkuwi-teyrchain-primitives")]
pub use pezkuwi_teyrchain_primitives;
@@ -615,8 +639,7 @@ pub use pezpallet_authority_discovery;
#[cfg(feature = "pezpallet-authorship")]
pub use pezpallet_authorship;
/// Consensus extension module for BABE consensus. Collects on-chain randomness from VRF
/// outputs and manages epoch transitions.
/// Consensus extension module for BABE consensus. Collects on-chain randomness from VRF outputs and manages epoch transitions.
#[cfg(feature = "pezpallet-babe")]
pub use pezpallet_babe;
@@ -640,8 +663,7 @@ pub use pezpallet_beefy_mmr;
#[cfg(feature = "pezpallet-bounties")]
pub use pezpallet_bounties;
/// Module implementing GRANDPA on-chain light client used for bridging consensus of
/// bizinikiwi-based chains.
/// Module implementing GRANDPA on-chain light client used for bridging consensus of bizinikiwi-based chains.
#[cfg(feature = "pezpallet-bridge-grandpa")]
pub use pezpallet_bridge_grandpa;
@@ -669,8 +691,7 @@ pub use pezpallet_child_bounties;
#[cfg(feature = "pezpallet-collator-selection")]
pub use pezpallet_collator_selection;
/// Collective system: Members of a set of account IDs can make their collective feelings known
/// through dispatched calls from one of two specialized origins.
/// Collective system: Members of a set of account IDs can make their collective feelings known through dispatched calls from one of two specialized origins.
#[cfg(feature = "pezpallet-collective")]
pub use pezpallet_collective;
@@ -870,8 +891,7 @@ pub use pezpallet_preimage;
#[cfg(feature = "pezpallet-proxy")]
pub use pezpallet_proxy;
/// Ranked collective system: Members of a set of account IDs can make their collective
/// feelings known through dispatched calls from one of two specialized origins.
/// Ranked collective system: Members of a set of account IDs can make their collective feelings known through dispatched calls from one of two specialized origins.
#[cfg(feature = "pezpallet-ranked-collective")]
pub use pezpallet_ranked_collective;
@@ -903,10 +923,6 @@ pub use pezpallet_revive_uapi;
#[cfg(feature = "pezpallet-root-offences")]
pub use pezpallet_root_offences;
/// FRAME root testing pezpallet.
#[cfg(feature = "pezpallet-root-testing")]
pub use pezpallet_root_testing;
/// FRAME safe-mode pezpallet.
#[cfg(feature = "pezpallet-safe-mode")]
pub use pezpallet_safe_mode;
@@ -931,8 +947,7 @@ pub use pezpallet_session;
#[cfg(feature = "pezpallet-session-benchmarking")]
pub use pezpallet_session_benchmarking;
/// Pallet to skip payments for calls annotated with `feeless_if` if the respective conditions
/// are satisfied.
/// Pallet to skip payments for calls annotated with `feeless_if` if the respective conditions are satisfied.
#[cfg(feature = "pezpallet-skip-feeless-payment")]
pub use pezpallet_skip_feeless_payment;
@@ -948,13 +963,11 @@ pub use pezpallet_staking;
#[cfg(feature = "pezpallet-staking-async")]
pub use pezpallet_staking_async;
/// Pallet handling the communication with staking-rc-client. It's role is to glue the staking
/// pezpallet (on AssetHub chain) and session pezpallet (on Relay Chain) in a transparent way.
/// Pallet handling the communication with staking-rc-client. It's role is to glue the staking pezpallet (on AssetHub chain) and session pezpallet (on Relay Chain) in a transparent way.
#[cfg(feature = "pezpallet-staking-async-ah-client")]
pub use pezpallet_staking_async_ah_client;
/// Pallet handling the communication with staking-ah-client. It's role is to glue the staking
/// pezpallet (on AssetHub chain) and session pezpallet (on Relay Chain) in a transparent way.
/// Pallet handling the communication with staking-ah-client. It's role is to glue the staking pezpallet (on AssetHub chain) and session pezpallet (on Relay Chain) in a transparent way.
#[cfg(feature = "pezpallet-staking-async-rc-client")]
pub use pezpallet_staking_async_rc_client;
@@ -1230,8 +1243,7 @@ pub use pezsc_rpc_spec_v2;
#[cfg(feature = "pezsc-runtime-utilities")]
pub use pezsc_runtime_utilities;
/// Bizinikiwi service. Starts a thread that spins up the network, client, and extrinsic pool.
/// Manages communication between them.
/// Bizinikiwi service. Starts a thread that spins up the network, client, and extrinsic pool. Manages communication between them.
#[cfg(feature = "pezsc-service")]
pub use pezsc_service;
@@ -1343,8 +1355,7 @@ pub use pezsp_core;
#[cfg(feature = "pezsp-core-hashing")]
pub use pezsp_core_hashing;
/// Procedural macros for calculating static hashes (deprecated in favor of
/// `pezsp-crypto-hashing-proc-macro`).
/// Procedural macros for calculating static hashes (deprecated in favor of `pezsp-crypto-hashing-proc-macro`).
#[cfg(feature = "pezsp-core-hashing-proc-macro")]
pub use pezsp_core_hashing_proc_macro;
@@ -1428,8 +1439,7 @@ pub use pezsp_rpc;
#[cfg(feature = "pezsp-runtime-interface")]
pub use pezsp_runtime_interface;
/// This crate provides procedural macros for usage within the context of the Bizinikiwi
/// runtime interface.
/// This crate provides procedural macros for usage within the context of the Bizinikiwi runtime interface.
#[cfg(feature = "pezsp-runtime-interface-proc-macro")]
pub use pezsp_runtime_interface_proc_macro;
@@ -1437,8 +1447,7 @@ pub use pezsp_runtime_interface_proc_macro;
#[cfg(feature = "pezsp-session")]
pub use pezsp_session;
/// A crate which contains primitives that are useful for implementation that uses staking
/// approaches in general. Definitions related to sessions, slashing, etc go here.
/// A crate which contains primitives that are useful for implementation that uses staking approaches in general. Definitions related to sessions, slashing, etc go here.
#[cfg(feature = "pezsp-staking")]
pub use pezsp_staking;
@@ -1450,8 +1459,7 @@ pub use pezsp_state_machine;
#[cfg(feature = "pezsp-statement-store")]
pub use pezsp_statement_store;
/// Lowest-abstraction level for the Bizinikiwi runtime: just exports useful primitives from
/// std or client/alloc to be used with any code that depends on the runtime.
/// Lowest-abstraction level for the Bizinikiwi runtime: just exports useful primitives from std or client/alloc to be used with any code that depends on the runtime.
#[cfg(feature = "pezsp-std")]
pub use pezsp_std;
@@ -1479,8 +1487,7 @@ pub use pezsp_transaction_storage_proof;
#[cfg(feature = "pezsp-trie")]
pub use pezsp_trie;
/// Version module for the Bizinikiwi runtime; Provides a function that returns the runtime
/// version.
/// Version module for the Bizinikiwi runtime; Provides a function that returns the runtime version.
#[cfg(feature = "pezsp-version")]
pub use pezsp_version;
@@ -1496,8 +1503,7 @@ pub use pezsp_wasm_interface;
#[cfg(feature = "pezsp-weights")]
pub use pezsp_weights;
/// Utility for building chain-specification files for Bizinikiwi-based runtimes based on
/// `pezsp-genesis-builder`.
/// Utility for building chain-specification files for Bizinikiwi-based runtimes based on `pezsp-genesis-builder`.
#[cfg(feature = "pezstaging-chain-spec-builder")]
pub use pezstaging_chain_spec_builder;
@@ -1552,3 +1558,27 @@ pub use xcm_pez_simulator;
/// XCM runtime APIs.
#[cfg(feature = "xcm-runtime-pezapis")]
pub use xcm_runtime_pezapis;
/// Zombienet sdk config builder, allow to build a network configuration.
#[cfg(feature = "zombienet-configuration")]
pub use zombienet_configuration;
/// Zombienet Orchestrator, drive network spwan through providers.
#[cfg(feature = "zombienet-orchestrator")]
pub use zombienet_orchestrator;
/// Prometheus metric parser, parse metrics provided by internal prometheus server.
#[cfg(feature = "zombienet-prom-metrics-parser")]
pub use zombienet_prom_metrics_parser;
/// Zombienet provider, implement the logic to run the nodes in the native provider.
#[cfg(feature = "zombienet-provider")]
pub use zombienet_provider;
/// Zombienet SDK, entrypoint for using zombienet.
#[cfg(feature = "zombienet-sdk")]
pub use zombienet_sdk;
/// Support crates with common traits/structs and helpers.
#[cfg(feature = "zombienet-support")]
pub use zombienet_support;
+1 -1
View File
@@ -8,8 +8,8 @@ use pezkuwi_subxt_metadata::PalletMetadata;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
use scale_typegen::{
typegen::ir::{type_ir::CompositeIRKind, ToTokensWithSettings},
TypeGenerator,
typegen::ir::{ToTokensWithSettings, type_ir::CompositeIRKind},
};
/// Generate calls from the provided pallet's metadata. Each call returns a `StaticPayload`
+1 -1
View File
@@ -6,7 +6,7 @@ use heck::ToSnakeCase as _;
use pezkuwi_subxt_metadata::PalletMetadata;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
use scale_typegen::{TypeGenerator, typegen::ir::ToTokensWithSettings};
use scale_typegen::{typegen::ir::ToTokensWithSettings, TypeGenerator};
use super::CodegenError;
+1 -1
View File
@@ -4,7 +4,7 @@
use heck::ToSnakeCase as _;
use pezkuwi_subxt_metadata::{CustomValueMetadata, Metadata};
use scale_typegen::{TypeGenerator, typegen::ir::ToTokensWithSettings};
use scale_typegen::{typegen::ir::ToTokensWithSettings, TypeGenerator};
use std::collections::HashSet;
use proc_macro2::TokenStream as TokenStream2;
+1 -1
View File
@@ -6,7 +6,7 @@ use super::CodegenError;
use pezkuwi_subxt_metadata::PalletMetadata;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use scale_typegen::{TypeGenerator, typegen::ir::ToTokensWithSettings};
use scale_typegen::{typegen::ir::ToTokensWithSettings, TypeGenerator};
/// Generate events from the provided pallet metadata.
///
+9 -7
View File
@@ -15,17 +15,17 @@ mod storage;
use pezkuwi_subxt_metadata::Metadata;
use scale_typegen::{
TypeGenerator,
typegen::{
ir::{
ToTokensWithSettings,
type_ir::{CompositeFieldIR, CompositeIR, CompositeIRKind},
ToTokensWithSettings,
},
type_params::TypeParameters,
type_path::TypePath,
},
TypeGenerator,
};
use syn::{Ident, parse_quote};
use syn::{parse_quote, Ident};
use crate::{
api::custom_values::generate_custom_values, error::CodegenError, ir, subxt_type_gen_settings,
@@ -438,16 +438,18 @@ pub fn generate_type_alias_mod(
CompositeIRKind::NoFields => {
return quote!(); // no types mod generated for unit structs.
},
CompositeIRKind::Named(named) =>
CompositeIRKind::Named(named) => {
for (name, field) in named.iter_mut() {
let alias_name = format_ident!("{}", name.to_string().to_upper_camel_case());
modify_field_to_be_type_alias(field, alias_name);
},
CompositeIRKind::Unnamed(unnamed) =>
}
},
CompositeIRKind::Unnamed(unnamed) => {
for (i, field) in unnamed.iter_mut().enumerate() {
let alias_name = format_ident!("Field{}", i);
modify_field_to_be_type_alias(field, alias_name);
},
}
},
};
let types_mod_ident = type_gen.types_mod_ident();
@@ -8,7 +8,7 @@ use crate::CodegenError;
use pezkuwi_subxt_metadata::{PalletMetadata, ViewFunctionMetadata};
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
use scale_typegen::{TypeGenerator, typegen::ir::ToTokensWithSettings};
use scale_typegen::{typegen::ir::ToTokensWithSettings, TypeGenerator};
use std::collections::HashSet;
pub fn generate_pallet_view_functions(
+1 -1
View File
@@ -7,7 +7,7 @@ use std::collections::HashSet;
use heck::{ToSnakeCase as _, ToUpperCamelCase as _};
use pezkuwi_subxt_metadata::{Metadata, RuntimeApiMetadata};
use scale_typegen::{TypeGenerator, typegen::ir::ToTokensWithSettings};
use scale_typegen::{typegen::ir::ToTokensWithSettings, TypeGenerator};
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
+1 -1
View File
@@ -172,7 +172,7 @@ fn generate_storage_entry_fns(
mod tests {
use frame_metadata::v15;
use pezkuwi_subxt_metadata::Metadata;
use scale_info::{MetaType, meta_type};
use scale_info::{meta_type, MetaType};
// TODO: Think about adding tests for storage codegen which can use this sort of function.
#[allow(dead_code)]
+1 -1
View File
@@ -19,8 +19,8 @@ use getrandom as _;
use api::RuntimeGenerator;
use proc_macro2::TokenStream as TokenStream2;
use scale_typegen::{
typegen::settings::{substitutes::absolute_path, AllocCratePath},
DerivesRegistry, TypeGeneratorSettings, TypeSubstitutes, TypegenError,
typegen::settings::{AllocCratePath, substitutes::absolute_path},
};
use std::collections::HashMap;
use syn::parse_quote;
+5
View File
@@ -30,6 +30,11 @@ std = [
"serde/std",
"serde_json/std",
"tracing/std",
"bitvec/std",
"blake2/std",
"frame-decode/std",
"keccak-hash/std",
"pezkuwi-subxt-signer/std"
]
[dependencies]
@@ -3,13 +3,13 @@
// see LICENSE for license details.
use crate::{
Metadata,
config::{
Config, TransactionExtension,
transaction_extensions::{ChargeAssetTxPayment, ChargeTransactionPayment, CheckNonce},
Config, TransactionExtension,
},
dynamic::Value,
error::ExtrinsicError,
Metadata,
};
use alloc::borrow::ToOwned;
use frame_decode::extrinsics::ExtrinsicExtensions;
+5 -5
View File
@@ -3,10 +3,10 @@
// see LICENSE for license details.
use crate::{
Metadata,
blocks::extrinsic_transaction_extensions::ExtrinsicTransactionExtensions,
config::{Config, HashFor, Hasher},
error::{ExtrinsicDecodeErrorAt, ExtrinsicDecodeErrorAtReason, ExtrinsicError},
Metadata,
};
use alloc::{sync::Arc, vec::Vec};
use frame_decode::extrinsics::Extrinsic;
@@ -284,8 +284,8 @@ where
/// Attempt to decode these [`ExtrinsicDetails`] into a type representing the extrinsic fields.
/// Such types are exposed in the codegen as `pallet_name::calls::types::CallName` types.
pub fn as_extrinsic<E: StaticExtrinsic>(&self) -> Result<Option<E>, ExtrinsicError> {
if self.decoded_info().pallet_name() == E::PALLET &&
self.decoded_info().call_name() == E::CALL
if self.decoded_info().pallet_name() == E::PALLET
&& self.decoded_info().call_name() == E::CALL
{
let mut fields = self.decoded_info().call_data().map(|d| {
let name = if d.name().is_empty() { None } else { Some(d.name()) };
@@ -340,13 +340,13 @@ mod tests {
use assert_matches::assert_matches;
use codec::{Decode, Encode};
use frame_metadata::{
RuntimeMetadataPrefixed,
v15::{
CustomMetadata, ExtrinsicMetadata, OuterEnums, PalletCallMetadata, PalletMetadata,
RuntimeMetadataV15,
},
RuntimeMetadataPrefixed,
};
use scale_info::{TypeInfo, meta_type};
use scale_info::{meta_type, TypeInfo};
use scale_value::Value;
// Extrinsic needs to contain at least the generic type parameter "Call"
+1 -1
View File
@@ -69,7 +69,7 @@ mod extrinsics;
mod static_extrinsic;
pub use crate::error::ExtrinsicError;
use crate::{Metadata, config::Config, error::ExtrinsicDecodeErrorAt};
use crate::{config::Config, error::ExtrinsicDecodeErrorAt, Metadata};
use alloc::vec::Vec;
pub use extrinsic_transaction_extensions::{
ExtrinsicTransactionExtension, ExtrinsicTransactionExtensions,
+1 -1
View File
@@ -5,8 +5,8 @@
//! A couple of client types that we use elsewhere.
use crate::{
Metadata,
config::{Config, HashFor},
Metadata,
};
use derive_where::derive_where;
@@ -4,7 +4,7 @@
use crate::config::transaction_extensions::CheckMortalityParams;
use super::{Config, ExtrinsicParams, HashFor, transaction_extensions};
use super::{transaction_extensions, Config, ExtrinsicParams, HashFor};
/// The default [`super::ExtrinsicParams`] implementation understands common signed extensions
/// and how to apply them to a given chain.
+5 -3
View File
@@ -11,8 +11,8 @@
mod default_extrinsic_params;
mod extrinsic_params;
pub mod pezkuwi;
pub mod bizinikiwi;
pub mod pezkuwi;
pub mod transaction_extensions;
use codec::{Decode, Encode};
@@ -20,12 +20,14 @@ use core::fmt::Debug;
use pezkuwi_subxt_metadata::Metadata;
use scale_decode::DecodeAsType;
use scale_encode::EncodeAsType;
use serde::{Serialize, de::DeserializeOwned};
use serde::{de::DeserializeOwned, Serialize};
pub use bizinikiwi::{
BizinikiwConfig, BizinikiwiExtrinsicParams, BizinikiwiExtrinsicParamsBuilder,
};
pub use default_extrinsic_params::{DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder};
pub use extrinsic_params::{ExtrinsicParams, ExtrinsicParamsEncoder};
pub use pezkuwi::{PezkuwiConfig, PezkuwiExtrinsicParams, PezkuwiExtrinsicParamsBuilder};
pub use bizinikiwi::{BizinikiwConfig, BizinikiwiExtrinsicParams, BizinikiwiExtrinsicParamsBuilder};
pub use transaction_extensions::TransactionExtension;
/// Runtime types.
@@ -398,13 +398,14 @@ impl<T: Config> CheckMortalityParams<T> {
impl<T: Config> Params<T> for CheckMortalityParams<T> {
fn inject_block(&mut self, from_block_n: u64, from_block_hash: HashFor<T>) {
match &self.0 {
CheckMortalityParamsInner::MortalForBlocks(n) |
CheckMortalityParamsInner::MortalForBlocksOrImmortalIfNotPossible(n) =>
CheckMortalityParamsInner::MortalForBlocks(n)
| CheckMortalityParamsInner::MortalForBlocksOrImmortalIfNotPossible(n) => {
self.0 = CheckMortalityParamsInner::MortalFromBlock {
for_n_blocks: *n,
from_block_n,
from_block_hash,
},
}
},
_ => {
// Don't change anything if explicit Immortal or explicit block set.
},
@@ -670,10 +671,10 @@ fn is_type_empty(type_id: u32, types: &scale_info::PortableRegistry) -> bool {
TypeDef::Array(a) => a.len == 0 || is_type_empty(a.type_param.id, types),
TypeDef::Tuple(t) => t.fields.iter().all(|f| is_type_empty(f.id, types)),
// Explicitly list these in case any additions are made in the future.
TypeDef::BitSequence(_) |
TypeDef::Variant(_) |
TypeDef::Sequence(_) |
TypeDef::Compact(_) |
TypeDef::Primitive(_) => false,
TypeDef::BitSequence(_)
| TypeDef::Variant(_)
| TypeDef::Sequence(_)
| TypeDef::Compact(_)
| TypeDef::Primitive(_) => false,
}
}
+1 -1
View File
@@ -40,7 +40,7 @@
pub mod address;
use crate::{Metadata, error::ConstantError};
use crate::{error::ConstantError, Metadata};
use address::Address;
use alloc::{borrow::ToOwned, string::ToString, vec::Vec};
use frame_decode::constants::ConstantTypeInfo;
+2 -2
View File
@@ -32,7 +32,7 @@
pub mod address;
use crate::{Metadata, error::CustomValueError, utils::Maybe};
use crate::{error::CustomValueError, utils::Maybe, Metadata};
use address::Address;
use alloc::vec::Vec;
use frame_decode::custom_values::CustomValueTypeInfo;
@@ -99,7 +99,7 @@ mod tests {
use alloc::collections::BTreeMap;
use codec::Encode;
use scale_decode::DecodeAsType;
use scale_info::{TypeInfo, form::PortableForm};
use scale_info::{form::PortableForm, TypeInfo};
use alloc::{borrow::ToOwned, string::String, vec};
+5 -5
View File
@@ -46,9 +46,9 @@ use pezkuwi_subxt_metadata::PalletMetadata;
use scale_decode::{DecodeAsFields, DecodeAsType};
use crate::{
Metadata,
config::{Config, HashFor},
error::EventsError,
Metadata,
};
/// Create a new [`Events`] instance from the given bytes.
@@ -466,16 +466,16 @@ pub struct EventMetadataDetails<'a> {
#[cfg(test)]
pub(crate) mod test_utils {
use super::*;
use crate::config::{HashFor, BizinikiwConfig};
use crate::config::{BizinikiwConfig, HashFor};
use codec::Encode;
use frame_metadata::{
RuntimeMetadataPrefixed,
v15::{
CustomMetadata, ExtrinsicMetadata, OuterEnums, PalletEventMetadata, PalletMetadata,
RuntimeMetadataV15,
},
RuntimeMetadataPrefixed,
};
use scale_info::{TypeInfo, meta_type};
use scale_info::{meta_type, TypeInfo};
/// An "outer" events enum containing exactly one event.
#[derive(
@@ -611,7 +611,7 @@ pub(crate) mod test_utils {
#[cfg(test)]
mod tests {
use super::{
test_utils::{AllEvents, EventRecord, event_record, events, events_raw},
test_utils::{event_record, events, events_raw, AllEvents, EventRecord},
*,
};
use crate::{config::BizinikiwConfig, events::Phase};
+6 -2
View File
@@ -43,7 +43,7 @@
pub mod payload;
use crate::{Metadata, error::RuntimeApiError};
use crate::{error::RuntimeApiError, Metadata};
use alloc::{
format,
string::{String, ToString},
@@ -75,7 +75,11 @@ pub fn validate<P: Payload>(payload: P, metadata: &Metadata) -> Result<(), Runti
method_name: method_name.to_string(),
})?;
if hash != api_method.hash() { Err(RuntimeApiError::IncompatibleCodegen) } else { Ok(()) }
if hash != api_method.hash() {
Err(RuntimeApiError::IncompatibleCodegen)
} else {
Ok(())
}
}
/// Return the name of the runtime API call from the payload.
+7 -3
View File
@@ -53,12 +53,12 @@ mod storage_value;
pub mod address;
use crate::{Metadata, error::StorageError};
use crate::{error::StorageError, Metadata};
use address::Address;
use alloc::string::ToString;
pub use prefix_of::{EqualOrPrefixOf, PrefixOf};
pub use storage_entry::{StorageEntry, entry};
pub use storage_entry::{entry, StorageEntry};
pub use storage_key::{StorageHasher, StorageKey, StorageKeyPart};
pub use storage_key_value::StorageKeyValue;
pub use storage_value::StorageValue;
@@ -86,5 +86,9 @@ pub fn validate<Addr: Address>(address: Addr, metadata: &Metadata) -> Result<(),
}
})?;
if storage_hash != hash { Err(StorageError::IncompatibleCodegen) } else { Ok(()) }
if storage_hash != hash {
Err(StorageError::IncompatibleCodegen)
} else {
Ok(())
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
use super::{PrefixOf, StorageKeyValue, StorageValue, address::Address};
use super::{address::Address, PrefixOf, StorageKeyValue, StorageValue};
use crate::{error::StorageError, utils::YesMaybe};
use alloc::{sync::Arc, vec::Vec};
use frame_decode::storage::{IntoEncodableValues, StorageInfo};
+11 -3
View File
@@ -60,10 +60,10 @@ pub mod payload;
pub mod signer;
use crate::{
Metadata,
config::{Config, ExtrinsicParams, ExtrinsicParamsEncoder, HashFor, Hasher},
error::ExtrinsicError,
utils::Encoded,
Metadata,
};
use alloc::{borrow::Cow, string::ToString, vec::Vec};
use codec::{Compact, Encode};
@@ -95,7 +95,11 @@ pub fn validate<Call: Payload>(call: &Call, metadata: &Metadata) -> Result<(), E
call_name: call_name.to_string(),
})?;
if details.hash != expected_hash { Err(ExtrinsicError::IncompatibleCodegen) } else { Ok(()) }
if details.hash != expected_hash {
Err(ExtrinsicError::IncompatibleCodegen)
} else {
Ok(())
}
}
/// Returns the suggested transaction versions to build for a given chain, or an error
@@ -252,7 +256,11 @@ impl<T: Config> PartialTransactionV4<T> {
self.additional_and_extra_params.encode_signer_payload_value_to(&mut bytes);
self.additional_and_extra_params.encode_implicit_to(&mut bytes);
if bytes.len() > 256 { f(Cow::Borrowed(&blake2_256(&bytes))) } else { f(Cow::Owned(bytes)) }
if bytes.len() > 256 {
f(Cow::Borrowed(&blake2_256(&bytes)))
} else {
f(Cow::Owned(bytes))
}
}
/// Return the V4 signer payload for this extrinsic. These are the bytes that must
+1 -1
View File
@@ -5,7 +5,7 @@
//! This module contains the trait and types used to represent
//! transactions that can be submitted.
use crate::{Metadata, error::ExtrinsicError};
use crate::{error::ExtrinsicError, Metadata};
use alloc::{
borrow::Cow,
boxed::Box,
+1 -1
View File
@@ -8,8 +8,8 @@ use alloc::{vec, vec::Vec};
use codec::{Compact, Input};
use core::marker::PhantomData;
use scale_bits::{
Bits,
scale::format::{Format, OrderFormat, StoreFormat},
Bits,
};
use scale_decode::{IntoVisitor, TypeResolver};
+4 -4
View File
@@ -5,12 +5,12 @@
use alloc::{format, vec::Vec};
use codec::{Decode, Encode};
use scale_decode::{
IntoVisitor, TypeResolver, Visitor,
ext::scale_type_resolver,
visitor::{
TypeIdFor,
types::{Composite, Variant},
TypeIdFor,
},
IntoVisitor, TypeResolver, Visitor,
};
use scale_encode::EncodeAsType;
@@ -81,8 +81,8 @@ impl codec::Encode for Era {
Self::Immortal => output.push_byte(0),
Self::Mortal { period, phase } => {
let quantize_factor = (*period >> 12).max(1);
let encoded = (period.trailing_zeros() - 1).clamp(1, 15) as u16 |
((phase / quantize_factor) << 4) as u16;
let encoded = (period.trailing_zeros() - 1).clamp(1, 15) as u16
| ((phase / quantize_factor) << 4) as u16;
encoded.encode_to(output);
},
}
+2 -2
View File
@@ -3,7 +3,7 @@
// see LICENSE for license details.
use codec::{Decode, Encode};
use scale_decode::{IntoVisitor, TypeResolver, Visitor, visitor::DecodeAsTypeResult};
use scale_decode::{visitor::DecodeAsTypeResult, IntoVisitor, TypeResolver, Visitor};
use scale_encode::EncodeAsType;
use alloc::vec::Vec;
@@ -45,7 +45,7 @@ impl<T: Decode, R: TypeResolver> Visitor for StaticDecodeAsTypeVisitor<T, R> {
_type_id: R::TypeId,
_types: &'info R,
) -> DecodeAsTypeResult<Self, Result<Self::Value<'scale, 'info>, Self::Error>> {
use scale_decode::{Error, visitor::DecodeError};
use scale_decode::{visitor::DecodeError, Error};
let decoded = T::decode(input)
.map(Static)
.map_err(|e| Error::new(DecodeError::CodecError(e).into()));
+5 -5
View File
@@ -12,7 +12,7 @@
use core::marker::PhantomData;
use codec::{Decode, Encode};
use scale_decode::{DecodeAsType, IntoVisitor, TypeResolver, Visitor, visitor::DecodeAsTypeResult};
use scale_decode::{visitor::DecodeAsTypeResult, DecodeAsType, IntoVisitor, TypeResolver, Visitor};
use super::{Encoded, Static};
use alloc::vec::Vec;
@@ -32,7 +32,7 @@ impl<Address, Call, Signature, Extra> UncheckedExtrinsic<Address, Call, Signatur
/// Get the bytes of the encoded extrinsic.
pub fn bytes(&self) -> &[u8] {
self.0.0.0.as_slice()
self.0 .0 .0.as_slice()
}
}
@@ -75,7 +75,7 @@ impl<Address, Call, Signature, Extra> From<UncheckedExtrinsic<Address, Call, Sig
for Vec<u8>
{
fn from(bytes: UncheckedExtrinsic<Address, Call, Signature, Extra>) -> Self {
bytes.0.0.0
bytes.0 .0 .0
}
}
@@ -106,8 +106,8 @@ impl<Address, Call, Signature, Extra> IntoVisitor
type AnyVisitor<R: TypeResolver> =
UncheckedExtrinsicDecodeAsTypeVisitor<Address, Call, Signature, Extra, R>;
fn into_visitor<R: TypeResolver>()
-> UncheckedExtrinsicDecodeAsTypeVisitor<Address, Call, Signature, Extra, R> {
fn into_visitor<R: TypeResolver>(
) -> UncheckedExtrinsicDecodeAsTypeVisitor<Address, Call, Signature, Extra, R> {
UncheckedExtrinsicDecodeAsTypeVisitor(PhantomData)
}
}
+8 -5
View File
@@ -5,7 +5,7 @@
use super::PhantomDataSendSync;
use codec::{Compact, Decode, DecodeAll, Encode};
use derive_where::derive_where;
use scale_decode::{IntoVisitor, TypeResolver, Visitor, ext::scale_type_resolver::visitor};
use scale_decode::{ext::scale_type_resolver::visitor, IntoVisitor, TypeResolver, Visitor};
use scale_encode::EncodeAsType;
use alloc::{format, vec::Vec};
@@ -108,9 +108,12 @@ impl<T, R: TypeResolver> Visitor for WrapperKeepOpaqueVisitor<T, R> {
};
if value.name() != Some("WrapperKeepOpaque") {
return Err(Error::new(ErrorKind::VisitorDecodeError(DecodeError::TypeResolvingError(
format!("Expected a type named 'WrapperKeepOpaque', got: {:?}", value.name()),
))));
return Err(Error::new(ErrorKind::VisitorDecodeError(
DecodeError::TypeResolvingError(format!(
"Expected a type named 'WrapperKeepOpaque', got: {:?}",
value.name()
)),
)));
}
if value.remaining() != 2 {
@@ -159,7 +162,7 @@ mod test {
impl<T: scale_info::TypeInfo + 'static> scale_info::TypeInfo for WrapperKeepOpaque<T> {
type Identity = Self;
fn type_info() -> scale_info::Type {
use scale_info::{Path, Type, TypeParameter, build::Fields, meta_type};
use scale_info::{build::Fields, meta_type, Path, Type, TypeParameter};
Type::builder()
.path(Path::new("WrapperKeepOpaque", module_path!()))
+6 -2
View File
@@ -7,7 +7,7 @@
pub mod payload;
use crate::{Metadata, error::ViewFunctionError};
use crate::{error::ViewFunctionError, Metadata};
use alloc::{string::ToString, vec::Vec};
use payload::Payload;
use scale_decode::IntoVisitor;
@@ -33,7 +33,11 @@ pub fn validate<P: Payload>(payload: P, metadata: &Metadata) -> Result<(), ViewF
function_name: function_name.to_string(),
})?;
if hash != view_function.hash() { Err(ViewFunctionError::IncompatibleCodegen) } else { Ok(()) }
if hash != view_function.hash() {
Err(ViewFunctionError::IncompatibleCodegen)
} else {
Ok(())
}
}
/// The name of the Runtime API call which can execute
+2 -2
View File
@@ -2,8 +2,8 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
use crate::{JsonRpcError, LightClientRpcError, rpc::RpcResponse, shared_client::SharedClient};
use futures::{FutureExt, stream::StreamExt};
use crate::{rpc::RpcResponse, shared_client::SharedClient, JsonRpcError, LightClientRpcError};
use futures::{stream::StreamExt, FutureExt};
use serde_json::value::RawValue;
use smoldot_light::platform::PlatformRef;
use std::{collections::HashMap, str::FromStr};
+1 -1
View File
@@ -11,7 +11,7 @@ mod wasm_platform;
#[cfg(feature = "web")]
mod wasm_socket;
pub use helpers::{DefaultPlatform, build_platform};
pub use helpers::{build_platform, DefaultPlatform};
#[cfg(feature = "native")]
mod helpers {
@@ -8,7 +8,7 @@
use super::wasm_socket::WasmSocket;
use core::time::Duration;
use futures_util::{FutureExt, future};
use futures_util::{future, FutureExt};
pub fn now_from_unix_epoch() -> Duration {
web_time::SystemTime::now()
@@ -89,9 +89,9 @@ impl PlatformRef for SubxtPlatform {
fn supports_connection_type(&self, connection_type: ConnectionType) -> bool {
let result = matches!(
connection_type,
ConnectionType::WebSocketIpv4 { .. } |
ConnectionType::WebSocketIpv6 { .. } |
ConnectionType::WebSocketDns { .. }
ConnectionType::WebSocketIpv4 { .. }
| ConnectionType::WebSocketIpv6 { .. }
| ConnectionType::WebSocketDns { .. }
);
tracing::trace!(
@@ -4,7 +4,7 @@
use futures::{io, prelude::*};
use send_wrapper::SendWrapper;
use wasm_bindgen::{JsCast, prelude::*};
use wasm_bindgen::{prelude::*, JsCast};
use std::{
collections::VecDeque,
+2 -2
View File
@@ -5,7 +5,7 @@
//! Subxt macro for generating Bizinikiwi runtime interfaces.
use codec::Decode;
use darling::{FromMeta, ast::NestedMeta};
use darling::{ast::NestedMeta, FromMeta};
use pezkuwi_subxt_codegen::{CodegenBuilder, CodegenError, Metadata};
use proc_macro::TokenStream;
use proc_macro_error2::{abort_call_site, proc_macro_error};
@@ -261,7 +261,7 @@ fn fetch_metadata(
},
#[cfg(feature = "runtime-metadata-insecure-url")]
(None, Some(url_string)) => {
use pezkuwi_subxt_utils_fetchmetadata::{MetadataVersion, Url, from_url_blocking};
use pezkuwi_subxt_utils_fetchmetadata::{from_url_blocking, MetadataVersion, Url};
let url = Url::parse(url_string).unwrap_or_else(|_| {
abort_call_site!("Cannot download metadata; invalid url: {}", url_string)
+8 -1
View File
@@ -15,7 +15,14 @@ description = "Command line utilities for checking metadata compatibility betwee
[features]
default = ["legacy", "std"]
std = ["frame-metadata/std", "scale-info/std"]
std = [
"frame-metadata/std",
"scale-info/std",
"bitvec/std",
"frame-decode/std",
"codec/std",
"pezsp-crypto-hashing/std"
]
# Enable decoding of legacy metadata, too.
# std required by frame-metadata to decode <V14.
+2 -2
View File
@@ -3,8 +3,8 @@ mod portable_registry_builder;
mod tests;
use crate::{
Metadata,
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
Metadata,
};
use alloc::{borrow::ToOwned, collections::BTreeMap, format, string::ToString, vec::Vec};
use frame_decode::{
@@ -15,7 +15,7 @@ use frame_decode::{
};
use frame_metadata::v15;
use portable_registry_builder::PortableRegistryBuilder;
use scale_info_legacy::{TypeRegistrySet, type_registry::RuntimeApiName};
use scale_info_legacy::{type_registry::RuntimeApiName, TypeRegistrySet};
/// Options to configure the legacy translating.
pub(crate) struct Opts {
@@ -4,8 +4,8 @@ use alloc::{
string::ToString,
vec::Vec,
};
use scale_info::{PortableRegistry, PortableType, form::PortableForm};
use scale_info_legacy::{LookupName, TypeRegistrySet, type_registry::TypeRegistryResolveError};
use scale_info::{form::PortableForm, PortableRegistry, PortableType};
use scale_info_legacy::{type_registry::TypeRegistryResolveError, LookupName, TypeRegistrySet};
use scale_type_resolver::{
BitsOrderFormat, BitsStoreFormat, FieldIter, PathIter, Primitive, ResolvedTypeVisitor,
UnhandledKind, VariantIter,
@@ -459,9 +459,9 @@ fn prepare_path<'info, Path: PathIter<'info>>(
// Non-compliant paths are converted to our default path
let non_compliant_path = path[0..path.len() - 1].iter().any(|&p| {
p.is_empty() ||
p.starts_with(|c: char| !c.is_ascii_alphabetic()) ||
p.contains(|c: char| !c.is_ascii_alphanumeric() || c.is_ascii_uppercase())
p.is_empty()
|| p.starts_with(|c: char| !c.is_ascii_alphabetic())
|| p.contains(|c: char| !c.is_ascii_alphanumeric() || c.is_ascii_uppercase())
});
if non_compliant_path {
let last = *path.last().unwrap();
+15 -10
View File
@@ -432,16 +432,21 @@ fn codegen_works() {
};
match &metadata {
RuntimeMetadata::V9(m) =>
pezkuwi_subxt_codegen::Metadata::from_v9(m, &types_for_spec),
RuntimeMetadata::V10(m) =>
pezkuwi_subxt_codegen::Metadata::from_v10(m, &types_for_spec),
RuntimeMetadata::V11(m) =>
pezkuwi_subxt_codegen::Metadata::from_v11(m, &types_for_spec),
RuntimeMetadata::V12(m) =>
pezkuwi_subxt_codegen::Metadata::from_v12(m, &types_for_spec),
RuntimeMetadata::V13(m) =>
pezkuwi_subxt_codegen::Metadata::from_v13(m, &types_for_spec),
RuntimeMetadata::V9(m) => {
pezkuwi_subxt_codegen::Metadata::from_v9(m, &types_for_spec)
},
RuntimeMetadata::V10(m) => {
pezkuwi_subxt_codegen::Metadata::from_v10(m, &types_for_spec)
},
RuntimeMetadata::V11(m) => {
pezkuwi_subxt_codegen::Metadata::from_v11(m, &types_for_spec)
},
RuntimeMetadata::V12(m) => {
pezkuwi_subxt_codegen::Metadata::from_v12(m, &types_for_spec)
},
RuntimeMetadata::V13(m) => {
pezkuwi_subxt_codegen::Metadata::from_v13(m, &types_for_spec)
},
_ => panic!("Metadata version {} not expected", metadata.version()),
}
.expect("Could not convert to pezkuwi_subxt_metadata::Metadata")
+42 -28
View File
@@ -53,34 +53,48 @@ impl TryFrom<frame_metadata::RuntimeMetadataPrefixed> for crate::Metadata {
fn try_from(value: frame_metadata::RuntimeMetadataPrefixed) -> Result<Self, Self::Error> {
match value.1 {
frame_metadata::RuntimeMetadata::V0(_) =>
Err(TryFromError::UnsupportedMetadataVersion(0)),
frame_metadata::RuntimeMetadata::V1(_) =>
Err(TryFromError::UnsupportedMetadataVersion(1)),
frame_metadata::RuntimeMetadata::V2(_) =>
Err(TryFromError::UnsupportedMetadataVersion(2)),
frame_metadata::RuntimeMetadata::V3(_) =>
Err(TryFromError::UnsupportedMetadataVersion(3)),
frame_metadata::RuntimeMetadata::V4(_) =>
Err(TryFromError::UnsupportedMetadataVersion(4)),
frame_metadata::RuntimeMetadata::V5(_) =>
Err(TryFromError::UnsupportedMetadataVersion(5)),
frame_metadata::RuntimeMetadata::V6(_) =>
Err(TryFromError::UnsupportedMetadataVersion(6)),
frame_metadata::RuntimeMetadata::V7(_) =>
Err(TryFromError::UnsupportedMetadataVersion(7)),
frame_metadata::RuntimeMetadata::V8(_) =>
Err(TryFromError::UnsupportedMetadataVersion(8)),
frame_metadata::RuntimeMetadata::V9(_) =>
Err(TryFromError::UnsupportedMetadataVersion(9)),
frame_metadata::RuntimeMetadata::V10(_) =>
Err(TryFromError::UnsupportedMetadataVersion(10)),
frame_metadata::RuntimeMetadata::V11(_) =>
Err(TryFromError::UnsupportedMetadataVersion(11)),
frame_metadata::RuntimeMetadata::V12(_) =>
Err(TryFromError::UnsupportedMetadataVersion(12)),
frame_metadata::RuntimeMetadata::V13(_) =>
Err(TryFromError::UnsupportedMetadataVersion(13)),
frame_metadata::RuntimeMetadata::V0(_) => {
Err(TryFromError::UnsupportedMetadataVersion(0))
},
frame_metadata::RuntimeMetadata::V1(_) => {
Err(TryFromError::UnsupportedMetadataVersion(1))
},
frame_metadata::RuntimeMetadata::V2(_) => {
Err(TryFromError::UnsupportedMetadataVersion(2))
},
frame_metadata::RuntimeMetadata::V3(_) => {
Err(TryFromError::UnsupportedMetadataVersion(3))
},
frame_metadata::RuntimeMetadata::V4(_) => {
Err(TryFromError::UnsupportedMetadataVersion(4))
},
frame_metadata::RuntimeMetadata::V5(_) => {
Err(TryFromError::UnsupportedMetadataVersion(5))
},
frame_metadata::RuntimeMetadata::V6(_) => {
Err(TryFromError::UnsupportedMetadataVersion(6))
},
frame_metadata::RuntimeMetadata::V7(_) => {
Err(TryFromError::UnsupportedMetadataVersion(7))
},
frame_metadata::RuntimeMetadata::V8(_) => {
Err(TryFromError::UnsupportedMetadataVersion(8))
},
frame_metadata::RuntimeMetadata::V9(_) => {
Err(TryFromError::UnsupportedMetadataVersion(9))
},
frame_metadata::RuntimeMetadata::V10(_) => {
Err(TryFromError::UnsupportedMetadataVersion(10))
},
frame_metadata::RuntimeMetadata::V11(_) => {
Err(TryFromError::UnsupportedMetadataVersion(11))
},
frame_metadata::RuntimeMetadata::V12(_) => {
Err(TryFromError::UnsupportedMetadataVersion(12))
},
frame_metadata::RuntimeMetadata::V13(_) => {
Err(TryFromError::UnsupportedMetadataVersion(13))
},
frame_metadata::RuntimeMetadata::V14(m) => m.try_into(),
frame_metadata::RuntimeMetadata::V15(m) => m.try_into(),
frame_metadata::RuntimeMetadata::V16(m) => m.try_into(),
+1 -1
View File
@@ -5,9 +5,9 @@
use super::TryFromError;
use crate::{
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
ConstantMetadata, CustomMetadataInner, ExtrinsicMetadata, Metadata, OuterEnumsMetadata,
PalletMetadataInner, StorageEntryMetadata, StorageMetadata, TransactionExtensionMetadataInner,
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
};
use alloc::{borrow::ToOwned, collections::BTreeMap, format, string::String, vec, vec::Vec};
use frame_decode::storage::StorageTypeInfo;
+1 -1
View File
@@ -5,10 +5,10 @@
use super::TryFromError;
use crate::{
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
ConstantMetadata, ExtrinsicMetadata, Metadata, OuterEnumsMetadata, PalletMetadataInner,
RuntimeApiMetadataInner, RuntimeApiMethodMetadataInner, StorageEntryMetadata, StorageMetadata,
TransactionExtensionMetadataInner,
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
};
use alloc::{collections::BTreeMap, vec, vec::Vec};
use frame_decode::{runtime_apis::RuntimeApiTypeInfo, storage::StorageTypeInfo};
+1 -1
View File
@@ -5,10 +5,10 @@
use super::TryFromError;
use crate::{
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
ConstantMetadata, ExtrinsicMetadata, Metadata, OuterEnumsMetadata, PalletMetadataInner,
RuntimeApiMetadataInner, RuntimeApiMethodMetadataInner, StorageEntryMetadata, StorageMetadata,
TransactionExtensionMetadataInner, ViewFunctionMetadataInner,
utils::{ordered_map::OrderedMap, variant_index::VariantIndex},
};
use frame_decode::{
runtime_apis::RuntimeApiTypeInfo, storage::StorageTypeInfo,
+3 -3
View File
@@ -43,15 +43,15 @@ use frame_decode::{
};
use hashbrown::HashMap;
use scale_info::{PortableRegistry, Variant, form::PortableForm};
use scale_info::{form::PortableForm, PortableRegistry, Variant};
use utils::{
ordered_map::OrderedMap,
validation::{HASH_LEN, get_custom_value_hash},
validation::{get_custom_value_hash, HASH_LEN},
variant_index::VariantIndex,
};
pub use frame_decode::storage::StorageHasher;
pub use from::{SUPPORTED_METADATA_VERSIONS, TryFromError};
pub use from::{TryFromError, SUPPORTED_METADATA_VERSIONS};
pub use utils::validation::MetadataHasher;
#[cfg(feature = "legacy")]
+17 -5
View File
@@ -10,7 +10,7 @@ use crate::{
};
use alloc::vec::Vec;
use hashbrown::HashMap;
use scale_info::{Field, PortableRegistry, TypeDef, TypeDefVariant, Variant, form::PortableForm};
use scale_info::{form::PortableForm, Field, PortableRegistry, TypeDef, TypeDefVariant, Variant};
// The number of bytes our `hash` function produces.
pub(crate) const HASH_LEN: usize = 32;
@@ -115,7 +115,11 @@ fn get_type_def_variant_hash(
.as_ref()
.map(|only_these_variants| only_these_variants.contains(&var.name.as_str()))
.unwrap_or(true);
if should_hash { xor(bytes, get_variant_hash(registry, var, cache)) } else { bytes }
if should_hash {
xor(bytes, get_variant_hash(registry, var, cache))
} else {
bytes
}
});
concat_and_hash2(&variant_id_bytes, &variant_field_bytes)
}
@@ -521,7 +525,11 @@ impl<'a> MetadataHasher<'a> {
.unwrap_or(true);
// We don't care what order the pallets are seen in, so XOR their
// hashes together to be order independent.
if should_hash { xor(bytes, get_pallet_hash(pallet)) } else { bytes }
if should_hash {
xor(bytes, get_pallet_hash(pallet))
} else {
bytes
}
});
let apis_hash = metadata.runtime_api_traits().fold([0u8; HASH_LEN], |bytes, api| {
@@ -534,7 +542,11 @@ impl<'a> MetadataHasher<'a> {
.unwrap_or(true);
// We don't care what order the runtime APIs are seen in, so XOR their
// hashes together to be order independent.
if should_hash { xor(bytes, get_runtime_apis_hash(api)) } else { bytes }
if should_hash {
xor(bytes, get_runtime_apis_hash(api))
} else {
bytes
}
});
let outer_enums_hash = concat_and_hash3(
@@ -566,7 +578,7 @@ mod tests {
use super::*;
use bitvec::{order::Lsb0, vec::BitVec};
use frame_metadata::v15;
use scale_info::{Registry, meta_type};
use scale_info::{meta_type, Registry};
// Define recursive types.
#[allow(dead_code)]
+1 -1
View File
@@ -4,7 +4,7 @@
use alloc::{borrow::ToOwned, string::String};
use hashbrown::HashMap;
use scale_info::{PortableRegistry, TypeDef, Variant, form::PortableForm};
use scale_info::{form::PortableForm, PortableRegistry, TypeDef, Variant};
/// Given some type ID and type registry, build a couple of
/// indexes to look up variants by index or name. If the ID provided
+1 -1
View File
@@ -51,5 +51,5 @@ pub use round_robin_rpc_client::RoundRobinRpcClient;
mod rpc_client;
mod rpc_client_t;
pub use rpc_client::{RpcClient, RpcParams, RpcSubscription, rpc_params};
pub use rpc_client::{rpc_params, RpcClient, RpcParams, RpcSubscription};
pub use rpc_client_t::{RawRpcFuture, RawRpcSubscription, RawValue, RpcClientT};
@@ -28,8 +28,8 @@
use super::{RawRpcFuture, RawRpcSubscription, RpcClientT};
use std::sync::{
Arc,
atomic::{AtomicUsize, Ordering},
Arc,
};
/// A simple RPC client which is provided a set of clients on initialization and
+1 -1
View File
@@ -5,7 +5,7 @@
use super::{RawRpcSubscription, RpcClientT};
use crate::Error;
use futures::{Stream, StreamExt};
use serde::{Serialize, de::DeserializeOwned};
use serde::{de::DeserializeOwned, Serialize};
use serde_json::value::RawValue;
use std::{pin::Pin, sync::Arc, task::Poll};
+5 -5
View File
@@ -7,8 +7,8 @@
//! methods exposed here.
use crate::{
client::{rpc_params, RpcClient, RpcSubscription},
Error, Hash, RpcConfig,
client::{RpcClient, RpcSubscription, rpc_params},
};
use derive_where::derive_where;
use futures::{Stream, StreamExt};
@@ -891,10 +891,10 @@ impl<H: Hash> Stream for TransactionSubscription<H> {
if let Poll::Ready(Some(Ok(res))) = &res {
if matches!(
res,
TransactionStatus::Dropped { .. } |
TransactionStatus::Error { .. } |
TransactionStatus::Invalid { .. } |
TransactionStatus::Finalized { .. }
TransactionStatus::Dropped { .. }
| TransactionStatus::Error { .. }
| TransactionStatus::Invalid { .. }
| TransactionStatus::Finalized { .. }
) {
// No more events will occur after these ones.
self.done = true
+1 -1
View File
@@ -5,8 +5,8 @@
//! An interface to call the raw legacy RPC methods.
use crate::{
client::{rpc_params, RpcClient, RpcSubscription},
Error, RpcConfig,
client::{RpcClient, RpcSubscription, rpc_params},
};
use codec::Decode;
use derive_where::derive_where;
+5 -1
View File
@@ -26,5 +26,9 @@ pub fn url_is_secure(url: &str) -> Result<bool, Error> {
/// Validates, that the given Url is secure ("https" or "wss" scheme) or is referring to localhost.
pub fn validate_url_is_secure(url: &str) -> Result<(), Error> {
if !url_is_secure(url)? { Err(Error::InsecureUrl(url.into())) } else { Ok(()) }
if !url_is_secure(url)? {
Err(Error::InsecureUrl(url.into()))
} else {
Ok(())
}
}
+10
View File
@@ -29,6 +29,16 @@ std = [
"serde?/std",
"serde_json?/std",
"sha2/std",
"bip32?/std",
"getrandom?/std",
"hex/std",
"keccak-hash?/std",
"codec/std",
"pezkuwi-subxt-core?/std",
"pezsp-core/std",
"pezsp-crypto-hashing/std",
"pezsp-keyring/std",
"zeroize/std"
]
# Pick the signer implementation(s) you need by enabling the
+5 -1
View File
@@ -94,6 +94,10 @@ impl<T: AsRef<str>> From<T> for DeriveJunction {
DeriveJunction::soft(code)
};
if hard { res.harden() } else { res }
if hard {
res.harden()
} else {
res
}
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ mod secret_uri;
mod seed_from_entropy;
pub use derive_junction::DeriveJunction;
pub use secret_uri::{DEV_PHRASE, SecretUri, SecretUriError};
pub use secret_uri::{SecretUri, SecretUriError, DEV_PHRASE};
#[cfg(any(feature = "sr25519", feature = "ecdsa"))]
pub use seed_from_entropy::seed_from_entropy;
+5 -4
View File
@@ -5,10 +5,10 @@
//! An ecdsa keypair implementation.
use codec::Encode;
use crate::crypto::{DeriveJunction, SecretUri, seed_from_entropy};
use crate::crypto::{seed_from_entropy, DeriveJunction, SecretUri};
use core::str::FromStr;
use hex::FromHex;
use secp256k1::{Message, Secp256k1, SecretKey, ecdsa::RecoverableSignature};
use secp256k1::{ecdsa::RecoverableSignature, Message, Secp256k1, SecretKey};
use secrecy::ExposeSecret;
use thiserror::Error as DeriveError;
@@ -135,9 +135,10 @@ impl Keypair {
for junction in junctions {
match junction {
DeriveJunction::Soft(_) => return Err(Error::SoftJunction),
DeriveJunction::Hard(junction_bytes) =>
DeriveJunction::Hard(junction_bytes) => {
acc = ("Secp256k1HDKD", acc, junction_bytes)
.using_encoded(pezsp_crypto_hashing::blake2_256),
.using_encoded(pezsp_crypto_hashing::blake2_256)
},
}
}
Self::from_secret_key(acc)
+2 -2
View File
@@ -106,7 +106,7 @@ impl Keypair {
/// Obtain the [`eth::PublicKey`] of this keypair.
pub fn public_key(&self) -> PublicKey {
let uncompressed = self.0.0.public_key().serialize_uncompressed();
let uncompressed = self.0 .0.public_key().serialize_uncompressed();
PublicKey(uncompressed)
}
@@ -576,7 +576,7 @@ mod test {
for (case_idx, (keypair, exp_account_id, exp_priv_key)) in cases.into_iter().enumerate() {
let act_account_id = keypair.public_key().to_account_id().checksum();
let act_priv_key = format!("0x{}", &keypair.0.0.display_secret());
let act_priv_key = format!("0x{}", &keypair.0 .0.display_secret());
assert_eq!(exp_account_id, act_account_id, "account ID mismatch in {case_idx}");
assert_eq!(exp_priv_key, act_priv_key, "private key mismatch in {case_idx}");
+1 -1
View File
@@ -52,4 +52,4 @@ pub use secrecy::{ExposeSecret, SecretString};
// SecretUri's can be parsed from strings and used to generate key pairs.
// DeriveJunctions are the "path" part of these SecretUris.
pub use crypto::{DEV_PHRASE, DeriveJunction, SecretUri, SecretUriError};
pub use crypto::{DeriveJunction, SecretUri, SecretUriError, DEV_PHRASE};
+10 -10
View File
@@ -6,8 +6,8 @@
use base64::Engine;
use crypto_secretbox::{
Key, Nonce, XSalsa20Poly1305,
aead::{Aead, KeyInit},
Key, Nonce, XSalsa20Poly1305,
};
use pezkuwi_subxt_core::utils::AccountId32;
use serde::Deserialize;
@@ -86,11 +86,11 @@ impl KeyringPairJson {
fn decrypt(self, password: &str) -> Result<sr25519::Keypair, Error> {
// Check encoding.
// https://github.com/pezkuwi-js/common/blob/37fa211fdb141d4f6eb32e8f377a4651ed2d9068/packages/keyring/src/keyring.ts#L166
if self.encoding.version != "3" ||
!self.encoding.content.contains(&"pkcs8".to_owned()) ||
!self.encoding.content.contains(&"sr25519".to_owned()) ||
!self.encoding.r#type.contains(&"scrypt".to_owned()) ||
!self.encoding.r#type.contains(&"xsalsa20-poly1305".to_owned())
if self.encoding.version != "3"
|| !self.encoding.content.contains(&"pkcs8".to_owned())
|| !self.encoding.content.contains(&"sr25519".to_owned())
|| !self.encoding.r#type.contains(&"scrypt".to_owned())
|| !self.encoding.r#type.contains(&"xsalsa20-poly1305".to_owned())
{
return Err(Error::UnsupportedEncoding);
}
@@ -139,8 +139,8 @@ impl KeyringPairJson {
let div = &plaintext[80..85];
let public_key = &plaintext[85..117];
if header != [48, 83, 2, 1, 1, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32] ||
div != [161, 35, 3, 33, 0]
if header != [48, 83, 2, 1, 1, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]
|| div != [161, 35, 3, 33, 0]
{
return Err(Error::InvalidKeys);
}
@@ -149,8 +149,8 @@ impl KeyringPairJson {
let keypair = sr25519::Keypair::from_ed25519_bytes(secret_key)?;
// Ensure keys are correct.
if keypair.public_key().0 != public_key ||
keypair.public_key().to_account_id() != self.address
if keypair.public_key().0 != public_key
|| keypair.public_key().to_account_id() != self.address
{
return Err(Error::InvalidKeys);
}
+3 -3
View File
@@ -10,12 +10,12 @@
use core::str::FromStr;
use crate::crypto::{DeriveJunction, SecretUri, seed_from_entropy};
use crate::crypto::{seed_from_entropy, DeriveJunction, SecretUri};
use hex::FromHex;
use schnorrkel::{
ExpansionMode, MiniSecretKey,
derive::{ChainCode, Derivation},
ExpansionMode, MiniSecretKey,
};
use secrecy::ExposeSecret;
@@ -283,9 +283,9 @@ mod subxt_compat {
use super::*;
use pezkuwi_subxt_core::{
Config,
tx::signer::Signer as SignerT,
utils::{AccountId32, MultiAddress, MultiSignature},
Config,
};
impl From<Signature> for MultiSignature {
@@ -6,8 +6,8 @@
#![allow(missing_docs, unused)]
use sp_core::{Pair as _, sr25519};
use pezkuwi_subxt::{Config, OnlineClient, PezkuwiConfig, config::bizinikiwi::MultiAddress};
use pezkuwi_subxt::{config::bizinikiwi::MultiAddress, Config, OnlineClient, PezkuwiConfig};
use sp_core::{sr25519, Pair as _};
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
@@ -16,14 +16,14 @@ pub mod pezkuwi {}
/// and that PezkuwiConfig is the runtime configuration.
mod pair_signer {
use super::*;
use sp_runtime::{
MultiSignature as SpMultiSignature,
traits::{IdentifyAccount, Verify},
};
use pezkuwi_subxt::{
config::bizinikiwi::{AccountId32, MultiSignature},
tx::Signer,
};
use sp_runtime::{
traits::{IdentifyAccount, Verify},
MultiSignature as SpMultiSignature,
};
/// A [`Signer`] implementation for [`sp_core::sr25519::Pair`].
#[derive(Clone)]
@@ -1,7 +1,7 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
utils::{AccountId32, MultiAddress},
OnlineClient, PezkuwiConfig,
};
use codec::Decode;
@@ -55,5 +55,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
fn display_address(addr: &MultiAddress<AccountId32, ()>) -> String {
if let MultiAddress::Id(id32) = addr { format!("{id32}") } else { "MultiAddress::...".into() }
if let MultiAddress::Id(id32) = addr {
format!("{id32}")
} else {
"MultiAddress::...".into()
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig, dynamic::Value};
use pezkuwi_subxt::{dynamic::Value, OnlineClient, PezkuwiConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use futures::StreamExt;
use pezkuwi_subxt::{PezkuwiConfig, client::OnlineClient, lightclient::LightClient};
use pezkuwi_subxt::{client::OnlineClient, lightclient::LightClient, PezkuwiConfig};
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
@@ -1,11 +1,11 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{
PezkuwiConfig,
client::OnlineClient,
lightclient::{ChainConfig, LightClient},
utils::fetch_chainspec_from_rpc_node,
PezkuwiConfig,
};
use pezkuwi_subxt_signer::sr25519::dev;
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
+2 -2
View File
@@ -1,10 +1,10 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
backend::{legacy::LegacyRpcMethods, rpc::RpcClient},
config::DefaultExtrinsicParamsBuilder as Params,
OnlineClient, PezkuwiConfig,
};
use pezkuwi_subxt_signer::sr25519::dev;
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{config::PezkuwiConfig, utils::AccountId32, OnlineClient};
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, config::PezkuwiConfig, utils::AccountId32};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -13,8 +13,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// but since we know the input + return types we can pass them directly.
// There is one input argument, so the inputs are a tuple of one element.
let account: AccountId32 = dev::alice().public_key().into();
let runtime_api_call =
pezkuwi_subxt::dynamic::runtime_api_call::<_, u64>("AccountNonceApi", "account_nonce", (account,));
let runtime_api_call = pezkuwi_subxt::dynamic::runtime_api_call::<_, u64>(
"AccountNonceApi",
"account_nonce",
(account,),
);
// Submit the call to get back a result.
let nonce = api.runtime_api().at_latest().await?.call(runtime_api_call).await?;
+1 -1
View File
@@ -1,10 +1,10 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
ext::{
codec::{Compact, Decode},
frame_metadata::RuntimeMetadataPrefixed,
},
OnlineClient, PezkuwiConfig,
};
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{config::PezkuwiConfig, OnlineClient};
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, config::PezkuwiConfig};
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
@@ -1,13 +1,13 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{
backend::rpc::{RawRpcFuture, RawRpcSubscription, RawValue, RpcClient, RpcClientT},
OnlineClient, PezkuwiConfig,
};
use std::{
fmt::Write,
pin::Pin,
sync::{Arc, Mutex},
};
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
backend::rpc::{RawRpcFuture, RawRpcSubscription, RawValue, RpcClient, RpcClientT},
};
// A dummy RPC client that doesn't actually handle requests properly
// at all, but instead just logs what requests to it were made.
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{
OfflineClient, config::PezkuwiConfig, ext::codec::Decode, metadata::Metadata, utils::H256,
config::PezkuwiConfig, ext::codec::Decode, metadata::Metadata, utils::H256, OfflineClient,
};
#[tokio::main]
@@ -1,8 +1,8 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::config::{
Config, DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder, PezkuwiConfig, BizinikiwConfig,
BizinikiwConfig, Config, DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder, PezkuwiConfig,
};
use pezkuwi_subxt_signer::sr25519::dev;
#[pezkuwi_subxt::subxt(
runtime_metadata_path = "../artifacts/pezkuwi_metadata_full.scale",
+3 -3
View File
@@ -1,13 +1,13 @@
#![allow(missing_docs)]
use codec::Encode;
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{
client::ClientState,
config::{
Config, ExtrinsicParams, ExtrinsicParamsEncoder, ExtrinsicParamsError, HashFor,
transaction_extensions::Params,
transaction_extensions::Params, Config, ExtrinsicParams, ExtrinsicParamsEncoder,
ExtrinsicParamsError, HashFor,
},
};
use pezkuwi_subxt_signer::sr25519::dev;
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_full.scale")]
pub mod runtime {}
@@ -1,15 +1,15 @@
#![allow(missing_docs)]
use codec::Encode;
use pezkuwi_subxt_signer::sr25519::dev;
use scale_encode::EncodeAsType;
use scale_info::PortableRegistry;
use pezkuwi_subxt::{
client::ClientState,
config::{
Config, DefaultExtrinsicParamsBuilder, ExtrinsicParams, ExtrinsicParamsEncoder,
ExtrinsicParamsError, transaction_extensions,
transaction_extensions, Config, DefaultExtrinsicParamsBuilder, ExtrinsicParams,
ExtrinsicParamsEncoder, ExtrinsicParamsError,
},
};
use pezkuwi_subxt_signer::sr25519::dev;
use scale_encode::EncodeAsType;
use scale_info::PortableRegistry;
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod runtime {}
@@ -10,8 +10,8 @@ use std::time::Duration;
use futures::StreamExt;
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
backend::rpc::reconnecting_rpc_client::{ExponentialBackoff, RpcClient},
OnlineClient, PezkuwiConfig,
};
// Generate an interface that we can use from the node's metadata.
@@ -4,11 +4,11 @@
use futures::StreamExt;
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
backend::{
chain_head::{ChainHeadBackend, ChainHeadBackendBuilder},
rpc::RpcClient,
},
OnlineClient, PezkuwiConfig,
};
// Generate an interface that we can use from the node's metadata.
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_signer::sr25519::dev;
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
@@ -1,10 +1,10 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
dynamic::{At, Value},
utils::AccountId32,
OnlineClient, PezkuwiConfig,
};
use pezkuwi_subxt_signer::sr25519::dev;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -16,7 +16,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// to access a value; an AccountId32. In this example we don't know the
// return type and so we set it to `Value`, which anything can decode into.
let account: AccountId32 = dev::alice().public_key().into();
let storage_query = pezkuwi_subxt::dynamic::storage::<(AccountId32,), Value>("System", "Account");
let storage_query =
pezkuwi_subxt::dynamic::storage::<(AccountId32,), Value>("System", "Account");
// Use that query to access a storage entry, fetch a result and decode the value.
let client_at = api.storage().at_latest().await?;
+1 -1
View File
@@ -1,5 +1,5 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig, ext::futures::StreamExt};
use pezkuwi_subxt::{ext::futures::StreamExt, OnlineClient, PezkuwiConfig};
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
@@ -1,9 +1,9 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig,
dynamic::{At, Value},
ext::futures::StreamExt,
utils::AccountId32,
OnlineClient, PezkuwiConfig,
};
#[tokio::main]
@@ -15,7 +15,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// here, we assume that there is one value to provide at this entry
// to access a value; an AccountId32. In this example we don't know the
// return type and so we set it to `Value`, which anything can decode into.
let storage_query = pezkuwi_subxt::dynamic::storage::<(AccountId32,), Value>("System", "Account");
let storage_query =
pezkuwi_subxt::dynamic::storage::<(AccountId32,), Value>("System", "Account");
// Use that query to access a storage entry, iterate over it and decode values.
let client_at = api.storage().at_latest().await?;
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_signer::sr25519::dev;
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
+6 -4
View File
@@ -5,9 +5,9 @@
#![allow(missing_docs)]
use pezkuwi_subxt_core::utils::AccountId20;
use pezkuwi_subxt_signer::eth::{Signature, dev};
use pezkuwi_subxt::OnlineClient;
use pezkuwi_subxt_core::utils::AccountId20;
use pezkuwi_subxt_signer::eth::{dev, Signature};
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/frontier_metadata_small.scale")]
mod eth_runtime {}
@@ -19,8 +19,10 @@ impl pezkuwi_subxt::Config for EthRuntimeConfig {
type Address = AccountId20;
type Signature = Signature;
type Hasher = pezkuwi_subxt::config::bizinikiwi::BlakeTwo256;
type Header =
pezkuwi_subxt::config::bizinikiwi::BizinikiwiHeader<u32, pezkuwi_subxt::config::bizinikiwi::BlakeTwo256>;
type Header = pezkuwi_subxt::config::bizinikiwi::BizinikiwiHeader<
u32,
pezkuwi_subxt::config::bizinikiwi::BlakeTwo256,
>;
type ExtrinsicParams = pezkuwi_subxt::config::BizinikiwiExtrinsicParams<Self>;
type AssetId = u32;
}
+2 -2
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_signer::sr25519::dev;
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
@@ -36,7 +36,7 @@ fn remark() -> Box<dyn pezkuwi_subxt::tx::Payload> {
}
fn dynamic_remark() -> Box<dyn pezkuwi_subxt::tx::Payload> {
use pezkuwi_subxt::dynamic::{Value, tx};
use pezkuwi_subxt::dynamic::{tx, Value};
let tx_payload = tx("System", "remark", vec![Value::from_bytes("Hello")]);
Box::new(tx_payload)
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_signer::sr25519::dev;
type BoxedError = Box<dyn std::error::Error + Send + Sync + 'static>;
+1 -1
View File
@@ -1,6 +1,6 @@
#![allow(missing_docs)]
use pezkuwi_subxt::{tx::TxStatus, OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig, tx::TxStatus};
// Generate an interface that we can use from the node's metadata.
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
+2 -2
View File
@@ -1,8 +1,8 @@
#![allow(missing_docs)]
use pezkuwi_subxt_signer::sr25519::dev;
use pezkuwi_subxt::{
OnlineClient, PezkuwiConfig, config::pezkuwi::PezkuwiExtrinsicParamsBuilder as Params,
config::pezkuwi::PezkuwiExtrinsicParamsBuilder as Params, OnlineClient, PezkuwiConfig,
};
use pezkuwi_subxt_signer::sr25519::dev;
#[pezkuwi_subxt::subxt(runtime_metadata_path = "../artifacts/pezkuwi_metadata_small.scale")]
pub mod pezkuwi {}
@@ -227,8 +227,8 @@ pub(super) mod test_utils {
BestBlockChanged, Finalized, Initialized, NewBlock,
};
use std::sync::{
Arc,
atomic::{AtomicUsize, Ordering},
Arc,
};
/// Given some events, returns a follow stream getter that we can use in
@@ -297,10 +297,12 @@ impl<H: Hash> Shared<H> {
.collect();
shared.block_events_for_new_subscriptions.retain(|ev| match ev {
FollowEvent::NewBlock(new_block_ev) =>
!to_remove.contains(&new_block_ev.block_hash.hash()),
FollowEvent::BestBlockChanged(best_block_ev) =>
!to_remove.contains(&best_block_ev.best_block_hash.hash()),
FollowEvent::NewBlock(new_block_ev) => {
!to_remove.contains(&new_block_ev.block_hash.hash())
},
FollowEvent::BestBlockChanged(best_block_ev) => {
!to_remove.contains(&best_block_ev.best_block_hash.hash())
},
_ => true,
});
},
@@ -2,7 +2,7 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
use super::{ChainHeadRpcMethods, follow_stream::FollowStream};
use super::{follow_stream::FollowStream, ChainHeadRpcMethods};
use crate::{
config::{Config, Hash, HashFor},
error::BackendError,
@@ -229,20 +229,27 @@ impl<H: Hash> Stream for FollowStreamUnpin<H> {
FollowStreamMsg::Event(FollowEvent::Stop)
},
// These events aren't interesting; we just forward them on:
FollowStreamMsg::Event(FollowEvent::OperationBodyDone(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationBodyDone(details)),
FollowStreamMsg::Event(FollowEvent::OperationCallDone(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationCallDone(details)),
FollowStreamMsg::Event(FollowEvent::OperationStorageItems(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationStorageItems(details)),
FollowStreamMsg::Event(FollowEvent::OperationWaitingForContinue(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationWaitingForContinue(details)),
FollowStreamMsg::Event(FollowEvent::OperationStorageDone(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationStorageDone(details)),
FollowStreamMsg::Event(FollowEvent::OperationInaccessible(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationInaccessible(details)),
FollowStreamMsg::Event(FollowEvent::OperationError(details)) =>
FollowStreamMsg::Event(FollowEvent::OperationError(details)),
FollowStreamMsg::Event(FollowEvent::OperationBodyDone(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationBodyDone(details))
},
FollowStreamMsg::Event(FollowEvent::OperationCallDone(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationCallDone(details))
},
FollowStreamMsg::Event(FollowEvent::OperationStorageItems(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationStorageItems(details))
},
FollowStreamMsg::Event(FollowEvent::OperationWaitingForContinue(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationWaitingForContinue(details))
},
FollowStreamMsg::Event(FollowEvent::OperationStorageDone(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationStorageDone(details))
},
FollowStreamMsg::Event(FollowEvent::OperationInaccessible(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationInaccessible(details))
},
FollowStreamMsg::Event(FollowEvent::OperationError(details)) => {
FollowStreamMsg::Event(FollowEvent::OperationError(details))
},
};
// Return our event.
@@ -352,8 +359,8 @@ impl<H: Hash> FollowStreamUnpin<H> {
let mut blocks_to_unpin = vec![];
for (hash, details) in &self.pinned {
if rel_block_age.saturating_sub(details.rel_block_age) >= self.max_block_life ||
(unpin_flags.contains(hash) && details.can_be_unpinned)
if rel_block_age.saturating_sub(details.rel_block_age) >= self.max_block_life
|| (unpin_flags.contains(hash) && details.can_be_unpinned)
{
// The block is too old, or it's been flagged to be unpinned and won't be in a
// future backend event, so we can unpin it for real now.
@@ -460,7 +467,7 @@ impl<H: Hash> Drop for BlockRef<H> {
#[cfg(test)]
pub(super) mod test_utils {
use super::{
super::follow_stream::{FollowStream, test_utils::test_stream_getter},
super::follow_stream::{test_utils::test_stream_getter, FollowStream},
*,
};
use crate::config::bizinikiwi::H256;
+37 -26
View File
@@ -19,21 +19,21 @@ mod storage_items;
use self::follow_stream_driver::FollowStreamFinalizedHeads;
use crate::{
backend::{
Backend, BlockRef, BlockRefT, RuntimeVersion, StorageResponse, StreamOf, StreamOfResults,
TransactionStatus, utils::retry,
utils::retry, Backend, BlockRef, BlockRefT, RuntimeVersion, StorageResponse, StreamOf,
StreamOfResults, TransactionStatus,
},
config::{Config, Hash, HashFor},
error::{BackendError, RpcError},
};
use async_trait::async_trait;
use follow_stream_driver::{FollowStreamDriver, FollowStreamDriverHandle};
use futures::{Stream, StreamExt, future::Either};
use futures::{future::Either, Stream, StreamExt};
use pezkuwi_subxt_rpcs::{
RpcClient,
methods::chain_head::{
FollowEvent, MethodResponse, RuntimeEvent, StorageQuery, StorageQueryType,
StorageResultType,
},
RpcClient,
};
use std::{collections::HashMap, task::Poll};
use storage_items::StorageItems;
@@ -432,8 +432,9 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for ChainHeadBackend<T> {
.events()
.filter_map(|ev| {
let out = match ev {
FollowEvent::Initialized(init) =>
init.finalized_block_hashes.last().map(|b| b.clone().into()),
FollowEvent::Initialized(init) => {
init.finalized_block_hashes.last().map(|b| b.clone().into())
},
_ => None,
};
std::future::ready(out)
@@ -597,22 +598,28 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for ChainHeadBackend<T> {
match tx_status {
RpcTransactionStatus::Validated => TransactionStatus::Validated,
RpcTransactionStatus::Broadcasted => TransactionStatus::Broadcasted,
RpcTransactionStatus::BestChainBlockIncluded { block: None } =>
TransactionStatus::NoLongerInBestBlock,
RpcTransactionStatus::BestChainBlockIncluded { block: Some(block) } =>
RpcTransactionStatus::BestChainBlockIncluded { block: None } => {
TransactionStatus::NoLongerInBestBlock
},
RpcTransactionStatus::BestChainBlockIncluded { block: Some(block) } => {
TransactionStatus::InBestBlock {
hash: BlockRef::from_hash(block.hash),
},
RpcTransactionStatus::Finalized { block } =>
}
},
RpcTransactionStatus::Finalized { block } => {
TransactionStatus::InFinalizedBlock {
hash: BlockRef::from_hash(block.hash),
},
RpcTransactionStatus::Error { error } =>
TransactionStatus::Error { message: error },
RpcTransactionStatus::Invalid { error } =>
TransactionStatus::Invalid { message: error },
RpcTransactionStatus::Dropped { error } =>
TransactionStatus::Dropped { message: error },
}
},
RpcTransactionStatus::Error { error } => {
TransactionStatus::Error { message: error }
},
RpcTransactionStatus::Invalid { error } => {
TransactionStatus::Invalid { message: error }
},
RpcTransactionStatus::Dropped { error } => {
TransactionStatus::Dropped { message: error }
},
}
})
.map_err(Into::into)
@@ -782,15 +789,19 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for ChainHeadBackend<T> {
};
TransactionStatus::InBestBlock { hash: block_ref }
},
RpcTransactionStatus::BestChainBlockIncluded { block: None } =>
TransactionStatus::NoLongerInBestBlock,
RpcTransactionStatus::BestChainBlockIncluded { block: None } => {
TransactionStatus::NoLongerInBestBlock
},
RpcTransactionStatus::Broadcasted => TransactionStatus::Broadcasted,
RpcTransactionStatus::Dropped { error, .. } =>
TransactionStatus::Dropped { message: error },
RpcTransactionStatus::Error { error } =>
TransactionStatus::Error { message: error },
RpcTransactionStatus::Invalid { error } =>
TransactionStatus::Invalid { message: error },
RpcTransactionStatus::Dropped { error, .. } => {
TransactionStatus::Dropped { message: error }
},
RpcTransactionStatus::Error { error } => {
TransactionStatus::Error { message: error }
},
RpcTransactionStatus::Invalid { error } => {
TransactionStatus::Invalid { message: error }
},
RpcTransactionStatus::Validated => TransactionStatus::Validated,
};
return Poll::Ready(Some(Ok(tx_progress_ev)));
+10 -10
View File
@@ -8,15 +8,15 @@
use self::rpc_methods::TransactionStatus as RpcTransactionStatus;
use crate::{
backend::{
utils::{retry, retry_stream},
Backend, BlockRef, RuntimeVersion, StorageResponse, StreamOf, StreamOfResults,
TransactionStatus,
utils::{retry, retry_stream},
},
config::{Config, HashFor, Header},
error::BackendError,
};
use async_trait::async_trait;
use futures::{Future, FutureExt, Stream, StreamExt, TryStreamExt, future, future::Either, stream};
use futures::{future, future::Either, stream, Future, FutureExt, Stream, StreamExt, TryStreamExt};
use pezkuwi_subxt_rpcs::RpcClient;
use std::{
collections::VecDeque,
@@ -360,10 +360,10 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for LegacyBackend<T> {
let sub = self.methods.author_submit_and_watch_extrinsic(extrinsic).await?;
let sub = sub.filter_map(|r| {
let mapped = r
.map_err(|e| e.into())
.map(|tx| {
match tx {
let mapped =
r.map_err(|e| e.into())
.map(|tx| {
match tx {
// We ignore these because they don't map nicely to the new API. They don't
// signal "end states" so this should be fine.
RpcTransactionStatus::Future => None,
@@ -394,8 +394,8 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for LegacyBackend<T> {
.into(),
}),
}
})
.transpose();
})
.transpose();
future::ready(mapped)
});
@@ -504,8 +504,8 @@ impl<T: Config> Stream for StorageFetchDescendantKeysStream<T> {
match keys {
Ok(mut keys) => {
if this.pagination_start_key.is_some() &&
keys.first() == this.pagination_start_key.as_ref()
if this.pagination_start_key.is_some()
&& keys.first() == this.pagination_start_key.as_ref()
{
// Currently, Smoldot returns the "start key" as the first key in the
// input (see https://github.com/smol-dot/smoldot/issues/1692), whereas Bizinikiwi doesn't.

Some files were not shown because too many files have changed in this diff Show More