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:
terence tsao 2019-12-13 06:00:29 -08:00 committed by prylabs-bulldozer[bot]
parent d93ec64b21
commit a5881f924f
6 changed files with 19 additions and 29 deletions

View File

@ -7,7 +7,5 @@ func init() {
EnableAttestationCache: true,
EnableEth1DataVoteCache: true,
EnableShuffledIndexCache: true,
EnableCommitteeCache: true,
EnableActiveCountCache: true,
})
}

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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

View File

@ -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

View File

@ -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,