mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 03:51:29 +00:00
Deprecate active count and committee cache flags (#4276)
* Deprecate active count and committee cache flags * Merge branch 'master' into deprecate-flags
This commit is contained in:
parent
d93ec64b21
commit
a5881f924f
2
beacon-chain/cache/feature_flag_test.go
vendored
2
beacon-chain/cache/feature_flag_test.go
vendored
@ -7,7 +7,5 @@ func init() {
|
||||
EnableAttestationCache: true,
|
||||
EnableEth1DataVoteCache: true,
|
||||
EnableShuffledIndexCache: true,
|
||||
EnableCommitteeCache: true,
|
||||
EnableActiveCountCache: true,
|
||||
})
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
||||
ethereum_beacon_p2p_v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
)
|
||||
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db/filters"
|
||||
ethereum_beacon_p2p_v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
)
|
||||
|
||||
|
@ -6,11 +6,6 @@ import (
|
||||
|
||||
ptypes "github.com/gogo/protobuf/types"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/feed"
|
||||
@ -20,7 +15,12 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/powchain"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/sync"
|
||||
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
var log logrus.FieldLogger
|
||||
|
@ -44,8 +44,6 @@ type Flags struct {
|
||||
EnableBLSPubkeyCache bool // EnableBLSPubkeyCache to improve wall time of PubkeyFromBytes.
|
||||
EnableShuffledIndexCache bool // EnableShuffledIndexCache to cache expensive shuffled index computation.
|
||||
EnableSkipSlotsCache bool // EnableSkipSlotsCache caches the state in skipped slots.
|
||||
EnableCommitteeCache bool // EnableCommitteeCache to cache committee computation.
|
||||
EnableActiveCountCache bool // EnableActiveCountCache.
|
||||
}
|
||||
|
||||
var featureConfig *Flags
|
||||
@ -126,14 +124,6 @@ func ConfigureBeaconChain(ctx *cli.Context) {
|
||||
log.Warn("Enabling experimental kafka streaming.")
|
||||
cfg.KafkaBootstrapServers = ctx.GlobalString(kafkaBootstrapServersFlag.Name)
|
||||
}
|
||||
if ctx.GlobalBool(enableCommitteeCacheFlag.Name) {
|
||||
log.Warn("Enabled committee cache.")
|
||||
cfg.EnableCommitteeCache = true
|
||||
}
|
||||
if ctx.GlobalBool(enableActiveCountCacheFlag.Name) {
|
||||
log.Warn("Enabled active count cache.")
|
||||
cfg.EnableActiveCountCache = true
|
||||
}
|
||||
if ctx.GlobalBool(enableSnappyDBCompressionFlag.Name) {
|
||||
log.Warn("Enabled snappy compression in the database.")
|
||||
cfg.EnableSnappyDBCompression = true
|
||||
|
@ -38,14 +38,6 @@ var (
|
||||
Name: "enable-shuffled-index-cache",
|
||||
Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106",
|
||||
}
|
||||
enableCommitteeCacheFlag = cli.BoolFlag{
|
||||
Name: "enable-committee-cache",
|
||||
Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106",
|
||||
}
|
||||
enableActiveCountCacheFlag = cli.BoolFlag{
|
||||
Name: "enable-active-count-cache",
|
||||
Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106",
|
||||
}
|
||||
// NewCacheFlag enables the node to use the new caching scheme.
|
||||
NewCacheFlag = cli.BoolFlag{
|
||||
Name: "new-cache",
|
||||
@ -134,6 +126,16 @@ var (
|
||||
Usage: deprecatedUsage,
|
||||
Hidden: true,
|
||||
}
|
||||
deprecatedEnableActiveCountCacheFlag = cli.BoolFlag{
|
||||
Name: "enable-active-count-cache",
|
||||
Usage: deprecatedUsage,
|
||||
Hidden: true,
|
||||
}
|
||||
deprecatedEnableCommitteeCacheFlag = cli.BoolFlag{
|
||||
Name: "enable-committee-cache",
|
||||
Usage: deprecatedUsage,
|
||||
Hidden: true,
|
||||
}
|
||||
)
|
||||
|
||||
var deprecatedFlags = []cli.Flag{
|
||||
@ -144,6 +146,8 @@ var deprecatedFlags = []cli.Flag{
|
||||
deprecatedOptimizeProcessEpoch,
|
||||
deprecatedInitSyncNoVerifyFlag,
|
||||
deprecatedEnableActiveIndicesCacheFlag,
|
||||
deprecatedEnableActiveCountCacheFlag,
|
||||
deprecatedEnableCommitteeCacheFlag,
|
||||
}
|
||||
|
||||
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
|
||||
@ -167,8 +171,6 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
|
||||
enableBackupWebhookFlag,
|
||||
enableBLSPubkeyCacheFlag,
|
||||
enableShuffledIndexCache,
|
||||
enableCommitteeCacheFlag,
|
||||
enableActiveCountCacheFlag,
|
||||
enableSkipSlotsCache,
|
||||
enableSnappyDBCompressionFlag,
|
||||
enablePruneBoundaryStateFlag,
|
||||
|
Loading…
Reference in New Issue
Block a user