Skip to content

Commit

Permalink
wip: 🚧 benchmark a few more extrinsics of the File System pallet (#295)
Browse files Browse the repository at this point in the history
* feat: 🚧 benchmark more extrinsics of the file system pallet

* fix: 🩹 add new argument to `issue_storage_request` extrinsic in benchmark

* feat: ✨ add collection deletion + benchmark more extrinsics

* chore: 🏷️ run typegen

* fix: 🩹 amend review

* chore: 🏷️ run typegen
  • Loading branch information
TDemeco authored Dec 30, 2024
1 parent c9b5ce1 commit b5d132d
Show file tree
Hide file tree
Showing 14 changed files with 1,354 additions and 251 deletions.
1 change: 1 addition & 0 deletions api-augment/dist/interfaces/lookup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api-augment/dist/interfaces/lookup.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions api-augment/dist/types/interfaces/augment-api-errors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ declare module "@polkadot/api-base/types/errors" {
* Cannot hold the required deposit from the user
**/
CannotHoldDeposit: AugmentedError<ApiType>;
/**
* Collection ID was not found.
**/
CollectionNotFound: AugmentedError<ApiType>;
/**
* Divided by 0
**/
Expand Down
2 changes: 2 additions & 0 deletions api-augment/dist/types/interfaces/types-lookup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5411,6 +5411,7 @@ declare module "@polkadot/types/lookup" {
readonly isBucketNotFound: boolean;
readonly isBucketNotEmpty: boolean;
readonly isNotBucketOwner: boolean;
readonly isCollectionNotFound: boolean;
readonly isProviderRootNotFound: boolean;
readonly isExpectedNonInclusionProof: boolean;
readonly isExpectedInclusionProof: boolean;
Expand Down Expand Up @@ -5485,6 +5486,7 @@ declare module "@polkadot/types/lookup" {
| "BucketNotFound"
| "BucketNotEmpty"
| "NotBucketOwner"
| "CollectionNotFound"
| "ProviderRootNotFound"
| "ExpectedNonInclusionProof"
| "ExpectedInclusionProof"
Expand Down
4 changes: 4 additions & 0 deletions api-augment/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ declare module "@polkadot/api-base/types/errors" {
* Cannot hold the required deposit from the user
**/
CannotHoldDeposit: AugmentedError<ApiType>;
/**
* Collection ID was not found.
**/
CollectionNotFound: AugmentedError<ApiType>;
/**
* Divided by 0
**/
Expand Down
1 change: 1 addition & 0 deletions api-augment/src/interfaces/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4498,6 +4498,7 @@ export default {
"BucketNotFound",
"BucketNotEmpty",
"NotBucketOwner",
"CollectionNotFound",
"ProviderRootNotFound",
"ExpectedNonInclusionProof",
"ExpectedInclusionProof",
Expand Down
2 changes: 2 additions & 0 deletions api-augment/src/interfaces/types-lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5678,6 +5678,7 @@ declare module "@polkadot/types/lookup" {
readonly isBucketNotFound: boolean;
readonly isBucketNotEmpty: boolean;
readonly isNotBucketOwner: boolean;
readonly isCollectionNotFound: boolean;
readonly isProviderRootNotFound: boolean;
readonly isExpectedNonInclusionProof: boolean;
readonly isExpectedInclusionProof: boolean;
Expand Down Expand Up @@ -5752,6 +5753,7 @@ declare module "@polkadot/types/lookup" {
| "BucketNotFound"
| "BucketNotEmpty"
| "NotBucketOwner"
| "CollectionNotFound"
| "ProviderRootNotFound"
| "ExpectedNonInclusionProof"
| "ExpectedInclusionProof"
Expand Down
2 changes: 1 addition & 1 deletion api-augment/storagehub.json

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions pallets/file-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ sp-weights = { workspace = true }

# Local
pallet-file-system-runtime-api = { workspace = true }
pallet-proofs-dealer = { workspace = true, optional = true }
pallet-storage-providers = { workspace = true, optional = true }

shp-constants = { workspace = true }
Expand All @@ -45,7 +46,6 @@ serde = { workspace = true }
pallet-bucket-nfts = { workspace = true }
pallet-cr-randomness = { workspace = true }
pallet-storage-providers = { workspace = true }
pallet-proofs-dealer = { workspace = true }
pallet-payment-streams = { workspace = true }
shp-data-price-updater = { workspace = true }
shp-treasury-funding = { workspace = true }
Expand All @@ -60,51 +60,51 @@ pallet-balances = { workspace = true, features = ["std"] }
[features]
default = ["std"]
std = [
"codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"pallet-bucket-nfts/std",
"pallet-cr-randomness/std",
"pallet-file-system-runtime-api/std",
"pallet-nfts/std",
"pallet-payment-streams/std",
"pallet-proofs-dealer/std",
"pallet-storage-providers/std",
"scale-info/std",
"shp-constants/std",
"shp-file-metadata/std",
"shp-traits/std",
"shp-treasury-funding/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-trie/std",
"sp-weights/std",
"codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"pallet-bucket-nfts/std",
"pallet-cr-randomness/std",
"pallet-file-system-runtime-api/std",
"pallet-nfts/std",
"pallet-payment-streams/std",
"pallet-proofs-dealer/std",
"pallet-storage-providers/std",
"scale-info/std",
"shp-constants/std",
"shp-file-metadata/std",
"shp-traits/std",
"shp-treasury-funding/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-trie/std",
"sp-weights/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-cr-randomness/runtime-benchmarks",
"pallet-proofs-dealer/runtime-benchmarks",
"pallet-storage-providers/runtime-benchmarks",
"pallet-bucket-nfts/runtime-benchmarks",
"shp-constants/runtime-benchmarks",
"shp-file-metadata/runtime-benchmarks",
"shp-traits/runtime-benchmarks",
"shp-treasury-funding/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-cr-randomness/runtime-benchmarks",
"pallet-proofs-dealer/runtime-benchmarks",
"pallet-storage-providers/runtime-benchmarks",
"pallet-bucket-nfts/runtime-benchmarks",
"shp-constants/runtime-benchmarks",
"shp-file-metadata/runtime-benchmarks",
"shp-traits/runtime-benchmarks",
"shp-treasury-funding/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-proofs-dealer/try-runtime",
"pallet-storage-providers/try-runtime",
"pallet-bucket-nfts/try-runtime",
"shp-constants/try-runtime",
"shp-file-metadata/try-runtime",
"shp-traits/try-runtime",
"shp-treasury-funding/try-runtime",
"sp-runtime/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-proofs-dealer/try-runtime",
"pallet-storage-providers/try-runtime",
"pallet-bucket-nfts/try-runtime",
"shp-constants/try-runtime",
"shp-file-metadata/try-runtime",
"shp-traits/try-runtime",
"shp-treasury-funding/try-runtime",
"sp-runtime/try-runtime",
]
Loading

0 comments on commit b5d132d

Please sign in to comment.