Skip to content

Commit

Permalink
fix: 🐛 update spam handling to avoid inconsistencies after runtime up…
Browse files Browse the repository at this point in the history
…grades
  • Loading branch information
TDemeco committed Jan 23, 2025
1 parent 15bbb01 commit e712120
Show file tree
Hide file tree
Showing 18 changed files with 355 additions and 250 deletions.
56 changes: 28 additions & 28 deletions api-augment/dist/interfaces/lookup.js

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

8 changes: 5 additions & 3 deletions api-augment/dist/types/interfaces/augment-api-query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1372,11 +1372,13 @@ declare module "@polkadot/api-base/types/storage" {
lastDeletedTick: AugmentedQuery<ApiType, () => Observable<u32>, []> &
QueryableStorageEntry<ApiType, []>;
/**
* The number of blocks that have been considered _not_ full in the last [`Config::BlockFullnessPeriod`].
* The vector holding whether the last [`Config::BlockFullnessPeriod`] blocks were full or not.
*
* This is used to check if the network is presumably under a spam attack.
* Each element in the vector represents a block, and is `true` if the block was full, and `false` if it was not.
* Note: Ideally we would use a `BitVec` to reduce storage, but since there's no bounded `BitVec` implementation
* we use a BoundedVec<bool> instead. This uses 7 more bits of storage per element.
**/
notFullBlocksCount: AugmentedQuery<ApiType, () => Observable<u32>, []> &
pastBlocksStatus: AugmentedQuery<ApiType, () => Observable<Vec<bool>>, []> &
QueryableStorageEntry<ApiType, []>;
/**
* A mapping from block number to the weight used in that block.
Expand Down
Loading

0 comments on commit e712120

Please sign in to comment.