From 9076bc4fc73abbcf271c8160d18ea3b8d232667e Mon Sep 17 00:00:00 2001 From: jennwiederholen Date: Thu, 29 Aug 2024 15:15:50 +0900 Subject: [PATCH 1/2] Feat: remove mem-size to support go1.23 --- cmd/geth/main.go | 2 -- go.mod | 1 - go.sum | 2 -- internal/debug/flags.go | 4 ---- 4 files changed, 9 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0a28da665eb0..28e92e0010ed 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -396,8 +396,6 @@ func geth(ctx *cli.Context) error { // it unlocks any requested accounts, and starts the RPC/IPC interfaces and the // miner. func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isConsole bool) { - debug.Memsize.Add("node", stack) - // Start up the node itself utils.StartNode(ctx, stack, isConsole) diff --git a/go.mod b/go.mod index 22434ac9941b..d4fd6f78e6b0 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,6 @@ require ( github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa github.com/fatih/color v1.7.0 github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c - github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff github.com/go-stack/stack v1.8.0 github.com/golang-jwt/jwt/v4 v4.3.0 diff --git a/go.sum b/go.sum index da04c5325921..0294aae4d845 100644 --- a/go.sum +++ b/go.sum @@ -174,8 +174,6 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c h1:CndMRAH4JIwxbW8KYq6Q+cGWcGHz0FjGR3QqcInWcW0= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 3aa990adfb3a..6751ac57f8d5 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -27,14 +27,11 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/exp" - "github.com/fjl/memsize/memsizeui" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" "gopkg.in/urfave/cli.v1" ) -var Memsize memsizeui.Handler - var ( verbosityFlag = cli.IntFlag{ Name: "verbosity", @@ -190,7 +187,6 @@ func StartPProf(address string, withMetrics bool) { if withMetrics { exp.Exp(metrics.DefaultRegistry) } - http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize)) log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address)) go func() { if err := http.ListenAndServe(address, nil); err != nil { From 4e4637d3fab5de23fb2205d2909e6b293890728f Mon Sep 17 00:00:00 2001 From: jennwiederholen Date: Thu, 29 Aug 2024 15:38:56 +0900 Subject: [PATCH 2/2] Fix: remove memsize from mobile/geth --- mobile/geth.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/mobile/geth.go b/mobile/geth.go index 709b68cbded8..5231a444aaed 100644 --- a/mobile/geth.go +++ b/mobile/geth.go @@ -149,8 +149,6 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) { return nil, err } - debug.Memsize.Add("node", rawStack) - var genesis *core.Genesis if config.EthereumGenesis != "" { // Parse the user supplied genesis spec if not mainnet