-
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: support calamari parachain fee calculations (#749)
* support calamari fee calculation * lose redundant import * calamari runtime constants * calamari handler * whitespace for the linter * wasm-pack * sorting for the linter * minCalcFeeRuntime correction * lint * whitespace fix
- Loading branch information
Showing
6 changed files
with
53 additions
and
0 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 |
---|---|---|
|
@@ -61,6 +61,8 @@ impl Multiplier { | |
("dock-pos-main-runtime", _) => V2(new_u128(inner)), | ||
("dock-pos-test-runtime", _) => V2(new_u128(inner)), | ||
|
||
("calamari", _v) => V2(new_u128(inner)), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
TarikGul
Member
|
||
|
||
_ => { | ||
info!("Unsupported runtime: {}#{}", spec_name, spec_version); | ||
return None; | ||
|
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,37 @@ | ||
import { ControllerConfig } from '../types/chains-config'; | ||
import { initLRUCache } from './cache/lruCache'; | ||
import { getBlockWeight } from './metadata-consts'; | ||
|
||
/** | ||
* Controllers for calamari collator | ||
*/ | ||
export const calamariControllers: ControllerConfig = { | ||
controllers: [ | ||
'AccountsBalanceInfo', | ||
'AccountsStakingInfo', | ||
'AccountsStakingPayouts', | ||
'AccountsValidate', | ||
'AccountsVestingInfo', | ||
'Blocks', | ||
'BlocksExtrinsics', | ||
'NodeNetwork', | ||
'NodeTransactionPool', | ||
'NodeVersion', | ||
'PalletsStakingProgress', | ||
'PalletsStorage', | ||
'Paras', | ||
'RuntimeCode', | ||
'RuntimeMetadata', | ||
'RuntimeSpec', | ||
'TransactionDryRun', | ||
'TransactionFeeEstimate', | ||
'TransactionMaterial', | ||
'TransactionSubmit', | ||
], | ||
options: { | ||
finalizes: true, | ||
minCalcFeeRuntime: 1, | ||
blockWeightStore: getBlockWeight('calamari'), | ||
blockStore: initLRUCache(), | ||
}, | ||
}; |
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,9 @@ | ||
import { MetadataConsts } from '../../types/chains-config'; | ||
import { extrinsicBaseWeight } from './substrateConsts'; | ||
|
||
export const calamariDefinitions: MetadataConsts[] = [ | ||
{ | ||
runtimeVersions: [1, 2, 3, 4], | ||
extrinsicBaseWeight, | ||
}, | ||
]; |
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
Nit: I can't see why sometimes the variabel is
_v
and other times it's_
; settle on just one?