Invalid : approval program too long. max len 1024 bytes - General - Algorand

Invalid : approval program too long. max len 1024 bytes

post by humblefool on Jun 1, 2021

I’m getting this error while creating an application.

I would like to understand why there is a limitation on the approval program ?

Is there any workaround for this ?

I’m writing an approval program length which is more than 1024 bytes.

With this limitation, I cannot proceed further.

post by JasonW on Jun 1, 2021

That is a current limitation in Algorand. These limits are added to keep performance high. That said, this particular one is being addressed with a new feature that is being worked on now: https://github.com/algorand/go-algorand/pull/2157

post by humblefool on Jun 1, 2021

Thanks jason.

When can we expect this change to be available on mainnet or betanet ?

How come no other application have this problem ? just wanted to confirm if I’m doing something wrong which is causing more byte size

post by JasonW on Jun 1, 2021

That is the compiled byte size of the program. You can get around this by splitting contracts and linking them with an additional transaction in some cases. Hopefully, this change will be available over the summer.