Documentation ¶
Overview ¶
Package featureconfig defines which features are enabled for runtime in order to selctively enable certain features to maintain a stable runtime.
The process for implementing new features using this package is as follows:
- Add a new CMD flag in flags.go, and place it in the proper list(s) var for its client.
- Add a condition for the flag in the proper Configure function(s) below.
- Place any "new" behavior in the `if flagEnabled` statement.
- Place any "previous" behavior in the `else` statement.
- Ensure any tests using the new feature fail if the flag isn't enabled. 5a. Use the following to enable your flag for tests: cfg := &featureconfig.Flags{ VerifyAttestationSigs: true, } featureconfig.Init(cfg)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GenesisDelayFlag disables the standard genesis delay. GenesisDelayFlag = cli.BoolFlag{ Name: "genesis-delay", Usage: "Wait and process the genesis event at the midnight of the next day rather than 30s after the ETH1 block time of the chainstart triggering deposit", } // MinimalConfigFlag enables the minimal configuration. MinimalConfigFlag = cli.BoolFlag{ Name: "minimal-config", Usage: "Use minimal config with parameters as defined in the spec.", } // EnableAttestationCacheFlag see https://github.com/prysmaticlabs/prysm/issues/3106. EnableAttestationCacheFlag = cli.BoolFlag{ Name: "enable-attestation-cache", Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106", } // EnableEth1DataVoteCacheFlag see https://github.com/prysmaticlabs/prysm/issues/3106. EnableEth1DataVoteCacheFlag = cli.BoolFlag{ Name: "enable-eth1-data-vote-cache", Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106", } // InitSyncNoVerifyFlag enables the initial sync no verify configuration. InitSyncNoVerifyFlag = cli.BoolFlag{ Name: "init-sync-no-verify", Usage: "Initial sync to finalized check point w/o verifying block's signature, RANDAO and attestation's aggregated signatures", } // NewCacheFlag enables the node to use the new caching scheme. NewCacheFlag = cli.BoolFlag{ Name: "new-cache", Usage: "Use the new shuffled indices cache for committee. Much improvement than previous caching implementations", } // SkipBLSVerifyFlag skips BLS signature verification across the runtime for development purposes. SkipBLSVerifyFlag = cli.BoolFlag{ Name: "skip-bls-verify", Usage: "Whether or not to skip BLS verification of signature at runtime, this is unsafe and should only be used for development", } )
var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{ GenesisDelayFlag, MinimalConfigFlag, writeSSZStateTransitionsFlag, EnableAttestationCacheFlag, EnableEth1DataVoteCacheFlag, InitSyncNoVerifyFlag, NewCacheFlag, SkipBLSVerifyFlag, enableBackupWebhookFlag, enableBLSPubkeyCacheFlag, enableShuffledIndexCache, enableCommitteeCacheFlag, enableActiveIndicesCacheFlag, enableActiveCountCacheFlag, pruneFinalizedStatesFlag, enableSkipSlotsCache, }...)
BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client.
var ValidatorFlags = append(deprecatedFlags, []cli.Flag{ MinimalConfigFlag, }...)
ValidatorFlags contains a list of all the feature flags that apply to the validator client.
Functions ¶
func ConfigureBeaconChain ¶
ConfigureBeaconChain sets the global config based on what flags are enabled for the beacon-chain client.
func ConfigureValidator ¶
ConfigureValidator sets the global config based on what flags are enabled for the validator client.
Types ¶
type Flags ¶ added in v0.2.5
type Flags struct { GenesisDelay bool // GenesisDelay when processing a chain start genesis event. MinimalConfig bool // MinimalConfig as defined in the spec. WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory. InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents. SkipBLSVerify bool // Skips BLS verification across the runtime. EnableBackupWebhook bool // EnableBackupWebhook to allow database backups to trigger from monitoring port /db/backup. PruneFinalizedStates bool // PruneFinalizedStates from the database. // Cache toggles. EnableAttestationCache bool // EnableAttestationCache; see https://github.com/prysmaticlabs/prysm/issues/3106. EnableEth1DataVoteCache bool // EnableEth1DataVoteCache; see https://github.com/prysmaticlabs/prysm/issues/3106. EnableNewCache bool // EnableNewCache enables the node to use the new caching scheme. 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. EnableActiveIndicesCache bool // EnableActiveIndicesCache. EnableActiveCountCache bool // EnableActiveCountCache. }
Flags is a struct to represent which features the client will perform on runtime.