From 078aafe4dcff6a4301526f71b2712372925c5c9f Mon Sep 17 00:00:00 2001 From: Ludovit Scholtz Date: Sat, 26 Oct 2024 00:04:03 +0200 Subject: [PATCH] API: MaxTealSourceBytes to 512 kb (#6068) Co-authored-by: John Jannotti Co-authored-by: cce <51567+cce@users.noreply.github.com> --- daemon/algod/api/server/v2/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/algod/api/server/v2/handlers.go b/daemon/algod/api/server/v2/handlers.go index 9c5da32b3d..704d447280 100644 --- a/daemon/algod/api/server/v2/handlers.go +++ b/daemon/algod/api/server/v2/handlers.go @@ -64,8 +64,8 @@ import ( // MaxTealSourceBytes sets a size limit for TEAL source programs for requests // Max TEAL program size is currently 8k // but we allow for comments, spacing, and repeated consts -// in the source TEAL, so we allow up to 200KB -const MaxTealSourceBytes = 200_000 +// in the source TEAL. We have some indication that real TEAL programs with comments are about 20 times bigger than the bytecode they produce, and we may soon allow 16,000 byte logicsigs, implying a maximum of 320kb. Let's call it half a meg for a little room to spare. +const MaxTealSourceBytes = 512 * 1024 // MaxTealDryrunBytes sets a size limit for dryrun requests // With the ability to hold unlimited assets DryrunRequests can