1
votes

I followed the instructions at https://substrate.dev/docs/en/tutorials/upgrade-a-chain/ to test out upgrading a chain runtime. When I submitted the setCode transaction I received the following error...

invalid transaction transaction would exhaust the block limits

I understand what the error means. But, I don't understand why the tutorial is failing. Has anyone else been able to get this tutorial working. Any help on this would be greatly appreciated.

2

2 Answers

2
votes

Yes, just like it told you transaction would exhaust the block limits

So there're 2 ways to achieve this.

  1. Like 2075 said use sudoUncheckedWeight, this will bypass the weight checking
  2. Use schedule module, this will schedule the runtime upgrade at a specific block height then execute it
  3. Democracy (actually this call the schedule implicitly)
1
votes

Did you try your upgrade through the UI? If you go through Developer > Sudo and select sudo - sudoUncheckedWeight and then system - setCode it should work.

Another route would go through Developer > Extrinsics, select your sudo account, then sudo, uncheckedWeight and system, setCode.