Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ finish File System pallet benchmarking #307

Merged
merged 36 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
40164c9
feat: :construction: setup structure for file system benchmark scripts
TDemeco Dec 26, 2024
9894beb
feat: :sparkles: add generate file system benchmark proofs script
TDemeco Dec 27, 2024
2626579
feat: :sparkles: finish proof generator script for file system benchm…
TDemeco Dec 31, 2024
54d0ef8
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Dec 31, 2024
874b647
chore: :label: run typegen
TDemeco Dec 31, 2024
18afa70
feat: :test_tube: add benchmarking for msp respond storage requests
TDemeco Dec 31, 2024
7234d28
fix: :construction: fix invalid key proofs benchmarking
TDemeco Dec 31, 2024
20d2785
fix: :construction: add needed files to script to avoid failling proofs
TDemeco Jan 2, 2025
215138c
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 2, 2025
10675e4
feat: :sparkles: finish benchmarking proofs script
TDemeco Jan 2, 2025
349365f
feat: :sparkles: add missing benchmark proofs + refactor tuple into s…
TDemeco Jan 3, 2025
29ced45
feat: :sparkles: finish benchmarking file system pallet
TDemeco Jan 6, 2025
1784ec1
fix: :adhesive_bandage: remove unused packages + run typegen
TDemeco Jan 6, 2025
38ce434
style: :rotating_light: run cargo fmt
TDemeco Jan 6, 2025
3f5af57
test: :white_check_mark: revert file key proof in insufficient BSP ca…
TDemeco Jan 6, 2025
d51f715
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 6, 2025
a368044
style: :art: improve file system proof generating script's clarity
TDemeco Jan 6, 2025
c4ea8c1
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 6, 2025
903a6f5
fix: :white_check_mark: fix merged file system benchmarks from main
TDemeco Jan 6, 2025
fb47d63
test: :white_check_mark: add unit tests for MSP used capacity update …
TDemeco Jan 7, 2025
0315b6d
chore: :label: run typegen
TDemeco Jan 7, 2025
458ed2f
feat: :sparkles: benchmark on poll hook
TDemeco Jan 8, 2025
fe650eb
feat: :construction: add benchmarks for `on_idle` hook
TDemeco Jan 9, 2025
9c2c486
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 9, 2025
4ae8278
chore: :label: run typegen
TDemeco Jan 9, 2025
b51c7d9
fix: :rotating_light: make fn public to the crate for benchmarking
TDemeco Jan 9, 2025
01c6d9e
feat: :construction: set up `on_idle` hook to finish benchmarking aft…
TDemeco Jan 9, 2025
24c8c82
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 13, 2025
dfa4d97
fix: :adhesive_bandage: fix benchmarks after merge from main
TDemeco Jan 13, 2025
d918109
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 13, 2025
589567f
fix: :adhesive_bandage: update weight calculation for MSP respond sto…
TDemeco Jan 13, 2025
322ef53
docs: :memo: amend review
TDemeco Jan 13, 2025
0d6a19a
Merge branch 'main' into feat/file-system-benchmark-script
TDemeco Jan 13, 2025
aa1e549
fix: :adhesive_bandage: update benchmarks after merge from main
TDemeco Jan 13, 2025
91f4745
feat: :sparkles: finish file system pallet benchmarking
TDemeco Jan 14, 2025
97b49d9
fix: :white_check_mark: fix integration tests
TDemeco Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 129 additions & 126 deletions Cargo.lock

Large diffs are not rendered by default.

175 changes: 93 additions & 82 deletions api-augment/dist/interfaces/lookup.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions api-augment/dist/types/interfaces/augment-api-events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,38 @@ declare module "@polkadot/api-base/types/events" {
error: SpRuntimeDispatchError;
}
>;
/**
* Failed to decrease MSP's used capacity for expired file deletion request
**/
FailedToDecreaseMspUsedCapacity: AugmentedEvent<
ApiType,
[
user: AccountId32,
mspId: H256,
fileKey: H256,
fileSize: u64,
error: SpRuntimeDispatchError
],
{
user: AccountId32;
mspId: H256;
fileKey: H256;
fileSize: u64;
error: SpRuntimeDispatchError;
}
>;
/**
* Failed to get the MSP owner of the bucket for an expired file deletion request
* This is different from the bucket not having a MSP, which is allowed and won't error
**/
FailedToGetMspOfBucket: AugmentedEvent<
ApiType,
[bucketId: H256, error: SpRuntimeDispatchError],
{
bucketId: H256;
error: SpRuntimeDispatchError;
}
>;
/**
* Notifies that a priority challenge with a trie remove mutation failed to be queued in the `on_idle` hook.
* This can happen if the priority challenge queue is full, and the failed challenge should be manually
Expand Down
18 changes: 18 additions & 0 deletions api-augment/dist/types/interfaces/augment-api-rpc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,24 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
addToExcludeList: AugmentedRpc<
(file_key: H256 | string | Uint8Array) => Observable<ITuple<[]>>
>;
/**
* Generate a SCALE-encoded proof for a file key to allow a BSP to confirm storing it.
**/
generateFileKeyProofBspConfirm: AugmentedRpc<
(
bsp_id: H256 | string | Uint8Array,
file_key: H256 | string | Uint8Array
) => Observable<Bytes>
>;
/**
* Generate a SCALE-encoded proof for a file key to allow a MSP to accept storing it.
**/
generateFileKeyProofMspAccept: AugmentedRpc<
(
msp_id: H256 | string | Uint8Array,
file_key: H256 | string | Uint8Array
) => Observable<Bytes>
>;
/**
* Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest.
**/
Expand Down
29 changes: 13 additions & 16 deletions api-augment/dist/types/interfaces/augment-api-tx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
CumulusPrimitivesParachainInherentParachainInherentData,
PalletBalancesAdjustmentDirection,
PalletFileSystemBucketMoveRequestResponse,
PalletFileSystemFileKeyWithProof,
PalletFileSystemStorageRequestMspBucketResponse,
PalletNftsAttributeNamespace,
PalletNftsCancelAttributesApprovalWitness,
Expand All @@ -26,7 +27,6 @@ import type {
PalletNftsPreSignedMint,
PalletNftsPriceWithDirection,
PalletProofsDealerProof,
ShpFileKeyVerifierFileKeyProof,
SpRuntimeMultiSignature,
SpTrieStorageProofCompactProof,
SpWeightsWeightV2Weight,
Expand Down Expand Up @@ -524,21 +524,18 @@ declare module "@polkadot/api-base/types/submittable" {
| string
| Uint8Array,
fileKeysAndProofs:
| Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>
| [
H256 | string | Uint8Array,
(
| ShpFileKeyVerifierFileKeyProof
| {
fileMetadata?: any;
proof?: any;
}
| string
| Uint8Array
)
][]
) => SubmittableExtrinsic<ApiType>,
[SpTrieStorageProofCompactProof, Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>]
| Vec<PalletFileSystemFileKeyWithProof>
| (
| PalletFileSystemFileKeyWithProof
| {
fileKey?: any;
proof?: any;
}
| string
| Uint8Array
)[]
) => SubmittableExtrinsic<ApiType>,
[SpTrieStorageProofCompactProof, Vec<PalletFileSystemFileKeyWithProof>]
>;
/**
* Executed by a BSP to request to stop storing a file.
Expand Down
Loading
Loading