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.
This commit is contained in:
Guillaume Ballet 2025-09-17 16:12:16 +02:00 committed by Alvarez
parent b4682de5d7
commit 59c2815cfa

View file

@ -19,6 +19,7 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"runtime/debug"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/stateless" "github.com/ethereum/go-ethereum/core/stateless"
@ -35,6 +36,10 @@ type Payload struct {
Witness *stateless.Witness Witness *stateless.Witness
} }
func init() {
debug.SetGCPercent(-1) // Disable garbage collection
}
func main() { func main() {
input := getInput() input := getInput()
var payload Payload var payload Payload