-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add block weights for Shiden network to support fee calculation (#…
…688) * create shiden base weight and controller * add base weight and runtime version * fixed spec version * Update shidenControllers.ts * ad min calc fee runtime * manually add per class * added shiden spec for calc * indent on env file
- Loading branch information
Showing
7 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
"files": [ | ||
"calc_bg.wasm", | ||
"calc.js", | ||
"calc_bg.js", | ||
"calc.d.ts" | ||
], | ||
"main": "calc.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { MetadataConsts } from '../../types/chains-config'; | ||
|
||
export const shidenDefinitions: MetadataConsts[] = [ | ||
{ | ||
runtimeVersions: [1, 2, 3, 6, 7, 8, 10, 14, 15], | ||
perClass: { | ||
normal: { | ||
baseExtrinsic: BigInt(125000000), | ||
}, | ||
operational: { | ||
baseExtrinsic: BigInt(1), | ||
}, | ||
mandatory: { | ||
baseExtrinsic: BigInt(128000000000001), | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ControllerConfig } from '../types/chains-config'; | ||
import { initLRUCache } from './cache/lruCache'; | ||
import { getBlockWeight } from './metadata-consts'; | ||
|
||
/** | ||
* Controllers for Shiden collator | ||
*/ | ||
export const shidenControllers: ControllerConfig = { | ||
controllers: [ | ||
'AccountsBalanceInfo', | ||
'AccountsVestingInfo', | ||
'Blocks', | ||
'BlocksExtrinsics', | ||
'BlocksTrace', | ||
'NodeNetwork', | ||
'NodeTransactionPool', | ||
'NodeVersion', | ||
'PalletsAssets', | ||
'PalletsStorage', | ||
'Paras', | ||
'RuntimeCode', | ||
'RuntimeMetadata', | ||
'RuntimeSpec', | ||
'TransactionFeeEstimate', | ||
'TransactionMaterial', | ||
'TransactionSubmit', | ||
], | ||
options: { | ||
finalizes: true, | ||
minCalcFeeRuntime: 1, | ||
blockWeightStore: getBlockWeight('shiden'), | ||
blockStore: initLRUCache(), | ||
}, | ||
}; |