Skip to content

Commit

Permalink
feat: Penalize BSP for stop storing a file and transfer to Treasury a…
Browse files Browse the repository at this point in the history
…ccount (Moonsong-Labs#247)

* penalize bsp for stop storing a file and transfer to treasury

* expect or error to retrieve bsp account id

* feat: ✨ Set `BspStopStoringFilePenalty` to be half of `SlashAmountPerMaxFileSize`

* chore: 🏷️ Update api-augment

---------

Co-authored-by: Facundo Farall <[email protected]>
  • Loading branch information
snowmead and ffarall authored Nov 6, 2024
1 parent 72c84ca commit 5c11888
Show file tree
Hide file tree
Showing 22 changed files with 1,084 additions and 855 deletions.
335 changes: 172 additions & 163 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.

8 changes: 8 additions & 0 deletions api-augment/dist/types/interfaces/augment-api-consts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ declare module "@polkadot/api-base/types/consts" {
[key: string]: Codec;
};
fileSystem: {
/**
* Penalty payed by a BSP when they forcefully stop storing a file.
**/
bspStopStoringFilePenalty: u128 & AugmentedConst<ApiType>;
/**
* Maximum batch of storage requests that can be confirmed at once when calling `bsp_confirm_storing`.
**/
Expand Down Expand Up @@ -117,6 +121,10 @@ declare module "@polkadot/api-base/types/consts" {
* Time-to-live for a storage request.
**/
storageRequestTtl: u32 & AugmentedConst<ApiType>;
/**
* The treasury account of the runtime, where a fraction of each payment goes.
**/
treasuryAccount: AccountId32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
Expand Down
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 @@ -230,6 +230,10 @@ declare module "@polkadot/api-base/types/errors" {
* Failed to encode fingerprint as slice.
**/
FailedToEncodeFingerprint: AugmentedError<ApiType>;
/**
* Failed to get owner account of ID of provider
**/
FailedToGetOwnerAccount: AugmentedError<ApiType>;
/**
* Failed to convert to primitive type.
**/
Expand Down
Loading

0 comments on commit 5c11888

Please sign in to comment.