From d7a96b03e6ef882d4bf742f97e382a51c0cf08be Mon Sep 17 00:00:00 2001 From: Ben Guidarelli Date: Tue, 11 Oct 2022 08:46:45 -0400 Subject: [PATCH 1/3] bump max size of teal source and dryrun --- daemon/algod/api/server/v2/handlers.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/daemon/algod/api/server/v2/handlers.go b/daemon/algod/api/server/v2/handlers.go index dadaf52638..f3805b8ab2 100644 --- a/daemon/algod/api/server/v2/handlers.go +++ b/daemon/algod/api/server/v2/handlers.go @@ -51,8 +51,14 @@ import ( "github.com/algorand/go-codec/codec" ) -const maxTealSourceBytes = 1e5 -const maxTealDryrunBytes = 1e5 +// max compiled teal program is currently 8k +// but we allow for comments, spacing, and repeated consts +// in the source teal, allow up to 200kb +const maxTealSourceBytes = 2e5 + +// With the ability to hold unlimited assets DryrunRequests can +// become quite large, allow up to 1mb +const maxTealDryrunBytes = 1e6 // Handlers is an implementation to the V2 route handler interface defined by the generated code. type Handlers struct { From 56ed7991da2d3bc3fe23c51fa4e0f66cc1e27d69 Mon Sep 17 00:00:00 2001 From: Ben Guidarelli Date: Tue, 11 Oct 2022 12:03:05 -0400 Subject: [PATCH 2/3] Update daemon/algod/api/server/v2/handlers.go --- daemon/algod/api/server/v2/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/algod/api/server/v2/handlers.go b/daemon/algod/api/server/v2/handlers.go index f3805b8ab2..28600ab800 100644 --- a/daemon/algod/api/server/v2/handlers.go +++ b/daemon/algod/api/server/v2/handlers.go @@ -54,7 +54,7 @@ import ( // max compiled teal program is currently 8k // but we allow for comments, spacing, and repeated consts // in the source teal, allow up to 200kb -const maxTealSourceBytes = 2e5 +const maxTealSourceBytes = 200_000 // With the ability to hold unlimited assets DryrunRequests can // become quite large, allow up to 1mb From 844e2ca8e8fabc7040b6240ba7ea3df93e262ab5 Mon Sep 17 00:00:00 2001 From: Ben Guidarelli Date: Tue, 11 Oct 2022 12:03:20 -0400 Subject: [PATCH 3/3] Update daemon/algod/api/server/v2/handlers.go --- daemon/algod/api/server/v2/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/algod/api/server/v2/handlers.go b/daemon/algod/api/server/v2/handlers.go index 28600ab800..3b8d7bc671 100644 --- a/daemon/algod/api/server/v2/handlers.go +++ b/daemon/algod/api/server/v2/handlers.go @@ -58,7 +58,7 @@ const maxTealSourceBytes = 200_000 // With the ability to hold unlimited assets DryrunRequests can // become quite large, allow up to 1mb -const maxTealDryrunBytes = 1e6 +const maxTealDryrunBytes = 1_000_000 // Handlers is an implementation to the V2 route handler interface defined by the generated code. type Handlers struct {