fix(`/blocks`): cache extrinsic base weight constants to improve performance (#478)
This fixes a regression that happened when v2.1.2 was released. ie: [commit](https://github.com/paritytech/substrate-api-sidecar/commit/5ec24e63). It achieves this by cacheing extrinsic weight constants from the metadata that are used in extrinsic fee calculations.
Showing
- README.md 1 addition, 1 deletionREADME.md
- src/chains-config/defaultControllers.ts 2 additions, 0 deletionssrc/chains-config/defaultControllers.ts
- src/chains-config/dockMainnetControllers.ts 2 additions, 0 deletionssrc/chains-config/dockMainnetControllers.ts
- src/chains-config/dockTestnetControllers.ts 2 additions, 0 deletionssrc/chains-config/dockTestnetControllers.ts
- src/chains-config/index.ts 6 additions, 0 deletionssrc/chains-config/index.ts
- src/chains-config/kulupuControllers.ts 2 additions, 0 deletionssrc/chains-config/kulupuControllers.ts
- src/chains-config/kusamaControllers.ts 33 additions, 0 deletionssrc/chains-config/kusamaControllers.ts
- src/chains-config/mandalaControllers.ts 2 additions, 0 deletionssrc/chains-config/mandalaControllers.ts
- src/chains-config/metadata-consts/index.ts 78 additions, 0 deletionssrc/chains-config/metadata-consts/index.ts
- src/chains-config/metadata-consts/kusamaConsts.ts 28 additions, 0 deletionssrc/chains-config/metadata-consts/kusamaConsts.ts
- src/chains-config/metadata-consts/polkadotConsts.ts 34 additions, 0 deletionssrc/chains-config/metadata-consts/polkadotConsts.ts
- src/chains-config/metadata-consts/substrateConsts.ts 37 additions, 0 deletionssrc/chains-config/metadata-consts/substrateConsts.ts
- src/chains-config/metadata-consts/westendConsts.ts 30 additions, 0 deletionssrc/chains-config/metadata-consts/westendConsts.ts
- src/chains-config/polkadotControllers.ts 33 additions, 0 deletionssrc/chains-config/polkadotControllers.ts
- src/chains-config/westendControllers.ts 33 additions, 0 deletionssrc/chains-config/westendControllers.ts
- src/controllers/blocks/BlocksController.ts 11 additions, 1 deletionsrc/controllers/blocks/BlocksController.ts
- src/controllers/blocks/BlocksExtrinsicsController.ts 16 additions, 2 deletionssrc/controllers/blocks/BlocksExtrinsicsController.ts
- src/services/blocks/BlocksService.spec.ts 74 additions, 3 deletionssrc/services/blocks/BlocksService.spec.ts
- src/services/blocks/BlocksService.ts 217 additions, 160 deletionssrc/services/blocks/BlocksService.ts
- src/test-helpers/metadata/metadata.ts 15 additions, 3 deletionssrc/test-helpers/metadata/metadata.ts
Please register or sign in to comment