Skip to content

Commit

Permalink
Sync: Verify all block and attestations signatures on finalized block…
Browse files Browse the repository at this point in the history
…s by default (#6499)

* Make verifying all signatures the default operation
* Merge branch 'master' into flip-verify-all
* Merge branch 'master' into flip-verify-all
* Merge branch 'master' into flip-verify-all
* Merge branch 'master' into flip-verify-all
  • Loading branch information
prestonvanloon authored Jul 7, 2020
1 parent 64fa474 commit 46b82eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
7 changes: 3 additions & 4 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Disabled ssz cache")
cfg.EnableSSZCache = false
}
if ctx.Bool(initSyncVerifyEverythingFlag.Name) {
log.Warn("Initial syncing with verifying all block's content signatures.")
cfg.InitSyncNoVerify = false
} else {
cfg.InitSyncNoVerify = false
if ctx.Bool(disableInitSyncVerifyEverythingFlag.Name) {
log.Warn("Initial syncing while verifying only the block proposer signatures.")
cfg.InitSyncNoVerify = true
}
if ctx.Bool(skipBLSVerifyFlag.Name) {
Expand Down
15 changes: 10 additions & 5 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ var (
Name: "kafka-url",
Usage: "Stream attestations and blocks to specified kafka servers. This field is used for bootstrap.servers kafka config field.",
}
initSyncVerifyEverythingFlag = &cli.BoolFlag{
Name: "initial-sync-verify-all-signatures",
disableInitSyncVerifyEverythingFlag = &cli.BoolFlag{
Name: "disable-initial-sync-verify-all-signatures",
Usage: "Initial sync to finalized checkpoint with verifying block's signature, RANDAO " +
"and attestation's aggregated signatures. Without this flag, only the proposer " +
"and attestation's aggregated signatures. With this flag, only the proposer " +
"signature is verified until the node reaches the end of the finalized chain.",
}
enableSlasherFlag = &cli.BoolFlag{
Expand Down Expand Up @@ -156,7 +156,6 @@ var (

// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
initSyncVerifyEverythingFlag,
forceMaxCoverAttestationAggregation,
newBeaconStateLocks,
batchBlockVerify,
Expand Down Expand Up @@ -477,6 +476,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedInitSyncVerifyEverythingFlag = &cli.BoolFlag{
Name: "initial-sync-verify-all-signatures",
Usage: deprecatedUsage,
Hidden: true,
}
)

var deprecatedFlags = []cli.Flag{
Expand Down Expand Up @@ -542,6 +546,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedArchiveAttestation,
deprecatedEnableProtectProposerFlag,
deprecatedEnableProtectAttesterFlag,
deprecatedInitSyncVerifyEverythingFlag,
}

// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
Expand Down Expand Up @@ -572,7 +577,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableForkChoiceUnsafeFlag,
disableDynamicCommitteeSubnets,
disableSSZCache,
initSyncVerifyEverythingFlag,
disableInitSyncVerifyEverythingFlag,
skipBLSVerifyFlag,
kafkaBootstrapServersFlag,
enableBackupWebhookFlag,
Expand Down

0 comments on commit 46b82eb

Please sign in to comment.