mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-17 16:40:40 +00:00
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:
parent
fda09c7b1b
commit
6492751355
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue