Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

seal: avoid hitting the trie when computing weight #6486

Closed
pepyakin opened this issue Jun 23, 2020 · 1 comment · Fixed by #7017
Closed

seal: avoid hitting the trie when computing weight #6486

pepyakin opened this issue Jun 23, 2020 · 1 comment · Fixed by #7017

Comments

@pepyakin
Copy link
Contributor

pepyakin commented Jun 23, 2020

For computing the weight cost of put_code we fetch the schedule from the storage. However, accessing the storage within the validate_transaction path is discouraged. That's why we should consider switching the put_code_per_byte_cost to be a const.

@pepyakin pepyakin changed the title pallet-contracts: avoid hitting the trie when computing weight seal: avoid hitting the trie when computing weight Jul 1, 2020
@athei
Copy link
Member

athei commented Aug 18, 2020

This will be solved for free once the proper weights arrive. The prices for the extrinsics are then read directly from the WeightInfo Trait and not from the schedule.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants