Invert state field trie (#6013)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terence tsao 2020-05-28 06:24:26 -07:00 committed by GitHub
parent 9e8eafda6a
commit e3180cf977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -189,9 +189,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Enabling state management service")
cfg.NewStateMgmt = true
}
if ctx.Bool(enableFieldTrie.Name) {
log.Warn("Enabling state field trie")
cfg.EnableFieldTrie = true
cfg.EnableFieldTrie = true
if ctx.Bool(disableFieldTrie.Name) {
log.Warn("Disabling state field trie")
cfg.EnableFieldTrie = false
}
if ctx.Bool(disableInitSyncBatchSaveBlocks.Name) {
log.Warn("Disabling init sync batch save blocks mode")

View File

@ -124,10 +124,11 @@ var (
Name: "enable-new-state-mgmt",
Usage: "This enable the usage of state mgmt service across Prysm",
}
enableFieldTrie = &cli.BoolFlag{
Name: "enable-state-field-trie",
Usage: "Enables the usage of state field tries to compute the state root",
disableFieldTrie = &cli.BoolFlag{
Name: "disable-state-field-trie",
Usage: "Disables the usage of state field tries to compute the state root",
}
disableInitSyncBatchSaveBlocks = &cli.BoolFlag{
Name: "disable-init-sync-batch-save-blocks",
Usage: "Instead of saving batch blocks to the DB during initial syncing, this disables batch saving of blocks",
@ -160,7 +161,6 @@ var (
// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
enableFieldTrie,
enableNewStateMgmt,
enableInitSyncWeightedRoundRobin,
}
@ -375,6 +375,10 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecateEnableFieldTrie = &cli.BoolFlag{
Name: "enable-state-field-trie",
Usage: deprecatedUsage,
Hidden: true}
)
var deprecatedFlags = []cli.Flag{
@ -419,6 +423,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedBroadcastSlashingFlag,
deprecatedDisableHistoricalDetectionFlag,
deprecateEnableStateRefCopy,
deprecateEnableFieldTrie,
}
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
@ -470,11 +475,11 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
dontPruneStateStartUp,
disableBroadcastSlashingFlag,
enableNewStateMgmt,
enableFieldTrie,
disableInitSyncBatchSaveBlocks,
waitForSyncedFlag,
skipRegenHistoricalStates,
enableInitSyncWeightedRoundRobin,
disableFieldTrie,
disableStateRefCopy,
}...)
@ -483,7 +488,6 @@ var E2EBeaconChainFlags = []string{
"--cache-filtered-block-tree",
"--enable-state-gen-sig-verify",
"--check-head-state",
"--enable-state-field-trie",
"--enable-new-state-mgmt",
"--enable-init-sync-wrr",
}