mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 17:22:18 +00:00
cc730d17af
* use committee cache in UpdateLatestAttestation * fmt * gaz * fixed existing tests * verify cache miss works * gaz * added test for committee hit and update attestation target * verify cache miss works * Update beacon-chain/core/helpers/committee.go Co-Authored-By: terenc3t <terence@prysmaticlabs.com> * rm declaring err * add feature flag * fork choice vote count to use cached ancestor * comments * fmt * spelling and grammer * no extra space * renamed vars & added a test for cache miss * lint * add cache hit test case : ) * gaz * Remove Enableblock, it was a copy/paste typo * refactor cached ancestor blk getter into its own function
63 lines
2.6 KiB
Go
63 lines
2.6 KiB
Go
package featureconfig
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var (
|
|
// VerifyAttestationSigsFlag determines whether to verify signatures for attestations.
|
|
VerifyAttestationSigsFlag = cli.BoolFlag{
|
|
Name: "enable-attestation-signature-verification",
|
|
Usage: "Verify signatures for attestations.",
|
|
}
|
|
// EnableComputeStateRootFlag enables the implemenation for the proposer RPC
|
|
// method to compute the state root of a given block.
|
|
// This feature is not
|
|
// necessary for the first iteration of the test network, but critical to
|
|
// future work. This flag can be removed once we are satisified that it works
|
|
// well without issue.
|
|
EnableComputeStateRootFlag = cli.BoolFlag{
|
|
Name: "enable-compute-state-root",
|
|
Usage: "Enable server side compute state root. Default is a no-op implementation.",
|
|
}
|
|
// EnableCrosslinksFlag enables the processing of crosslinks in epoch processing. It is disabled by default.
|
|
EnableCrosslinksFlag = cli.BoolFlag{
|
|
Name: "enable-crosslinks",
|
|
Usage: "Enable crosslinks in epoch processing, default is disabled.",
|
|
}
|
|
// EnableCommitteesCacheFlag enables crosslink committees cache for state transition. It is disabled by default.
|
|
EnableCommitteesCacheFlag = cli.BoolFlag{
|
|
Name: "enable-committees-cache",
|
|
Usage: "Enable crosslink committees cache for state transition, default is disabled.",
|
|
}
|
|
// EnableBlockAncestorCacheFlag enables block ancestor cache for LMD GHOST fork choice optimization. I
|
|
// it is disabled by default.
|
|
EnableBlockAncestorCacheFlag = cli.BoolFlag{
|
|
Name: "enable-block-ancestor-cache",
|
|
Usage: "Enable block ancestor cache for fork choice optimization, default is disabled.",
|
|
}
|
|
// EnableCheckBlockStateRootFlag check block state root in block processing. It is disabled by default.
|
|
EnableCheckBlockStateRootFlag = cli.BoolFlag{
|
|
Name: "enable-check-block-state-root",
|
|
Usage: "Enable check block state root in block processing, default is disabled.",
|
|
}
|
|
// EnableHistoricalStatePruningFlag allows the database to prune old historical states.
|
|
EnableHistoricalStatePruningFlag = cli.BoolFlag{
|
|
Name: "enable-historical-state-pruning",
|
|
Usage: "Enable database pruning of historical states after finalized epochs",
|
|
}
|
|
)
|
|
|
|
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
|
|
var ValidatorFlags = []cli.Flag{}
|
|
|
|
// BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client.
|
|
var BeaconChainFlags = []cli.Flag{
|
|
EnableComputeStateRootFlag,
|
|
EnableCrosslinksFlag,
|
|
EnableCommitteesCacheFlag,
|
|
EnableCheckBlockStateRootFlag,
|
|
EnableHistoricalStatePruningFlag,
|
|
EnableBlockAncestorCacheFlag,
|
|
}
|