Gas limits are prohibitive for contract interaction

There are multiple ways to see this problem.

Raising the limit per transaction*

I believe this would not increase the load on the network.

It might make the network slower as less transactions could be included in a block, but then, markets would decide which one would be included.

Improving Michelson

Support for more efficient instructions has already been added in the past by people from the LIGO team and Nomadic (DIG/DUG). This made code more efficient for all languages. There are currently plans to add similar improvements to the protocol.

Optimizing the Michelson interpreter

As gas efficiency concerns become bigger, we could spend time optimizing the actual Michelson interpreter to reduce gas costs of various operations.

Optimizing your LIGO code

You can ask on any of the LIGO channels (#ligo on slack) for tips to change your LIGO code to make the generated Michelson more efficient.

Optimizing the LIGO compiler

If you can send us examples, we can optimize the LIGO compiler to take care of them.
We are also adding features to include Michelson within LIGO programs, so that performance sensitive code can be written in Michelson directly.


It is to be noted that there are two kinds of optimizations a compiler can do:

  • Optimizing the program. This includes things like inlining, computing constants, etc. They should still work with any future improvement of Michelson.
  • Optimizing the Michelson. They are very contingent to the current version of Michelson, and will likely be out-of-date at some point.

It is also to be noted that improving Michelson benefits everyone, while compiler optimizations have to be re-coded for all languages.


*Precision following from Arthur’s next message.

4 Likes