chore: update crates.io publish plan and fix dependencies
- Update CRATES_PUBLISH_PLAN.md with Level 0-2 completion status - Fix binary-merkle-tree and related dependencies - Add runtime_logger_tests.rs - Update various Cargo.toml files
This commit is contained in:
Generated
+50
-46
@@ -1913,18 +1913,6 @@ version = "1.8.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a"
|
checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "binary-merkle-tree"
|
|
||||||
version = "13.0.0"
|
|
||||||
dependencies = [
|
|
||||||
"array-bytes 6.2.3",
|
|
||||||
"hash-db",
|
|
||||||
"log",
|
|
||||||
"parity-scale-codec",
|
|
||||||
"pezsp-core",
|
|
||||||
"pezsp-runtime",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
version = "1.3.3"
|
version = "1.3.3"
|
||||||
@@ -2308,6 +2296,7 @@ dependencies = [
|
|||||||
"pezsp-consensus",
|
"pezsp-consensus",
|
||||||
"pezsp-core",
|
"pezsp-core",
|
||||||
"pezsp-runtime",
|
"pezsp-runtime",
|
||||||
|
"pezsp-tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2606,8 +2595,8 @@ dependencies = [
|
|||||||
name = "bp-beefy"
|
name = "bp-beefy"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"binary-merkle-tree",
|
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezbp-runtime",
|
"pezbp-runtime",
|
||||||
"pezframe-support",
|
"pezframe-support",
|
||||||
"pezpallet-beefy-mmr",
|
"pezpallet-beefy-mmr",
|
||||||
@@ -9966,6 +9955,17 @@ dependencies = [
|
|||||||
"indexmap 2.12.1",
|
"indexmap 2.12.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pez-binary-merkle-tree"
|
||||||
|
version = "14.0.1"
|
||||||
|
dependencies = [
|
||||||
|
"array-bytes 6.2.3",
|
||||||
|
"hash-db",
|
||||||
|
"log",
|
||||||
|
"parity-scale-codec",
|
||||||
|
"pezsp-core",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pez-chain-spec-guide-runtime"
|
name = "pez-chain-spec-guide-runtime"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
@@ -12129,7 +12129,6 @@ dependencies = [
|
|||||||
"Inflector",
|
"Inflector",
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
"array-bytes 6.2.3",
|
"array-bytes 6.2.3",
|
||||||
"binary-merkle-tree",
|
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"docify",
|
"docify",
|
||||||
"environmental",
|
"environmental",
|
||||||
@@ -12140,6 +12139,7 @@ dependencies = [
|
|||||||
"macro_magic",
|
"macro_magic",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"paste",
|
"paste",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezframe-support-procedural",
|
"pezframe-support-procedural",
|
||||||
"pezframe-system",
|
"pezframe-system",
|
||||||
"pezsp-api",
|
"pezsp-api",
|
||||||
@@ -13610,7 +13610,6 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"asset-test-pezutils",
|
"asset-test-pezutils",
|
||||||
"assets-common",
|
"assets-common",
|
||||||
"binary-merkle-tree",
|
|
||||||
"bizinikiwi-bip39",
|
"bizinikiwi-bip39",
|
||||||
"bizinikiwi-build-script-utils",
|
"bizinikiwi-build-script-utils",
|
||||||
"bizinikiwi-frame-rpc-support",
|
"bizinikiwi-frame-rpc-support",
|
||||||
@@ -13630,6 +13629,7 @@ dependencies = [
|
|||||||
"bp-xcm-bridge-hub-router",
|
"bp-xcm-bridge-hub-router",
|
||||||
"bridge-hub-common",
|
"bridge-hub-common",
|
||||||
"frame-remote-externalities",
|
"frame-remote-externalities",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pez-ethereum-standards",
|
"pez-ethereum-standards",
|
||||||
"pez-fork-tree",
|
"pez-fork-tree",
|
||||||
"pez-generate-bags",
|
"pez-generate-bags",
|
||||||
@@ -13734,7 +13734,6 @@ dependencies = [
|
|||||||
"pezkuwi-runtime-teyrchains",
|
"pezkuwi-runtime-teyrchains",
|
||||||
"pezkuwi-sdk-frame",
|
"pezkuwi-sdk-frame",
|
||||||
"pezkuwi-service",
|
"pezkuwi-service",
|
||||||
"pezkuwi-ss58-registry",
|
|
||||||
"pezkuwi-statement-distribution",
|
"pezkuwi-statement-distribution",
|
||||||
"pezkuwi-statement-table",
|
"pezkuwi-statement-table",
|
||||||
"pezkuwi-subxt",
|
"pezkuwi-subxt",
|
||||||
@@ -13969,6 +13968,7 @@ dependencies = [
|
|||||||
"pezsp-runtime-interface",
|
"pezsp-runtime-interface",
|
||||||
"pezsp-runtime-interface-proc-macro",
|
"pezsp-runtime-interface-proc-macro",
|
||||||
"pezsp-session",
|
"pezsp-session",
|
||||||
|
"pezsp-ss58-registry 1.52.0",
|
||||||
"pezsp-staking",
|
"pezsp-staking",
|
||||||
"pezsp-state-machine",
|
"pezsp-state-machine",
|
||||||
"pezsp-statement-store",
|
"pezsp-statement-store",
|
||||||
@@ -14279,19 +14279,6 @@ dependencies = [
|
|||||||
"zagros-runtime-constants",
|
"zagros-runtime-constants",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pezkuwi-ss58-registry"
|
|
||||||
version = "1.51.0"
|
|
||||||
dependencies = [
|
|
||||||
"Inflector",
|
|
||||||
"num-format",
|
|
||||||
"proc-macro2 1.0.103",
|
|
||||||
"quote 1.0.42",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"unicode-xid 0.2.6",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pezkuwi-statement-distribution"
|
name = "pezkuwi-statement-distribution"
|
||||||
version = "7.0.0"
|
version = "7.0.0"
|
||||||
@@ -14909,13 +14896,13 @@ dependencies = [
|
|||||||
name = "pezkuwichain-runtime"
|
name = "pezkuwichain-runtime"
|
||||||
version = "7.0.0"
|
version = "7.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"binary-merkle-tree",
|
|
||||||
"bitvec",
|
"bitvec",
|
||||||
"bizinikiwi-wasm-builder",
|
"bizinikiwi-wasm-builder",
|
||||||
"frame-remote-externalities",
|
"frame-remote-externalities",
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezframe-benchmarking",
|
"pezframe-benchmarking",
|
||||||
"pezframe-election-provider-support",
|
"pezframe-election-provider-support",
|
||||||
"pezframe-executive",
|
"pezframe-executive",
|
||||||
@@ -15562,9 +15549,9 @@ name = "pezpallet-beefy-mmr"
|
|||||||
version = "28.0.0"
|
version = "28.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes 6.2.3",
|
"array-bytes 6.2.3",
|
||||||
"binary-merkle-tree",
|
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezframe-benchmarking",
|
"pezframe-benchmarking",
|
||||||
"pezframe-support",
|
"pezframe-support",
|
||||||
"pezframe-system",
|
"pezframe-system",
|
||||||
@@ -17566,13 +17553,13 @@ name = "pezpallet-staking-async-rc-runtime"
|
|||||||
version = "7.0.0"
|
version = "7.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"binary-merkle-tree",
|
|
||||||
"bitvec",
|
"bitvec",
|
||||||
"bizinikiwi-wasm-builder",
|
"bizinikiwi-wasm-builder",
|
||||||
"frame-remote-externalities",
|
"frame-remote-externalities",
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezframe-benchmarking",
|
"pezframe-benchmarking",
|
||||||
"pezframe-election-provider-support",
|
"pezframe-election-provider-support",
|
||||||
"pezframe-executive",
|
"pezframe-executive",
|
||||||
@@ -20395,7 +20382,6 @@ dependencies = [
|
|||||||
"pezsp-runtime",
|
"pezsp-runtime",
|
||||||
"pezsp-runtime-interface",
|
"pezsp-runtime-interface",
|
||||||
"pezsp-state-machine",
|
"pezsp-state-machine",
|
||||||
"pezsp-test-primitives",
|
|
||||||
"pezsp-trie",
|
"pezsp-trie",
|
||||||
"pezsp-version",
|
"pezsp-version",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -20673,10 +20659,10 @@ dependencies = [
|
|||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"parking_lot 0.12.5",
|
"parking_lot 0.12.5",
|
||||||
"paste",
|
"paste",
|
||||||
"pezkuwi-ss58-registry",
|
|
||||||
"pezsp-crypto-hashing",
|
"pezsp-crypto-hashing",
|
||||||
"pezsp-debug-derive",
|
"pezsp-debug-derive",
|
||||||
"pezsp-externalities",
|
"pezsp-externalities",
|
||||||
|
"pezsp-ss58-registry 1.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pezsp-std",
|
"pezsp-std",
|
||||||
"pezsp-storage",
|
"pezsp-storage",
|
||||||
"primitive-types 0.13.1",
|
"primitive-types 0.13.1",
|
||||||
@@ -20745,7 +20731,6 @@ dependencies = [
|
|||||||
"byteorder",
|
"byteorder",
|
||||||
"criterion",
|
"criterion",
|
||||||
"digest 0.10.7",
|
"digest 0.10.7",
|
||||||
"pezsp-crypto-hashing-proc-macro",
|
|
||||||
"sha2 0.10.9",
|
"sha2 0.10.9",
|
||||||
"sha3",
|
"sha3",
|
||||||
"twox-hash 1.6.3",
|
"twox-hash 1.6.3",
|
||||||
@@ -20902,7 +20887,6 @@ dependencies = [
|
|||||||
name = "pezsp-npos-elections"
|
name = "pezsp-npos-elections"
|
||||||
version = "26.0.0"
|
version = "26.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bizinikiwi-test-utils",
|
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"pezsp-arithmetic",
|
"pezsp-arithmetic",
|
||||||
"pezsp-core",
|
"pezsp-core",
|
||||||
@@ -20953,8 +20937,6 @@ dependencies = [
|
|||||||
name = "pezsp-runtime"
|
name = "pezsp-runtime"
|
||||||
version = "31.0.1"
|
version = "31.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"binary-merkle-tree",
|
|
||||||
"bizinikiwi-test-runtime-client",
|
|
||||||
"bytes",
|
"bytes",
|
||||||
"docify",
|
"docify",
|
||||||
"either",
|
"either",
|
||||||
@@ -20964,7 +20946,7 @@ dependencies = [
|
|||||||
"num-traits",
|
"num-traits",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"paste",
|
"paste",
|
||||||
"pezsp-api",
|
"pez-binary-merkle-tree",
|
||||||
"pezsp-application-crypto",
|
"pezsp-application-crypto",
|
||||||
"pezsp-arithmetic",
|
"pezsp-arithmetic",
|
||||||
"pezsp-core",
|
"pezsp-core",
|
||||||
@@ -20992,10 +20974,7 @@ dependencies = [
|
|||||||
"impl-trait-for-tuples",
|
"impl-trait-for-tuples",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"pezsp-externalities",
|
"pezsp-externalities",
|
||||||
"pezsp-io",
|
|
||||||
"pezsp-runtime-interface-proc-macro",
|
"pezsp-runtime-interface-proc-macro",
|
||||||
"pezsp-runtime-interface-test-wasm",
|
|
||||||
"pezsp-state-machine",
|
|
||||||
"pezsp-std",
|
"pezsp-std",
|
||||||
"pezsp-storage",
|
"pezsp-storage",
|
||||||
"pezsp-tracing",
|
"pezsp-tracing",
|
||||||
@@ -21068,6 +21047,34 @@ dependencies = [
|
|||||||
"scale-info",
|
"scale-info",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pezsp-ss58-registry"
|
||||||
|
version = "1.52.0"
|
||||||
|
dependencies = [
|
||||||
|
"Inflector",
|
||||||
|
"num-format",
|
||||||
|
"proc-macro2 1.0.103",
|
||||||
|
"quote 1.0.42",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"unicode-xid 0.2.6",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pezsp-ss58-registry"
|
||||||
|
version = "1.52.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1bf18f939625b28ef71ad9eb5bcfe34aaa30ab6fd38740c49b9ea1a9f36b4671"
|
||||||
|
dependencies = [
|
||||||
|
"Inflector",
|
||||||
|
"num-format",
|
||||||
|
"proc-macro2 1.0.103",
|
||||||
|
"quote 1.0.42",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"unicode-xid 0.2.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pezsp-staking"
|
name = "pezsp-staking"
|
||||||
version = "26.0.0"
|
version = "26.0.0"
|
||||||
@@ -21094,7 +21101,6 @@ dependencies = [
|
|||||||
"pezsp-core",
|
"pezsp-core",
|
||||||
"pezsp-externalities",
|
"pezsp-externalities",
|
||||||
"pezsp-panic-handler",
|
"pezsp-panic-handler",
|
||||||
"pezsp-runtime",
|
|
||||||
"pezsp-trie",
|
"pezsp-trie",
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
@@ -21203,7 +21209,6 @@ version = "29.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.12",
|
"ahash 0.8.12",
|
||||||
"array-bytes 6.2.3",
|
"array-bytes 6.2.3",
|
||||||
"bizinikiwi-prometheus-endpoint",
|
|
||||||
"criterion",
|
"criterion",
|
||||||
"foldhash 0.1.5",
|
"foldhash 0.1.5",
|
||||||
"hash-db",
|
"hash-db",
|
||||||
@@ -21214,7 +21219,6 @@ dependencies = [
|
|||||||
"parking_lot 0.12.5",
|
"parking_lot 0.12.5",
|
||||||
"pezsp-core",
|
"pezsp-core",
|
||||||
"pezsp-externalities",
|
"pezsp-externalities",
|
||||||
"pezsp-runtime",
|
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
"schnellru",
|
"schnellru",
|
||||||
@@ -28310,13 +28314,13 @@ name = "zagros-runtime"
|
|||||||
version = "7.0.0"
|
version = "7.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"binary-merkle-tree",
|
|
||||||
"bitvec",
|
"bitvec",
|
||||||
"bizinikiwi-wasm-builder",
|
"bizinikiwi-wasm-builder",
|
||||||
"frame-remote-externalities",
|
"frame-remote-externalities",
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
"pez-binary-merkle-tree",
|
||||||
"pezframe-benchmarking",
|
"pezframe-benchmarking",
|
||||||
"pezframe-election-provider-support",
|
"pezframe-election-provider-support",
|
||||||
"pezframe-executive",
|
"pezframe-executive",
|
||||||
|
|||||||
+5
-5
@@ -718,7 +718,7 @@ backoff = { version = "0.4" }
|
|||||||
backtrace = { version = "0.3.71" }
|
backtrace = { version = "0.3.71" }
|
||||||
base58 = { version = "0.2.0" }
|
base58 = { version = "0.2.0" }
|
||||||
base64 = { version = "0.22.1", default-features = false }
|
base64 = { version = "0.22.1", default-features = false }
|
||||||
binary-merkle-tree = { path = "bizinikiwi/utils/binary-merkle-tree", version = "13.0.0", default-features = false }
|
pez-binary-merkle-tree = { path = "bizinikiwi/utils/binary-merkle-tree", version = "14.0.1", default-features = false }
|
||||||
bincode = { version = "1.3.3" }
|
bincode = { version = "1.3.3" }
|
||||||
bip32 = { version = "0.5.2", default-features = false }
|
bip32 = { version = "0.5.2", default-features = false }
|
||||||
bip39 = { version = "2.2.0", default-features = false }
|
bip39 = { version = "2.2.0", default-features = false }
|
||||||
@@ -1402,8 +1402,8 @@ pezsp-tracing = { path = "bizinikiwi/primitives/tracing", version = "16.0.0", de
|
|||||||
pezsp-transaction-pool = { path = "bizinikiwi/primitives/transaction-pool", version = "26.0.0", default-features = false }
|
pezsp-transaction-pool = { path = "bizinikiwi/primitives/transaction-pool", version = "26.0.0", default-features = false }
|
||||||
pezsp-transaction-storage-proof = { path = "bizinikiwi/primitives/transaction-storage-proof", version = "26.0.0", default-features = false }
|
pezsp-transaction-storage-proof = { path = "bizinikiwi/primitives/transaction-storage-proof", version = "26.0.0", default-features = false }
|
||||||
pezsp-trie = { path = "bizinikiwi/primitives/trie", version = "29.0.0", default-features = false }
|
pezsp-trie = { path = "bizinikiwi/primitives/trie", version = "29.0.0", default-features = false }
|
||||||
pezsp-version = { path = "bizinikiwi/primitives/version", default-features = false }
|
pezsp-version = { path = "bizinikiwi/primitives/version", version = "29.0.0", default-features = false }
|
||||||
pezsp-version-proc-macro = { path = "bizinikiwi/primitives/version/proc-macro", default-features = false }
|
pezsp-version-proc-macro = { path = "bizinikiwi/primitives/version/proc-macro", version = "13.0.0", default-features = false }
|
||||||
pezsp-wasm-interface = { path = "bizinikiwi/primitives/wasm-interface", version = "20.0.0", default-features = false }
|
pezsp-wasm-interface = { path = "bizinikiwi/primitives/wasm-interface", version = "20.0.0", default-features = false }
|
||||||
pezsp-weights = { path = "bizinikiwi/primitives/weights", version = "27.0.0", default-features = false }
|
pezsp-weights = { path = "bizinikiwi/primitives/weights", version = "27.0.0", default-features = false }
|
||||||
pin-project = { version = "1.1.3" }
|
pin-project = { version = "1.1.3" }
|
||||||
@@ -1422,7 +1422,7 @@ proc-macro2 = { version = "1.0.86" }
|
|||||||
procfs = { version = "0.16.0" }
|
procfs = { version = "0.16.0" }
|
||||||
prom-metrics-parser = { package = "zombienet-prom-metrics-parser", path = "vendor/pezkuwi-zombienet-sdk/crates/prom-metrics-parser" }
|
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 = { version = "0.13.0", default-features = false }
|
||||||
prometheus-endpoint = { path = "bizinikiwi/utils/prometheus", default-features = false, package = "bizinikiwi-prometheus-endpoint" }
|
prometheus-endpoint = { path = "bizinikiwi/utils/prometheus", default-features = false, package = "bizinikiwi-prometheus-endpoint", version = "0.17.0" }
|
||||||
prometheus-parse = { version = "0.2.2" }
|
prometheus-parse = { version = "0.2.2" }
|
||||||
proptest = { version = "1" }
|
proptest = { version = "1" }
|
||||||
prost = { version = "0.12.4" }
|
prost = { version = "0.12.4" }
|
||||||
@@ -1501,7 +1501,7 @@ soketto = { version = "0.8.0" }
|
|||||||
sp-core = { version = "38.1.0" }
|
sp-core = { version = "38.1.0" }
|
||||||
spinners = { version = "4.1.1" }
|
spinners = { version = "4.1.1" }
|
||||||
sqlx = { version = "0.8.2" }
|
sqlx = { version = "0.8.2" }
|
||||||
ss58-registry = { path = "vendor/ss58-registry", package = "pezkuwi-ss58-registry", version = "1.51.0", default-features = false }
|
ss58-registry = { package = "pezsp-ss58-registry", version = "1.52.0", default-features = false }
|
||||||
ssz_rs = { version = "0.9.0", default-features = false }
|
ssz_rs = { version = "0.9.0", default-features = false }
|
||||||
ssz_rs_derive = { version = "0.9.0", default-features = false }
|
ssz_rs_derive = { version = "0.9.0", default-features = false }
|
||||||
static_assertions = { version = "1.1.0", default-features = false }
|
static_assertions = { version = "1.1.0", default-features = false }
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ workspace = true
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
array-bytes = { optional = true, workspace = true, default-features = true }
|
array-bytes = { optional = true, workspace = true, default-features = true }
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
codec = { features = ["derive"], workspace = true }
|
codec = { features = ["derive"], workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
pezframe-benchmarking = { optional = true, workspace = true }
|
pezframe-benchmarking = { optional = true, workspace = true }
|
||||||
@@ -41,7 +41,7 @@ pezsp-staking = { workspace = true, default-features = true }
|
|||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
"pezframe-benchmarking/std",
|
"pezframe-benchmarking/std",
|
||||||
@@ -71,7 +71,7 @@ try-runtime = [
|
|||||||
"pezsp-runtime/try-runtime",
|
"pezsp-runtime/try-runtime",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"pezframe-benchmarking/runtime-benchmarks",
|
"pezframe-benchmarking/runtime-benchmarks",
|
||||||
"pezframe-support/runtime-benchmarks",
|
"pezframe-support/runtime-benchmarks",
|
||||||
"pezframe-system/runtime-benchmarks",
|
"pezframe-system/runtime-benchmarks",
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ impl<T: Config> Pezpallet<T> {
|
|||||||
len,
|
len,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let keyset_commitment = binary_merkle_tree::merkle_root::<
|
let keyset_commitment = pez_binary_merkle_tree::merkle_root::<
|
||||||
<T as pezpallet_mmr::Config>::Hashing,
|
<T as pezpallet_mmr::Config>::Hashing,
|
||||||
_,
|
_,
|
||||||
>(beefy_addresses)
|
>(beefy_addresses)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ impl BeefyDataProvider<Vec<u8>> for DummyDataProvider {
|
|||||||
fn extra_data() -> Vec<u8> {
|
fn extra_data() -> Vec<u8> {
|
||||||
let mut col = vec![(15, vec![1, 2, 3]), (5, vec![4, 5, 6])];
|
let mut col = vec![(15, vec![1, 2, 3]), (5, vec![4, 5, 6])];
|
||||||
col.sort();
|
col.sort();
|
||||||
binary_merkle_tree::merkle_root::<<Test as pezpallet_mmr::Config>::Hashing, _>(
|
pez_binary_merkle_tree::merkle_root::<<Test as pezpallet_mmr::Config>::Hashing, _>(
|
||||||
col.into_iter().map(|pair| pair.encode()),
|
col.into_iter().map(|pair| pair.encode()),
|
||||||
)
|
)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ serde_derive = { optional = true, workspace = true }
|
|||||||
serde_json = { features = ["alloc"], workspace = true }
|
serde_json = { features = ["alloc"], workspace = true }
|
||||||
smallvec = { workspace = true, default-features = true }
|
smallvec = { workspace = true, default-features = true }
|
||||||
|
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
pezsp-api = { workspace = true }
|
pezsp-api = { workspace = true }
|
||||||
pezsp-application-crypto = { workspace = true }
|
pezsp-application-crypto = { workspace = true }
|
||||||
pezsp-arithmetic = { workspace = true }
|
pezsp-arithmetic = { workspace = true }
|
||||||
@@ -135,7 +135,7 @@ bizinikiwi-wasm-builder = { workspace = true, default-features = true }
|
|||||||
default = ["std"]
|
default = ["std"]
|
||||||
no_std = []
|
no_std = []
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"bitvec/std",
|
"bitvec/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
@@ -230,7 +230,7 @@ std = [
|
|||||||
"xcm/std",
|
"xcm/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
||||||
"pezframe-benchmarking/runtime-benchmarks",
|
"pezframe-benchmarking/runtime-benchmarks",
|
||||||
"pezframe-election-provider-support/runtime-benchmarks",
|
"pezframe-election-provider-support/runtime-benchmarks",
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
|||||||
fn extra_data() -> H256 {
|
fn extra_data() -> H256 {
|
||||||
let para_heads: Vec<(u32, Vec<u8>)> =
|
let para_heads: Vec<(u32, Vec<u8>)> =
|
||||||
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
||||||
binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
pez_binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||||
para_heads.into_iter().map(|pair| pair.encode()),
|
para_heads.into_iter().map(|pair| pair.encode()),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
array-bytes = { workspace = true }
|
array-bytes = { workspace = true }
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
bitflags = { workspace = true }
|
bitflags = { workspace = true }
|
||||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||||
docify = { workspace = true }
|
docify = { workspace = true }
|
||||||
@@ -63,7 +63,7 @@ pretty_assertions = { workspace = true }
|
|||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"environmental/std",
|
"environmental/std",
|
||||||
"frame-metadata/std",
|
"frame-metadata/std",
|
||||||
@@ -91,7 +91,7 @@ std = [
|
|||||||
"serde_json/std",
|
"serde_json/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"pezframe-support-procedural/runtime-benchmarks",
|
"pezframe-support-procedural/runtime-benchmarks",
|
||||||
"pezframe-system/runtime-benchmarks",
|
"pezframe-system/runtime-benchmarks",
|
||||||
"pezsp-api/runtime-benchmarks",
|
"pezsp-api/runtime-benchmarks",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ impl<H: Hasher> VerifyExistenceProof for BinaryMerkleTreeProver<H>
|
|||||||
where
|
where
|
||||||
H::Out: Decode + Encode,
|
H::Out: Decode + Encode,
|
||||||
{
|
{
|
||||||
type Proof = binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
type Proof = pez_binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||||
type Hash = H::Out;
|
type Hash = H::Out;
|
||||||
|
|
||||||
fn verify_proof(proof: Self::Proof, root: &Self::Hash) -> Result<Vec<u8>, DispatchError> {
|
fn verify_proof(proof: Self::Proof, root: &Self::Hash) -> Result<Vec<u8>, DispatchError> {
|
||||||
@@ -53,7 +53,7 @@ where
|
|||||||
return Err(TrieError::RootMismatch.into());
|
return Err(TrieError::RootMismatch.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
if binary_merkle_tree::verify_proof::<H, _, _>(
|
if pez_binary_merkle_tree::verify_proof::<H, _, _>(
|
||||||
&proof.root,
|
&proof.root,
|
||||||
proof.proof,
|
proof.proof,
|
||||||
proof.number_of_leaves,
|
proof.number_of_leaves,
|
||||||
@@ -68,7 +68,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<H: Hasher> ProofToHashes for BinaryMerkleTreeProver<H> {
|
impl<H: Hasher> ProofToHashes for BinaryMerkleTreeProver<H> {
|
||||||
type Proof = binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
type Proof = pez_binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||||
|
|
||||||
// This base 2 merkle trie includes a `proof` field which is a `Vec<Hash>`.
|
// This base 2 merkle trie includes a `proof` field which is a `Vec<Hash>`.
|
||||||
// The length of this vector tells us the depth of the proof, and how many
|
// The length of this vector tells us the depth of the proof, and how many
|
||||||
@@ -128,8 +128,8 @@ mod tests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn verify_binary_merkle_tree_prover_works() {
|
fn verify_pez_binary_merkle_tree_prover_works() {
|
||||||
let proof = binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
let proof = pez_binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||||
vec![b"hey".encode(), b"yes".encode()],
|
vec![b"hey".encode(), b"yes".encode()],
|
||||||
1,
|
1,
|
||||||
);
|
);
|
||||||
@@ -208,7 +208,7 @@ mod tests {
|
|||||||
fn proof_to_hashes_binary() {
|
fn proof_to_hashes_binary() {
|
||||||
let mut i: u32 = 1;
|
let mut i: u32 = 1;
|
||||||
while i < 10_000_000 {
|
while i < 10_000_000 {
|
||||||
let proof = binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
let proof = pez_binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||||
(0..i).map(|i| u128::from(i).encode()),
|
(0..i).map(|i| u128::from(i).encode()),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ pezsp-version = { workspace = true }
|
|||||||
scale-info = { features = ["derive"], workspace = true }
|
scale-info = { features = ["derive"], workspace = true }
|
||||||
thiserror = { optional = true, workspace = true }
|
thiserror = { optional = true, workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
pezsp-test-primitives = { workspace = true }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
@@ -50,7 +47,6 @@ std = [
|
|||||||
"pezsp-runtime-interface/std",
|
"pezsp-runtime-interface/std",
|
||||||
"pezsp-runtime/std",
|
"pezsp-runtime/std",
|
||||||
"pezsp-state-machine/std",
|
"pezsp-state-machine/std",
|
||||||
"pezsp-test-primitives/std",
|
|
||||||
"pezsp-trie/std",
|
"pezsp-trie/std",
|
||||||
"pezsp-version/std",
|
"pezsp-version/std",
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
@@ -71,7 +67,6 @@ runtime-benchmarks = [
|
|||||||
"pezsp-runtime-interface/runtime-benchmarks",
|
"pezsp-runtime-interface/runtime-benchmarks",
|
||||||
"pezsp-runtime/runtime-benchmarks",
|
"pezsp-runtime/runtime-benchmarks",
|
||||||
"pezsp-state-machine?/runtime-benchmarks",
|
"pezsp-state-machine?/runtime-benchmarks",
|
||||||
"pezsp-test-primitives/runtime-benchmarks",
|
|
||||||
"pezsp-trie?/runtime-benchmarks",
|
"pezsp-trie?/runtime-benchmarks",
|
||||||
"pezsp-version/runtime-benchmarks",
|
"pezsp-version/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ pezsp-runtime = { workspace = true }
|
|||||||
scale-info = { features = ["derive"], workspace = true }
|
scale-info = { features = ["derive"], workspace = true }
|
||||||
serde = { features = ["alloc", "derive"], optional = true, workspace = true }
|
serde = { features = ["alloc", "derive"], optional = true, workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
bizinikiwi-test-utils = { workspace = true }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
bench = []
|
bench = []
|
||||||
|
|||||||
@@ -32,9 +32,6 @@ static_assertions = { workspace = true, default-features = true }
|
|||||||
polkavm-derive = { workspace = true }
|
polkavm-derive = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pezsp-io = { workspace = true, default-features = true }
|
|
||||||
pezsp-runtime-interface-test-wasm = { workspace = true }
|
|
||||||
pezsp-state-machine = { workspace = true, default-features = true }
|
|
||||||
rustversion = { workspace = true }
|
rustversion = { workspace = true }
|
||||||
trybuild = { workspace = true }
|
trybuild = { workspace = true }
|
||||||
|
|
||||||
@@ -44,9 +41,6 @@ std = [
|
|||||||
"bytes/std",
|
"bytes/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"pezsp-externalities/std",
|
"pezsp-externalities/std",
|
||||||
"pezsp-io/std",
|
|
||||||
"pezsp-runtime-interface-test-wasm/std",
|
|
||||||
"pezsp-state-machine/std",
|
|
||||||
"pezsp-std/std",
|
"pezsp-std/std",
|
||||||
"pezsp-storage/std",
|
"pezsp-storage/std",
|
||||||
"pezsp-tracing/std",
|
"pezsp-tracing/std",
|
||||||
@@ -60,7 +54,4 @@ std = [
|
|||||||
# Disables static assertions in `impls.rs` that checks the word size. To prevent any footgun, the
|
# Disables static assertions in `impls.rs` that checks the word size. To prevent any footgun, the
|
||||||
# check is changed into a runtime check.
|
# check is changed into a runtime check.
|
||||||
disable_target_static_assertions = []
|
disable_target_static_assertions = []
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = []
|
||||||
"pezsp-io/runtime-benchmarks",
|
|
||||||
"pezsp-state-machine/runtime-benchmarks",
|
|
||||||
]
|
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ repository.workspace = true
|
|||||||
description = "Runtime Modules shared primitive types."
|
description = "Runtime Modules shared primitive types."
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
exclude = [
|
||||||
|
"docs/images/*.png",
|
||||||
|
"docs/images/*.jpg",
|
||||||
|
"docs/whitepaper/*.png",
|
||||||
|
"!docs/images/Pezkuwi_Logo_Horizontal_Pink_White.png",
|
||||||
|
"!docs/images/Pezkuwi_Logo_Horizontal_Pink_Black.png",
|
||||||
|
]
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
@@ -17,7 +24,7 @@ workspace = true
|
|||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
bytes = { workspace = true }
|
bytes = { workspace = true }
|
||||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||||
docify = { workspace = true }
|
docify = { workspace = true }
|
||||||
@@ -43,8 +50,6 @@ simple-mermaid = { workspace = true, optional = true }
|
|||||||
tuplex = { workspace = true, default-features = false }
|
tuplex = { workspace = true, default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bizinikiwi-test-runtime-client = { workspace = true }
|
|
||||||
pezsp-api = { workspace = true, default-features = true }
|
|
||||||
pezsp-state-machine = { workspace = true, default-features = true }
|
pezsp-state-machine = { workspace = true, default-features = true }
|
||||||
pezsp-tracing = { workspace = true, default-features = true }
|
pezsp-tracing = { workspace = true, default-features = true }
|
||||||
rand = { workspace = true, default-features = true }
|
rand = { workspace = true, default-features = true }
|
||||||
@@ -53,9 +58,6 @@ zstd = { workspace = true }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
|
||||||
"bizinikiwi-test-runtime-client/runtime-benchmarks",
|
|
||||||
"pezsp-api/runtime-benchmarks",
|
|
||||||
"pezsp-io/runtime-benchmarks",
|
"pezsp-io/runtime-benchmarks",
|
||||||
"pezsp-state-machine/runtime-benchmarks",
|
"pezsp-state-machine/runtime-benchmarks",
|
||||||
"pezsp-trie/runtime-benchmarks",
|
"pezsp-trie/runtime-benchmarks",
|
||||||
@@ -63,7 +65,7 @@ runtime-benchmarks = [
|
|||||||
try-runtime = []
|
try-runtime = []
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"bytes/std",
|
"bytes/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"either/std",
|
"either/std",
|
||||||
@@ -71,7 +73,6 @@ std = [
|
|||||||
"hash256-std-hasher/std",
|
"hash256-std-hasher/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
"num-traits/std",
|
"num-traits/std",
|
||||||
"pezsp-api/std",
|
|
||||||
"pezsp-application-crypto/std",
|
"pezsp-application-crypto/std",
|
||||||
"pezsp-arithmetic/std",
|
"pezsp-arithmetic/std",
|
||||||
"pezsp-core/std",
|
"pezsp-core/std",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
use super::{ProofToHashes, ProvingTrie, TrieError};
|
use super::{ProofToHashes, ProvingTrie, TrieError};
|
||||||
use crate::{Decode, DispatchError, Encode};
|
use crate::{Decode, DispatchError, Encode};
|
||||||
use alloc::{collections::BTreeMap, vec::Vec};
|
use alloc::{collections::BTreeMap, vec::Vec};
|
||||||
use binary_merkle_tree::{merkle_proof, merkle_root, MerkleProof};
|
use pez_binary_merkle_tree::{merkle_proof, merkle_root, MerkleProof};
|
||||||
use codec::MaxEncodedLen;
|
use codec::MaxEncodedLen;
|
||||||
|
|
||||||
/// A helper structure for building a basic base-2 merkle trie and creating compact proofs for that
|
/// A helper structure for building a basic base-2 merkle trie and creating compact proofs for that
|
||||||
@@ -143,7 +143,7 @@ where
|
|||||||
return Err(TrieError::ValueMismatch.into());
|
return Err(TrieError::ValueMismatch.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
if binary_merkle_tree::verify_proof::<Hashing, _, _>(
|
if pez_binary_merkle_tree::verify_proof::<Hashing, _, _>(
|
||||||
&decoded_proof.root,
|
&decoded_proof.root,
|
||||||
decoded_proof.proof,
|
decoded_proof.proof,
|
||||||
decoded_proof.number_of_leaves,
|
decoded_proof.number_of_leaves,
|
||||||
|
|||||||
@@ -62,40 +62,3 @@ impl log::Log for RuntimeLogger {
|
|||||||
|
|
||||||
fn flush(&self) {}
|
fn flush(&self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use bizinikiwi_test_runtime_client::{
|
|
||||||
runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt,
|
|
||||||
};
|
|
||||||
use pezsp_api::ProvideRuntimeApi;
|
|
||||||
use std::env;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn ensure_runtime_logger_works() {
|
|
||||||
if env::var("RUN_TEST").is_ok() {
|
|
||||||
pezsp_tracing::try_init_simple();
|
|
||||||
|
|
||||||
let client = TestClientBuilder::new().build();
|
|
||||||
let runtime_api = client.runtime_api();
|
|
||||||
runtime_api
|
|
||||||
.do_trace_log(client.chain_info().genesis_hash)
|
|
||||||
.expect("Logging should not fail");
|
|
||||||
} else {
|
|
||||||
for (level, should_print) in &[("test=trace", true), ("info", false)] {
|
|
||||||
let executable = std::env::current_exe().unwrap();
|
|
||||||
let output = std::process::Command::new(executable)
|
|
||||||
.env("RUN_TEST", "1")
|
|
||||||
.env("RUST_LOG", level)
|
|
||||||
.args(&["--nocapture", "ensure_runtime_logger_works"])
|
|
||||||
.output()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let output = String::from_utf8(output.stderr).unwrap();
|
|
||||||
assert!(output.contains("Hey I'm runtime") == *should_print);
|
|
||||||
assert!(output.contains("THIS IS TRACING") == *should_print);
|
|
||||||
assert!(output.contains("Hey, I'm tracing") == *should_print);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ trie-db = { workspace = true }
|
|||||||
arbitrary = { features = ["derive"], workspace = true }
|
arbitrary = { features = ["derive"], workspace = true }
|
||||||
array-bytes = { workspace = true, default-features = true }
|
array-bytes = { workspace = true, default-features = true }
|
||||||
assert_matches = { workspace = true }
|
assert_matches = { workspace = true }
|
||||||
pezsp-runtime = { workspace = true, default-features = true }
|
|
||||||
pretty_assertions = { workspace = true }
|
pretty_assertions = { workspace = true }
|
||||||
rand = { workspace = true, default-features = true }
|
rand = { workspace = true, default-features = true }
|
||||||
|
|
||||||
@@ -51,7 +50,6 @@ std = [
|
|||||||
"pezsp-core/std",
|
"pezsp-core/std",
|
||||||
"pezsp-externalities/std",
|
"pezsp-externalities/std",
|
||||||
"pezsp-panic-handler",
|
"pezsp-panic-handler",
|
||||||
"pezsp-runtime/std",
|
|
||||||
"pezsp-trie/std",
|
"pezsp-trie/std",
|
||||||
"rand",
|
"rand",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -59,6 +57,5 @@ std = [
|
|||||||
"trie-db/std",
|
"trie-db/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"pezsp-runtime/runtime-benchmarks",
|
|
||||||
"pezsp-trie/runtime-benchmarks",
|
"pezsp-trie/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use codec::Encode;
|
|||||||
use hash_db::Hasher;
|
use hash_db::Hasher;
|
||||||
use pezsp_core::{storage::StateVersion, traits::Externalities};
|
use pezsp_core::{storage::StateVersion, traits::Externalities};
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
use pezsp_runtime::traits::BlakeTwo256;
|
use pezsp_core::Blake2Hasher as BlakeTwo256;
|
||||||
use pezsp_trie::PrefixedMemoryDB;
|
use pezsp_trie::PrefixedMemoryDB;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use crate::backend::{AsTrieBackend, Backend};
|
use crate::backend::{AsTrieBackend, Backend};
|
||||||
use pezsp_core::storage::StateVersion;
|
use pezsp_core::storage::StateVersion;
|
||||||
use pezsp_runtime::traits::BlakeTwo256;
|
use pezsp_core::Blake2Hasher as BlakeTwo256;
|
||||||
|
|
||||||
/// Assert in memory backend with only child trie keys works as trie backend.
|
/// Assert in memory backend with only child trie keys works as trie backend.
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ mod tests {
|
|||||||
traits::{CallContext, CodeExecutor, Externalities, RuntimeCode},
|
traits::{CallContext, CodeExecutor, Externalities, RuntimeCode},
|
||||||
H256,
|
H256,
|
||||||
};
|
};
|
||||||
use pezsp_runtime::traits::BlakeTwo256;
|
use pezsp_core::Blake2Hasher as BlakeTwo256;
|
||||||
use pezsp_trie::{
|
use pezsp_trie::{
|
||||||
trie_types::{TrieDBMutBuilderV0, TrieDBMutBuilderV1},
|
trie_types::{TrieDBMutBuilderV0, TrieDBMutBuilderV1},
|
||||||
KeySpacedDBMut, PrefixedMemoryDB,
|
KeySpacedDBMut, PrefixedMemoryDB,
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ where
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use pezsp_core::{storage::ChildInfo, traits::Externalities, H256};
|
use pezsp_core::{storage::ChildInfo, traits::Externalities, H256};
|
||||||
use pezsp_runtime::traits::BlakeTwo256;
|
use pezsp_core::Blake2Hasher as BlakeTwo256;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn commit_should_work() {
|
fn commit_should_work() {
|
||||||
|
|||||||
@@ -578,7 +578,7 @@ pub mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use codec::Encode;
|
use codec::Encode;
|
||||||
use pezsp_core::H256;
|
use pezsp_core::H256;
|
||||||
use pezsp_runtime::traits::BlakeTwo256;
|
use pezsp_core::Blake2Hasher as BlakeTwo256;
|
||||||
use pezsp_trie::{
|
use pezsp_trie::{
|
||||||
cache::{CacheSize, SharedTrieCache},
|
cache::{CacheSize, SharedTrieCache},
|
||||||
trie_types::{TrieDBBuilder, TrieDBMutBuilderV0, TrieDBMutBuilderV1},
|
trie_types::{TrieDBBuilder, TrieDBMutBuilderV0, TrieDBMutBuilderV1},
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ nohash-hasher = { optional = true, workspace = true }
|
|||||||
parking_lot = { optional = true, workspace = true, default-features = true }
|
parking_lot = { optional = true, workspace = true, default-features = true }
|
||||||
pezsp-core = { workspace = true }
|
pezsp-core = { workspace = true }
|
||||||
pezsp-externalities = { workspace = true }
|
pezsp-externalities = { workspace = true }
|
||||||
prometheus-endpoint = { optional = true, workspace = true, default-features = true }
|
|
||||||
rand = { optional = true, workspace = true, default-features = true }
|
rand = { optional = true, workspace = true, default-features = true }
|
||||||
scale-info = { features = ["derive"], workspace = true }
|
scale-info = { features = ["derive"], workspace = true }
|
||||||
schnellru = { optional = true, workspace = true }
|
schnellru = { optional = true, workspace = true }
|
||||||
@@ -43,7 +42,7 @@ trie-root = { workspace = true }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
array-bytes = { workspace = true, default-features = true }
|
array-bytes = { workspace = true, default-features = true }
|
||||||
criterion = { workspace = true, default-features = true }
|
criterion = { workspace = true, default-features = true }
|
||||||
pezsp-runtime = { workspace = true, default-features = true }
|
pezsp-core = { workspace = true, default-features = true }
|
||||||
trie-bench = { workspace = true }
|
trie-bench = { workspace = true }
|
||||||
trie-standardmap = { workspace = true }
|
trie-standardmap = { workspace = true }
|
||||||
|
|
||||||
@@ -59,8 +58,6 @@ std = [
|
|||||||
"parking_lot",
|
"parking_lot",
|
||||||
"pezsp-core/std",
|
"pezsp-core/std",
|
||||||
"pezsp-externalities/std",
|
"pezsp-externalities/std",
|
||||||
"pezsp-runtime/std",
|
|
||||||
"prometheus-endpoint",
|
|
||||||
"rand",
|
"rand",
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
"schnellru",
|
"schnellru",
|
||||||
@@ -69,4 +66,4 @@ std = [
|
|||||||
"trie-db/std",
|
"trie-db/std",
|
||||||
"trie-root/std",
|
"trie-root/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = ["pezsp-runtime/runtime-benchmarks"]
|
runtime-benchmarks = []
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ criterion_main!(benches);
|
|||||||
|
|
||||||
fn benchmark(c: &mut Criterion) {
|
fn benchmark(c: &mut Criterion) {
|
||||||
trie_bench::standard_benchmark::<
|
trie_bench::standard_benchmark::<
|
||||||
pezsp_trie::LayoutV1<pezsp_runtime::traits::BlakeTwo256>,
|
pezsp_trie::LayoutV1<pezsp_core::Blake2Hasher>,
|
||||||
pezsp_trie::TrieStream,
|
pezsp_trie::TrieStream,
|
||||||
>(c, "bizinikiwi-blake2");
|
>(c, "bizinikiwi-blake2");
|
||||||
trie_bench::standard_benchmark::<
|
trie_bench::standard_benchmark::<
|
||||||
pezsp_trie::LayoutV1<pezsp_runtime::traits::BlakeTwo256>,
|
pezsp_trie::LayoutV1<pezsp_core::KeccakHasher>,
|
||||||
pezsp_trie::TrieStream,
|
pezsp_trie::TrieStream,
|
||||||
>(c, "bizinikiwi-keccak");
|
>(c, "bizinikiwi-keccak");
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-192
@@ -17,212 +17,63 @@
|
|||||||
|
|
||||||
//! Metrics for the trie cache.
|
//! Metrics for the trie cache.
|
||||||
|
|
||||||
use prometheus_endpoint::{
|
#[cfg(feature = "std")]
|
||||||
exponential_buckets,
|
pub use prometheus_impl::*;
|
||||||
prometheus::{core::Collector, HistogramTimer},
|
|
||||||
CounterVec, GaugeVec, HistogramOpts, HistogramVec, Opts, PrometheusError, Registry, U64,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Register a metric with the given registry.
|
#[cfg(feature = "std")]
|
||||||
fn register<T: Clone + Collector + 'static>(
|
mod prometheus_impl {
|
||||||
metric: T,
|
use super::TrieHitStatsSnapshot;
|
||||||
registry: &Registry,
|
|
||||||
) -> Result<T, PrometheusError> {
|
|
||||||
registry.register(Box::new(metric.clone()))?;
|
|
||||||
Ok(metric)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Metrics for the trie cache.
|
/// Metrics for the trie cache - stub implementation when prometheus is disabled.
|
||||||
/// This struct is used to track the performance of the trie cache.
|
#[derive(Clone)]
|
||||||
/// It contains histograms and counters for the shared and local caches.
|
pub struct Metrics;
|
||||||
#[derive(Clone)]
|
|
||||||
pub struct Metrics {
|
|
||||||
// The duration in seconds to update the shared trie caches from local to shared cache.
|
|
||||||
shared_update_duration: HistogramVec,
|
|
||||||
// Number of attempts hitting the shared trie caches.
|
|
||||||
shared_hits: CounterVec<U64>,
|
|
||||||
// Number of attempts to the shared trie caches.
|
|
||||||
shared_fetch_attempts: CounterVec<U64>,
|
|
||||||
// Number of attempts hitting the local trie caches.
|
|
||||||
local_hits: CounterVec<U64>,
|
|
||||||
// Number of attempts to the local caches.
|
|
||||||
local_fetch_attempts: CounterVec<U64>,
|
|
||||||
// Length of the local caches.
|
|
||||||
local_cache_lengths: HistogramVec,
|
|
||||||
// The inline size of the shared caches.
|
|
||||||
shared_cache_inline_size: GaugeVec<U64>,
|
|
||||||
// The heap size of the shared caches.
|
|
||||||
shared_cache_heap_size: GaugeVec<U64>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Metrics {
|
/// Stub registry type when prometheus is disabled.
|
||||||
/// Create a new instance of the metrics.
|
pub struct Registry;
|
||||||
pub(crate) fn register(registry: &Registry) -> Result<Self, PrometheusError> {
|
|
||||||
Ok(Self {
|
/// Stub timer type.
|
||||||
shared_update_duration: register(
|
pub struct HistogramTimer;
|
||||||
HistogramVec::new(
|
|
||||||
HistogramOpts {
|
impl Drop for HistogramTimer {
|
||||||
common_opts: Opts::new(
|
fn drop(&mut self) {}
|
||||||
"trie_cache_shared_update_duration",
|
|
||||||
"Duration in seconds to update the shared trie caches from local cache to shared cache",
|
|
||||||
),
|
|
||||||
buckets: exponential_buckets(0.001, 4.0, 9)
|
|
||||||
.expect("function parameters are constant and always valid; qed"),
|
|
||||||
},
|
|
||||||
&["cache_type"], // node or value
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
shared_hits: register(
|
|
||||||
CounterVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_shared_hits",
|
|
||||||
"Number of attempts hitting the shared trie cache",
|
|
||||||
),
|
|
||||||
&["cache_type"], // node or value
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
shared_fetch_attempts: register(
|
|
||||||
CounterVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_shared_fetch_attempts",
|
|
||||||
"Number of attempts to the shared trie cache",
|
|
||||||
),
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
local_hits: register(
|
|
||||||
CounterVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_local_hits",
|
|
||||||
"Number of attempts hitting the local trie cache",
|
|
||||||
),
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
local_fetch_attempts: register(
|
|
||||||
CounterVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_local_fetch_attempts",
|
|
||||||
"Number of attempts to the local cache",
|
|
||||||
),
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
local_cache_lengths: register(
|
|
||||||
HistogramVec::new(
|
|
||||||
HistogramOpts {
|
|
||||||
common_opts: Opts::new(
|
|
||||||
"trie_cache_local_cache_lengths",
|
|
||||||
"Histogram of length of the local cache",
|
|
||||||
),
|
|
||||||
buckets: exponential_buckets(1.0, 4.0, 9)
|
|
||||||
.expect("function parameters are constant and always valid; qed"),
|
|
||||||
},
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
shared_cache_inline_size: register(
|
|
||||||
GaugeVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_shared_cache_inline_size",
|
|
||||||
"The inline size of the shared caches",
|
|
||||||
),
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
shared_cache_heap_size: register(
|
|
||||||
GaugeVec::new(
|
|
||||||
Opts::new(
|
|
||||||
"trie_cache_shared_cache_heap_size",
|
|
||||||
"The heap size of the shared caches",
|
|
||||||
),
|
|
||||||
&["cache_type"],
|
|
||||||
)?,
|
|
||||||
registry,
|
|
||||||
)?,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Start a timer for the shared node cache update duration.
|
impl Metrics {
|
||||||
pub(crate) fn start_shared_node_update_timer(&self) -> HistogramTimer {
|
/// Create a new instance of the metrics.
|
||||||
self.shared_update_duration.with_label_values(&["node"]).start_timer()
|
pub(crate) fn register(_registry: &Registry) -> Result<Self, ()> {
|
||||||
}
|
Ok(Self)
|
||||||
|
}
|
||||||
|
|
||||||
/// Start a timer for the shared value cache update duration.
|
/// Start a timer for the shared node cache update duration.
|
||||||
pub(crate) fn start_shared_value_update_timer(&self) -> HistogramTimer {
|
pub(crate) fn start_shared_node_update_timer(&self) -> HistogramTimer {
|
||||||
self.shared_update_duration.with_label_values(&["value"]).start_timer()
|
HistogramTimer
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Observe the shared node cache length.
|
/// Start a timer for the shared value cache update duration.
|
||||||
pub(crate) fn observe_local_node_cache_length(&self, node_cache_len: usize) {
|
pub(crate) fn start_shared_value_update_timer(&self) -> HistogramTimer {
|
||||||
self.local_cache_lengths
|
HistogramTimer
|
||||||
.with_label_values(&["node"])
|
}
|
||||||
.observe(node_cache_len as f64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the shared value cache length.
|
/// Observe the shared node cache length.
|
||||||
pub(crate) fn observe_local_value_cache_length(&self, value_cache_len: usize) {
|
pub(crate) fn observe_local_node_cache_length(&self, _node_cache_len: usize) {}
|
||||||
self.local_cache_lengths
|
|
||||||
.with_label_values(&["value"])
|
|
||||||
.observe(value_cache_len as f64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the shared node cache inline size.
|
/// Observe the shared value cache length.
|
||||||
pub(crate) fn observe_node_cache_inline_size(&self, cache_size: usize) {
|
pub(crate) fn observe_local_value_cache_length(&self, _value_cache_len: usize) {}
|
||||||
self.shared_cache_inline_size
|
|
||||||
.with_label_values(&["node"])
|
|
||||||
.set(cache_size as u64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the shared value cache inline size.
|
/// Observe the shared node cache inline size.
|
||||||
pub(crate) fn observe_value_cache_inline_size(&self, cache_size: usize) {
|
pub(crate) fn observe_node_cache_inline_size(&self, _cache_size: usize) {}
|
||||||
self.shared_cache_inline_size
|
|
||||||
.with_label_values(&["value"])
|
|
||||||
.set(cache_size as u64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the shared node cache heap size.
|
/// Observe the shared value cache inline size.
|
||||||
pub(crate) fn observe_node_cache_heap_size(&self, cache_size: usize) {
|
pub(crate) fn observe_value_cache_inline_size(&self, _cache_size: usize) {}
|
||||||
self.shared_cache_heap_size.with_label_values(&["node"]).set(cache_size as u64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the shared value cache heap size.
|
/// Observe the shared node cache heap size.
|
||||||
pub(crate) fn observe_value_cache_heap_size(&self, cache_size: usize) {
|
pub(crate) fn observe_node_cache_heap_size(&self, _cache_size: usize) {}
|
||||||
self.shared_cache_heap_size.with_label_values(&["value"]).set(cache_size as u64);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Observe the hit stats from an instance of a local cache.
|
/// Observe the shared value cache heap size.
|
||||||
pub(crate) fn observe_hits_stats(&self, stats: &TrieHitStatsSnapshot) {
|
pub(crate) fn observe_value_cache_heap_size(&self, _cache_size: usize) {}
|
||||||
self.shared_hits
|
|
||||||
.with_label_values(&["node"])
|
|
||||||
.inc_by(stats.node_cache.shared_hits);
|
|
||||||
self.shared_fetch_attempts
|
|
||||||
.with_label_values(&["node"])
|
|
||||||
.inc_by(stats.node_cache.shared_fetch_attempts);
|
|
||||||
self.local_hits.with_label_values(&["node"]).inc_by(stats.node_cache.local_hits);
|
|
||||||
self.local_fetch_attempts
|
|
||||||
.with_label_values(&["node"])
|
|
||||||
.inc_by(stats.node_cache.local_fetch_attempts);
|
|
||||||
|
|
||||||
self.shared_hits
|
/// Observe the hit stats from an instance of a local cache.
|
||||||
.with_label_values(&["value"])
|
pub(crate) fn observe_hits_stats(&self, _stats: &TrieHitStatsSnapshot) {}
|
||||||
.inc_by(stats.value_cache.shared_hits);
|
|
||||||
self.shared_fetch_attempts
|
|
||||||
.with_label_values(&["value"])
|
|
||||||
.inc_by(stats.value_cache.shared_fetch_attempts);
|
|
||||||
self.local_hits
|
|
||||||
.with_label_values(&["value"])
|
|
||||||
.inc_by(stats.value_cache.local_hits);
|
|
||||||
self.local_fetch_attempts
|
|
||||||
.with_label_values(&["value"])
|
|
||||||
.inc_by(stats.value_cache.local_fetch_attempts);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ use core::{hash::Hash, time::Duration};
|
|||||||
use hash_db::Hasher;
|
use hash_db::Hasher;
|
||||||
use nohash_hasher::BuildNoHashHasher;
|
use nohash_hasher::BuildNoHashHasher;
|
||||||
use parking_lot::{Mutex, RwLock, RwLockWriteGuard};
|
use parking_lot::{Mutex, RwLock, RwLockWriteGuard};
|
||||||
use prometheus_endpoint::Registry;
|
use super::metrics::Registry;
|
||||||
use schnellru::LruMap;
|
use schnellru::LruMap;
|
||||||
use std::{
|
use std::{
|
||||||
collections::{hash_map::Entry as SetEntry, HashMap},
|
collections::{hash_map::Entry as SetEntry, HashMap},
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ pezsp-consensus = { workspace = true, default-features = true }
|
|||||||
pezsp-core = { workspace = true, default-features = true }
|
pezsp-core = { workspace = true, default-features = true }
|
||||||
pezsp-runtime = { workspace = true, default-features = true }
|
pezsp-runtime = { workspace = true, default-features = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
pezsp-tracing = { workspace = true, default-features = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
bls-experimental = ["bizinikiwi-test-runtime/bls-experimental"]
|
bls-experimental = ["bizinikiwi-test-runtime/bls-experimental"]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ pub mod trait_tests;
|
|||||||
|
|
||||||
mod block_builder_ext;
|
mod block_builder_ext;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod runtime_logger_tests;
|
||||||
|
|
||||||
pub use bizinikiwi_test_client::*;
|
pub use bizinikiwi_test_client::*;
|
||||||
pub use bizinikiwi_test_runtime as runtime;
|
pub use bizinikiwi_test_runtime as runtime;
|
||||||
pub use pezsc_consensus::LongestChain;
|
pub use pezsc_consensus::LongestChain;
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
// This file is part of Bizinikiwi.
|
||||||
|
|
||||||
|
// Copyright (C) Parity Technologies (UK) Ltd. and Dijital Kurdistan Tech Institute
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
//! Tests for runtime logger integration.
|
||||||
|
//!
|
||||||
|
//! These tests verify that logging from within the runtime works correctly
|
||||||
|
//! with the test client infrastructure.
|
||||||
|
|
||||||
|
use crate::{runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt};
|
||||||
|
use pezsp_api::ProvideRuntimeApi;
|
||||||
|
use std::env;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn ensure_runtime_logger_works() {
|
||||||
|
if env::var("RUN_TEST").is_ok() {
|
||||||
|
pezsp_tracing::try_init_simple();
|
||||||
|
|
||||||
|
let client = TestClientBuilder::new().build();
|
||||||
|
let runtime_api = client.runtime_api();
|
||||||
|
runtime_api
|
||||||
|
.do_trace_log(client.chain_info().genesis_hash)
|
||||||
|
.expect("Logging should not fail");
|
||||||
|
} else {
|
||||||
|
for (level, should_print) in &[("test=trace", true), ("info", false)] {
|
||||||
|
let executable = std::env::current_exe().unwrap();
|
||||||
|
let output = std::process::Command::new(executable)
|
||||||
|
.env("RUN_TEST", "1")
|
||||||
|
.env("RUST_LOG", level)
|
||||||
|
.args(&["--nocapture", "ensure_runtime_logger_works"])
|
||||||
|
.output()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
let output = String::from_utf8(output.stderr).unwrap();
|
||||||
|
assert!(output.contains("Hey I'm runtime") == *should_print);
|
||||||
|
assert!(output.contains("THIS IS TRACING") == *should_print);
|
||||||
|
assert!(output.contains("Hey, I'm tracing") == *should_print);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "binary-merkle-tree"
|
name = "pez-binary-merkle-tree"
|
||||||
version = "13.0.0"
|
version = "14.0.1"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
@@ -21,16 +21,13 @@ log = { optional = true, workspace = true }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
array-bytes = { workspace = true, default-features = true }
|
array-bytes = { workspace = true, default-features = true }
|
||||||
pezsp-core = { workspace = true, default-features = true }
|
pezsp-core = { workspace = true, default-features = true }
|
||||||
pezsp-runtime = { workspace = true, default-features = true }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
debug = ["array-bytes", "log"]
|
debug = ["array-bytes", "log"]
|
||||||
default = ["debug", "std"]
|
default = ["debug", "std"]
|
||||||
runtime-benchmarks = ["pezsp-runtime/runtime-benchmarks"]
|
|
||||||
std = [
|
std = [
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"hash-db/std",
|
"hash-db/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
"pezsp-core/std",
|
|
||||||
"pezsp-runtime/std",
|
|
||||||
]
|
]
|
||||||
|
runtime-benchmarks = []
|
||||||
|
|||||||
@@ -416,8 +416,7 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use pezsp_core::H256;
|
use pezsp_core::{H256, KeccakHasher};
|
||||||
use pezsp_runtime::traits::Keccak256;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn should_generate_empty_root() {
|
fn should_generate_empty_root() {
|
||||||
@@ -425,7 +424,7 @@ mod tests {
|
|||||||
let data: Vec<[u8; 1]> = Default::default();
|
let data: Vec<[u8; 1]> = Default::default();
|
||||||
|
|
||||||
// when
|
// when
|
||||||
let out = merkle_root::<Keccak256, _>(data);
|
let out = merkle_root::<KeccakHasher, _>(data);
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -442,7 +441,7 @@ mod tests {
|
|||||||
)];
|
)];
|
||||||
|
|
||||||
// when
|
// when
|
||||||
let out = merkle_root::<Keccak256, _>(data);
|
let out = merkle_root::<KeccakHasher, _>(data);
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -460,7 +459,7 @@ mod tests {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// when
|
// when
|
||||||
let out = merkle_root::<Keccak256, _>(data);
|
let out = merkle_root::<KeccakHasher, _>(data);
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -472,7 +471,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn should_generate_root_complex() {
|
fn should_generate_root_complex() {
|
||||||
let test = |root, data| {
|
let test = |root, data| {
|
||||||
assert_eq!(array_bytes::bytes2hex("", &merkle_root::<Keccak256, _>(data)), root);
|
assert_eq!(array_bytes::bytes2hex("", &merkle_root::<KeccakHasher, _>(data)), root);
|
||||||
};
|
};
|
||||||
|
|
||||||
test(
|
test(
|
||||||
@@ -502,8 +501,8 @@ mod tests {
|
|||||||
let data = vec!["a", "b", "c"];
|
let data = vec!["a", "b", "c"];
|
||||||
|
|
||||||
// when
|
// when
|
||||||
let proof0 = merkle_proof::<Keccak256, _, _>(data.clone(), 0);
|
let proof0 = merkle_proof::<KeccakHasher, _, _>(data.clone(), 0);
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof0.root,
|
&proof0.root,
|
||||||
proof0.proof.clone(),
|
proof0.proof.clone(),
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -511,8 +510,8 @@ mod tests {
|
|||||||
&proof0.leaf,
|
&proof0.leaf,
|
||||||
));
|
));
|
||||||
|
|
||||||
let proof1 = merkle_proof::<Keccak256, _, _>(data.clone(), 1);
|
let proof1 = merkle_proof::<KeccakHasher, _, _>(data.clone(), 1);
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof1.root,
|
&proof1.root,
|
||||||
proof1.proof,
|
proof1.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -520,8 +519,8 @@ mod tests {
|
|||||||
&proof1.leaf,
|
&proof1.leaf,
|
||||||
));
|
));
|
||||||
|
|
||||||
let proof2 = merkle_proof::<Keccak256, _, _>(data.clone(), 2);
|
let proof2 = merkle_proof::<KeccakHasher, _, _>(data.clone(), 2);
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof2.root,
|
&proof2.root,
|
||||||
proof2.proof,
|
proof2.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -539,7 +538,7 @@ mod tests {
|
|||||||
array_bytes::bytes2hex("", &proof1.root)
|
array_bytes::bytes2hex("", &proof1.root)
|
||||||
);
|
);
|
||||||
|
|
||||||
assert!(!verify_proof::<Keccak256, _, _>(
|
assert!(!verify_proof::<KeccakHasher, _, _>(
|
||||||
&array_bytes::hex2array_unchecked(
|
&array_bytes::hex2array_unchecked(
|
||||||
"fb3b3be94be9e983ba5e094c9c51a7d96a4fa2e5d8e891df00ca89ba05bb1239"
|
"fb3b3be94be9e983ba5e094c9c51a7d96a4fa2e5d8e891df00ca89ba05bb1239"
|
||||||
)
|
)
|
||||||
@@ -550,7 +549,7 @@ mod tests {
|
|||||||
&proof0.leaf
|
&proof0.leaf
|
||||||
));
|
));
|
||||||
|
|
||||||
assert!(!verify_proof::<Keccak256, _, _>(
|
assert!(!verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof0.root.into(),
|
&proof0.root.into(),
|
||||||
vec![],
|
vec![],
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -566,9 +565,9 @@ mod tests {
|
|||||||
|
|
||||||
for l in 0..data.len() as u32 {
|
for l in 0..data.len() as u32 {
|
||||||
// when
|
// when
|
||||||
let proof = merkle_proof::<Keccak256, _, _>(data.clone(), l);
|
let proof = merkle_proof::<KeccakHasher, _, _>(data.clone(), l);
|
||||||
// then
|
// then
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof.root,
|
&proof.root,
|
||||||
proof.proof,
|
proof.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -591,9 +590,9 @@ mod tests {
|
|||||||
|
|
||||||
for l in 0..data.len() as u32 {
|
for l in 0..data.len() as u32 {
|
||||||
// when
|
// when
|
||||||
let proof = merkle_proof::<Keccak256, _, _>(data.clone(), l);
|
let proof = merkle_proof::<KeccakHasher, _, _>(data.clone(), l);
|
||||||
// then
|
// then
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof.root,
|
&proof.root,
|
||||||
proof.proof,
|
proof.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -614,9 +613,9 @@ mod tests {
|
|||||||
|
|
||||||
for l in (0..data.len() as u32).step_by(13) {
|
for l in (0..data.len() as u32).step_by(13) {
|
||||||
// when
|
// when
|
||||||
let proof = merkle_proof::<Keccak256, _, _>(data.clone(), l);
|
let proof = merkle_proof::<KeccakHasher, _, _>(data.clone(), l);
|
||||||
// then
|
// then
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof.root,
|
&proof.root,
|
||||||
proof.proof,
|
proof.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -629,7 +628,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[should_panic]
|
#[should_panic]
|
||||||
fn should_panic_on_invalid_leaf_index() {
|
fn should_panic_on_invalid_leaf_index() {
|
||||||
merkle_proof::<Keccak256, _, _>(vec!["a"], 5);
|
merkle_proof::<KeccakHasher, _, _>(vec!["a"], 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -815,13 +814,13 @@ mod tests {
|
|||||||
|
|
||||||
for l in 0..data.len() as u32 {
|
for l in 0..data.len() as u32 {
|
||||||
// when
|
// when
|
||||||
let proof = merkle_proof::<Keccak256, _, _>(data.clone(), l);
|
let proof = merkle_proof::<KeccakHasher, _, _>(data.clone(), l);
|
||||||
assert_eq!(array_bytes::bytes2hex("", &proof.root), array_bytes::bytes2hex("", &root));
|
assert_eq!(array_bytes::bytes2hex("", &proof.root), array_bytes::bytes2hex("", &root));
|
||||||
assert_eq!(proof.leaf_index, l);
|
assert_eq!(proof.leaf_index, l);
|
||||||
assert_eq!(&proof.leaf, &data[l as usize]);
|
assert_eq!(&proof.leaf, &data[l as usize]);
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assert!(verify_proof::<Keccak256, _, _>(
|
assert!(verify_proof::<KeccakHasher, _, _>(
|
||||||
&proof.root,
|
&proof.root,
|
||||||
proof.proof,
|
proof.proof,
|
||||||
data.len() as _,
|
data.len() as _,
|
||||||
@@ -830,7 +829,7 @@ mod tests {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let proof = merkle_proof::<Keccak256, _, _>(data.clone(), data.len() as u32 - 1);
|
let proof = merkle_proof::<KeccakHasher, _, _>(data.clone(), data.len() as u32 - 1);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
proof,
|
proof,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ serde = { features = ["alloc", "derive"], workspace = true }
|
|||||||
pezbp-runtime = { workspace = true }
|
pezbp-runtime = { workspace = true }
|
||||||
|
|
||||||
# Bizinikiwi Dependencies
|
# Bizinikiwi Dependencies
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
pezframe-support = { workspace = true }
|
pezframe-support = { workspace = true }
|
||||||
pezpallet-beefy-mmr = { workspace = true }
|
pezpallet-beefy-mmr = { workspace = true }
|
||||||
pezpallet-mmr = { workspace = true }
|
pezpallet-mmr = { workspace = true }
|
||||||
@@ -33,7 +33,7 @@ pezsp-std = { workspace = true }
|
|||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"pezbp-runtime/std",
|
"pezbp-runtime/std",
|
||||||
"pezframe-support/std",
|
"pezframe-support/std",
|
||||||
@@ -46,7 +46,7 @@ std = [
|
|||||||
"serde/std",
|
"serde/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"pezbp-runtime/runtime-benchmarks",
|
"pezbp-runtime/runtime-benchmarks",
|
||||||
"pezframe-support/runtime-benchmarks",
|
"pezframe-support/runtime-benchmarks",
|
||||||
"pezpallet-beefy-mmr/runtime-benchmarks",
|
"pezpallet-beefy-mmr/runtime-benchmarks",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
|
||||||
pub use binary_merkle_tree::merkle_root;
|
pub use pez_binary_merkle_tree::merkle_root;
|
||||||
pub use pezpallet_beefy_mmr::BeefyEcdsaToEthereum;
|
pub use pezpallet_beefy_mmr::BeefyEcdsaToEthereum;
|
||||||
pub use pezpallet_mmr::{
|
pub use pezpallet_mmr::{
|
||||||
primitives::{DataOrHash as MmrDataOrHash, LeafProof as MmrProof},
|
primitives::{DataOrHash as MmrDataOrHash, LeafProof as MmrProof},
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ serde = { workspace = true }
|
|||||||
serde_derive = { optional = true, workspace = true }
|
serde_derive = { optional = true, workspace = true }
|
||||||
serde_json = { features = ["alloc"], workspace = true }
|
serde_json = { features = ["alloc"], workspace = true }
|
||||||
|
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
pezkuwichain-runtime-constants = { workspace = true }
|
pezkuwichain-runtime-constants = { workspace = true }
|
||||||
pezsp-api = { workspace = true }
|
pezsp-api = { workspace = true }
|
||||||
pezsp-arithmetic = { workspace = true }
|
pezsp-arithmetic = { workspace = true }
|
||||||
@@ -132,7 +132,7 @@ bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features
|
|||||||
default = ["std"]
|
default = ["std"]
|
||||||
no_std = []
|
no_std = []
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"bitvec/std",
|
"bitvec/std",
|
||||||
"bizinikiwi-wasm-builder",
|
"bizinikiwi-wasm-builder",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
@@ -226,7 +226,7 @@ std = [
|
|||||||
"xcm/std",
|
"xcm/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"bizinikiwi-wasm-builder?/runtime-benchmarks",
|
"bizinikiwi-wasm-builder?/runtime-benchmarks",
|
||||||
"pezframe-benchmarking/runtime-benchmarks",
|
"pezframe-benchmarking/runtime-benchmarks",
|
||||||
"pezframe-election-provider-support/runtime-benchmarks",
|
"pezframe-election-provider-support/runtime-benchmarks",
|
||||||
|
|||||||
@@ -1387,7 +1387,7 @@ impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
|||||||
fn extra_data() -> H256 {
|
fn extra_data() -> H256 {
|
||||||
let para_heads: Vec<(u32, Vec<u8>)> =
|
let para_heads: Vec<(u32, Vec<u8>)> =
|
||||||
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
||||||
binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
pez_binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||||
para_heads.into_iter().map(|pair| pair.encode()),
|
para_heads.into_iter().map(|pair| pair.encode()),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ serde = { workspace = true }
|
|||||||
serde_derive = { optional = true, workspace = true }
|
serde_derive = { optional = true, workspace = true }
|
||||||
serde_json = { features = ["alloc"], workspace = true }
|
serde_json = { features = ["alloc"], workspace = true }
|
||||||
|
|
||||||
binary-merkle-tree = { workspace = true }
|
pez-binary-merkle-tree = { workspace = true }
|
||||||
pezsp-api = { workspace = true }
|
pezsp-api = { workspace = true }
|
||||||
pezsp-application-crypto = { workspace = true }
|
pezsp-application-crypto = { workspace = true }
|
||||||
pezsp-arithmetic = { workspace = true }
|
pezsp-arithmetic = { workspace = true }
|
||||||
@@ -138,7 +138,7 @@ bizinikiwi-wasm-builder = { workspace = true, default-features = true }
|
|||||||
default = ["std"]
|
default = ["std"]
|
||||||
no_std = []
|
no_std = []
|
||||||
std = [
|
std = [
|
||||||
"binary-merkle-tree/std",
|
"pez-binary-merkle-tree/std",
|
||||||
"bitvec/std",
|
"bitvec/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
@@ -239,7 +239,7 @@ std = [
|
|||||||
"zagros-runtime-constants/std",
|
"zagros-runtime-constants/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"binary-merkle-tree/runtime-benchmarks",
|
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||||
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
||||||
"pezframe-benchmarking/runtime-benchmarks",
|
"pezframe-benchmarking/runtime-benchmarks",
|
||||||
"pezframe-election-provider-support/runtime-benchmarks",
|
"pezframe-election-provider-support/runtime-benchmarks",
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
|||||||
fn extra_data() -> H256 {
|
fn extra_data() -> H256 {
|
||||||
let para_heads: Vec<(u32, Vec<u8>)> =
|
let para_heads: Vec<(u32, Vec<u8>)> =
|
||||||
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
||||||
binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
pez_binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||||
para_heads.into_iter().map(|pair| pair.encode()),
|
para_heads.into_iter().map(|pair| pair.encode()),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
Sat Dec 27 19:45:29 UTC 2025 - Publishing pezsp-arithmetic
|
||||||
|
Sat Dec 27 19:45:44 UTC 2025 - SUCCESS: pezsp-arithmetic
|
||||||
|
Sat Dec 27 19:46:53 UTC 2025 - Publishing pezsp-runtime-interface-proc-macro
|
||||||
|
Sat Dec 27 19:47:06 UTC 2025 - SUCCESS: pezsp-runtime-interface-proc-macro
|
||||||
|
Sat Dec 27 19:48:15 UTC 2025 - Publishing pezsp-runtime-interface
|
||||||
|
Sat Dec 27 19:48:19 UTC 2025 - FAILED: pezsp-runtime-interface
|
||||||
|
Updating crates.io index
|
||||||
|
Packaging pezsp-runtime-interface v24.0.0 (/home/mamostehp/pezkuwi-sdk/bizinikiwi/primitives/runtime-interface)
|
||||||
|
Updating crates.io index
|
||||||
|
error: failed to prepare local package for uploading
|
||||||
|
|
||||||
|
Caused by:
|
||||||
|
no matching package named `pezsp-io` found
|
||||||
|
location searched: crates.io index
|
||||||
|
required by package `pezsp-runtime-interface v24.0.0 (/home/mamostehp/pezkuwi-sdk/bizinikiwi/primitives/runtime-interface)`
|
||||||
|
Sat Dec 27 19:49:28 UTC 2025 - Publishing pezsp-io
|
||||||
|
Sat Dec 27 19:49:31 UTC 2025 - FAILED: pezsp-io
|
||||||
|
Updating crates.io index
|
||||||
|
Packaging pezsp-io v30.0.0 (/home/mamostehp/pezkuwi-sdk/bizinikiwi/primitives/io)
|
||||||
|
Updating crates.io index
|
||||||
|
error: failed to prepare local package for uploading
|
||||||
|
|
||||||
|
Caused by:
|
||||||
|
no matching package named `pezsp-core` found
|
||||||
|
location searched: crates.io index
|
||||||
|
required by package `pezsp-io v30.0.0 (/home/mamostehp/pezkuwi-sdk/bizinikiwi/primitives/io)`
|
||||||
|
Sat Dec 27 19:50:40 UTC 2025 - Publishing pezsp-core
|
||||||
|
Sat Dec 27 19:50:41 UTC 2025 - FAILED: pezsp-core
|
||||||
|
Updating crates.io index
|
||||||
|
error: all dependencies must have a version specified when publishing.
|
||||||
|
dependency `pezkuwi-ss58-registry` does not specify a version
|
||||||
|
Note: The published dependency will use the version from crates.io,
|
||||||
|
the `path` specification will be removed from the dependency declaration.
|
||||||
Executable
+54
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd /home/mamostehp/pezkuwi-sdk
|
||||||
|
LOG="/home/mamostehp/pezkuwi-sdk/publish.log"
|
||||||
|
|
||||||
|
publish_crate() {
|
||||||
|
local crate=$1
|
||||||
|
echo "$(date -u) - Publishing $crate" | tee -a $LOG
|
||||||
|
|
||||||
|
OUTPUT=$(cargo publish -p "$crate" 2>&1)
|
||||||
|
EXIT_CODE=$?
|
||||||
|
|
||||||
|
if [ $EXIT_CODE -eq 0 ]; then
|
||||||
|
echo "$(date -u) - SUCCESS: $crate" | tee -a $LOG
|
||||||
|
return 0
|
||||||
|
elif echo "$OUTPUT" | grep -q "429 Too Many Requests"; then
|
||||||
|
echo "$(date -u) - RATE LIMITED: $crate - waiting 120s" | tee -a $LOG
|
||||||
|
sleep 120
|
||||||
|
# Retry
|
||||||
|
OUTPUT=$(cargo publish -p "$crate" 2>&1)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "$(date -u) - SUCCESS (retry): $crate" | tee -a $LOG
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
elif echo "$OUTPUT" | grep -q "already uploaded"; then
|
||||||
|
echo "$(date -u) - SKIPPED: $crate (already published)" | tee -a $LOG
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$(date -u) - FAILED: $crate" | tee -a $LOG
|
||||||
|
echo "$OUTPUT" >> $LOG
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Level 1 crates
|
||||||
|
CRATES=(
|
||||||
|
"pezsp-arithmetic"
|
||||||
|
"pezsp-runtime-interface-proc-macro"
|
||||||
|
"pezsp-runtime-interface"
|
||||||
|
"pezsp-io"
|
||||||
|
"pezsp-core"
|
||||||
|
"pezsp-keyring"
|
||||||
|
"pezsp-weights"
|
||||||
|
"pezsp-version-proc-macro"
|
||||||
|
"pezsp-version"
|
||||||
|
"pezsp-application-crypto"
|
||||||
|
"pezsp-metadata-ir"
|
||||||
|
)
|
||||||
|
|
||||||
|
for crate in "${CRATES[@]}"; do
|
||||||
|
publish_crate "$crate"
|
||||||
|
sleep 65
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Batch complete!" | tee -a $LOG
|
||||||
Executable
+74
@@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Publish crates with rate limit handling
|
||||||
|
|
||||||
|
CRATES=(
|
||||||
|
# Level 0 remaining
|
||||||
|
"pezsp-core-hashing-proc-macro"
|
||||||
|
"pezsp-wasm-interface"
|
||||||
|
# Level 1
|
||||||
|
"pezsp-arithmetic"
|
||||||
|
"pezsp-io"
|
||||||
|
"pezsp-runtime-interface-proc-macro"
|
||||||
|
"pezsp-runtime-interface"
|
||||||
|
"pezsp-core"
|
||||||
|
"pezsp-keyring"
|
||||||
|
"pezsp-weights"
|
||||||
|
"pezsp-version-proc-macro"
|
||||||
|
"pezsp-version"
|
||||||
|
"pezsp-application-crypto"
|
||||||
|
"pezsp-runtime"
|
||||||
|
"pezsp-staking"
|
||||||
|
"pezsp-state-machine"
|
||||||
|
"pezsp-trie"
|
||||||
|
"pezsp-database"
|
||||||
|
"pezsp-maybe-compressed-blob"
|
||||||
|
)
|
||||||
|
|
||||||
|
PUBLISHED=0
|
||||||
|
FAILED=0
|
||||||
|
|
||||||
|
for crate in "${CRATES[@]}"; do
|
||||||
|
echo "========================================"
|
||||||
|
echo "Publishing: $crate"
|
||||||
|
echo "Time: $(date -u)"
|
||||||
|
echo "========================================"
|
||||||
|
|
||||||
|
OUTPUT=$(cargo publish -p "$crate" 2>&1)
|
||||||
|
EXIT_CODE=$?
|
||||||
|
|
||||||
|
if [ $EXIT_CODE -eq 0 ]; then
|
||||||
|
echo "SUCCESS: $crate"
|
||||||
|
((PUBLISHED++))
|
||||||
|
elif echo "$OUTPUT" | grep -q "429 Too Many Requests"; then
|
||||||
|
# Extract wait time
|
||||||
|
WAIT_UNTIL=$(echo "$OUTPUT" | grep -oP 'after \K[^o]+')
|
||||||
|
echo "RATE LIMITED - waiting until $WAIT_UNTIL"
|
||||||
|
echo "Sleeping 120 seconds..."
|
||||||
|
sleep 120
|
||||||
|
# Retry
|
||||||
|
echo "Retrying $crate..."
|
||||||
|
cargo publish -p "$crate" 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "SUCCESS on retry: $crate"
|
||||||
|
((PUBLISHED++))
|
||||||
|
else
|
||||||
|
echo "FAILED on retry: $crate"
|
||||||
|
((FAILED++))
|
||||||
|
fi
|
||||||
|
elif echo "$OUTPUT" | grep -q "already uploaded"; then
|
||||||
|
echo "SKIPPED (already published): $crate"
|
||||||
|
else
|
||||||
|
echo "FAILED: $crate"
|
||||||
|
echo "$OUTPUT"
|
||||||
|
((FAILED++))
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Waiting 65 seconds..."
|
||||||
|
sleep 65
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "SUMMARY"
|
||||||
|
echo "Published: $PUBLISHED"
|
||||||
|
echo "Failed: $FAILED"
|
||||||
|
echo "========================================"
|
||||||
+7
-7
@@ -9,7 +9,7 @@ default = ["std"]
|
|||||||
std = [
|
std = [
|
||||||
"asset-test-pezutils?/std",
|
"asset-test-pezutils?/std",
|
||||||
"assets-common?/std",
|
"assets-common?/std",
|
||||||
"binary-merkle-tree?/std",
|
"pez-binary-merkle-tree?/std",
|
||||||
"bizinikiwi-bip39?/std",
|
"bizinikiwi-bip39?/std",
|
||||||
"bp-header-pez-chain?/std",
|
"bp-header-pez-chain?/std",
|
||||||
"bp-messages?/std",
|
"bp-messages?/std",
|
||||||
@@ -58,7 +58,7 @@ std = [
|
|||||||
"pezkuwi-runtime-metrics?/std",
|
"pezkuwi-runtime-metrics?/std",
|
||||||
"pezkuwi-runtime-teyrchains?/std",
|
"pezkuwi-runtime-teyrchains?/std",
|
||||||
"pezkuwi-sdk-frame?/std",
|
"pezkuwi-sdk-frame?/std",
|
||||||
"pezkuwi-ss58-registry?/std",
|
"pezsp-ss58-registry?/std",
|
||||||
"pezkuwi-subxt-core?/std",
|
"pezkuwi-subxt-core?/std",
|
||||||
"pezkuwi-subxt-metadata?/std",
|
"pezkuwi-subxt-metadata?/std",
|
||||||
"pezkuwi-subxt-signer?/std",
|
"pezkuwi-subxt-signer?/std",
|
||||||
@@ -238,7 +238,7 @@ std = [
|
|||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"asset-test-pezutils?/runtime-benchmarks",
|
"asset-test-pezutils?/runtime-benchmarks",
|
||||||
"assets-common?/runtime-benchmarks",
|
"assets-common?/runtime-benchmarks",
|
||||||
"binary-merkle-tree?/runtime-benchmarks",
|
"pez-binary-merkle-tree?/runtime-benchmarks",
|
||||||
"bizinikiwi-frame-rpc-support?/runtime-benchmarks",
|
"bizinikiwi-frame-rpc-support?/runtime-benchmarks",
|
||||||
"bizinikiwi-frame-rpc-system?/runtime-benchmarks",
|
"bizinikiwi-frame-rpc-system?/runtime-benchmarks",
|
||||||
"bizinikiwi-rpc-client?/runtime-benchmarks",
|
"bizinikiwi-rpc-client?/runtime-benchmarks",
|
||||||
@@ -745,7 +745,7 @@ with-tracing = [
|
|||||||
]
|
]
|
||||||
runtime-full = [
|
runtime-full = [
|
||||||
"assets-common",
|
"assets-common",
|
||||||
"binary-merkle-tree",
|
"pez-binary-merkle-tree",
|
||||||
"bizinikiwi-bip39",
|
"bizinikiwi-bip39",
|
||||||
"bp-header-pez-chain",
|
"bp-header-pez-chain",
|
||||||
"bp-messages",
|
"bp-messages",
|
||||||
@@ -797,7 +797,7 @@ runtime-full = [
|
|||||||
"pezkuwi-runtime-metrics",
|
"pezkuwi-runtime-metrics",
|
||||||
"pezkuwi-runtime-teyrchains",
|
"pezkuwi-runtime-teyrchains",
|
||||||
"pezkuwi-sdk-frame",
|
"pezkuwi-sdk-frame",
|
||||||
"pezkuwi-ss58-registry",
|
"pezsp-ss58-registry",
|
||||||
"pezkuwi-subxt-core",
|
"pezkuwi-subxt-core",
|
||||||
"pezkuwi-subxt-macro",
|
"pezkuwi-subxt-macro",
|
||||||
"pezkuwi-subxt-metadata",
|
"pezkuwi-subxt-metadata",
|
||||||
@@ -1183,7 +1183,7 @@ default-features = false
|
|||||||
optional = true
|
optional = true
|
||||||
path = "../pezcumulus/teyrchains/runtimes/assets/common"
|
path = "../pezcumulus/teyrchains/runtimes/assets/common"
|
||||||
|
|
||||||
[dependencies.binary-merkle-tree]
|
[dependencies.pez-binary-merkle-tree]
|
||||||
default-features = false
|
default-features = false
|
||||||
optional = true
|
optional = true
|
||||||
path = "../bizinikiwi/utils/binary-merkle-tree"
|
path = "../bizinikiwi/utils/binary-merkle-tree"
|
||||||
@@ -1443,7 +1443,7 @@ default-features = false
|
|||||||
optional = true
|
optional = true
|
||||||
path = "../bizinikiwi/pezframe"
|
path = "../bizinikiwi/pezframe"
|
||||||
|
|
||||||
[dependencies.pezkuwi-ss58-registry]
|
[dependencies.pezsp-ss58-registry]
|
||||||
default-features = false
|
default-features = false
|
||||||
optional = true
|
optional = true
|
||||||
path = "../vendor/ss58-registry"
|
path = "../vendor/ss58-registry"
|
||||||
|
|||||||
+3
-3
@@ -21,7 +21,7 @@ pub use assets_common;
|
|||||||
|
|
||||||
/// A no-std/Bizinikiwi compatible library to construct binary merkle tree.
|
/// A no-std/Bizinikiwi compatible library to construct binary merkle tree.
|
||||||
#[cfg(feature = "binary-merkle-tree")]
|
#[cfg(feature = "binary-merkle-tree")]
|
||||||
pub use binary_merkle_tree;
|
pub use pez_binary_merkle_tree;
|
||||||
|
|
||||||
/// Converting BIP39 entropy to valid Bizinikiwi (sr25519) SecretKeys.
|
/// Converting BIP39 entropy to valid Bizinikiwi (sr25519) SecretKeys.
|
||||||
#[cfg(feature = "bizinikiwi-bip39")]
|
#[cfg(feature = "bizinikiwi-bip39")]
|
||||||
@@ -516,8 +516,8 @@ pub use pezkuwi_sdk_frame;
|
|||||||
pub use pezkuwi_service;
|
pub use pezkuwi_service;
|
||||||
|
|
||||||
/// Registry of known SS58 address types - PezkuwiChain fork.
|
/// Registry of known SS58 address types - PezkuwiChain fork.
|
||||||
#[cfg(feature = "pezkuwi-ss58-registry")]
|
#[cfg(feature = "pezsp-ss58-registry")]
|
||||||
pub use pezkuwi_ss58_registry;
|
pub use pezsp_ss58_registry;
|
||||||
|
|
||||||
/// Statement Distribution Subsystem.
|
/// Statement Distribution Subsystem.
|
||||||
#[cfg(feature = "pezkuwi-statement-distribution")]
|
#[cfg(feature = "pezkuwi-statement-distribution")]
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pezkuwi-ss58-registry"
|
name = "pezsp-ss58-registry"
|
||||||
version = "1.51.0"
|
version = "1.52.0"
|
||||||
description = "Registry of known SS58 address types - PezkuwiChain fork"
|
description = "Registry of known SS58 address types - PezkuwiChain fork"
|
||||||
documentation.workspace = true
|
documentation.workspace = true
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user