-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
/benchmark runtime pallet pallet_contracts |
Finished benchmark for branch: at-remove-configcache Benchmark: Benchmark Runtime Pallet cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs ResultsPallet: "pallet_contracts", Extrinsic: "on_initialize", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
|
…/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ppl can still implement those Get
stuff using some storage.
(for instance parameter_types
allows to do:
parameter_types! {
pub storage MyGetter: u64 = 5;
}
)
But I think using storage to implement getter is not very advised for production runtime, also it would be in cache anyway.
Code looks good though
Yes I know. But I would not consider this case as this is something you really shouldn't do. |
bot merge |
Trying merge. |
This is a small PR. The chunk is just repetitiv test changes and automated weight results.
The
ConfigCache
was meant to load values needed contract execution once instead of on-demand. The reality is that the only in-storage value of theConfigCache
is theSchedule
. The other values are just simple getters which mostly return constant values or results of simple calculation. Also cache usage was inconsequential at best because all the values are pervasive as they are defined on the public trait.For all these reason i consider the
ConfigCache
clutter and remove it with this PR.