The weigh of set_code
wantwas not properly benchmarked until this MR, so it was probably assuming way too much weight. The proper way would be to integrate that into your runtime and then use the updated weights.
And additionally set your MaxProposalWeight
to something sensible.
Another (hackier) way is to wrap the System::set_code
in a Utility::with_weight
call if you want to ignore the weight check. Note that this introduces the possibility of creating an overweight block, if the set_code
does use more than the block limit. But so far the results for set_code
indicated about 60ms, which should have more than enough room to not produce an overweight block.