diff --git a/operator/Cargo.lock b/operator/Cargo.lock index 59a43614..60011856 100644 --- a/operator/Cargo.lock +++ b/operator/Cargo.lock @@ -8639,8 +8639,8 @@ dependencies = [ [[package]] name = "pallet-bucket-nfts" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -8696,8 +8696,8 @@ dependencies = [ [[package]] name = "pallet-cr-randomness" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-support", "frame-system", @@ -8980,8 +8980,8 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-file-system" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "fp-account", "fp-evm", @@ -9220,8 +9220,8 @@ dependencies = [ [[package]] name = "pallet-file-system" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -9249,8 +9249,8 @@ dependencies = [ [[package]] name = "pallet-file-system-runtime-api" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "parity-scale-codec", "scale-info", @@ -9445,8 +9445,8 @@ dependencies = [ [[package]] name = "pallet-payment-streams" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -9465,8 +9465,8 @@ dependencies = [ [[package]] name = "pallet-payment-streams-runtime-api" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "parity-scale-codec", "scale-info", @@ -9493,8 +9493,8 @@ dependencies = [ [[package]] name = "pallet-proofs-dealer" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -9519,8 +9519,8 @@ dependencies = [ [[package]] name = "pallet-proofs-dealer-runtime-api" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "parity-scale-codec", "scale-info", @@ -9558,8 +9558,8 @@ dependencies = [ [[package]] name = "pallet-randomness" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -9696,8 +9696,8 @@ dependencies = [ [[package]] name = "pallet-storage-providers" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-benchmarking", "frame-support", @@ -9718,8 +9718,8 @@ dependencies = [ [[package]] name = "pallet-storage-providers-runtime-api" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "parity-scale-codec", "scale-info", @@ -13881,8 +13881,8 @@ dependencies = [ [[package]] name = "shc-actors-derive" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "once_cell", "proc-macro2", @@ -13894,8 +13894,8 @@ dependencies = [ [[package]] name = "shc-actors-framework" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "bincode", @@ -13913,8 +13913,8 @@ dependencies = [ [[package]] name = "shc-blockchain-service" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "array-bytes", @@ -13969,8 +13969,8 @@ dependencies = [ [[package]] name = "shc-blockchain-service-db" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "chrono", "diesel", @@ -13993,8 +13993,8 @@ dependencies = [ [[package]] name = "shc-client" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "array-bytes", @@ -14002,6 +14002,7 @@ dependencies = [ "async-trait", "axum", "axum-extra", + "bytes", "chrono", "frame-benchmarking", "frame-benchmarking-cli", @@ -14067,12 +14068,13 @@ dependencies = [ [[package]] name = "shc-common" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "bigdecimal", "bincode", + "bytes", "cumulus-primitives-core", "cumulus-primitives-storage-weight-reclaim", "fp-account", @@ -14131,8 +14133,8 @@ dependencies = [ [[package]] name = "shc-file-manager" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "bincode", "hash-db", @@ -14140,6 +14142,7 @@ dependencies = [ "kvdb-memorydb", "kvdb-rocksdb", "log", + "lru 0.16.3", "parity-scale-codec", "serde_json", "shc-common", @@ -14155,8 +14158,8 @@ dependencies = [ [[package]] name = "shc-file-transfer-service" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "array-bytes", @@ -14164,6 +14167,7 @@ dependencies = [ "async-trait", "chrono", "futures", + "pallet-storage-providers-runtime-api", "parity-scale-codec", "prost 0.12.6", "prost-build 0.12.6", @@ -14178,14 +14182,15 @@ dependencies = [ "shc-common", "shp-file-key-verifier", "shp-file-metadata", + "sp-api", "thiserror 1.0.69", "tokio", ] [[package]] name = "shc-fisherman-service" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "async-trait", "diesel", @@ -14215,8 +14220,8 @@ dependencies = [ [[package]] name = "shc-forest-manager" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "async-trait", @@ -14241,8 +14246,8 @@ dependencies = [ [[package]] name = "shc-indexer-db" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "bigdecimal", "chrono", @@ -14269,8 +14274,8 @@ dependencies = [ [[package]] name = "shc-indexer-service" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "anyhow", "array-bytes", @@ -14320,8 +14325,8 @@ dependencies = [ [[package]] name = "shc-rpc" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "array-bytes", "async-trait", @@ -14366,8 +14371,8 @@ dependencies = [ [[package]] name = "shc-telemetry" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -14383,8 +14388,8 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "shp-constants" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "sp-core", "sp-runtime", @@ -14392,8 +14397,8 @@ dependencies = [ [[package]] name = "shp-data-price-updater" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-support", "parity-scale-codec", @@ -14407,8 +14412,8 @@ dependencies = [ [[package]] name = "shp-file-key-verifier" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-support", "parity-scale-codec", @@ -14425,8 +14430,8 @@ dependencies = [ [[package]] name = "shp-file-metadata" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "hex", "num-bigint", @@ -14441,8 +14446,8 @@ dependencies = [ [[package]] name = "shp-forest-verifier" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-support", "parity-scale-codec", @@ -14458,16 +14463,16 @@ dependencies = [ [[package]] name = "shp-opaque" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "sp-runtime", ] [[package]] name = "shp-session-keys" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "async-trait", "parity-scale-codec", @@ -14481,8 +14486,8 @@ dependencies = [ [[package]] name = "shp-traits" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "frame-support", "parity-scale-codec", @@ -14495,8 +14500,8 @@ dependencies = [ [[package]] name = "shp-treasury-funding" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "log", "shp-traits", @@ -14506,8 +14511,8 @@ dependencies = [ [[package]] name = "shp-tx-implicits-runtime-api" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "parity-scale-codec", "scale-info", @@ -14519,8 +14524,8 @@ dependencies = [ [[package]] name = "shp-types" -version = "0.4.1" -source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.1#b5d6eb2ffa153d97e079d1fda382773b466f4702" +version = "0.4.2" +source = "git+https://github.com/Moonsong-Labs/storage-hub.git?tag=v0.4.2#5b52af21ca6c60db96bb7c3fe7c069075e941614" dependencies = [ "sp-core", "sp-runtime", diff --git a/operator/Cargo.toml b/operator/Cargo.toml index 169d361b..4419b4b3 100644 --- a/operator/Cargo.toml +++ b/operator/Cargo.toml @@ -272,42 +272,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.4.1", default-features = false } -pallet-cr-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-file-system-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-payment-streams = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-payment-streams-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-proofs-dealer = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-proofs-dealer-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-storage-providers = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -pallet-storage-providers-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-constants = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-data-price-updater = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-file-key-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-file-metadata = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-forest-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-traits = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-treasury-funding = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } +pallet-bucket-nfts = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-cr-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-file-system-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-payment-streams = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-payment-streams-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-proofs-dealer = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-proofs-dealer-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-randomness = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-storage-providers = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +pallet-storage-providers-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-constants = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-data-price-updater = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-file-key-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-file-metadata = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-forest-verifier = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-traits = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-treasury-funding = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } ## Client -shc-actors-derive = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-actors-framework = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-blockchain-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-client = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-common = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-file-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-file-transfer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-fisherman-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-forest-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-indexer-db = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-indexer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shc-rpc = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-opaque = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-tx-implicits-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } -shp-types = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } +shc-actors-derive = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-actors-framework = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-blockchain-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-client = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-common = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-file-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-file-transfer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-fisherman-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-forest-manager = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-indexer-db = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-indexer-service = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shc-rpc = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-opaque = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-tx-implicits-runtime-api = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } +shp-types = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } ## Precompiles -pallet-evm-precompile-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.1", default-features = false } +pallet-evm-precompile-file-system = { git = "https://github.com/Moonsong-Labs/storage-hub.git", tag = "v0.4.2", default-features = false } # Static linking diff --git a/operator/node/src/cli.rs b/operator/node/src/cli.rs index af0ac8af..d661df4e 100644 --- a/operator/node/src/cli.rs +++ b/operator/node/src/cli.rs @@ -28,6 +28,7 @@ use shc_indexer_db::models::{FileFiltering, FileOrdering}; use shc_indexer_service::IndexerMode; use shc_rpc::RpcConfig; use shp_types::StorageDataUnit; +use sp_core::H256; // Available Sealing methods. #[derive(Copy, Clone, Debug, Default, ValueEnum)] @@ -73,6 +74,7 @@ pub struct Cli { "pending_db_url", "fisherman", "fisherman_database_url", "trusted_file_transfer_server", "trusted_file_transfer_server_host", "trusted_file_transfer_server_port", + "trusted_file_transfer_batch_size_bytes", "trusted_msps", ])] pub provider_config_file: Option, @@ -497,6 +499,26 @@ pub struct ProviderConfigurations { default_value = "7070" )] pub trusted_file_transfer_server_port: Option, + + /// Batch size in bytes used by MSP trusted upload ingestion (default: 2MB). + #[arg( + long, + value_name = "BYTES", + help_heading = "Trusted File Transfer Server Options", + default_value = "2097152", + value_parser = clap::value_parser!(u64).range(1..) + )] + pub trusted_file_transfer_batch_size_bytes: Option, + + /// Comma-separated list of trusted MSP IDs that this BSP accepts download requests from. + /// Only applicable when running as a BSP provider. + #[arg( + long = "trusted-msps", + value_delimiter = ',', + value_name = "MSP_ID", + help_heading = "BSP Download Authorisation" + )] + pub trusted_msps: Vec, } impl ProviderConfigurations { @@ -669,6 +691,8 @@ impl ProviderConfigurations { 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, + trusted_file_transfer_batch_size_bytes: self.trusted_file_transfer_batch_size_bytes, + trusted_msps: self.trusted_msps.clone(), max_open_forests: self.max_open_forests, // 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 7346833a..bcd4a3a4 100644 --- a/operator/node/src/command.rs +++ b/operator/node/src/command.rs @@ -37,6 +37,7 @@ use shc_client::builder::{ }; use shc_rpc::RpcConfig; use shp_types::StorageDataUnit; +use sp_core::H256; /// Configuration for the provider. #[derive(Debug, Clone, Deserialize)] @@ -92,6 +93,12 @@ pub struct ProviderOptions { /// Port for trusted file transfer HTTP server. #[serde(default, skip_serializing_if = "Option::is_none")] pub trusted_file_transfer_server_port: Option, + /// Batch size in bytes for trusted file transfer uploads. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub trusted_file_transfer_batch_size_bytes: Option, + /// List of trusted MSP IDs that BSP nodes accept download requests from. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub trusted_msps: Vec, // 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 b203e7c7..f8f34140 100644 --- a/operator/node/src/service.rs +++ b/operator/node/src/service.rs @@ -1192,19 +1192,10 @@ where let task_spawner = TaskSpawner::new(task_manager.spawn_handle(), task_spawner_name); let mut builder = StorageHubBuilder::::new(task_spawner, prometheus_registry); - // Setup file transfer service (common to all roles) let (file_transfer_request_protocol_name, file_transfer_request_receiver) = file_transfer_request_protocol .expect("FileTransfer request protocol should already be initialised."); - builder - .with_file_transfer( - file_transfer_request_receiver, - file_transfer_request_protocol_name, - network.clone(), - ) - .await; - // Role-specific configuration let rpc_config = match role_options { RoleOptions::Provider(ProviderOptions { @@ -1226,8 +1217,20 @@ where trusted_file_transfer_server, trusted_file_transfer_server_host, trusted_file_transfer_server_port, + trusted_file_transfer_batch_size_bytes, + trusted_msps, .. }) => { + // Setup file transfer service with trusted MSPs config + builder + .with_file_transfer( + client.clone(), + trusted_msps.clone(), + file_transfer_request_receiver, + file_transfer_request_protocol_name, + network.clone(), + ) + .await; info!( "Starting as a Storage Provider. Storage path: {:?}, Max storage capacity: {:?}, Jump capacity: {:?}, MSP charging period: {:?}", storage_path, max_storage_capacity, jump_capacity, msp_charging_period, @@ -1262,11 +1265,17 @@ where } if *trusted_file_transfer_server { + let batch_target_bytes = trusted_file_transfer_batch_size_bytes + .and_then(|size| usize::try_from(size).ok()) + .unwrap_or( + shc_client::trusted_file_transfer::server::DEFAULT_BATCH_TARGET_BYTES, + ); 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), + batch_target_bytes, }; builder.with_trusted_file_transfer_server(file_transfer_config); } @@ -1281,6 +1290,17 @@ where rpc_config.clone() } RoleOptions::Fisherman(fisherman_options) => { + // Setup file transfer service (no trusted MSPs for fisherman) + builder + .with_file_transfer( + client.clone(), + vec![], + file_transfer_request_receiver, + file_transfer_request_protocol_name, + network.clone(), + ) + .await; + // Validate configuration compatibility with indexer if let Some(indexer_cfg) = indexer_options { if indexer_cfg.indexer_mode == shc_indexer_service::IndexerMode::Lite {