cmd/keeper: disable GC for zkvm execution (#32638)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

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 GitHub
parent fda09c7b1b
commit 6492751355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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