diff --git a/operator/Cargo.lock b/operator/Cargo.lock index 24fb0f36..9af03d3c 100644 --- a/operator/Cargo.lock +++ b/operator/Cargo.lock @@ -946,6 +946,85 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "axum" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower 0.5.2", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-extra" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96" +dependencies = [ + "axum", + "axum-core", + "bytes", + "fastrand", + "futures-util", + "headers", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "mime", + "multer", + "pin-project-lite", + "rustversion", + "serde_core", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "backtrace" version = "0.3.76" @@ -3658,6 +3737,15 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -5310,6 +5398,30 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http 1.3.1", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.3.1", +] + [[package]] name = "heck" version = "0.4.1" @@ -7394,6 +7506,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + [[package]] name = "matrixmultiply" version = "0.3.10" @@ -7665,6 +7783,23 @@ dependencies = [ "uuid", ] +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 1.3.1", + "httparse", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + [[package]] name = "multiaddr" version = "0.17.1" @@ -8436,8 +8571,8 @@ dependencies = [ [[package]] name = "pallet-bucket-nfts" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8493,8 +8628,8 @@ dependencies = [ [[package]] name = "pallet-cr-randomness" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-support", "frame-system", @@ -8777,8 +8912,8 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-file-system" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "fp-account", "fp-evm", @@ -9028,8 +9163,8 @@ dependencies = [ [[package]] name = "pallet-file-system" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9055,8 +9190,8 @@ dependencies = [ [[package]] name = "pallet-file-system-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9251,8 +9386,8 @@ dependencies = [ [[package]] name = "pallet-payment-streams" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9271,8 +9406,8 @@ dependencies = [ [[package]] name = "pallet-payment-streams-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9299,8 +9434,8 @@ dependencies = [ [[package]] name = "pallet-proofs-dealer" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9321,8 +9456,8 @@ dependencies = [ [[package]] name = "pallet-proofs-dealer-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9343,8 +9478,8 @@ dependencies = [ [[package]] name = "pallet-randomness" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9484,8 +9619,8 @@ dependencies = [ [[package]] name = "pallet-storage-providers" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9506,8 +9641,8 @@ dependencies = [ [[package]] name = "pallet-storage-providers-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "parity-scale-codec", "scale-info", @@ -13539,6 +13674,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + [[package]] name = "serde_spanned" version = "0.6.9" @@ -13658,8 +13804,8 @@ dependencies = [ [[package]] name = "shc-actors-derive" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "once_cell", "proc-macro2", @@ -13671,8 +13817,8 @@ dependencies = [ [[package]] name = "shc-actors-framework" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "bincode", @@ -13689,8 +13835,8 @@ dependencies = [ [[package]] name = "shc-blockchain-service" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "array-bytes", @@ -13733,6 +13879,7 @@ dependencies = [ "shp-tx-implicits-runtime-api", "sp-api", "sp-blockchain", + "sp-consensus", "sp-core", "sp-keystore", "sp-runtime", @@ -13743,8 +13890,8 @@ dependencies = [ [[package]] name = "shc-blockchain-service-db" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "chrono", "diesel", @@ -13767,13 +13914,15 @@ dependencies = [ [[package]] name = "shc-client" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "array-bytes", "async-channel 1.9.0", "async-trait", + "axum", + "axum-extra", "chrono", "frame-benchmarking", "frame-benchmarking-cli", @@ -13829,12 +13978,14 @@ dependencies = [ "substrate-build-script-utils", "thiserror 1.0.69", "tokio", + "tokio-stream", + "tower-http 0.5.2", ] [[package]] name = "shc-common" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "bigdecimal", @@ -13897,8 +14048,8 @@ dependencies = [ [[package]] name = "shc-file-manager" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "bincode", "hash-db", @@ -13921,8 +14072,8 @@ dependencies = [ [[package]] name = "shc-file-transfer-service" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "array-bytes", @@ -13950,8 +14101,8 @@ dependencies = [ [[package]] name = "shc-fisherman-service" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "async-trait", "diesel", @@ -13980,8 +14131,8 @@ dependencies = [ [[package]] name = "shc-forest-manager" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "async-trait", "bincode", @@ -14005,8 +14156,8 @@ dependencies = [ [[package]] name = "shc-indexer-db" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "bigdecimal", "chrono", @@ -14033,8 +14184,8 @@ dependencies = [ [[package]] name = "shc-indexer-service" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "anyhow", "array-bytes", @@ -14084,8 +14235,8 @@ dependencies = [ [[package]] name = "shc-rpc" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "array-bytes", "async-trait", @@ -14136,8 +14287,8 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "shp-constants" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "sp-core", "sp-runtime", @@ -14145,8 +14296,8 @@ dependencies = [ [[package]] name = "shp-data-price-updater" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-support", "parity-scale-codec", @@ -14160,8 +14311,8 @@ dependencies = [ [[package]] name = "shp-file-key-verifier" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-support", "parity-scale-codec", @@ -14178,8 +14329,8 @@ dependencies = [ [[package]] name = "shp-file-metadata" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "hex", "num-bigint", @@ -14194,8 +14345,8 @@ dependencies = [ [[package]] name = "shp-forest-verifier" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-support", "parity-scale-codec", @@ -14211,16 +14362,16 @@ dependencies = [ [[package]] name = "shp-opaque" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "sp-runtime", ] [[package]] name = "shp-session-keys" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "async-trait", "parity-scale-codec", @@ -14234,8 +14385,8 @@ dependencies = [ [[package]] name = "shp-traits" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "frame-support", "parity-scale-codec", @@ -14248,8 +14399,8 @@ dependencies = [ [[package]] name = "shp-treasury-funding" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "log", "shp-traits", @@ -14259,8 +14410,8 @@ dependencies = [ [[package]] name = "shp-tx-implicits-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "parity-scale-codec", "scale-info", @@ -14272,8 +14423,8 @@ dependencies = [ [[package]] name = "shp-types" -version = "0.1.0" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.2.9#a2c15c6a25071d2060403a469b663eec51974010" +version = "0.3.0" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.3.0#a41f0bef38c164585e84d7951e8db14e236de37a" dependencies = [ "sp-core", "sp-runtime", @@ -17040,6 +17191,7 @@ dependencies = [ "tokio", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -17056,6 +17208,7 @@ dependencies = [ "pin-project-lite", "tower-layer", "tower-service", + "tracing", ] [[package]] diff --git a/operator/Cargo.toml b/operator/Cargo.toml index fcce0eef..b4976e81 100644 --- a/operator/Cargo.toml +++ b/operator/Cargo.toml @@ -265,42 +265,42 @@ fc-storage = { git = "https://github.com/polkadot-evm/frontier", branch = "stabl # StorageHub ## Runtime -pallet-bucket-nfts = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-cr-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-file-system-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-payment-streams = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-payment-streams-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-proofs-dealer = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-proofs-dealer-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-storage-providers = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -pallet-storage-providers-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-constants = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-data-price-updater = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-file-key-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-file-metadata = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-forest-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-traits = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-treasury-funding = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } +pallet-bucket-nfts = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-cr-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-file-system-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-payment-streams = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-payment-streams-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-proofs-dealer = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-proofs-dealer-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-storage-providers = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +pallet-storage-providers-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-constants = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-data-price-updater = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-file-key-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-file-metadata = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-forest-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-traits = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-treasury-funding = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } ## Client -shc-actors-derive = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-actors-framework = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-blockchain-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-client = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-common = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-file-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-file-transfer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-fisherman-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-forest-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-indexer-db = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-indexer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shc-rpc = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-opaque = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-tx-implicits-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } -shp-types = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } +shc-actors-derive = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-actors-framework = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-blockchain-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-client = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-common = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-file-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-file-transfer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-fisherman-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-forest-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-indexer-db = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-indexer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shc-rpc = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-opaque = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-tx-implicits-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } +shp-types = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } ## Precompiles -pallet-evm-precompile-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.2.9", default-features = false } +pallet-evm-precompile-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.3.0", default-features = false } # Static linking diff --git a/operator/node/src/cli.rs b/operator/node/src/cli.rs index dc491ab5..c8f432a3 100644 --- a/operator/node/src/cli.rs +++ b/operator/node/src/cli.rs @@ -61,8 +61,8 @@ pub struct Cli { /// Provider configurations file path (allow to specify the provider configuration in a file instead of the cli) #[arg(long, conflicts_with_all = [ "provider", "provider_type", "max_storage_capacity", "jump_capacity", - "storage_layer", "storage_path", "extrinsic_retry_timeout", "sync_mode_min_blocks_behind", - "check_for_pending_proofs_period", "max_blocks_behind_to_catch_up_root_changes", + "storage_layer", "storage_path", "extrinsic_retry_timeout", + "check_for_pending_proofs_period", "msp_charging_period", "msp_charge_fees_task", "msp_charge_fees_min_debt", "msp_move_bucket_task", "msp_move_bucket_max_try_count", "msp_move_bucket_max_tip", "bsp_upload_file_task", "bsp_upload_file_max_try_count", "bsp_upload_file_max_tip", @@ -70,7 +70,8 @@ pub struct Cli { "bsp_charge_fees_task", "bsp_charge_fees_min_debt", "bsp_submit_proof_task", "bsp_submit_proof_max_attempts", "pending_db_url", - "fisherman", "fisherman_database_url", + "fisherman", "fisherman_database_url", + "trusted_file_transfer_server", "trusted_file_transfer_server_host", "trusted_file_transfer_server_port", ])] pub provider_config_file: Option, @@ -232,18 +233,10 @@ pub struct ProviderConfigurations { #[arg(long, default_value = "60")] pub extrinsic_retry_timeout: Option, - /// The minimum number of blocks behind the current best block to consider the node out of sync. - #[arg(long, default_value = "5")] - pub sync_mode_min_blocks_behind: Option, - /// On blocks that are multiples of this number, the blockchain service will trigger the catch of proofs. #[arg(long, default_value = "4")] pub check_for_pending_proofs_period: Option, - /// The maximum number of blocks from the past that will be processed for catching up the root changes. - #[arg(long, default_value = "10")] - pub max_blocks_behind_to_catch_up_root_changes: Option, - /// Enable MSP file distribution to BSPs (disabled by default unless set via config/CLI). /// Only applicable when running as an MSP provider. #[arg(long, value_name = "BOOLEAN")] @@ -441,6 +434,32 @@ pub struct ProviderConfigurations { help_heading = "MSP Database Options" )] pub msp_database_url: Option, + + /// Enable the trusted file transfer HTTP server + #[arg( + long, + value_name = "BOOLEAN", + help_heading = "Trusted File Transfer Server Options" + )] + pub trusted_file_transfer_server: bool, + + /// Host address for trusted file transfer HTTP server (default: 127.0.0.1). + #[arg( + long, + value_name = "HOST", + help_heading = "Trusted File Transfer Server Options", + default_value = "127.0.0.1" + )] + pub trusted_file_transfer_server_host: Option, + + /// Port for trusted file transfer HTTP server (default: 7070). + #[arg( + long, + value_name = "PORT", + help_heading = "Trusted File Transfer Server Options", + default_value = "7070" + )] + pub trusted_file_transfer_server_port: Option, } impl ProviderConfigurations { @@ -561,24 +580,11 @@ impl ProviderConfigurations { bs_changed = true; } - if let Some(sync_mode_min_blocks_behind) = self.sync_mode_min_blocks_behind { - bs_options.sync_mode_min_blocks_behind = Some(sync_mode_min_blocks_behind); - bs_changed = true; - } - if let Some(check_for_pending_proofs_period) = self.check_for_pending_proofs_period { bs_options.check_for_pending_proofs_period = Some(check_for_pending_proofs_period); bs_changed = true; } - if let Some(max_blocks_behind_to_catch_up_root_changes) = - self.max_blocks_behind_to_catch_up_root_changes - { - bs_options.max_blocks_behind_to_catch_up_root_changes = - Some(max_blocks_behind_to_catch_up_root_changes); - bs_changed = true; - } - // Set MSP distribution flag if provided on CLI and role is MSP if self.msp_distribute_files && provider_type == ProviderType::Msp { bs_options.enable_msp_distribute_files = Some(true); @@ -608,6 +614,9 @@ impl ProviderConfigurations { bsp_submit_proof, blockchain_service, msp_database_url: self.msp_database_url.clone(), + trusted_file_transfer_server: self.trusted_file_transfer_server, + trusted_file_transfer_server_host: self.trusted_file_transfer_server_host.clone(), + trusted_file_transfer_server_port: self.trusted_file_transfer_server_port, // We don't support maintenance mode for now. // maintenance_mode: self.maintenance_mode, } diff --git a/operator/node/src/command.rs b/operator/node/src/command.rs index 0dd08e35..69a9bcd0 100644 --- a/operator/node/src/command.rs +++ b/operator/node/src/command.rs @@ -80,6 +80,15 @@ pub struct ProviderOptions { pub blockchain_service: Option, /// MSP database URL. pub msp_database_url: Option, + /// Enable the trusted file transfer HTTP server. + #[serde(default)] + pub trusted_file_transfer_server: bool, + /// Host address for trusted file transfer HTTP server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub trusted_file_transfer_server_host: Option, + /// Port for trusted file transfer HTTP server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub trusted_file_transfer_server_port: Option, // Whether the node is running in maintenance mode. We are not supporting maintenance mode. // pub maintenance_mode: bool, } diff --git a/operator/node/src/service.rs b/operator/node/src/service.rs index 7ce84b11..9fe4f1dd 100644 --- a/operator/node/src/service.rs +++ b/operator/node/src/service.rs @@ -1182,6 +1182,9 @@ where bsp_submit_proof, blockchain_service, msp_database_url, + trusted_file_transfer_server, + trusted_file_transfer_server_host, + trusted_file_transfer_server_port, .. }) => { info!( @@ -1217,6 +1220,16 @@ where } } + if *trusted_file_transfer_server { + let file_transfer_config = shc_client::trusted_file_transfer::server::Config { + host: trusted_file_transfer_server_host + .clone() + .unwrap_or_else(|| "127.0.0.1".to_string()), + port: trusted_file_transfer_server_port.unwrap_or(7070), + }; + builder.with_trusted_file_transfer_server(file_transfer_config); + } + if let Some(c) = blockchain_service { let peer_id = network.local_peer_id().to_bytes(); let mut c = c.clone(); @@ -1295,6 +1308,9 @@ where ) .await; + // Spawn the trusted file transfer server if configured + sh_builder.spawn_trusted_file_transfer_server().await; + // Initialize the BSP peer manager sh_builder.with_peer_manager(rocks_db_path.clone()); diff --git a/operator/runtime/mainnet/src/configs/storagehub/client.rs b/operator/runtime/mainnet/src/configs/storagehub/client.rs index 970e75ab..110bec9d 100644 --- a/operator/runtime/mainnet/src/configs/storagehub/client.rs +++ b/operator/runtime/mainnet/src/configs/storagehub/client.rs @@ -19,7 +19,7 @@ // no_std Wasm runtime. use shc_common::{ traits::{ExtensionOperations, StorageEnableRuntime, TransactionHashProvider}, - types::{MinimalExtension, StorageEnableEvents, StorageHubEventsVec}, + types::{MinimalExtension, StorageEnableErrors, StorageEnableEvents, StorageHubEventsVec}, }; use sp_core::H256; @@ -30,6 +30,7 @@ impl StorageEnableRuntime for crate::Runtime { type Signature = crate::Signature; type Extension = crate::SignedExtra; type RuntimeApi = crate::RuntimeApi; + type RuntimeError = crate::RuntimeError; } // Implement the transaction extension helpers for the concrete runtime's SignedExtra. @@ -103,3 +104,20 @@ impl TransactionHashProvider for crate::Runtime { tx_map } } + +impl Into> for crate::RuntimeError { + fn into(self) -> StorageEnableErrors { + match self { + crate::RuntimeError::System(error) => StorageEnableErrors::System(error), + crate::RuntimeError::Providers(error) => StorageEnableErrors::StorageProviders(error), + crate::RuntimeError::ProofsDealer(error) => StorageEnableErrors::ProofsDealer(error), + crate::RuntimeError::PaymentStreams(error) => { + StorageEnableErrors::PaymentStreams(error) + } + crate::RuntimeError::FileSystem(error) => StorageEnableErrors::FileSystem(error), + crate::RuntimeError::Balances(error) => StorageEnableErrors::Balances(error), + crate::RuntimeError::BucketNfts(error) => StorageEnableErrors::BucketNfts(error), + other => StorageEnableErrors::Other(format!("{:?}", other)), + } + } +} diff --git a/operator/runtime/mainnet/src/lib.rs b/operator/runtime/mainnet/src/lib.rs index bdef45e0..926a36f9 100644 --- a/operator/runtime/mainnet/src/lib.rs +++ b/operator/runtime/mainnet/src/lib.rs @@ -245,7 +245,7 @@ pub type SignedPayload = generic::SignedPayload; /// /// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. #[allow(unused_parens)] -type Migrations = (); +type Migrations = (pallet_file_system::migrations::v1::MigrateV0ToV1,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1335,7 +1335,7 @@ impl_runtime_apis! { } - impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId> for Runtime { + impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId, H256> for Runtime { fn get_bsp_info(bsp_id: &BackupStorageProviderId) -> Result, GetBspInfoError> { Providers::get_bsp_info(bsp_id) } @@ -1391,6 +1391,10 @@ impl_runtime_apis! { fn query_buckets_of_user_stored_by_msp(msp_id: &ProviderIdFor, user: &AccountId) -> Result>, QueryBucketsOfUserStoredByMspError> { Ok(sp_runtime::Vec::from_iter(Providers::query_buckets_of_user_stored_by_msp(msp_id, user)?)) } + + fn query_bucket_root(bucket_id: &BucketId) -> Result { + Providers::query_bucket_root(bucket_id) + } } impl shp_tx_implicits_runtime_api::TxImplicitsApi for Runtime { diff --git a/operator/runtime/stagenet/src/configs/storagehub/client.rs b/operator/runtime/stagenet/src/configs/storagehub/client.rs index 970e75ab..110bec9d 100644 --- a/operator/runtime/stagenet/src/configs/storagehub/client.rs +++ b/operator/runtime/stagenet/src/configs/storagehub/client.rs @@ -19,7 +19,7 @@ // no_std Wasm runtime. use shc_common::{ traits::{ExtensionOperations, StorageEnableRuntime, TransactionHashProvider}, - types::{MinimalExtension, StorageEnableEvents, StorageHubEventsVec}, + types::{MinimalExtension, StorageEnableErrors, StorageEnableEvents, StorageHubEventsVec}, }; use sp_core::H256; @@ -30,6 +30,7 @@ impl StorageEnableRuntime for crate::Runtime { type Signature = crate::Signature; type Extension = crate::SignedExtra; type RuntimeApi = crate::RuntimeApi; + type RuntimeError = crate::RuntimeError; } // Implement the transaction extension helpers for the concrete runtime's SignedExtra. @@ -103,3 +104,20 @@ impl TransactionHashProvider for crate::Runtime { tx_map } } + +impl Into> for crate::RuntimeError { + fn into(self) -> StorageEnableErrors { + match self { + crate::RuntimeError::System(error) => StorageEnableErrors::System(error), + crate::RuntimeError::Providers(error) => StorageEnableErrors::StorageProviders(error), + crate::RuntimeError::ProofsDealer(error) => StorageEnableErrors::ProofsDealer(error), + crate::RuntimeError::PaymentStreams(error) => { + StorageEnableErrors::PaymentStreams(error) + } + crate::RuntimeError::FileSystem(error) => StorageEnableErrors::FileSystem(error), + crate::RuntimeError::Balances(error) => StorageEnableErrors::Balances(error), + crate::RuntimeError::BucketNfts(error) => StorageEnableErrors::BucketNfts(error), + other => StorageEnableErrors::Other(format!("{:?}", other)), + } + } +} diff --git a/operator/runtime/stagenet/src/lib.rs b/operator/runtime/stagenet/src/lib.rs index a8ed4111..8f48c58a 100644 --- a/operator/runtime/stagenet/src/lib.rs +++ b/operator/runtime/stagenet/src/lib.rs @@ -247,7 +247,7 @@ pub type SignedPayload = generic::SignedPayload; /// /// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. #[allow(unused_parens)] -type Migrations = (); +type Migrations = (pallet_file_system::migrations::v1::MigrateV0ToV1,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1338,7 +1338,7 @@ impl_runtime_apis! { } - impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId> for Runtime { + impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId, H256> for Runtime { fn get_bsp_info(bsp_id: &BackupStorageProviderId) -> Result, GetBspInfoError> { Providers::get_bsp_info(bsp_id) } @@ -1394,6 +1394,10 @@ impl_runtime_apis! { fn query_buckets_of_user_stored_by_msp(msp_id: &ProviderIdFor, user: &AccountId) -> Result>, QueryBucketsOfUserStoredByMspError> { Ok(sp_runtime::Vec::from_iter(Providers::query_buckets_of_user_stored_by_msp(msp_id, user)?)) } + + fn query_bucket_root(bucket_id: &BucketId) -> Result { + Providers::query_bucket_root(bucket_id) + } } impl shp_tx_implicits_runtime_api::TxImplicitsApi for Runtime { diff --git a/operator/runtime/testnet/src/configs/storagehub/client.rs b/operator/runtime/testnet/src/configs/storagehub/client.rs index 970e75ab..110bec9d 100644 --- a/operator/runtime/testnet/src/configs/storagehub/client.rs +++ b/operator/runtime/testnet/src/configs/storagehub/client.rs @@ -19,7 +19,7 @@ // no_std Wasm runtime. use shc_common::{ traits::{ExtensionOperations, StorageEnableRuntime, TransactionHashProvider}, - types::{MinimalExtension, StorageEnableEvents, StorageHubEventsVec}, + types::{MinimalExtension, StorageEnableErrors, StorageEnableEvents, StorageHubEventsVec}, }; use sp_core::H256; @@ -30,6 +30,7 @@ impl StorageEnableRuntime for crate::Runtime { type Signature = crate::Signature; type Extension = crate::SignedExtra; type RuntimeApi = crate::RuntimeApi; + type RuntimeError = crate::RuntimeError; } // Implement the transaction extension helpers for the concrete runtime's SignedExtra. @@ -103,3 +104,20 @@ impl TransactionHashProvider for crate::Runtime { tx_map } } + +impl Into> for crate::RuntimeError { + fn into(self) -> StorageEnableErrors { + match self { + crate::RuntimeError::System(error) => StorageEnableErrors::System(error), + crate::RuntimeError::Providers(error) => StorageEnableErrors::StorageProviders(error), + crate::RuntimeError::ProofsDealer(error) => StorageEnableErrors::ProofsDealer(error), + crate::RuntimeError::PaymentStreams(error) => { + StorageEnableErrors::PaymentStreams(error) + } + crate::RuntimeError::FileSystem(error) => StorageEnableErrors::FileSystem(error), + crate::RuntimeError::Balances(error) => StorageEnableErrors::Balances(error), + crate::RuntimeError::BucketNfts(error) => StorageEnableErrors::BucketNfts(error), + other => StorageEnableErrors::Other(format!("{:?}", other)), + } + } +} diff --git a/operator/runtime/testnet/src/lib.rs b/operator/runtime/testnet/src/lib.rs index 02207488..108636c8 100644 --- a/operator/runtime/testnet/src/lib.rs +++ b/operator/runtime/testnet/src/lib.rs @@ -245,7 +245,7 @@ pub type SignedPayload = generic::SignedPayload; /// /// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. #[allow(unused_parens)] -type Migrations = (); +type Migrations = (pallet_file_system::migrations::v1::MigrateV0ToV1,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -1335,7 +1335,7 @@ impl_runtime_apis! { } - impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId> for Runtime { + impl pallet_storage_providers_runtime_api::StorageProvidersApi, BackupStorageProvider, MainStorageProviderId, AccountId, ProviderIdFor, StorageProviderId, StorageDataUnit, Balance, BucketId, Multiaddresses, ValuePropositionWithId, H256> for Runtime { fn get_bsp_info(bsp_id: &BackupStorageProviderId) -> Result, GetBspInfoError> { Providers::get_bsp_info(bsp_id) } @@ -1391,6 +1391,10 @@ impl_runtime_apis! { fn query_buckets_of_user_stored_by_msp(msp_id: &ProviderIdFor, user: &AccountId) -> Result>, QueryBucketsOfUserStoredByMspError> { Ok(sp_runtime::Vec::from_iter(Providers::query_buckets_of_user_stored_by_msp(msp_id, user)?)) } + + fn query_bucket_root(bucket_id: &BucketId) -> Result { + Providers::query_bucket_root(bucket_id) + } } impl shp_tx_implicits_runtime_api::TxImplicitsApi for Runtime { diff --git a/operator/scripts/verify-licenses.sh b/operator/scripts/verify-licenses.sh index 5cff33e2..29e26615 100755 --- a/operator/scripts/verify-licenses.sh +++ b/operator/scripts/verify-licenses.sh @@ -40,6 +40,8 @@ LICENSES=( "Zlib" "Unicode-3.0" "(Apache-2.0 OR MIT) AND Unicode-3.0" + "(Apache-2.0 OR MIT) AND BSD-3-Clause" + "BSD-3-Clause AND MIT" ) AUTHORS=( "PureStake" diff --git a/test/.papi/descriptors/package.json b/test/.papi/descriptors/package.json index 6a13c7de..3a1814dc 100644 --- a/test/.papi/descriptors/package.json +++ b/test/.papi/descriptors/package.json @@ -1,5 +1,5 @@ { - "version": "0.1.0-autogenerated.13813679320506320915", + "version": "0.1.0-autogenerated.3899565146829206681", "name": "@polkadot-api/descriptors", "files": [ "dist" diff --git a/test/.papi/metadata/datahaven.scale b/test/.papi/metadata/datahaven.scale index 8237ae86..e39e92a1 100644 Binary files a/test/.papi/metadata/datahaven.scale and b/test/.papi/metadata/datahaven.scale differ