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 benchmarking the storage-providers pallet's extrinsics #344

Merged
merged 9 commits into from
Feb 4, 2025
15 changes: 13 additions & 2 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.

12 changes: 12 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 @@ -1087,6 +1087,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when a user exceeded the bucket data limit based on the associated value proposition.
**/
BucketSizeExceedsLimit: AugmentedError<ApiType>;
/**
* Error thrown when, after moving all buckets of a MSP when removing it from the system, the amount doesn't match the expected value.
**/
BucketsMovedAmountMismatch: AugmentedError<ApiType>;
/**
* Error thrown when the runtime cannot hold the required deposit from the account to register it as a SP or change its capacity.
**/
Expand Down Expand Up @@ -1133,6 +1137,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when changing the MSP of a bucket to the same assigned MSP.
**/
MspAlreadyAssignedToBucket: AugmentedError<ApiType>;
/**
* An operation dedicated to MSPs only
**/
MspOnlyOperation: AugmentedError<ApiType>;
/**
* Error thrown when a Provider tries to add a new MultiAddress to its account but it already exists.
**/
Expand Down Expand Up @@ -1245,6 +1253,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when the value proposition id is not found.
**/
ValuePropositionNotFound: AugmentedError<ApiType>;
/**
* Error thrown when, after deleting all value propositions of a MSP when removing it from the system, the amount doesn't match the expected value.
**/
ValuePropositionsDeletedAmountMismatch: AugmentedError<ApiType>;
/**
* Generic error
**/
Expand Down
12 changes: 12 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 @@ -2308,6 +2308,18 @@ declare module "@polkadot/api-base/types/events" {
newRoot: H256;
}
>;
/**
* Event emitted when the provider that has been marked as insolvent was a MSP. It notifies the users of that MSP
* the buckets that it was holding, so they can take appropriate measures.
**/
BucketsOfInsolventMsp: AugmentedEvent<
ApiType,
[mspId: H256, buckets: Vec<H256>],
{
mspId: H256;
buckets: Vec<H256>;
}
>;
/**
* Event emitted when a SP has changed its capacity successfully. Provides information about
* that SP's account id, its old total data that could store, and the new total data.
Expand Down
5 changes: 4 additions & 1 deletion api-augment/dist/types/interfaces/augment-api-tx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3627,7 +3627,10 @@ declare module "@polkadot/api-base/types/submittable" {
*
* Emits `MspSignOffSuccess` event when successful.
**/
mspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
mspSignOff: AugmentedSubmittable<
(mspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
[H256]
>;
/**
* Dispatchable extrinsic that allows BSPs and MSPs to remove an existing multiaddress from their account.
*
Expand Down
12 changes: 10 additions & 2 deletions api-augment/dist/types/interfaces/lookup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,10 @@ declare const _default: {
ProviderInsolvent: {
providerId: string;
};
BucketsOfInsolventMsp: {
mspId: string;
buckets: string;
};
BucketRootChanged: {
bucketId: string;
oldRoot: string;
Expand Down Expand Up @@ -1445,7 +1449,7 @@ declare const _default: {
endBlockGracePeriod: string;
};
/**
* Lookup133: pallet_file_system::pallet::Event<T>
* Lookup134: pallet_file_system::pallet::Event<T>
**/
PalletFileSystemEvent: {
_enum: {
Expand Down Expand Up @@ -3400,7 +3404,9 @@ declare const _default: {
providerAccount: string;
};
cancel_sign_up: string;
msp_sign_off: string;
msp_sign_off: {
mspId: string;
};
bsp_sign_off: string;
change_capacity: {
newCapacity: string;
Expand Down Expand Up @@ -4249,6 +4255,8 @@ declare const _default: {
capacity: string;
capacityUsed: string;
multiaddresses: string;
amountOfBuckets: string;
amountOfValueProps: string;
lastCapacityChange: string;
ownerAccount: string;
paymentAccount: string;
Expand Down
19 changes: 18 additions & 1 deletion api-augment/dist/types/interfaces/types-lookup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,11 @@ declare module "@polkadot/types/lookup" {
readonly asProviderInsolvent: {
readonly providerId: H256;
} & Struct;
readonly isBucketsOfInsolventMsp: boolean;
readonly asBucketsOfInsolventMsp: {
readonly mspId: H256;
readonly buckets: Vec<H256>;
} & Struct;
readonly isBucketRootChanged: boolean;
readonly asBucketRootChanged: {
readonly bucketId: H256;
Expand Down Expand Up @@ -1837,6 +1842,7 @@ declare module "@polkadot/types/lookup" {
| "AwaitingTopUp"
| "TopUpFulfilled"
| "ProviderInsolvent"
| "BucketsOfInsolventMsp"
| "BucketRootChanged"
| "MultiAddressAdded"
| "MultiAddressRemoved"
Expand Down Expand Up @@ -1870,7 +1876,7 @@ declare module "@polkadot/types/lookup" {
readonly startedAt: u32;
readonly endBlockGracePeriod: u32;
}
/** @name PalletFileSystemEvent (133) */
/** @name PalletFileSystemEvent (134) */
interface PalletFileSystemEvent extends Enum {
readonly isNewBucket: boolean;
readonly asNewBucket: {
Expand Down Expand Up @@ -4176,6 +4182,9 @@ declare module "@polkadot/types/lookup" {
} & Struct;
readonly isCancelSignUp: boolean;
readonly isMspSignOff: boolean;
readonly asMspSignOff: {
readonly mspId: H256;
} & Struct;
readonly isBspSignOff: boolean;
readonly isChangeCapacity: boolean;
readonly asChangeCapacity: {
Expand Down Expand Up @@ -5406,6 +5415,8 @@ declare module "@polkadot/types/lookup" {
readonly capacity: u64;
readonly capacityUsed: u64;
readonly multiaddresses: Vec<Bytes>;
readonly amountOfBuckets: u128;
readonly amountOfValueProps: u32;
readonly lastCapacityChange: u32;
readonly ownerAccount: AccountId32;
readonly paymentAccount: AccountId32;
Expand Down Expand Up @@ -5448,6 +5459,7 @@ declare module "@polkadot/types/lookup" {
readonly isBucketNotFound: boolean;
readonly isBucketAlreadyExists: boolean;
readonly isBucketNotEmpty: boolean;
readonly isBucketsMovedAmountMismatch: boolean;
readonly isAppendBucketToMspFailed: boolean;
readonly isProviderNotSlashable: boolean;
readonly isTopUpNotRequired: boolean;
Expand All @@ -5459,6 +5471,7 @@ declare module "@polkadot/types/lookup" {
readonly isValuePropositionNotFound: boolean;
readonly isValuePropositionAlreadyExists: boolean;
readonly isValuePropositionNotAvailable: boolean;
readonly isValuePropositionsDeletedAmountMismatch: boolean;
readonly isFixedRatePaymentStreamNotFound: boolean;
readonly isMspAlreadyAssignedToBucket: boolean;
readonly isBucketSizeExceedsLimit: boolean;
Expand All @@ -5468,6 +5481,7 @@ declare module "@polkadot/types/lookup" {
readonly isDeleteProviderConditionsNotMet: boolean;
readonly isCannotStopCycleWithNonDefaultRoot: boolean;
readonly isBspOnlyOperation: boolean;
readonly isMspOnlyOperation: boolean;
readonly isInvalidEncodedFileMetadata: boolean;
readonly isInvalidEncodedAccountId: boolean;
readonly isPaymentStreamNotFound: boolean;
Expand Down Expand Up @@ -5497,6 +5511,7 @@ declare module "@polkadot/types/lookup" {
| "BucketNotFound"
| "BucketAlreadyExists"
| "BucketNotEmpty"
| "BucketsMovedAmountMismatch"
| "AppendBucketToMspFailed"
| "ProviderNotSlashable"
| "TopUpNotRequired"
Expand All @@ -5508,6 +5523,7 @@ declare module "@polkadot/types/lookup" {
| "ValuePropositionNotFound"
| "ValuePropositionAlreadyExists"
| "ValuePropositionNotAvailable"
| "ValuePropositionsDeletedAmountMismatch"
| "FixedRatePaymentStreamNotFound"
| "MspAlreadyAssignedToBucket"
| "BucketSizeExceedsLimit"
Expand All @@ -5517,6 +5533,7 @@ declare module "@polkadot/types/lookup" {
| "DeleteProviderConditionsNotMet"
| "CannotStopCycleWithNonDefaultRoot"
| "BspOnlyOperation"
| "MspOnlyOperation"
| "InvalidEncodedFileMetadata"
| "InvalidEncodedAccountId"
| "PaymentStreamNotFound";
Expand Down
12 changes: 12 additions & 0 deletions api-augment/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when a user exceeded the bucket data limit based on the associated value proposition.
**/
BucketSizeExceedsLimit: AugmentedError<ApiType>;
/**
* Error thrown when, after moving all buckets of a MSP when removing it from the system, the amount doesn't match the expected value.
**/
BucketsMovedAmountMismatch: AugmentedError<ApiType>;
/**
* Error thrown when the runtime cannot hold the required deposit from the account to register it as a SP or change its capacity.
**/
Expand Down Expand Up @@ -1141,6 +1145,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when changing the MSP of a bucket to the same assigned MSP.
**/
MspAlreadyAssignedToBucket: AugmentedError<ApiType>;
/**
* An operation dedicated to MSPs only
**/
MspOnlyOperation: AugmentedError<ApiType>;
/**
* Error thrown when a Provider tries to add a new MultiAddress to its account but it already exists.
**/
Expand Down Expand Up @@ -1253,6 +1261,10 @@ declare module "@polkadot/api-base/types/errors" {
* Error thrown when the value proposition id is not found.
**/
ValuePropositionNotFound: AugmentedError<ApiType>;
/**
* Error thrown when, after deleting all value propositions of a MSP when removing it from the system, the amount doesn't match the expected value.
**/
ValuePropositionsDeletedAmountMismatch: AugmentedError<ApiType>;
/**
* Generic error
**/
Expand Down
9 changes: 9 additions & 0 deletions api-augment/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,15 @@ declare module "@polkadot/api-base/types/events" {
[bucketId: H256, oldRoot: H256, newRoot: H256],
{ bucketId: H256; oldRoot: H256; newRoot: H256 }
>;
/**
* Event emitted when the provider that has been marked as insolvent was a MSP. It notifies the users of that MSP
* the buckets that it was holding, so they can take appropriate measures.
**/
BucketsOfInsolventMsp: AugmentedEvent<
ApiType,
[mspId: H256, buckets: Vec<H256>],
{ mspId: H256; buckets: Vec<H256> }
>;
/**
* Event emitted when a SP has changed its capacity successfully. Provides information about
* that SP's account id, its old total data that could store, and the new total data.
Expand Down
5 changes: 4 additions & 1 deletion api-augment/src/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,10 @@ declare module "@polkadot/api-base/types/submittable" {
*
* Emits `MspSignOffSuccess` event when successful.
**/
mspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
mspSignOff: AugmentedSubmittable<
(mspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
[H256]
>;
/**
* Dispatchable extrinsic that allows BSPs and MSPs to remove an existing multiaddress from their account.
*
Expand Down
15 changes: 13 additions & 2 deletions api-augment/src/interfaces/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,10 @@ export default {
ProviderInsolvent: {
providerId: "H256"
},
BucketsOfInsolventMsp: {
mspId: "H256",
buckets: "Vec<H256>"
},
BucketRootChanged: {
bucketId: "H256",
oldRoot: "H256",
Expand Down Expand Up @@ -1461,7 +1465,7 @@ export default {
endBlockGracePeriod: "u32"
},
/**
* Lookup133: pallet_file_system::pallet::Event<T>
* Lookup134: pallet_file_system::pallet::Event<T>
**/
PalletFileSystemEvent: {
_enum: {
Expand Down Expand Up @@ -3492,7 +3496,9 @@ export default {
providerAccount: "Option<AccountId32>"
},
cancel_sign_up: "Null",
msp_sign_off: "Null",
msp_sign_off: {
mspId: "H256"
},
bsp_sign_off: "Null",
change_capacity: {
newCapacity: "u64"
Expand Down Expand Up @@ -4448,6 +4454,8 @@ export default {
capacity: "u64",
capacityUsed: "u64",
multiaddresses: "Vec<Bytes>",
amountOfBuckets: "u128",
amountOfValueProps: "u32",
lastCapacityChange: "u32",
ownerAccount: "AccountId32",
paymentAccount: "AccountId32",
Expand Down Expand Up @@ -4498,6 +4506,7 @@ export default {
"BucketNotFound",
"BucketAlreadyExists",
"BucketNotEmpty",
"BucketsMovedAmountMismatch",
"AppendBucketToMspFailed",
"ProviderNotSlashable",
"TopUpNotRequired",
Expand All @@ -4509,6 +4518,7 @@ export default {
"ValuePropositionNotFound",
"ValuePropositionAlreadyExists",
"ValuePropositionNotAvailable",
"ValuePropositionsDeletedAmountMismatch",
"FixedRatePaymentStreamNotFound",
"MspAlreadyAssignedToBucket",
"BucketSizeExceedsLimit",
Expand All @@ -4518,6 +4528,7 @@ export default {
"DeleteProviderConditionsNotMet",
"CannotStopCycleWithNonDefaultRoot",
"BspOnlyOperation",
"MspOnlyOperation",
"InvalidEncodedFileMetadata",
"InvalidEncodedAccountId",
"PaymentStreamNotFound"
Expand Down
Loading
Loading