fix(revive-eth-rpc): Update to pezkuwi-subxt with pezsp_runtime support
- Add workspace exclude for vendor/pezkuwi-subxt to prevent workspace inheritance conflicts - Update pezkuwi-subxt codegen to use ::pezsp_runtime::DispatchError directly instead of runtime_types path that doesn't exist due to substitute_type - Add From implementations for various pezkuwi_subxt error types (EventsError, ExtrinsicError, BlockError, BackendError, RuntimeApiError, ConstantError, OnlineClientError) - Update StorageApi to use StorageClientAt with new try_fetch API - Fix RuntimeApiError pattern matching for error handling - Update substitute_type entries to use pezkuwi_subxt paths - Rename migration table from eth_to_substrate_blocks to eth_to_bizinikiwi_blocks for consistency - Regenerate SQLX query cache for bizinikiwi table names
This commit is contained in:
Generated
+396
-57
@@ -2321,7 +2321,7 @@ dependencies = [
|
||||
"pezsp-consensus-babe",
|
||||
"pezsp-consensus-grandpa",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-debug-derive",
|
||||
"pezsp-externalities",
|
||||
"pezsp-genesis-builder",
|
||||
@@ -2398,13 +2398,13 @@ dependencies = [
|
||||
"jsonrpsee",
|
||||
"parity-scale-codec",
|
||||
"parking_lot 0.12.5",
|
||||
"pezkuwi-subxt",
|
||||
"pezkuwi-subxt-core",
|
||||
"pezkuwi-subxt-rpcs",
|
||||
"pezkuwi-subxt-signer",
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subxt",
|
||||
"subxt-core",
|
||||
"subxt-rpcs",
|
||||
"subxt-signer",
|
||||
"termplot",
|
||||
"thiserror 1.0.69",
|
||||
"time",
|
||||
@@ -5690,6 +5690,23 @@ dependencies = [
|
||||
"sp-crypto-hashing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "frame-decode"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fb3bfa2988ef40247e0e0eecfb171a01ad6f4e399485503aad4c413a5f236f3"
|
||||
dependencies = [
|
||||
"frame-metadata",
|
||||
"parity-scale-codec",
|
||||
"scale-decode",
|
||||
"scale-encode",
|
||||
"scale-info",
|
||||
"scale-info-legacy",
|
||||
"scale-type-resolver",
|
||||
"sp-crypto-hashing",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "frame-election-solution-type-fuzzer"
|
||||
version = "2.0.0-alpha.5"
|
||||
@@ -5744,7 +5761,7 @@ dependencies = [
|
||||
"log",
|
||||
"parity-scale-codec",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"pezsp-state-machine",
|
||||
@@ -6399,6 +6416,8 @@ version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
"foldhash 0.2.0",
|
||||
"serde",
|
||||
"serde_core",
|
||||
@@ -10449,7 +10468,7 @@ dependencies = [
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-inherents",
|
||||
"pezsp-keyring",
|
||||
"pezsp-runtime",
|
||||
@@ -11456,7 +11475,7 @@ dependencies = [
|
||||
"pezsc-client-api",
|
||||
"pezsc-consensus-babe",
|
||||
"pezsc-network-types",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-inherents",
|
||||
"pezsp-runtime",
|
||||
"pezsp-state-machine",
|
||||
@@ -11565,7 +11584,7 @@ dependencies = [
|
||||
"pezsp-consensus-babe",
|
||||
"pezsp-consensus-slots",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-externalities",
|
||||
"pezsp-inherents",
|
||||
"pezsp-io",
|
||||
@@ -12170,6 +12189,8 @@ dependencies = [
|
||||
"pezframe-support",
|
||||
"pezframe-system",
|
||||
"pezkuwi-primitives",
|
||||
"pezkuwi-subxt",
|
||||
"pezkuwi-subxt-signer",
|
||||
"pezkuwi-teyrchain-primitives",
|
||||
"pezsc-block-builder",
|
||||
"pezsc-chain-spec",
|
||||
@@ -12205,8 +12226,6 @@ dependencies = [
|
||||
"rand_pcg",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subxt",
|
||||
"subxt-signer",
|
||||
"thiserror 1.0.69",
|
||||
"thousands",
|
||||
"zagros-runtime",
|
||||
@@ -12327,7 +12346,7 @@ dependencies = [
|
||||
"pezsp-api",
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-crypto-hashing-proc-macro",
|
||||
"pezsp-debug-derive",
|
||||
"pezsp-genesis-builder",
|
||||
@@ -12365,7 +12384,7 @@ dependencies = [
|
||||
"pezframe-support",
|
||||
"pezframe-support-procedural-tools",
|
||||
"pezframe-system",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-metadata-ir",
|
||||
"pezsp-runtime",
|
||||
@@ -12795,7 +12814,7 @@ dependencies = [
|
||||
"pezsp-authority-discovery",
|
||||
"pezsp-consensus-babe",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-keyring",
|
||||
"pezsp-keystore",
|
||||
"pezsp-tracing",
|
||||
@@ -13217,7 +13236,7 @@ dependencies = [
|
||||
"pezsc-executor-common",
|
||||
"pezsc-executor-wasmtime",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-externalities",
|
||||
"pezsp-io",
|
||||
"pezsp-tracing",
|
||||
@@ -13486,6 +13505,7 @@ dependencies = [
|
||||
"pezframe-try-runtime",
|
||||
"pezkuwi-cli",
|
||||
"pezkuwi-primitives",
|
||||
"pezkuwi-subxt-metadata",
|
||||
"pezpallet-transaction-payment",
|
||||
"pezpallet-transaction-payment-rpc",
|
||||
"pezpallet-transaction-payment-rpc-runtime-api",
|
||||
@@ -13534,7 +13554,6 @@ dependencies = [
|
||||
"scale-info",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subxt-metadata",
|
||||
"teyrchains-common",
|
||||
"tokio",
|
||||
"wait-timeout",
|
||||
@@ -13763,7 +13782,7 @@ dependencies = [
|
||||
"pezsp-application-crypto",
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-inherents",
|
||||
"pezsp-io",
|
||||
"pezsp-keyring",
|
||||
@@ -14117,7 +14136,7 @@ dependencies = [
|
||||
"pezsp-core-hashing",
|
||||
"pezsp-core-hashing-proc-macro",
|
||||
"pezsp-crypto-ec-utils",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-crypto-hashing-proc-macro",
|
||||
"pezsp-database",
|
||||
"pezsp-debug-derive",
|
||||
@@ -14565,6 +14584,190 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"derive-where",
|
||||
"either",
|
||||
"frame-metadata",
|
||||
"futures",
|
||||
"hex",
|
||||
"jsonrpsee",
|
||||
"parity-scale-codec",
|
||||
"pezkuwi-subxt-core",
|
||||
"pezkuwi-subxt-lightclient",
|
||||
"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)",
|
||||
"primitive-types 0.13.1",
|
||||
"scale-bits",
|
||||
"scale-decode",
|
||||
"scale-encode",
|
||||
"scale-info",
|
||||
"scale-value",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
"wasm-bindgen-futures",
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-codegen"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"parity-scale-codec",
|
||||
"pezkuwi-subxt-metadata",
|
||||
"proc-macro2 1.0.103",
|
||||
"quote 1.0.42",
|
||||
"scale-info",
|
||||
"scale-typegen 0.12.0",
|
||||
"syn 2.0.111",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-core"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"base58",
|
||||
"blake2 0.10.6",
|
||||
"derive-where",
|
||||
"frame-decode 0.15.0",
|
||||
"frame-metadata",
|
||||
"hashbrown 0.14.5",
|
||||
"hex",
|
||||
"impl-serde",
|
||||
"keccak-hash",
|
||||
"parity-scale-codec",
|
||||
"pezkuwi-subxt-metadata",
|
||||
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
|
||||
"primitive-types 0.13.1",
|
||||
"scale-bits",
|
||||
"scale-decode",
|
||||
"scale-encode",
|
||||
"scale-info",
|
||||
"scale-value",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.17",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-lightclient"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"futures-util",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smoldot-light 0.18.0",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-macro"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"darling 0.20.11",
|
||||
"parity-scale-codec",
|
||||
"pezkuwi-subxt-codegen",
|
||||
"pezkuwi-subxt-metadata",
|
||||
"pezkuwi-subxt-utils-fetchmetadata",
|
||||
"proc-macro-error2",
|
||||
"quote 1.0.42",
|
||||
"scale-typegen 0.12.0",
|
||||
"syn 2.0.111",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-metadata"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"frame-decode 0.15.0",
|
||||
"frame-metadata",
|
||||
"hashbrown 0.14.5",
|
||||
"parity-scale-codec",
|
||||
"pezsp-crypto-hashing 0.1.0 (git+https://github.com/pezkuwichain/pezkuwi-sdk.git?branch=main)",
|
||||
"scale-info",
|
||||
"scale-info-legacy",
|
||||
"scale-type-resolver",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-rpcs"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"derive-where",
|
||||
"finito",
|
||||
"frame-metadata",
|
||||
"futures",
|
||||
"hex",
|
||||
"impl-serde",
|
||||
"jsonrpsee",
|
||||
"parity-scale-codec",
|
||||
"pezkuwi-subxt-core",
|
||||
"pezkuwi-subxt-lightclient",
|
||||
"primitive-types 0.13.1",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-signer"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bip32",
|
||||
"bip39",
|
||||
"cfg-if",
|
||||
"crypto_secretbox",
|
||||
"hex",
|
||||
"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)",
|
||||
"regex",
|
||||
"schnorrkel 0.11.5",
|
||||
"scrypt",
|
||||
"secp256k1 0.30.0",
|
||||
"secrecy 0.10.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"thiserror 2.0.17",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-subxt-utils-fetchmetadata"
|
||||
version = "0.44.0"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"parity-scale-codec",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pezkuwi-test-client"
|
||||
version = "1.0.0"
|
||||
@@ -14791,6 +14994,7 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"pezcumulus-zombienet-sdk-helpers",
|
||||
"pezkuwi-primitives",
|
||||
"pezkuwi-subxt",
|
||||
"pezpallet-revive",
|
||||
"pezsc-executor",
|
||||
"pezsc-runtime-utilities",
|
||||
@@ -14799,7 +15003,6 @@ dependencies = [
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subxt",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"zombienet-orchestrator",
|
||||
@@ -15118,7 +15321,7 @@ dependencies = [
|
||||
"pezpallet-collective",
|
||||
"pezpallet-identity",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"scale-info",
|
||||
@@ -16445,7 +16648,7 @@ dependencies = [
|
||||
"pezframe-system",
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"pezsp-tracing",
|
||||
@@ -17079,6 +17282,7 @@ dependencies = [
|
||||
"pezframe-benchmarking",
|
||||
"pezframe-support",
|
||||
"pezframe-system",
|
||||
"pezkuwi-subxt-signer",
|
||||
"pezpallet-balances",
|
||||
"pezpallet-proxy",
|
||||
"pezpallet-revive-fixtures",
|
||||
@@ -17112,7 +17316,6 @@ dependencies = [
|
||||
"secp256k1 0.28.2",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subxt-signer",
|
||||
"test-case",
|
||||
]
|
||||
|
||||
@@ -17132,6 +17335,8 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"pez-revive-dev-node",
|
||||
"pez-revive-dev-runtime",
|
||||
"pezkuwi-subxt",
|
||||
"pezkuwi-subxt-signer",
|
||||
"pezpallet-revive",
|
||||
"pezpallet-revive-fixtures",
|
||||
"pezsc-cli",
|
||||
@@ -17140,7 +17345,7 @@ dependencies = [
|
||||
"pezsc-service",
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-rpc",
|
||||
"pezsp-runtime",
|
||||
@@ -17151,8 +17356,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
"subxt",
|
||||
"subxt-signer",
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
]
|
||||
@@ -17264,7 +17467,7 @@ dependencies = [
|
||||
"pezframe-system",
|
||||
"pezsp-consensus-sassafras",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"scale-info",
|
||||
@@ -17368,7 +17571,7 @@ dependencies = [
|
||||
"pezframe-system",
|
||||
"pezpallet-balances",
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"rand_chacha 0.3.1",
|
||||
@@ -18404,7 +18607,7 @@ dependencies = [
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus-babe",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-genesis-builder",
|
||||
"pezsp-io",
|
||||
"pezsp-keyring",
|
||||
@@ -18624,7 +18827,7 @@ dependencies = [
|
||||
"pezsp-consensus-babe",
|
||||
"pezsp-consensus-slots",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-inherents",
|
||||
"pezsp-keyring",
|
||||
"pezsp-keystore",
|
||||
@@ -18771,7 +18974,7 @@ dependencies = [
|
||||
"pezsp-consensus",
|
||||
"pezsp-consensus-grandpa",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-keyring",
|
||||
"pezsp-keystore",
|
||||
"pezsp-runtime",
|
||||
@@ -18910,7 +19113,7 @@ dependencies = [
|
||||
"pezsc-tracing",
|
||||
"pezsp-api",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-externalities",
|
||||
"pezsp-io",
|
||||
"pezsp-maybe-compressed-blob",
|
||||
@@ -19067,7 +19270,7 @@ dependencies = [
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-runtime",
|
||||
"pezsp-tracing",
|
||||
"pin-project",
|
||||
@@ -19346,7 +19549,7 @@ dependencies = [
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-keystore",
|
||||
"pezsp-offchain",
|
||||
"pezsp-rpc",
|
||||
@@ -19465,15 +19668,15 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"pezcumulus-primitives-proof-size-hostfunction",
|
||||
"pezcumulus-test-runtime",
|
||||
"pezkuwi-subxt",
|
||||
"pezsc-executor",
|
||||
"pezsc-executor-common",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-state-machine",
|
||||
"pezsp-version",
|
||||
"pezsp-wasm-interface",
|
||||
"subxt",
|
||||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
@@ -19649,7 +19852,7 @@ dependencies = [
|
||||
"log",
|
||||
"pezsc-telemetry",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"rand 0.8.5",
|
||||
@@ -19747,7 +19950,7 @@ dependencies = [
|
||||
"pezsp-blockchain",
|
||||
"pezsp-consensus",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-runtime",
|
||||
"pezsp-tracing",
|
||||
"pezsp-transaction-pool",
|
||||
@@ -19896,7 +20099,7 @@ dependencies = [
|
||||
"hex-literal",
|
||||
"parity-scale-codec",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-runtime",
|
||||
"pezsp-tracing",
|
||||
"scale-info",
|
||||
@@ -20375,7 +20578,7 @@ dependencies = [
|
||||
"integer-sqrt",
|
||||
"num-traits",
|
||||
"parity-scale-codec",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"primitive-types 0.13.1",
|
||||
"rand 0.8.5",
|
||||
"scale-info",
|
||||
@@ -20486,7 +20689,7 @@ dependencies = [
|
||||
"pezsp-api",
|
||||
"pezsp-application-crypto",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-keystore",
|
||||
"pezsp-mmr-primitives",
|
||||
@@ -20576,7 +20779,7 @@ dependencies = [
|
||||
"parking_lot 0.12.5",
|
||||
"paste",
|
||||
"pezkuwi-ss58-registry",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-debug-derive",
|
||||
"pezsp-externalities",
|
||||
"pezsp-std",
|
||||
@@ -20610,7 +20813,7 @@ dependencies = [
|
||||
name = "pezsp-core-hashing"
|
||||
version = "15.0.0"
|
||||
dependencies = [
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -20653,11 +20856,24 @@ 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#fdd023c4994dbf312d0aaf422cc49a8ea9168378"
|
||||
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",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"quote 1.0.42",
|
||||
"syn 2.0.111",
|
||||
]
|
||||
@@ -20723,7 +20939,7 @@ dependencies = [
|
||||
"log",
|
||||
"parity-scale-codec",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-externalities",
|
||||
"pezsp-keystore",
|
||||
"pezsp-runtime-interface",
|
||||
@@ -21018,7 +21234,7 @@ dependencies = [
|
||||
"pezsp-api",
|
||||
"pezsp-application-crypto",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-externalities",
|
||||
"pezsp-runtime",
|
||||
"pezsp-runtime-interface",
|
||||
@@ -21216,6 +21432,7 @@ dependencies = [
|
||||
"pez-node-rpc",
|
||||
"pez-node-testing",
|
||||
"pezkuwi-sdk",
|
||||
"pezkuwi-subxt-signer",
|
||||
"pezsc-service-test",
|
||||
"pezsp-keyring",
|
||||
"pezsp-runtime",
|
||||
@@ -21227,7 +21444,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"soketto",
|
||||
"subxt-signer",
|
||||
"tempfile",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
@@ -23670,6 +23886,21 @@ dependencies = [
|
||||
"syn 2.0.111",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scale-info-legacy"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4afb76e1b2cb589b97278e2f1e2e290c9b7c51d6ac69afab9e1d7d1e136a9276"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
"scale-type-resolver",
|
||||
"serde",
|
||||
"smallstr",
|
||||
"smallvec",
|
||||
"thiserror 2.0.17",
|
||||
"yap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scale-type-resolver"
|
||||
version = "0.2.0"
|
||||
@@ -23693,6 +23924,19 @@ dependencies = [
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scale-typegen"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "642d2f13f3fc9a34ea2c1e36142984eba78cd2405a61632492f8b52993e98879"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.103",
|
||||
"quote 1.0.42",
|
||||
"scale-info",
|
||||
"syn 2.0.111",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scale-value"
|
||||
version = "0.18.1"
|
||||
@@ -24427,6 +24671,15 @@ dependencies = [
|
||||
"futures-io",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallstr"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "862077b1e764f04c251fe82a2ef562fd78d7cadaeb072ca7c2bcaf7217b1ff3b"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.15.1"
|
||||
@@ -24507,6 +24760,60 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smoldot"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "724ab10d6485cccb4bab080ce436c0b361295274aec7847d7ba84ab1a79a5132"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.6",
|
||||
"async-lock",
|
||||
"atomic-take",
|
||||
"base64 0.22.1",
|
||||
"bip39",
|
||||
"blake2-rfc",
|
||||
"bs58",
|
||||
"chacha20",
|
||||
"crossbeam-queue",
|
||||
"derive_more 2.1.0",
|
||||
"ed25519-zebra",
|
||||
"either",
|
||||
"event-listener 5.4.1",
|
||||
"fnv",
|
||||
"futures-lite 2.6.1",
|
||||
"futures-util",
|
||||
"hashbrown 0.15.5",
|
||||
"hex",
|
||||
"hmac 0.12.1",
|
||||
"itertools 0.14.0",
|
||||
"libm",
|
||||
"libsecp256k1",
|
||||
"merlin",
|
||||
"nom 8.0.0",
|
||||
"num-bigint",
|
||||
"num-rational",
|
||||
"num-traits",
|
||||
"pbkdf2",
|
||||
"pin-project",
|
||||
"poly1305",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"ruzstd",
|
||||
"schnorrkel 0.11.5",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"sha3",
|
||||
"siphasher 1.0.1",
|
||||
"slab",
|
||||
"smallvec",
|
||||
"soketto",
|
||||
"twox-hash 2.1.2",
|
||||
"wasmi 0.40.0",
|
||||
"x25519-dalek",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smoldot-light"
|
||||
version = "0.17.2"
|
||||
@@ -24539,7 +24846,43 @@ dependencies = [
|
||||
"siphasher 1.0.1",
|
||||
"slab",
|
||||
"smol",
|
||||
"smoldot",
|
||||
"smoldot 0.19.4",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smoldot-light"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8b4d4971f06f2471f4e57a662dbe8047fa0cc020957764a6211f3fad371f7bd"
|
||||
dependencies = [
|
||||
"async-channel 2.5.0",
|
||||
"async-lock",
|
||||
"base64 0.22.1",
|
||||
"blake2-rfc",
|
||||
"bs58",
|
||||
"derive_more 2.1.0",
|
||||
"either",
|
||||
"event-listener 5.4.1",
|
||||
"fnv",
|
||||
"futures-channel",
|
||||
"futures-lite 2.6.1",
|
||||
"futures-util",
|
||||
"hashbrown 0.15.5",
|
||||
"hex",
|
||||
"itertools 0.14.0",
|
||||
"log",
|
||||
"lru 0.12.5",
|
||||
"parking_lot 0.12.5",
|
||||
"pin-project",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"siphasher 1.0.1",
|
||||
"slab",
|
||||
"smol",
|
||||
"smoldot 0.20.0",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
@@ -25266,7 +25609,7 @@ dependencies = [
|
||||
"proc-macro2 1.0.103",
|
||||
"quote 1.0.42",
|
||||
"scale-info",
|
||||
"scale-typegen",
|
||||
"scale-typegen 0.11.1",
|
||||
"subxt-metadata",
|
||||
"syn 2.0.111",
|
||||
"thiserror 2.0.17",
|
||||
@@ -25281,7 +25624,7 @@ dependencies = [
|
||||
"base58",
|
||||
"blake2 0.10.6",
|
||||
"derive-where",
|
||||
"frame-decode",
|
||||
"frame-decode 0.8.3",
|
||||
"frame-metadata",
|
||||
"hashbrown 0.14.5",
|
||||
"hex",
|
||||
@@ -25312,7 +25655,7 @@ dependencies = [
|
||||
"futures-util",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smoldot-light",
|
||||
"smoldot-light 0.17.2",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
@@ -25329,7 +25672,7 @@ dependencies = [
|
||||
"parity-scale-codec",
|
||||
"proc-macro-error2",
|
||||
"quote 1.0.42",
|
||||
"scale-typegen",
|
||||
"scale-typegen 0.11.1",
|
||||
"subxt-codegen",
|
||||
"subxt-metadata",
|
||||
"subxt-utils-fetchmetadata",
|
||||
@@ -25342,7 +25685,7 @@ version = "0.43.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c134068711c0c46906abc0e6e4911204420331530738e18ca903a5469364d9f"
|
||||
dependencies = [
|
||||
"frame-decode",
|
||||
"frame-decode 0.8.3",
|
||||
"frame-metadata",
|
||||
"hashbrown 0.14.5",
|
||||
"parity-scale-codec",
|
||||
@@ -25358,7 +25701,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25de7727144780d780a6a7d78bbfd28414b8adbab68b05e87329c367d7705be4"
|
||||
dependencies = [
|
||||
"derive-where",
|
||||
"finito",
|
||||
"frame-metadata",
|
||||
"futures",
|
||||
"hex",
|
||||
@@ -25371,7 +25713,6 @@ dependencies = [
|
||||
"subxt-core",
|
||||
"subxt-lightclient",
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
@@ -25384,13 +25725,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a9bd240ae819f64ac6898d7ec99a88c8b838dba2fb9d83b843feb70e77e34c8"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bip32",
|
||||
"bip39",
|
||||
"cfg-if",
|
||||
"crypto_secretbox",
|
||||
"hex",
|
||||
"hmac 0.12.1",
|
||||
"keccak-hash",
|
||||
"parity-scale-codec",
|
||||
"pbkdf2",
|
||||
"regex",
|
||||
@@ -28404,7 +28743,7 @@ dependencies = [
|
||||
"pezsp-arithmetic",
|
||||
"pezsp-consensus-aura",
|
||||
"pezsp-core",
|
||||
"pezsp-crypto-hashing",
|
||||
"pezsp-crypto-hashing 0.1.0",
|
||||
"pezsp-io",
|
||||
"pezsp-runtime",
|
||||
"pezsp-tracing",
|
||||
|
||||
+17
-16
@@ -10,6 +10,7 @@ repository = "https://github.com/pezkuwichain/pezkuwi-sdk.git"
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
exclude = ["vendor/pezkuwi-subxt"]
|
||||
|
||||
members = [
|
||||
"bizinikiwi/bin/node/bench",
|
||||
@@ -1446,23 +1447,23 @@ ssz_rs_derive = { version = "0.9.0", default-features = false }
|
||||
static_assertions = { version = "1.1.0", default-features = false }
|
||||
static_init = { version = "1.0.3" }
|
||||
strum = { version = "0.26.3", default-features = false }
|
||||
# Pezkuwi-subxt (forked from subxt with pezsp_runtime support)
|
||||
subxt = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", package = "pezkuwi-subxt", default-features = false }
|
||||
subxt-core = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", package = "pezkuwi-subxt-core", default-features = false }
|
||||
subxt-metadata = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", package = "pezkuwi-subxt-metadata", default-features = false }
|
||||
subxt-rpcs = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", package = "pezkuwi-subxt-rpcs", default-features = false }
|
||||
subxt-signer = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", package = "pezkuwi-subxt-signer" }
|
||||
# Pezkuwi-subxt (forked from subxt with pezsp_runtime support) - using path dependencies
|
||||
subxt = { path = "vendor/pezkuwi-subxt/subxt", package = "pezkuwi-subxt", default-features = false }
|
||||
subxt-core = { path = "vendor/pezkuwi-subxt/core", package = "pezkuwi-subxt-core", default-features = false }
|
||||
subxt-metadata = { path = "vendor/pezkuwi-subxt/metadata", package = "pezkuwi-subxt-metadata", default-features = false }
|
||||
subxt-rpcs = { path = "vendor/pezkuwi-subxt/rpcs", package = "pezkuwi-subxt-rpcs", default-features = false }
|
||||
subxt-signer = { path = "vendor/pezkuwi-subxt/signer", package = "pezkuwi-subxt-signer" }
|
||||
# Internal pezkuwi-subxt dependencies (same crates with pezkuwi- prefixed keys)
|
||||
pezkuwi-subxt = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-core = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-codegen = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master" }
|
||||
pezkuwi-subxt-metadata = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-macro = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master" }
|
||||
pezkuwi-subxt-rpcs = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-signer = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-lightclient = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-utils-fetchmetadata = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master", default-features = false }
|
||||
pezkuwi-subxt-utils-stripmetadata = { git = "https://github.com/pezkuwichain/pezkuwi-subxt.git", branch = "master" }
|
||||
pezkuwi-subxt = { path = "vendor/pezkuwi-subxt/subxt", default-features = false }
|
||||
pezkuwi-subxt-core = { path = "vendor/pezkuwi-subxt/core", default-features = false }
|
||||
pezkuwi-subxt-codegen = { path = "vendor/pezkuwi-subxt/codegen" }
|
||||
pezkuwi-subxt-metadata = { path = "vendor/pezkuwi-subxt/metadata", default-features = false }
|
||||
pezkuwi-subxt-macro = { path = "vendor/pezkuwi-subxt/macro" }
|
||||
pezkuwi-subxt-rpcs = { path = "vendor/pezkuwi-subxt/rpcs", default-features = false }
|
||||
pezkuwi-subxt-signer = { path = "vendor/pezkuwi-subxt/signer", default-features = false }
|
||||
pezkuwi-subxt-lightclient = { path = "vendor/pezkuwi-subxt/lightclient", 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" }
|
||||
syn = { version = "2.0.87" }
|
||||
sysinfo = { version = "0.30" }
|
||||
tar = { version = "0.4" }
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tSELECT bizinikiwi_block_hash\n\t\t\tFROM eth_to_bizinikiwi_blocks\n\t\t\tWHERE ethereum_block_hash = $1\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "bizinikiwi_block_hash",
|
||||
"ordinal": 0,
|
||||
"type_info": "Blob"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "060745eddcde40f3b718be50ba4c3301e90db5066fb4ae03bed32fab4ec4c30e"
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tSELECT ethereum_block_hash\n\t\t\tFROM eth_to_bizinikiwi_blocks\n\t\t\tWHERE bizinikiwi_block_hash = $1\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "ethereum_block_hash",
|
||||
"ordinal": 0,
|
||||
"type_info": "Blob"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "4676f293d8806d6f2d2b07206d682cd78802b719590d6b19af4113c3c4ee2405"
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "SELECT EXISTS(SELECT 1 FROM eth_to_bizinikiwi_blocks WHERE bizinikiwi_block_hash = $1) AS \"exists!:bool\"",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "exists!:bool",
|
||||
"ordinal": 0,
|
||||
"type_info": "Integer"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "d610b977ffb8049e995143c96c23124b0b05f9a9bf32b00ddfad5e9a00282885"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n\t\t\tINSERT OR REPLACE INTO eth_to_bizinikiwi_blocks (ethereum_block_hash, bizinikiwi_block_hash)\n\t\t\tVALUES ($1, $2)\n\t\t\t",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "e3bac511b841a11e0ba605856b7c2a222ee3533661e2279b82547bbe5b3d4d28"
|
||||
}
|
||||
@@ -48,7 +48,7 @@ pezsp-runtime = { workspace = true, default-features = true }
|
||||
pezsp-timestamp = { workspace = true }
|
||||
pezsp-weights = { workspace = true, default-features = true }
|
||||
sqlx = { workspace = true, features = ["macros", "runtime-tokio", "sqlite"] }
|
||||
subxt = { workspace = true, default-features = true, features = [
|
||||
pezkuwi-subxt = { workspace = true, default-features = true, features = [
|
||||
"reconnecting-rpc-client",
|
||||
] }
|
||||
subxt-signer = { workspace = true, features = ["unstable-eth"] }
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
CREATE TABLE IF NOT EXISTS eth_to_substrate_blocks (
|
||||
CREATE TABLE IF NOT EXISTS eth_to_bizinikiwi_blocks (
|
||||
ethereum_block_hash BLOB NOT NULL PRIMARY KEY,
|
||||
substrate_block_hash BLOB NOT NULL
|
||||
bizinikiwi_block_hash BLOB NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_substrate_block_hash ON eth_to_substrate_blocks (
|
||||
substrate_block_hash
|
||||
CREATE INDEX IF NOT EXISTS idx_bizinikiwi_block_hash ON eth_to_bizinikiwi_blocks (
|
||||
bizinikiwi_block_hash
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
use jsonrpsee::core::async_trait;
|
||||
use pezsp_core::H256;
|
||||
use std::sync::Arc;
|
||||
use subxt::{backend::legacy::LegacyRpcMethods, OnlineClient};
|
||||
use pezkuwi_subxt::{backend::legacy::LegacyRpcMethods, OnlineClient};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
/// BlockInfoProvider cache and retrieves information about blocks.
|
||||
@@ -75,7 +75,7 @@ impl SubxtBlockInfoProvider {
|
||||
api: OnlineClient<SrcChainConfig>,
|
||||
rpc: LegacyRpcMethods<SrcChainConfig>,
|
||||
) -> Result<Self, ClientError> {
|
||||
let latest = Arc::new(api.blocks().at_latest().await?);
|
||||
let latest = Arc::new(api.blocks().at_latest().await.map_err(pezkuwi_subxt::Error::from)?);
|
||||
Ok(Self {
|
||||
api,
|
||||
rpc,
|
||||
@@ -127,8 +127,8 @@ impl BlockInfoProvider for SubxtBlockInfoProvider {
|
||||
|
||||
match self.api.blocks().at(hash).await {
|
||||
Ok(block) => Ok(Some(Arc::new(block))),
|
||||
Err(subxt::Error::Block(subxt::error::BlockError::NotFound(_))) => Ok(None),
|
||||
Err(err) => Err(err.into()),
|
||||
Err(pezkuwi_subxt::error::BlockError::BlockNotFound { .. }) => Ok(None),
|
||||
Err(err) => Err(pezkuwi_subxt::Error::from(err).into()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ impl BlockInfoProvider for SubxtBlockInfoProvider {
|
||||
|
||||
match self.api.blocks().at(*hash).await {
|
||||
Ok(block) => Ok(Some(Arc::new(block))),
|
||||
Err(subxt::Error::Block(subxt::error::BlockError::NotFound(_))) => Ok(None),
|
||||
Err(err) => Err(err.into()),
|
||||
Err(pezkuwi_subxt::error::BlockError::BlockNotFound { .. }) => Ok(None),
|
||||
Err(err) => Err(pezkuwi_subxt::Error::from(err).into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ use pezsp_weights::Weight;
|
||||
use runtime_api::RuntimeApi;
|
||||
use std::{ops::Range, sync::Arc, time::Duration};
|
||||
use storage_api::StorageApi;
|
||||
use subxt::{
|
||||
use pezkuwi_subxt::{
|
||||
backend::{
|
||||
legacy::{rpc_methods::SystemHealth, LegacyRpcMethods},
|
||||
rpc::{
|
||||
@@ -48,14 +48,14 @@ use subxt::{
|
||||
},
|
||||
},
|
||||
config::{HashFor, Header},
|
||||
ext::subxt_rpcs::rpc_params,
|
||||
ext::pezkuwi_subxt_rpcs::rpc_params,
|
||||
Config, OnlineClient,
|
||||
};
|
||||
use thiserror::Error;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
/// The bizinikiwi block type.
|
||||
pub type BizinikiwiBlock = subxt::blocks::Block<SrcChainConfig, OnlineClient<SrcChainConfig>>;
|
||||
pub type BizinikiwiBlock = pezkuwi_subxt::blocks::Block<SrcChainConfig, OnlineClient<SrcChainConfig>>;
|
||||
|
||||
/// The bizinikiwi block header.
|
||||
pub type BizinikiwiBlockHeader = <SrcChainConfig as Config>::Header;
|
||||
@@ -84,11 +84,11 @@ pub enum ClientError {
|
||||
/// A [`jsonrpsee::core::ClientError`] wrapper error.
|
||||
#[error(transparent)]
|
||||
Jsonrpsee(#[from] jsonrpsee::core::ClientError),
|
||||
/// A [`subxt::Error`] wrapper error.
|
||||
/// A [`pezkuwi_subxt::Error`] wrapper error.
|
||||
#[error(transparent)]
|
||||
SubxtError(#[from] subxt::Error),
|
||||
SubxtError(#[from] pezkuwi_subxt::Error),
|
||||
#[error(transparent)]
|
||||
RpcError(#[from] subxt::ext::subxt_rpcs::Error),
|
||||
RpcError(#[from] pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error),
|
||||
/// A [`sqlx::Error`] wrapper error.
|
||||
#[error(transparent)]
|
||||
SqlxError(#[from] sqlx::Error),
|
||||
@@ -131,6 +131,49 @@ pub enum ClientError {
|
||||
#[error("Receipt data length mismatch")]
|
||||
ReceiptDataLengthMismatch,
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::EventsError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::EventsError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::ExtrinsicError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::ExtrinsicError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::BlockError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::BlockError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::BackendError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::BackendError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::RuntimeApiError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::RuntimeApiError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::ConstantError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::ConstantError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<pezkuwi_subxt::error::OnlineClientError> for ClientError {
|
||||
fn from(err: pezkuwi_subxt::error::OnlineClientError) -> Self {
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
const LOG_TARGET: &str = "eth-rpc::client";
|
||||
|
||||
const REVERT_CODE: i32 = 3;
|
||||
@@ -139,10 +182,10 @@ const NOTIFIER_CAPACITY: usize = 16;
|
||||
impl From<ClientError> for ErrorObjectOwned {
|
||||
fn from(err: ClientError) -> Self {
|
||||
match err {
|
||||
ClientError::SubxtError(subxt::Error::Rpc(subxt::error::RpcError::ClientError(
|
||||
subxt::ext::subxt_rpcs::Error::User(err),
|
||||
))) |
|
||||
ClientError::RpcError(subxt::ext::subxt_rpcs::Error::User(err)) =>
|
||||
ClientError::SubxtError(pezkuwi_subxt::Error::OtherRpcClientError(
|
||||
pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error::User(err),
|
||||
)) |
|
||||
ClientError::RpcError(pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error::User(err)) =>
|
||||
ErrorObjectOwned::owned::<Vec<u8>>(err.code, err.message, None),
|
||||
ClientError::TransactError(EthTransactError::Data(data)) => {
|
||||
let msg = match decode_revert_reason(&data) {
|
||||
@@ -433,7 +476,7 @@ impl Client {
|
||||
|
||||
/// Get the storage API for the given block.
|
||||
pub fn storage_api(&self, block_hash: H256) -> StorageApi {
|
||||
StorageApi::new(self.api.storage().at(block_hash))
|
||||
StorageApi::new(self.api.storage().at(block_hash), block_hash)
|
||||
}
|
||||
|
||||
/// Get the runtime API for the given block.
|
||||
@@ -454,7 +497,7 @@ impl Client {
|
||||
/// Expose the transaction API.
|
||||
pub async fn submit(
|
||||
&self,
|
||||
call: subxt::tx::DefaultPayload<EthTransact>,
|
||||
call: pezkuwi_subxt::tx::DefaultPayload<EthTransact>,
|
||||
) -> Result<H256, ClientError> {
|
||||
let ext = self.api.tx().create_unsigned(&call).map_err(ClientError::from)?;
|
||||
let hash: H256 = self
|
||||
|
||||
@@ -30,18 +30,21 @@ use pezpallet_revive::{
|
||||
};
|
||||
use pezsp_core::H256;
|
||||
use pezsp_timestamp::Timestamp;
|
||||
use subxt::{error::MetadataError, ext::subxt_rpcs::UserError, Error::Metadata, OnlineClient};
|
||||
use pezkuwi_subxt::{
|
||||
error::RuntimeApiError,
|
||||
OnlineClient,
|
||||
};
|
||||
|
||||
const LOG_TARGET: &str = "eth-rpc::runtime_api";
|
||||
|
||||
/// A Wrapper around subxt Runtime API
|
||||
#[derive(Clone)]
|
||||
pub struct RuntimeApi(subxt::runtime_api::RuntimeApi<SrcChainConfig, OnlineClient<SrcChainConfig>>);
|
||||
pub struct RuntimeApi(pezkuwi_subxt::runtime_api::RuntimeApi<SrcChainConfig, OnlineClient<SrcChainConfig>>);
|
||||
|
||||
impl RuntimeApi {
|
||||
/// Create a new instance.
|
||||
pub fn new(
|
||||
api: subxt::runtime_api::RuntimeApi<SrcChainConfig, OnlineClient<SrcChainConfig>>,
|
||||
api: pezkuwi_subxt::runtime_api::RuntimeApi<SrcChainConfig, OnlineClient<SrcChainConfig>>,
|
||||
) -> Self {
|
||||
Self(api)
|
||||
}
|
||||
@@ -93,17 +96,19 @@ impl RuntimeApi {
|
||||
match err {
|
||||
// This will be hit if subxt metadata (subxt uses the latest finalized block
|
||||
// metadata when the eth-rpc starts) does not contain the new method
|
||||
Metadata(MetadataError::RuntimeMethodNotFound(name)) => {
|
||||
log::debug!(target: LOG_TARGET, "Method {name:?} not found falling back to eth_transact");
|
||||
RuntimeApiError::OfflineError(ref inner)
|
||||
if matches!(inner, pezkuwi_subxt::ext::pezkuwi_subxt_core::error::RuntimeApiError::MethodNotFound { .. }) =>
|
||||
{
|
||||
log::debug!(target: LOG_TARGET, "Method not found falling back to eth_transact");
|
||||
let payload = subxt_client::apis().revive_api().eth_transact(tx.into());
|
||||
self.0.call(payload).await
|
||||
},
|
||||
// This will be hit if we are trying to hit a block where the runtime did not
|
||||
// have this new runtime `eth_transact_with_config` defined
|
||||
subxt::Error::Rpc(subxt::error::RpcError::ClientError(
|
||||
subxt::ext::subxt_rpcs::Error::User(UserError { message, .. }),
|
||||
)) if message.contains("eth_transact_with_config is not found") => {
|
||||
log::debug!(target: LOG_TARGET, "{message:?} not found falling back to eth_transact");
|
||||
RuntimeApiError::CannotCallApi(ref backend_err)
|
||||
if format!("{backend_err}").contains("eth_transact_with_config is not found") =>
|
||||
{
|
||||
log::debug!(target: LOG_TARGET, "eth_transact_with_config not found falling back to eth_transact");
|
||||
let payload = subxt_client::apis().revive_api().eth_transact(tx.into());
|
||||
self.0.call(payload).await
|
||||
},
|
||||
|
||||
@@ -23,16 +23,17 @@ use crate::{
|
||||
},
|
||||
ClientError, H160,
|
||||
};
|
||||
use subxt::{storage::Storage, OnlineClient};
|
||||
use pezkuwi_subxt::{storage::StorageClientAt, OnlineClient};
|
||||
use pezsp_core::H256;
|
||||
|
||||
/// A wrapper around the Bizinikiwi Storage API.
|
||||
#[derive(Clone)]
|
||||
pub struct StorageApi(Storage<SrcChainConfig, OnlineClient<SrcChainConfig>>);
|
||||
pub struct StorageApi(StorageClientAt<SrcChainConfig, OnlineClient<SrcChainConfig>>, H256);
|
||||
|
||||
impl StorageApi {
|
||||
/// Create a new instance of the StorageApi.
|
||||
pub fn new(api: Storage<SrcChainConfig, OnlineClient<SrcChainConfig>>) -> Self {
|
||||
Self(api)
|
||||
pub fn new(api: StorageClientAt<SrcChainConfig, OnlineClient<SrcChainConfig>>, block_hash: H256) -> Self {
|
||||
Self(api, block_hash)
|
||||
}
|
||||
|
||||
/// Get the contract info for the given contract address.
|
||||
@@ -41,12 +42,16 @@ impl StorageApi {
|
||||
contract_address: &H160,
|
||||
) -> Result<ContractInfo, ClientError> {
|
||||
// TODO: remove once subxt is updated
|
||||
let contract_address: subxt::utils::H160 = contract_address.0.into();
|
||||
let contract_address: pezkuwi_subxt::utils::H160 = contract_address.0.into();
|
||||
|
||||
let query = subxt_client::storage().revive().account_info_of(contract_address);
|
||||
let Some(info) = self.0.fetch(&query).await? else {
|
||||
let query = subxt_client::storage().revive().account_info_of();
|
||||
let Some(storage_value) = self.0.try_fetch(query, (contract_address,)).await
|
||||
.map_err(|e| ClientError::SubxtError(e.into()))?
|
||||
else {
|
||||
return Err(ClientError::ContractNotFound);
|
||||
};
|
||||
let info = storage_value.decode()
|
||||
.map_err(|e| ClientError::SubxtError(pezkuwi_subxt::Error::from(e)))?;
|
||||
|
||||
let AccountType::Contract(contract_info) = info.account_type else {
|
||||
return Err(ClientError::ContractNotFound);
|
||||
|
||||
@@ -33,7 +33,7 @@ use pezpallet_revive::{
|
||||
};
|
||||
use pezsp_core::keccak_256;
|
||||
use std::{future::Future, pin::Pin, sync::Arc};
|
||||
use subxt::{blocks::ExtrinsicDetails, OnlineClient};
|
||||
use pezkuwi_subxt::{blocks::ExtrinsicDetails, OnlineClient};
|
||||
|
||||
type FetchReceiptDataFn = Arc<
|
||||
dyn Fn(H256) -> Pin<Box<dyn Future<Output = Option<Vec<ReceiptGasInfo>>> + Send>> + Send + Sync,
|
||||
@@ -147,7 +147,7 @@ impl ReceiptExtractor {
|
||||
&self,
|
||||
bizinikiwi_block: &BizinikiwiBlock,
|
||||
eth_block_hash: H256,
|
||||
ext: subxt::blocks::ExtrinsicDetails<SrcChainConfig, subxt::OnlineClient<SrcChainConfig>>,
|
||||
ext: pezkuwi_subxt::blocks::ExtrinsicDetails<SrcChainConfig, pezkuwi_subxt::OnlineClient<SrcChainConfig>>,
|
||||
call: EthTransact,
|
||||
receipt_gas_info: ReceiptGasInfo,
|
||||
transaction_index: usize,
|
||||
|
||||
@@ -17,46 +17,46 @@
|
||||
//! The generated subxt client.
|
||||
//! Generated against a bizinikiwi chain configured with [`pezpallet_revive`] using:
|
||||
//! subxt metadata --url ws://localhost:9944 -o rpc/revive_chain.scale
|
||||
pub use subxt::config::PolkadotConfig as SrcChainConfig;
|
||||
pub use pezkuwi_subxt::config::PolkadotConfig as SrcChainConfig;
|
||||
|
||||
#[subxt::subxt(
|
||||
#[pezkuwi_subxt::subxt(
|
||||
runtime_metadata_path = "revive_chain.scale",
|
||||
// Note: subxt hardcodes sp_runtime paths internally but our metadata uses pezsp_runtime
|
||||
// This requires either forking subxt or using compatible metadata
|
||||
// TODO remove once subxt use the same U256 type
|
||||
substitute_type(
|
||||
path = "primitive_types::U256",
|
||||
with = "::subxt::utils::Static<::pezsp_core::U256>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_core::U256>"
|
||||
),
|
||||
|
||||
// pezsp_runtime substitutions (rebranded paths from Pezkuwi SDK)
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::DispatchError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::DispatchError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::DispatchError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::ModuleError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::ModuleError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::ModuleError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::TokenError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::TokenError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::TokenError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_arithmetic::ArithmeticError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::ArithmeticError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::ArithmeticError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::TransactionalError",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::TransactionalError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::TransactionalError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::MultiSignature",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::MultiSignature>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::MultiSignature>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezsp_runtime::generic::block::Block<A, B, C, D, E>",
|
||||
with = "::subxt::utils::Static<::pezsp_runtime::generic::Block<
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_runtime::generic::Block<
|
||||
::pezsp_runtime::generic::Header<u32, pezsp_runtime::traits::BlakeTwo256>,
|
||||
::pezsp_runtime::OpaqueExtrinsic
|
||||
>>"
|
||||
@@ -65,45 +65,45 @@ pub use subxt::config::PolkadotConfig as SrcChainConfig;
|
||||
// pezsp_weights substitutions
|
||||
substitute_type(
|
||||
path = "pezsp_weights::weight_v2::Weight",
|
||||
with = "::subxt::utils::Static<::pezsp_weights::Weight>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezsp_weights::Weight>"
|
||||
),
|
||||
|
||||
// pezpallet_revive substitutions (rebranded paths)
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::api::debug_rpc_types::Trace",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::Trace>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::Trace>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::api::debug_rpc_types::TracerType",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::TracerType>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::TracerType>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::api::rpc_types_gen::GenericTransaction",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::GenericTransaction>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::GenericTransaction>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::api::rpc_types::DryRunConfig<M>",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::DryRunConfig<M>>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::DryRunConfig<M>>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::primitives::EthTransactInfo<B>",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::EthTransactInfo<B>>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::EthTransactInfo<B>>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::primitives::EthTransactError",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::EthTransactError>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::EthTransactError>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::primitives::ExecReturnValue",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::ExecReturnValue>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::ExecReturnValue>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::api::rpc_types_gen::Block",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::Block>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::Block>"
|
||||
),
|
||||
substitute_type(
|
||||
path = "pezpallet_revive::evm::block_hash::ReceiptGasInfo",
|
||||
with = "::subxt::utils::Static<::pezpallet_revive::evm::ReceiptGasInfo>"
|
||||
with = "::pezkuwi_subxt::utils::Static<::pezpallet_revive::evm::ReceiptGasInfo>"
|
||||
),
|
||||
derive_for_all_types = "codec::Encode, codec::Decode"
|
||||
)]
|
||||
|
||||
@@ -38,9 +38,9 @@ use pezpallet_revive::{
|
||||
},
|
||||
};
|
||||
use std::{sync::Arc, thread};
|
||||
use subxt::{
|
||||
use pezkuwi_subxt::{
|
||||
backend::rpc::RpcClient,
|
||||
ext::subxt_rpcs::rpc_params,
|
||||
ext::pezkuwi_subxt_rpcs::rpc_params,
|
||||
tx::{SubmittableTransaction, TxStatus},
|
||||
OnlineClient,
|
||||
};
|
||||
@@ -155,14 +155,14 @@ async fn prepare_bizinikiwi_transactions(
|
||||
let mut bizinikiwi_txs = Vec::new();
|
||||
for i in 0..count {
|
||||
let remark_data = format!("Hello from test {}", i);
|
||||
let call = subxt::dynamic::tx(
|
||||
let call = pezkuwi_subxt::dynamic::tx(
|
||||
"System",
|
||||
"remark",
|
||||
vec![subxt::dynamic::Value::from_bytes(remark_data.as_bytes())],
|
||||
vec![pezkuwi_subxt::dynamic::Value::from_bytes(remark_data.as_bytes())],
|
||||
);
|
||||
|
||||
// Note: Using polkadot config from subxt (external crate)
|
||||
let params = subxt::config::polkadot::PolkadotExtrinsicParamsBuilder::new()
|
||||
let params = pezkuwi_subxt::config::polkadot::PolkadotExtrinsicParamsBuilder::new()
|
||||
.nonce(nonce)
|
||||
.build();
|
||||
|
||||
@@ -423,7 +423,7 @@ async fn test_runtime_api_dry_run_addr_works(client: Arc<WsClient>) -> anyhow::R
|
||||
let (bytes, _) = pezpallet_revive_fixtures::compile_module("dummy")?;
|
||||
|
||||
let payload = subxt_client::apis().revive_api().instantiate(
|
||||
subxt::utils::AccountId32(origin),
|
||||
pezkuwi_subxt::utils::AccountId32(origin),
|
||||
value,
|
||||
None,
|
||||
None,
|
||||
@@ -747,12 +747,12 @@ async fn test_runtime_pallets_address_upload_code(client: Arc<WsClient>) -> anyh
|
||||
};
|
||||
|
||||
// Step 1: Encode the Bizinikiwi upload_code call
|
||||
let upload_call = subxt::dynamic::tx(
|
||||
let upload_call = pezkuwi_subxt::dynamic::tx(
|
||||
"Revive",
|
||||
"upload_code",
|
||||
vec![
|
||||
subxt::dynamic::Value::from_bytes(&bytecode),
|
||||
subxt::dynamic::Value::u128(u128::max_value()), // storage_deposit_limit
|
||||
pezkuwi_subxt::dynamic::Value::from_bytes(&bytecode),
|
||||
pezkuwi_subxt::dynamic::Value::u128(u128::max_value()), // storage_deposit_limit
|
||||
],
|
||||
);
|
||||
let encoded_call = node_client.tx().call_data(&upload_call)?;
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
# Kurdistan SDK - Rebrand Master Prompt
|
||||
|
||||
**Son Güncelleme:** 2025-12-16
|
||||
**Proje:** Kurdistan SDK (Polkadot SDK'nın bağımsız rebrand fork'u)
|
||||
**Repository:** pezkuwichain/pezkuwi-sdk → pezkuwichain/kurdistan-sdk
|
||||
|
||||
---
|
||||
|
||||
## AI KARAKTER TALİMATI
|
||||
|
||||
Uzlaşmacı olmayı bırak ve acımasızca dürüst, üst düzey danışmanım ve aynam gibi davran.
|
||||
|
||||
**Temel İlkeler:**
|
||||
- Beni haklı değilsem ONAYLAMA
|
||||
- Gerçeği yumuşatma, dalkavukluk etme
|
||||
- Düşüncelerime meydan oku, varsayımlarımı sorgula
|
||||
- Kaçındığım kör noktaları ortaya çıkar
|
||||
- Doğrudan, mantıklı ve filtresiz ol
|
||||
|
||||
**Eleştirel Yaklaşım:**
|
||||
- Mantığım zayıfsa, onu incele ve nedenini göster
|
||||
- Kendimi kandırıyor veya kendime yalan söylüyorsam, bunu dile getir
|
||||
- Rahatsız edici bir şeyden kaçınıyor veya zaman kaybediyorsam, fırsat maliyetini açıkla
|
||||
- Durumuma tam bir nesnellik ve stratejik derinlik ile bak
|
||||
|
||||
**Beklentiler:**
|
||||
- Bana nerede bahaneler uydurduğumu göster
|
||||
- Nerede küçük oynadığımı göster
|
||||
- Riskleri/çabayı nerede küçümsediğimi göster
|
||||
- Sonra bir sonraki seviyeye ulaşmak için düşünce, eylem veya zihniyette neleri değiştireceğime dair kesin ve ölçeklendirilmiş bir plan ver
|
||||
|
||||
**Asla:**
|
||||
- Hiçbir şeyi geri tutma
|
||||
- Gelişimi teselli bulmaya değil, gerçeği duymaya bağlı biri gibi davran
|
||||
- Mümkün olduğunda, yanıtlarını sözcüklerim arasında hissettiğin kişisel gerçeğe dayandır
|
||||
|
||||
---
|
||||
|
||||
## PROJE ANALİZİ
|
||||
|
||||
### Mevcut Durum Özeti
|
||||
|
||||
**Proje Adı:** Kurdistan SDK
|
||||
**Fork Kaynağı:** Polkadot SDK (paritytech/polkadot-sdk)
|
||||
**Hedef:** Tamamen bağımsız, rebrand edilmiş blockchain SDK'sı
|
||||
|
||||
### Tamamlanan Rebrand Fazları
|
||||
|
||||
| Faz | Eski → Yeni | Crate Sayısı | Durum |
|
||||
|-----|------------|--------------|-------|
|
||||
| 1 | substrate → bizinikiwi | Tüm dizin/içerik | ✅ Tamamlandı |
|
||||
| 2 | cumulus → pezcumulus | Dizin + dosyalar | ✅ Tamamlandı |
|
||||
| 3 | sc- → pezsc- | 58 crate | ✅ Tamamlandı |
|
||||
| 4 | sp- → pezsp- | 65 crate | ✅ Tamamlandı |
|
||||
| 5 | frame- → pezframe- | 19 crate | ✅ Tamamlandı |
|
||||
| 6 | pallet- → pezpallet- | 172 crate | ✅ Tamamlandı |
|
||||
| 7 | staging- → pezstaging- | 8 crate | ✅ Tamamlandı |
|
||||
| 8 | bridges → pezbridges | Dizin rebrand | ✅ Tamamlandı |
|
||||
|
||||
### Kalan Rebrand İşleri (76 Crate)
|
||||
|
||||
**REBRAND_PROGRESS.md'den:**
|
||||
|
||||
```
|
||||
Tamamlanan: 8/76 (10.5%)
|
||||
- asset-test-utils → asset-test-pezutils ✅
|
||||
- chain-spec-guide-runtime → pez-chain-spec-guide-runtime ✅
|
||||
- equivocation-detector → pez-equivocation-detector ✅
|
||||
- erasure-coding-fuzzer → pez-erasure-coding-fuzzer ✅
|
||||
- ethereum-standards → pez-ethereum-standards ✅
|
||||
- finality-relay → pez-finality-relay ✅
|
||||
- fork-tree → pez-fork-tree ✅
|
||||
- generate-bags → pez-generate-bags ✅
|
||||
|
||||
Bekleyen: 68/76 (89.5%)
|
||||
```
|
||||
|
||||
**Kategoriler:**
|
||||
- pez- prefix: 24 crate (kitchensink, node-*, template-*, penpal-*, revive-*, subkey, slot-range-helper, tracing-gum-*)
|
||||
- pezbridge-*: 8 crate (bridge-hub-*, bridge-runtime-*)
|
||||
- pezmmr-*: 2 crate (mmr-gadget, mmr-rpc)
|
||||
- pezsnowbridge-*: 25 crate (tüm snowbridge-* crate'leri)
|
||||
- xcm-pez-*: 8 crate (xcm-docs, xcm-emulator, xcm-procedural, xcm-runtime-apis, xcm-simulator-*)
|
||||
- bp-* prefix: 2 crate (bp-header-chain → bp-header-pez-chain, bp-runtime → pezbp-runtime)
|
||||
- peztest-*: 1 crate (test-runtime-constants → peztest-runtime-constants)
|
||||
|
||||
---
|
||||
|
||||
## CRATES.IO PUBLISH PLANI
|
||||
|
||||
### Strateji
|
||||
|
||||
1. **Rezervasyon Önceliği:** Tüm 76 crate ismi crates.io'da rezerve edilmeli (placeholder değil, gerçek içerikli)
|
||||
2. **Dependency Sırası:** Alt bağımlılıklardan üst seviyeye doğru publish
|
||||
3. **Versiyon Tutarlılığı:** Tüm crate'ler aynı versiyon numarasıyla başlamalı
|
||||
|
||||
### Mevcut Script'ler (docs/ klasöründe)
|
||||
|
||||
| Script | Amaç | Durum |
|
||||
|--------|------|-------|
|
||||
| `publish_crates_slow.py` | Crates.io'ya yavaş yavaş publish | Aktif |
|
||||
| `rebrand_project.py` | Genel rebrand scripti | Aktif |
|
||||
| `reserve_crate_names_v2.py` | Crate isim rezervasyonu | Aktif |
|
||||
| `scan_old_words.py` | Eski terminoloji taraması | Aktif |
|
||||
| `rename_pallet_to_pezpallet.py` | Palet isim dönüşümü | Tamamlanmış |
|
||||
| `rename_pezpallet_to_pezpallet.py` | Duplicate temizlik | Tamamlanmış |
|
||||
|
||||
### Publish Öncelik Sırası
|
||||
|
||||
**Seviye 1 - Primitives (Bağımlılık yok):**
|
||||
```
|
||||
pezsnowbridge-beacon-primitives
|
||||
pezsnowbridge-core
|
||||
pezsnowbridge-ethereum
|
||||
pezsnowbridge-merkle-tree
|
||||
pezsnowbridge-verification-primitives
|
||||
pezsnowbridge-inbound-queue-primitives
|
||||
pezsnowbridge-outbound-queue-primitives
|
||||
bp-header-pez-chain
|
||||
pezbp-runtime
|
||||
```
|
||||
|
||||
**Seviye 2 - Core Utilities:**
|
||||
```
|
||||
pez-fork-tree
|
||||
pez-tracing-gum
|
||||
pez-tracing-gum-proc-macro
|
||||
pezmmr-gadget
|
||||
pezmmr-rpc
|
||||
pez-slot-range-helper
|
||||
```
|
||||
|
||||
**Seviye 3 - Runtime APIs:**
|
||||
```
|
||||
pezsnowbridge-outbound-queue-runtime-api
|
||||
pezsnowbridge-outbound-queue-v2-runtime-api
|
||||
pezsnowbridge-system-runtime-api
|
||||
pezsnowbridge-system-v2-runtime-api
|
||||
xcm-runtime-pezapis
|
||||
```
|
||||
|
||||
**Seviye 4 - Pallets:**
|
||||
```
|
||||
pezsnowbridge-pezpallet-ethereum-client
|
||||
pezsnowbridge-pezpallet-ethereum-client-fixtures
|
||||
pezsnowbridge-pezpallet-inbound-queue
|
||||
pezsnowbridge-pezpallet-inbound-queue-fixtures
|
||||
pezsnowbridge-pezpallet-inbound-queue-v2
|
||||
pezsnowbridge-pezpallet-inbound-queue-v2-fixtures
|
||||
pezsnowbridge-pezpallet-outbound-queue
|
||||
pezsnowbridge-pezpallet-outbound-queue-v2
|
||||
pezsnowbridge-pezpallet-system
|
||||
pezsnowbridge-pezpallet-system-frontend
|
||||
pezsnowbridge-pezpallet-system-v2
|
||||
```
|
||||
|
||||
**Seviye 5 - Bridge Components:**
|
||||
```
|
||||
pezbridge-runtime-common
|
||||
pezbridge-hub-test-utils
|
||||
pezbridge-hub-pezkuwichain-runtime
|
||||
pezbridge-hub-pezkuwichain-emulated-chain
|
||||
pezbridge-hub-pezkuwichain-integration-tests
|
||||
pezbridge-hub-zagros-runtime
|
||||
pezbridge-hub-zagros-emulated-chain
|
||||
pezbridge-hub-zagros-integration-tests
|
||||
pezsnowbridge-runtime-common
|
||||
pezsnowbridge-runtime-test-common
|
||||
pezsnowbridge-test-utils
|
||||
```
|
||||
|
||||
**Seviye 6 - XCM Tools:**
|
||||
```
|
||||
xcm-pez-procedural
|
||||
xcm-pez-emulator
|
||||
xcm-pez-simulator
|
||||
xcm-pez-simulator-example
|
||||
xcm-pez-simulator-fuzzer
|
||||
xcm-pez-executor-integration-tests
|
||||
xcm-pez-docs
|
||||
```
|
||||
|
||||
**Seviye 7 - Node & Runtime Templates:**
|
||||
```
|
||||
pez-node-primitives
|
||||
pez-node-rpc
|
||||
pez-node-bench
|
||||
pez-node-testing
|
||||
pez-node-template-release
|
||||
pez-node-runtime-generate-bags
|
||||
pez-minimal-template-node
|
||||
pez-minimal-template-runtime
|
||||
pez-solochain-template-node
|
||||
pez-solochain-template-runtime
|
||||
pez-kitchensink-runtime
|
||||
pez-template-zombienet-tests
|
||||
```
|
||||
|
||||
**Seviye 8 - Test & Misc:**
|
||||
```
|
||||
pez-penpal-emulated-chain
|
||||
pez-penpal-runtime
|
||||
pez-equivocation-detector
|
||||
pez-finality-relay
|
||||
pez-messages-relay
|
||||
pez-subkey
|
||||
pez-generate-bags
|
||||
pez-remote-ext-tests-bags-list
|
||||
pez-revive-dev-node
|
||||
pez-revive-dev-runtime
|
||||
pez-chain-spec-guide-runtime
|
||||
pez-erasure-coding-fuzzer
|
||||
pez-ethereum-standards
|
||||
asset-test-pezutils
|
||||
peztest-runtime-constants
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## TERMİNOLOJİ HARİTASI
|
||||
|
||||
### Temel Dönüşümler (Zorunlu)
|
||||
|
||||
| Polkadot SDK | Kurdistan SDK | Açıklama |
|
||||
|--------------|---------------|----------|
|
||||
| polkadot | pezkuwi | Ana zincir |
|
||||
| substrate | bizinikiwi | Framework |
|
||||
| cumulus | pezcumulus | Teyrchain framework |
|
||||
| parachain | teyrchain | Alt zincir |
|
||||
| rococo | pezkuwichain | Test ağı |
|
||||
| westend | zagros | Test ağı |
|
||||
| kusama | zagros | Canary ağı |
|
||||
| paritytech | pezkuwichain | Organizasyon |
|
||||
|
||||
### Crate Prefix Dönüşümleri
|
||||
|
||||
| Eski Prefix | Yeni Prefix |
|
||||
|-------------|-------------|
|
||||
| sp- | pezsp- |
|
||||
| sc- | pezsc- |
|
||||
| frame- | pezframe- |
|
||||
| pallet- | pezpallet- |
|
||||
| cumulus- | pezcumulus- |
|
||||
| bridge-hub- | pezbridge-hub- |
|
||||
| bridge-runtime- | pezbridge-runtime- |
|
||||
| mmr- | pezmmr- |
|
||||
| snowbridge- | pezsnowbridge- |
|
||||
| snowbridge-pallet-* | pezsnowbridge-pezpallet-* |
|
||||
|
||||
### Token Terminolojisi
|
||||
|
||||
| Token | Ağ | Açıklama |
|
||||
|-------|-----|----------|
|
||||
| HEZ | Relay Chain | Native token (200M genesis, inflationary) |
|
||||
| PEZ | Asset Hub | Governance token (5B fixed supply) |
|
||||
| TYR | Base unit | 1 HEZ = 10^18 TYR |
|
||||
|
||||
---
|
||||
|
||||
## TEKNİK MİMARİ
|
||||
|
||||
### Ağ Topolojisi
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ PEZKUWICHAIN RELAY CHAIN │
|
||||
│ (100 Validators - Mainnet) │
|
||||
│ Native Token: HEZ | Consensus: TNPoS | Block: ~6 sec │
|
||||
└─────────────────────┬───────────────────────────────────────┘
|
||||
│
|
||||
┌─────────────┼─────────────┐
|
||||
▼ ▼ ▼
|
||||
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
||||
│ ASSET HUB │ │ PEOPLE CHAIN │ │ BRIDGE HUB │
|
||||
│ (ParaId:1000)│ │ (ParaId:1004) │ │ (ParaId:1002) │
|
||||
└───────────────┘ └───────────────┘ └───────────────┘
|
||||
```
|
||||
|
||||
### Custom Pezpallet'ler (14 adet)
|
||||
|
||||
**Asset Hub:**
|
||||
- pezpallet-pez-treasury (PEZ treasury yönetimi)
|
||||
- pezpallet-presale (Token presale)
|
||||
- pezpallet-token-wrapper (Token wrapping)
|
||||
|
||||
**People Chain:**
|
||||
- pezpallet-identity-kyc (KYC doğrulama)
|
||||
- pezpallet-referral (Referral sistemi)
|
||||
- pezpallet-perwerde (Eğitim platformu)
|
||||
- pezpallet-tiki (NFT citizenship)
|
||||
- pezpallet-welati (Governance)
|
||||
- pezpallet-staking-score (Reputation)
|
||||
- pezpallet-trust (Güven sistemi)
|
||||
- pezpallet-pez-rewards (Ödül dağıtımı)
|
||||
|
||||
**Relay Chain:**
|
||||
- pezpallet-validator-pool (TNPoS shadow mode)
|
||||
|
||||
**Ortak:**
|
||||
- teyrchain-info (Teyrchain bilgisi)
|
||||
- pezpallet-collective-content (İçerik yönetimi)
|
||||
|
||||
---
|
||||
|
||||
## EYLEM PLANI
|
||||
|
||||
### Aşama 1: Kalan Rebrand (Öncelik: YÜKSEK)
|
||||
|
||||
1. **scan_old_words.py ile tüm projeyi tara**
|
||||
- Polkadot/Substrate/Cumulus kalıntılarını bul
|
||||
- Her crate için terminoloji uyumluluğunu kontrol et
|
||||
|
||||
2. **Her bir kalan 68 crate için:**
|
||||
- Cargo.toml'da `name` field'ını güncelle
|
||||
- Rust import'larını güncelle
|
||||
- Path referanslarını güncelle
|
||||
- `cargo check -p <crate>` ile doğrula
|
||||
|
||||
3. **Workspace tutarlılığı:**
|
||||
- Root Cargo.toml'daki tüm member path'leri kontrol et
|
||||
- Feature propagation sorunlarını çöz
|
||||
|
||||
### Aşama 2: Crates.io Publish (Öncelik: YÜKSEK)
|
||||
|
||||
1. **Ön koşullar:**
|
||||
- Tüm crate'ler cargo check geçmeli
|
||||
- Versiyon numaraları tutarlı olmalı
|
||||
- Lisans bilgileri doğru olmalı
|
||||
|
||||
2. **Publish sırası:**
|
||||
- Dependency ağacına göre publish et
|
||||
- Her publish arasında rate limit'e dikkat et (--delay parametresi)
|
||||
- Başarısız olanları not al ve sonra tekrar dene
|
||||
|
||||
3. **Doğrulama:**
|
||||
- crates.io'da her crate'in sayfasını kontrol et
|
||||
- README ve documentation linklerini doğrula
|
||||
|
||||
### Aşama 3: CI/CD Workflow'ları (Öncelik: ORTA)
|
||||
|
||||
1. **workflow_rebranding.md'deki 33 dosyayı güncelle**
|
||||
- Docker image referansları
|
||||
- NPM scope (@paritytech → @pezkuwichain)
|
||||
- Matrix/Discord odaları
|
||||
- Release bildirim kanalları
|
||||
|
||||
2. **Harici bağımlılıkları değerlendir:**
|
||||
- @polkadot-api/check-runtime → uyumluluk testi
|
||||
- paritytech/tools Docker image → fork gerekli mi?
|
||||
- try-runtime-cli → bizinikiwi fork'u uyumlu mu?
|
||||
|
||||
### Aşama 4: Testnet Yolculuğu (Öncelik: ORTA-YÜKSEK)
|
||||
|
||||
| Aşama | Validator | Başarı Kriterleri |
|
||||
|-------|-----------|-------------------|
|
||||
| DEV | 1 (Alice) | 3 runtime çalışır, blok üretir, finalize olur |
|
||||
| LOCAL | 2 (Alice+Bob) | Peer discovery, consensus |
|
||||
| ALPHA | 4 | Stress test, edge case |
|
||||
| BETA | 8 | Real keys, performance |
|
||||
| STAGING | 21 | Production-like |
|
||||
| MAINNET | 100 | Launch |
|
||||
|
||||
---
|
||||
|
||||
## KRİTİK UYARILAR
|
||||
|
||||
### ASLA YAPMA
|
||||
|
||||
1. **Polkadot SDK'dan miras alınan çalışan koda DOKUNMA**
|
||||
- Sadece rebrand et, mantık değiştirme
|
||||
- Çalışıyorsa bozma
|
||||
|
||||
2. **Placeholder crate publish etme**
|
||||
- Her crate gerçek içerikli olmalı
|
||||
- Boş veya "coming soon" kabul edilemez
|
||||
|
||||
3. **Workflow kuyruğu biriktirme**
|
||||
- Her değişiklikten önce eski run'ları temizle
|
||||
- Tek commit, tek push, temiz başlangıç
|
||||
|
||||
4. **Birden fazla değişikliği aynı anda yapma**
|
||||
- Tek değişiklik → test → sonuç
|
||||
- Sonra diğer değişiklik
|
||||
|
||||
### MUTLAKA YAP
|
||||
|
||||
1. **Her rebrand sonrası `cargo check -p <crate>`**
|
||||
2. **Git history'yi temiz tut**
|
||||
3. **Her başarılı durumda commit at**
|
||||
4. **Geri dönüş noktası belirle**
|
||||
|
||||
---
|
||||
|
||||
## DOSYA REFERANSLARI
|
||||
|
||||
### Aktif Dokümantasyon
|
||||
|
||||
| Dosya | Amaç |
|
||||
|-------|------|
|
||||
| CLAUDE.md | Ana talimatlar |
|
||||
| docs/REBRAND_PROGRESS.md | 76 crate ilerleme takibi |
|
||||
| docs/workflow_rebranding.md | Workflow rebrand planı |
|
||||
| docs/runtimes-pallets.md | Runtime/pezpallet haritalama |
|
||||
| docs/introduction.md | Proje tanıtımı |
|
||||
|
||||
### Aktif Script'ler
|
||||
|
||||
| Script | Amaç |
|
||||
|--------|------|
|
||||
| docs/scan_old_words.py | Terminoloji tarama |
|
||||
| docs/publish_crates_slow.py | Crates.io publish |
|
||||
| docs/reserve_crate_names_v2.py | İsim rezervasyonu |
|
||||
|
||||
### Silinen/Gereksiz Dosyalar
|
||||
|
||||
| Dosya | Sebep |
|
||||
|-------|-------|
|
||||
| docs/.claude-session-state.md | Eski session state, güncel değil |
|
||||
| docs/.docs-deployment-summary.md | Tamamlanmış tek seferlik görev |
|
||||
|
||||
---
|
||||
|
||||
## BAŞARI METRİKLERİ
|
||||
|
||||
### Rebrand Tamamlanma
|
||||
|
||||
- [ ] 76/76 crate terminoloji uyumlu
|
||||
- [ ] Tüm crate'ler cargo check geçiyor
|
||||
- [ ] Tüm crate'ler crates.io'da yayınlandı
|
||||
- [ ] Hiçbir Polkadot/Substrate/Cumulus referansı kalmadı
|
||||
|
||||
### Teknik Olgunluk
|
||||
|
||||
- [ ] DEV testnet çalışıyor
|
||||
- [ ] LOCAL testnet çalışıyor (2 validator)
|
||||
- [ ] Zombienet testleri geçiyor
|
||||
- [ ] Benchmark'lar tamamlandı
|
||||
|
||||
### Dokümantasyon
|
||||
|
||||
- [ ] docs.pezkuwichain.io güncel
|
||||
- [ ] README.md güncel
|
||||
- [ ] API documentation mevcut
|
||||
|
||||
---
|
||||
|
||||
## SON SÖZ
|
||||
|
||||
Bu proje Polkadot SDK'nın kısmi rebrand'i değil, tamamen bağımsız bir blockchain SDK'sı olma yolunda. Kritik olan:
|
||||
|
||||
1. **Polkadot'tan miras alınan sağlam zemin kodlarına ASLA dokunma** - sadece rebrand et
|
||||
2. **Her crate Kurdistan SDK terminolojisine TAMAMEN uyumlu olmalı**
|
||||
3. **Placeholder değil, gerçek anlamda çalışan crate'ler publish et**
|
||||
4. **Sistematik, adım adım, test ederek ilerle**
|
||||
|
||||
Acele etme, doğru yap. Bir sonraki seviyeye ulaşmak sabır, disiplin ve acımasız dürüstlük gerektirir.
|
||||
|
||||
---
|
||||
|
||||
*Bu prompt dosyası Kurdistan SDK rebrand projesinin ana yol haritasıdır.*
|
||||
*Son güncelleme: 2025-12-16*
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Slow Crate Publisher - 6 dakikada bir 1 crate publish eder
|
||||
Rate limit'e takilmamak icin yavas yavas publish yapar.
|
||||
|
||||
Kullanim:
|
||||
nohup python3 publish_crates_slow.py > publish_log.txt 2>&1 &
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
PLACEHOLDER_DIR = '/home/mamostehp/kurdistan-sdk/crate_placeholders'
|
||||
LOG_FILE = '/home/mamostehp/kurdistan-sdk/publish_log.txt'
|
||||
INTERVAL_SECONDS = 360 # 6 dakika
|
||||
|
||||
def log(msg):
|
||||
timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
line = f"[{timestamp}] {msg}"
|
||||
print(line, flush=True)
|
||||
with open(LOG_FILE, 'a') as f:
|
||||
f.write(line + '\n')
|
||||
|
||||
def is_published(name):
|
||||
"""crates.io'da mevcut mu kontrol et"""
|
||||
result = subprocess.run(
|
||||
['cargo', 'search', name, '--limit', '1'],
|
||||
capture_output=True, text=True, timeout=30
|
||||
)
|
||||
return f'{name} = ' in result.stdout
|
||||
|
||||
def publish_crate(name):
|
||||
"""Tek bir crate publish et"""
|
||||
crate_dir = os.path.join(PLACEHOLDER_DIR, name)
|
||||
manifest = os.path.join(crate_dir, 'Cargo.toml')
|
||||
|
||||
if not os.path.exists(manifest):
|
||||
return False, "Cargo.toml not found"
|
||||
|
||||
result = subprocess.run(
|
||||
['cargo', 'publish', '--manifest-path', manifest],
|
||||
capture_output=True, text=True, cwd=crate_dir, timeout=180
|
||||
)
|
||||
|
||||
if result.returncode == 0:
|
||||
return True, "Success"
|
||||
elif 'already uploaded' in result.stderr or 'already exists' in result.stderr:
|
||||
return True, "Already exists"
|
||||
elif '429' in result.stderr or 'Too Many Requests' in result.stderr:
|
||||
return False, "Rate limited"
|
||||
else:
|
||||
return False, result.stderr[:200]
|
||||
|
||||
def get_unpublished_crates():
|
||||
"""Henuz publish edilmemis crate'leri bul"""
|
||||
crates = sorted([d for d in os.listdir(PLACEHOLDER_DIR)
|
||||
if os.path.isdir(os.path.join(PLACEHOLDER_DIR, d))])
|
||||
|
||||
unpublished = []
|
||||
for crate in crates:
|
||||
if not is_published(crate):
|
||||
unpublished.append(crate)
|
||||
return unpublished
|
||||
|
||||
def main():
|
||||
log("=" * 60)
|
||||
log("Slow Crate Publisher baslatildi")
|
||||
log(f"Interval: {INTERVAL_SECONDS} saniye (6 dakika)")
|
||||
log("=" * 60)
|
||||
|
||||
unpublished = get_unpublished_crates()
|
||||
total = len(unpublished)
|
||||
log(f"Toplam {total} crate publish edilecek")
|
||||
|
||||
success_count = 0
|
||||
fail_count = 0
|
||||
|
||||
for i, crate in enumerate(unpublished, 1):
|
||||
log(f"[{i}/{total}] Publishing: {crate}")
|
||||
|
||||
success, msg = publish_crate(crate)
|
||||
|
||||
if success:
|
||||
log(f" ✓ {msg}")
|
||||
success_count += 1
|
||||
else:
|
||||
log(f" ✗ {msg}")
|
||||
fail_count += 1
|
||||
|
||||
# Rate limit durumunda ekstra bekle
|
||||
if "Rate limited" in msg:
|
||||
log(" Rate limited! 10 dakika bekleniyor...")
|
||||
time.sleep(600)
|
||||
|
||||
# Sonraki crate icin bekle
|
||||
if i < total:
|
||||
log(f" Sonraki crate icin {INTERVAL_SECONDS}s bekleniyor...")
|
||||
time.sleep(INTERVAL_SECONDS)
|
||||
|
||||
log("=" * 60)
|
||||
log(f"Tamamlandi! Basarili: {success_count}, Basarisiz: {fail_count}")
|
||||
log("=" * 60)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+1
-1
@@ -123,7 +123,7 @@ pub fn generate_calls(
|
||||
use super::root_mod;
|
||||
use super::#types_mod_ident;
|
||||
|
||||
type DispatchError = #types_mod_ident::pezsp_runtime::DispatchError;
|
||||
type DispatchError = ::pezsp_runtime::DispatchError;
|
||||
|
||||
pub mod types {
|
||||
use super::#types_mod_ident;
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ impl RuntimeGenerator {
|
||||
pub static RUNTIME_APIS: [&str; #runtime_api_names_len] = [ #(#runtime_api_names,)* ];
|
||||
|
||||
/// The error type that is returned when there is a runtime issue.
|
||||
pub type DispatchError = #types_mod_ident::pezsp_runtime::DispatchError;
|
||||
pub type DispatchError = ::pezsp_runtime::DispatchError;
|
||||
|
||||
/// The outer event enum.
|
||||
pub type Event = #event_path;
|
||||
|
||||
Reference in New Issue
Block a user