From 64927513554d418e54734c96df6d588099992596 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:12:16 +0200 Subject: [PATCH] cmd/keeper: disable GC for zkvm execution (#32638) ZKVMs are constrained environments that liberally allocate memory and never release it. In this context, using the GC is only going to cause issues down the road, and slow things down in any case. --- cmd/keeper/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/keeper/main.go b/cmd/keeper/main.go index cfb06f0da0..9b459f6f36 100644 --- a/cmd/keeper/main.go +++ b/cmd/keeper/main.go @@ -19,6 +19,7 @@ package main import ( "fmt" "os" + "runtime/debug" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/stateless" @@ -35,6 +36,10 @@ type Payload struct { Witness *stateless.Witness } +func init() { + debug.SetGCPercent(-1) // Disable garbage collection +} + func main() { input := getInput() var payload Payload