Implement Batch Verifier For Pubsub Objects (#9344)

* add initial commit

* add aggregates in

* fmt

* add new changes

* gaz

* fix copy

* terence's review

* fix broken build
This commit is contained in:
Nishant Das
2021-09-15 13:49:50 +08:00
committed by GitHub
parent 31a78ab22a
commit 34391fa780
14 changed files with 372 additions and 16 deletions

View File

@@ -51,6 +51,7 @@ type Flags struct {
EnableOptimizedBalanceUpdate bool // EnableOptimizedBalanceUpdate uses an updated method of performing balance updates.
EnableDoppelGanger bool // EnableDoppelGanger enables doppelganger protection on startup for the validator.
EnableHistoricalSpaceRepresentation bool // EnableHistoricalSpaceRepresentation enables the saving of registry validators in separate buckets to save space
EnableBatchVerification bool // EnableBatchVerification enables batch signature verification on gossip messages.
// Logging related toggles.
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
@@ -213,6 +214,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
logDisabled(disableActiveBalanceCache)
cfg.EnableActiveBalanceCache = false
}
if ctx.Bool(enableBatchGossipVerification.Name) {
logEnabled(enableBatchGossipVerification)
cfg.EnableBatchVerification = true
}
Init(cfg)
}

View File

@@ -135,6 +135,10 @@ var (
Name: "disable-active-balance-cache",
Usage: "This disables active balance cache, which improves node performance during block processing",
}
enableBatchGossipVerification = &cli.BoolFlag{
Name: "enable-batch-gossip-verification",
Usage: "This enables batch verification of signatures received over gossip.",
}
)
// devModeFlags holds list of flags that are set when development mode is on.
@@ -142,6 +146,7 @@ var devModeFlags = []cli.Flag{
enableLargerGossipHistory,
enableNextSlotStateCache,
forceOptMaxCoverAggregationStategy,
enableBatchGossipVerification,
}
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
@@ -193,6 +198,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableCorrectlyInsertOrphanedAtts,
disableCorrectlyPruneCanonicalAtts,
disableActiveBalanceCache,
enableBatchGossipVerification,
}...)
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.