-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
increase max lsig program size #5990
Comments
👍 I think the easiest thing is to simply adjust the lsig teal max program size to 4k which is more in line with the other limits of the AVM. The other alternative is to go down the rabbit hole of having variable transaction fees that scale with transaction size and enforce only that transactions (or transaction groups) fit in a block which I would resist as long as possible to keep things simple |
I do not think this is a good idea, since it makes it easy to bloat transaction sizes. This is already a vector to annoy the network. Thankfully nobody has bothered yet, but it would be annoying for someone to fill blocks with cheap transactions that max out every possible field. Adding 3k to each transaction would only help them out. I claim that lsigs can and should be short. The main remaining use for lsigs is their high compute budget. From what I understand, that's why they're being brought up here - to use the expensive elliptic curve opcodes that enable checking zk proofs. Suppose, for example, that you need to use |
But you can already send a transaction group with 16 lsigs of 1kb each for a total of 16kb. Logically, we could approach it as the opcode budget and pool the lsig size to a transaction group limit we are comfortable with, with an appropriate transaction cost per KB of size.
I'll give you my specific use case and explain why I would not do that and what I would do instead. The zk verifiers created by As a selfish application developer, the ideal solution would be to be able to pool the entire ~500,000 opcode budget in app calls. I understand that's not possible because lsig run in parallel to app calls so they are entitled to a separate budget. This last option I find preferable to your suggestion because of complexity, maintainability, and risk of mistakes. This is a very specific example, but the issue is that we have 320,000 opcode budget that is very difficult to use and we should find a way to unlock it. The most logical approach to me is to pool a transaction group size limit, paying the appropriate fees, but not having to create dummy transactions. |
I'm mostly convinced by this:
I think we should probably pool the total allowable lsig size. I don't think we should try to avoid the creation of "dummy" transactions by using fee accounting, but then I'm not convinced we should do it for apps either. For those who do want to do it, and are unconvinced of the complexity, think about how the following things interact: You paid extra because you want your apps to run longer, you paid extra because you want your lsigs to run longer (or be bigger), you paid extra because of congestion, you paid extra to register for incentives. I don't think we should try to untangle that in the short, or even medium, term. So, with that in mind, when I say I'm "mostly" convinced by the argument I quoted, I don't mean we should allow a big lsig in a group containing a single txn that pays a large fee. But I'd be happy saying that the total number of lsig bytes in a group should be 1000*numTxnsInGroup. |
I'd be happy too if we can have the total number of lsig bytes in a group as 1000*numTxnsInGroup. As for the complexity of fee accounting, would you feel the same way if we had to implement everything from scratch instead of modifying the existing code? I am asking because I am struggling to see the complexity you see and was wondering if it's because I don't know the existing code and how complex is it to change or if it's because I have some logical gaps in my thinking. |
I've created a PR to implement pooling across a transaction group as suggested |
I'm creating this issue to continue the discussion on lsig size raised in #5943 by @giuliop. Below is his original post
I personally think 4k is reasonable considering with two transactions (one lsig + one appl) you can get access to > 10k bytes. The lsig program itself is 1k and then the second transaction can provide byte storage in note, args, and programs.
We could also potentially "pool" the size together. Meaning I can have a group with one lsig that is 15k with 15 other lsigs that are only a couple of bytes each.
The text was updated successfully, but these errors were encountered: