prysm-pulse/shared/featureconfig/flags.go
shayzluf 6c1740eefc Add Caching to Tree Hashing Algorithm (#1929)
* added todo to hash file in ssz

* params and copy of block cache

* start hash cache

* Hash cache implementation

* fixed some comments

* fixed promatheus duplicate counter name

* removed TODO

* change to use special expiration cache

* function name fixes junk object generator

* naming changes

* gazzle fix

* added pruning last read data test

* fixed gometallinter errors

* fix benchmarks and no int64 not serializable

* move struct from test

* add feature flag

* fix merge issues

* add featureflag to beacon and validator

* featureflag init for tests

* added feature flag to all ssz dependent tests

* remove setter func

* replace k8s tweaked expiration cache to https://github.com/karlseguin/ccache

* remove else

* change request by preston

* added init featureflags to genesis_test

* Update shared/ssz/hash_cache.go

add dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/ssz/hash_cache.go

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/ssz/hash_cache.go

remove extra space

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/params/config.go

add dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/featureconfig/config.go

remove dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/featureconfig/config.go

remove dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* remove powchain from prometheus hash cache name

* fixes fron change requests

* fix change requests

* remove faulty merge test

* gazelle fix

* fix fmt.sprintf

* remove debug binary

* fix gazelle
2019-04-24 13:39:02 +08:00

64 lines
2.4 KiB
Go

package featureconfig
import (
"github.com/urfave/cli"
)
var (
// CacheTreeHashFlag determines whether to cache tree hashes for ssz.
CacheTreeHashFlag = cli.BoolFlag{
Name: "enable-cache-tree-hash",
Usage: "Cache tree hashes for ssz",
}
// 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.",
}
// 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",
}
// DisableGossipSubFlag uses floodsub in place of gossipsub.
DisableGossipSubFlag = cli.BoolFlag{
Name: "disable-gossip-sub",
Usage: "Disable gossip sub messaging and use floodsub messaging",
}
)
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
var ValidatorFlags = []cli.Flag{
CacheTreeHashFlag,
}
// BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client.
var BeaconChainFlags = []cli.Flag{
EnableComputeStateRootFlag,
EnableCrosslinksFlag,
EnableCheckBlockStateRootFlag,
EnableHistoricalStatePruningFlag,
DisableGossipSubFlag,
CacheTreeHashFlag,
}