Compare commits

...

3 Commits

Author SHA1 Message Date
Preston Van Loon
21d0c09342 Run unclog for v5.3.2 2025-03-25 08:56:55 -05:00
james-prysm
e08ed0d823 Deprecate broken and unused debug flags in favor of --pprof (#15083)
* deprecating the trace and cpuprofile flags in favor of pprof

* gaz

* fixing change log title

* added hidden tags
2025-03-24 19:30:32 +00:00
xinhangzhou
2b4d8a09ff refactor: use maps.Copy for cleaner map handling (#15090)
Signed-off-by: xinhangzhou <shuangcui@aliyun.com>
2025-03-24 19:23:10 +00:00
35 changed files with 58 additions and 129 deletions

View File

@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
## [v5.3.2](https://github.com/prysmaticlabs/prysm/compare/v5.3.1...v5.3.2) - 2025-03-25
### Added
- enable SSZ for builder API calls. [[PR]](https://github.com/prysmaticlabs/prysm/pull/14976)
- Add Hoodi testnet flag `--hoodi` to specify Hoodi testnet config and bootnodes. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15057)
- block_gossip topic support to the beacon api event stream. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15038)
- Added a static analyzer to discourage use of panic() in Prysm. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15075)
- Add a feature flag `--blacklist-roots` to allow the node to specify blocks that will be treated as invalid. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15030)
### Changed
- changed request object for `POST /eth/v1/beacon/states/head/validators` to omit the field if empty for satisfying other clients. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15031)
- Update spec test to v1.5.0-beta.3. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15050)
- Update Gossip and RPC message limits to comply with the spec. [[PR]](https://github.com/prysmaticlabs/prysm/pull/14799)
- Return 404 instead of 500 from API when when a blob for a requested index is not found. [[PR]](https://github.com/prysmaticlabs/prysm/pull/14845)
- Save Electra orphaned attestations into attestations pool's block attestations. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15060)
- Removed redundant string conversion in `BeaconDbStater.State` to improve code clarity and maintainability. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15081)
### Fixed
- Update seen unaggregated att cache to properly handle Electra attestations. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15034)
- cosmetic fix for calling `/prysm/validators/performance` when connecting to non prysm beacon nodes and removing the 404 error log. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15062)
- Tracked validator cache: Make sure no to loose the reference. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15077)
- Fixed proposing at genesis when starting post Bellatrix. [[PR]](https://github.com/prysmaticlabs/prysm/pull/15084)
## [v5.3.1](https://github.com/prysmaticlabs/prysm/compare/v5.3.0...v5.3.1) - 2025-03-13
This release is packed with critical fixes for **Electra** and some important fixes for mainnet too.
@@ -3218,4 +3244,4 @@ There are no security updates in this release.
# Older than v2.0.0
For changelog history for releases older than v2.0.0, please refer to https://github.com/prysmaticlabs/prysm/releases
For changelog history for releases older than v2.0.0, please refer to https://github.com/prysmaticlabs/prysm/releases

View File

@@ -61,7 +61,6 @@ go_library(
"//monitoring/prometheus:go_default_library",
"//monitoring/tracing:go_default_library",
"//runtime:go_default_library",
"//runtime/debug:go_default_library",
"//runtime/prereqs:go_default_library",
"//runtime/version:go_default_library",
"@com_github_ethereum_go_ethereum//common:go_default_library",

View File

@@ -64,7 +64,6 @@ import (
"github.com/prysmaticlabs/prysm/v5/encoding/bytesutil"
"github.com/prysmaticlabs/prysm/v5/monitoring/prometheus"
"github.com/prysmaticlabs/prysm/v5/runtime"
"github.com/prysmaticlabs/prysm/v5/runtime/debug"
"github.com/prysmaticlabs/prysm/v5/runtime/prereqs"
"github.com/prysmaticlabs/prysm/v5/runtime/version"
"github.com/sirupsen/logrus"
@@ -432,7 +431,6 @@ func (b *BeaconNode) Start() {
defer signal.Stop(sigc)
<-sigc
log.Info("Got interrupt, shutting down...")
debug.Exit(b.cliCtx) // Ensure trace and CPU profile data are flushed.
go b.Close()
for i := 10; i > 0; i-- {
<-sigc

View File

@@ -150,7 +150,14 @@ func Test_endpoints(t *testing.T) {
actualRoutes[e.template] = e.methods
}
}
expectedRoutes := combineMaps(beaconRoutes, builderRoutes, configRoutes, debugRoutes, eventsRoutes, nodeRoutes, validatorRoutes, rewardsRoutes, lightClientRoutes, blobRoutes, prysmValidatorRoutes, prysmNodeRoutes, prysmBeaconRoutes)
expectedRoutes := make(map[string][]string)
for _, m := range []map[string][]string{
beaconRoutes, builderRoutes, configRoutes, debugRoutes, eventsRoutes,
nodeRoutes, validatorRoutes, rewardsRoutes, lightClientRoutes, blobRoutes,
prysmValidatorRoutes, prysmNodeRoutes, prysmBeaconRoutes,
} {
maps.Copy(expectedRoutes, m)
}
assert.Equal(t, true, maps.EqualFunc(expectedRoutes, actualRoutes, func(actualMethods []string, expectedMethods []string) bool {
return slices.Equal(expectedMethods, actualMethods)

View File

@@ -23,18 +23,6 @@ func init() {
logrus.SetOutput(io.Discard)
}
func combineMaps(maps ...map[string][]string) map[string][]string {
combinedMap := make(map[string][]string)
for _, m := range maps {
for k, v := range m {
combinedMap[k] = v
}
}
return combinedMap
}
func TestLifecycle_OK(t *testing.T) {
hook := logTest.NewGlobal()
chainService := &mock.ChainService{

View File

@@ -1,3 +0,0 @@
### Added
- enable SSZ for builder API calls

View File

@@ -0,0 +1,3 @@
### Deprecated
- deprecates and removes usage of the `--trace` flag and`--cpuprofile` flag in favor of just using `--pprof`

View File

@@ -1,3 +0,0 @@
### Fixed
- cosmetic fix for calling `/prysm/validators/performance` when connecting to non prysm beacon nodes and removing the 404 error log.

View File

@@ -1,3 +0,0 @@
### Changed
- changed request object for `POST /eth/v1/beacon/states/head/validators` to omit the field if empty for satisfying other clients.

View File

@@ -1,3 +0,0 @@
### Ignored
- switched panics for thrown errors in NewBeaconApiChainClientWithFallback functions

View File

@@ -1,3 +0,0 @@
### Changed
- Removed redundant string conversion in `BeaconDbStater.State` to improve code clarity and maintainability.

View File

@@ -1,2 +0,0 @@
### Ignored
- prysmaticlabs/prysm repo security fix: use forked version of tj-actions/changed-files and version pin other actions to commit sha in the changelog workflow.

View File

@@ -1,3 +0,0 @@
### Ignored
- `subscribeToSubnets`: Remove unused parameter.

View File

@@ -1,3 +0,0 @@
### Fixed
- Tracked validator cache: Make sure no to loose the reference.

View File

@@ -1,3 +0,0 @@
### Changed
- Update Gossip and RPC message limits to comply with the spec.

View File

@@ -1,3 +0,0 @@
### Added
- Add a feature flag `--blacklist-roots` to allow the node to specify blocks that will be treated as invalid.

View File

@@ -1,3 +0,0 @@
### Fixed
- Fixed proposing at genesis when starting post Bellatrix

View File

@@ -1,3 +0,0 @@
### Added
- Added a static analyzer to discourage use of panic() in Prysm

View File

@@ -1,3 +0,0 @@
#### Ignored
- Updated changelog for v5.3.1

View File

@@ -1,7 +0,0 @@
### Changed
- Return 404 instead of 500 from API when when a blob for a requested index is not found.
### Ignored
- Improve error messages and logs.

View File

@@ -1,3 +0,0 @@
### Changed
- Save Electra orphaned attestations into attestations pool's block attestations.

View File

@@ -1,3 +0,0 @@
### Fixed
- Update seen unaggregated att cache to properly handle Electra attestations.

View File

@@ -1,3 +0,0 @@
### Added
- block_gossip topic support to the beacon api event stream.

View File

@@ -1,3 +0,0 @@
### Ignored
- Clarify infinity signature tests

View File

@@ -1,3 +0,0 @@
### Ignored
- Clean up infinity signature usages

View File

@@ -1,3 +0,0 @@
### Ignored
- Clean up batch process pending deposits

View File

@@ -1,3 +0,0 @@
### Added
- Add Hoodi testnet flag `--hoodi` to specify Hoodi testnet config and bootnodes.

View File

@@ -1,3 +0,0 @@
### Changed
- Update spec test to v1.5.0-beta.3

View File

@@ -0,0 +1,3 @@
### Ignored
- Use maps.Copy for cleaner map handling

View File

@@ -211,6 +211,8 @@ var appHelpFlagGroups = []flagGroup{
Name: "deprecated",
Flags: []cli.Flag{
cmd.BackupWebhookOutputDir,
debug.CPUProfileFlag,
debug.TraceFlag,
},
},
{ // Flags used in debugging Prysm. These are flags not usually run by end users.
@@ -218,13 +220,11 @@ var appHelpFlagGroups = []flagGroup{
Flags: []cli.Flag{
cmd.MaxGoroutines,
debug.BlockProfileRateFlag,
debug.CPUProfileFlag,
debug.MemProfileRateFlag,
debug.MutexProfileFractionFlag,
debug.PProfAddrFlag,
debug.PProfFlag,
debug.PProfPortFlag,
debug.TraceFlag,
flags.SetGCPercent,
},
},

View File

@@ -199,10 +199,6 @@ func main() {
return cmd.ValidateNoArgs(ctx)
},
After: func(ctx *cli.Context) error {
debug.Exit(ctx)
return nil
},
}
defer func() {

View File

@@ -85,8 +85,6 @@ var appHelpFlagGroups = []flagGroup{
debug.PProfAddrFlag,
debug.PProfPortFlag,
debug.MemProfileRateFlag,
debug.CPUProfileFlag,
debug.TraceFlag,
debug.BlockProfileRateFlag,
debug.MutexProfileFractionFlag,
},
@@ -157,6 +155,13 @@ var appHelpFlagGroups = []flagGroup{
flags.InteropStartIndex,
},
},
{
Name: "deprecated",
Flags: []cli.Flag{
debug.CPUProfileFlag,
debug.TraceFlag,
},
},
}
func init() {

View File

@@ -78,15 +78,17 @@ var (
Name: "blockprofilerate",
Usage: "Turns on block profiling with the given rate.",
}
// CPUProfileFlag to specify where to write the CPU profile.
// deprecated: CPUProfileFlag
CPUProfileFlag = &cli.StringFlag{
Name: "cpuprofile",
Usage: "Writes CPU profile to the given file.",
Name: "cpuprofile",
Hidden: true,
Usage: "Do not use, deprecated",
}
// TraceFlag to specify where to write the trace execution profile.
// deprecated: TraceFlag
TraceFlag = &cli.StringFlag{
Name: "trace",
Usage: "Writes execution trace to the given file.",
Name: "trace",
Hidden: true,
Usage: "Do not use, deprecated",
}
)
@@ -328,17 +330,6 @@ func Setup(ctx *cli.Context) error {
if ctx.IsSet(MutexProfileFractionFlag.Name) {
runtime.SetMutexProfileFraction(ctx.Int(MutexProfileFractionFlag.Name))
}
if traceFile := ctx.String(TraceFlag.Name); traceFile != "" {
if err := Handler.StartGoTrace(TraceFlag.Name); err != nil {
return err
}
}
if cpuFile := ctx.String(CPUProfileFlag.Name); cpuFile != "" {
if err := Handler.StartCPUProfile(cpuFile); err != nil {
return err
}
}
// pprof server
if ctx.Bool(PProfFlag.Name) {
address := fmt.Sprintf("%s:%d", ctx.String(PProfAddrFlag.Name), ctx.Int(PProfPortFlag.Name))
@@ -359,18 +350,3 @@ func startPProf(address string) {
}
}()
}
// Exit stops all running profiles, flushing their output to the
// respective file.
func Exit(ctx *cli.Context) {
if traceFile := ctx.String(TraceFlag.Name); traceFile != "" {
if err := Handler.StopGoTrace(); err != nil {
log.WithError(err).Error("Failed to stop go tracing")
}
}
if cpuFile := ctx.String(CPUProfileFlag.Name); cpuFile != "" {
if err := Handler.StopCPUProfile(); err != nil {
log.WithError(err).Error("Failed to stop CPU profiling")
}
}
}

View File

@@ -47,7 +47,6 @@ go_library(
"//monitoring/prometheus:go_default_library",
"//monitoring/tracing:go_default_library",
"//runtime:go_default_library",
"//runtime/debug:go_default_library",
"//runtime/prereqs:go_default_library",
"//runtime/version:go_default_library",
"//validator/accounts/wallet:go_default_library",

View File

@@ -32,7 +32,6 @@ import (
"github.com/prysmaticlabs/prysm/v5/monitoring/prometheus"
"github.com/prysmaticlabs/prysm/v5/monitoring/tracing"
"github.com/prysmaticlabs/prysm/v5/runtime"
"github.com/prysmaticlabs/prysm/v5/runtime/debug"
"github.com/prysmaticlabs/prysm/v5/runtime/prereqs"
"github.com/prysmaticlabs/prysm/v5/runtime/version"
"github.com/prysmaticlabs/prysm/v5/validator/accounts/wallet"
@@ -154,7 +153,6 @@ func (c *ValidatorClient) Start() {
defer signal.Stop(sigc)
<-sigc
log.Info("Got interrupt, shutting down...")
debug.Exit(c.cliCtx) // Ensure trace and CPU profile data are flushed.
go c.Close()
for i := 10; i > 0; i-- {
<-sigc