From 3a5399d8e6be2d3d301abd1351b99cf9d31f1781 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 17 Sep 2025 11:27:50 +0200 Subject: [PATCH] cmd/keeper: disable GC for zkvm execution 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 cfb06f0da00a..9b459f6f36df 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