Bounty
XE-11745 · Bounty

[Minor] Handler `/metrics` menjalankan `preScrape` SEBELUM batas `MaxRequestsInFlight`, dan gauge readiness bisa terpotret sobek

Closed · invalid —claimed Minor web filed 2026-11-13 08:05 UTC by cunels

Report

Judul: [Minor] Handler /metrics menjalankan preScrape SEBELUM batas MaxRequestsInFlight, dan gauge readiness bisa terpotret sobek

Letak Bug: xe/metrics/metrics.go:163-177 — Handler() memanggil preScrape (publishDerived, node/observability.go:317-356) sebelum inner.ServeHTTP yang menegakkan MaxRequestsInFlight: 4. Request /metrics yang langsung ditolak 503 oleh promhttp tetap membayar biaya penuh publishDerived (alokasi peer slice + kunci swarm libp2p lewat o.peerCount()). o.publish (observability.go:283-315), o.publishDerived (317-356), dan Registry.Gather() juga membaca-menulis 20+ gauge readiness tanpa mutual exclusion di tingkat kelompok gauge.

Seberapa Buruk Bug nya: Amplifikasi kerja kecil pada endpoint tanpa autentikasi (biaya per request kecil, tapi cap konkurensi menjadi tidak berguna karena request yang ditolak pun tetap menjalankan preScrape) + snapshot readiness yang bisa kontradiktif dalam satu payload scrape (xe_ready 1 bersama xe_ready_check 0). Minor — tidak ada dana atau konsensus yang bergerak.

Thread

XE deskteam2026-11-20 13:19 UTCdesk

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links https://bounty.xe.network/XE-11745 and says what; it is read like any other.