Skip to content

Commit 24d7bde

Browse files
authored
chore!: remove memsize (#155)
## Why this should be merged `memsize` blocks usage of Go 1.23. We'll be building with 1.23 via `avalanchego` anyway (which doesn't transitively import `memsize`) so we want to run tests with the correct version. It will also unblock #154. ## How this works ✂️ We already cherry-pick the upstream commit (e467577) that removes `memsize` when on release branches so we instead do it ourselves and no longer cherry-pick. To avoid conflicts at the next `geth` sync, this PR should be reverted before performing the merge. See #128. ## How this was tested Existing tests.
1 parent 02110d3 commit 24d7bde

File tree

5 files changed

+0
-10
lines changed

5 files changed

+0
-10
lines changed

cmd/geth/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,6 @@ func geth(ctx *cli.Context) error {
349349
// it unlocks any requested accounts, and starts the RPC/IPC interfaces and the
350350
// miner.
351351
func startNode(ctx *cli.Context, stack *node.Node, backend ethapi.Backend, isConsole bool) {
352-
debug.Memsize.Add("node", stack)
353-
354352
// Start up the node itself
355353
utils.StartNode(ctx, stack, isConsole)
356354

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ require (
2424
github.com/fatih/color v1.13.0
2525
github.com/ferranbt/fastssz v0.1.2
2626
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
27-
github.com/fjl/memsize v0.0.2
2827
github.com/fsnotify/fsnotify v1.6.0
2928
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff
3029
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNP
191191
github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs=
192192
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e h1:bBLctRc7kr01YGvaDfgLbTwjFNW5jdp5y5rj8XXBHfY=
193193
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY=
194-
github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA=
195-
github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
196194
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
197195
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
198196
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=

internal/debug/flags.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,13 @@ import (
3030
"github.com/ava-labs/libevm/log"
3131
"github.com/ava-labs/libevm/metrics"
3232
"github.com/ava-labs/libevm/metrics/exp"
33-
"github.com/fjl/memsize/memsizeui"
3433
"github.com/mattn/go-colorable"
3534
"github.com/mattn/go-isatty"
3635
"github.com/urfave/cli/v2"
3736
"golang.org/x/exp/slog"
3837
"gopkg.in/natefinch/lumberjack.v2"
3938
)
4039

41-
var Memsize memsizeui.Handler
42-
4340
var (
4441
verbosityFlag = &cli.IntFlag{
4542
Name: "verbosity",
@@ -313,7 +310,6 @@ func StartPProf(address string, withMetrics bool) {
313310
if withMetrics {
314311
exp.Exp(metrics.DefaultRegistry)
315312
}
316-
http.Handle("/memsize/", http.StripPrefix("/memsize", &Memsize))
317313
log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address))
318314
go func() {
319315
if err := http.ListenAndServe(address, nil); err != nil {

libevm/tooling/release/cherrypicks

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
69f815f6f5791e0e48160bdad284773d0ffb1ba9 # params: print time value instead of pointer in ConfigCompatError (#29514)
1212
e4b8058d5a5832cdebdac7da385cf6d829c0d433 # eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644)
1313
34b46a2f756da71595ac84eb7f25441f2a5b6ebb # core/state/snapshot: add a missing lock (#30001)
14-
e4675771eda550e7eeb63a8884816982c1980644 # internal/debug: remove memsize (#30253)
1514
159fb1a1db551c544978dc16a5568a4730b4abf3 # crypto: add IsOnCurve check (#31100)
1615
da71839a270a353bac92e3108e4b74fb0eefec29 # internal/ethapi: fix panic in debug methods (#31157)

0 commit comments

Comments
 (0)