Proposer builds block in parallel. (Consensus vs Execution) (#12297)

* Proposer builds block in parallel. Cosensus vs Execution

* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* Use feature flag

---------

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
This commit is contained in:
terencechain
2023-05-01 07:37:26 -07:00
committed by GitHub
parent 83416f31a5
commit 5b8084b829
3 changed files with 103 additions and 33 deletions

View File

@@ -67,6 +67,8 @@ type Flags struct {
PrepareAllPayloads bool // PrepareAllPayloads informs the engine to prepare a block on every slot.
BuildBlockParallel bool // BuildBlockParallel builds beacon block for proposer in parallel.
// KeystoreImportDebounceInterval specifies the time duration the validator waits to reload new keys if they have
// changed on disk. This feature is for advanced use cases only.
KeystoreImportDebounceInterval time.Duration
@@ -212,6 +214,10 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
logEnabled(prepareAllPayloads)
cfg.PrepareAllPayloads = true
}
if ctx.IsSet(buildBlockParallel.Name) {
logEnabled(buildBlockParallel)
cfg.BuildBlockParallel = true
}
Init(cfg)
return nil
}

View File

@@ -118,6 +118,10 @@ var (
Name: "prepare-all-payloads",
Usage: "Informs the engine to prepare all local payloads. Useful for relayers and builders",
}
buildBlockParallel = &cli.BoolFlag{
Name: "build-block-parallel",
Usage: "Builds a beacon block in parallel for consensus and execution. It results in faster block construction time",
}
)
// devModeFlags holds list of flags that are set when development mode is on.
@@ -164,6 +168,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
enableVerboseSigVerification,
enableOptionalEngineMethods,
prepareAllPayloads,
buildBlockParallel,
}...)...)
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.