Save invalid block to temp save-invalid-block-temp (#13722)

This commit is contained in:
terence
2024-03-11 13:34:44 -07:00
committed by GitHub
parent ec7949fa4b
commit 697bcd418c
4 changed files with 41 additions and 0 deletions

View File

@@ -72,6 +72,9 @@ type Flags struct {
PrepareAllPayloads bool // PrepareAllPayloads informs the engine to prepare a block on every slot.
// BlobSaveFsync requires blob saving to block on fsync to ensure blobs are durably persisted before passing DA.
BlobSaveFsync bool
SaveInvalidBlock bool // SaveInvalidBlock saves invalid block to temp.
// 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
@@ -187,6 +190,11 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
cfg.WriteSSZStateTransitions = true
}
if ctx.Bool(saveInvalidBlockTempFlag.Name) {
logEnabled(saveInvalidBlockTempFlag)
cfg.SaveInvalidBlock = true
}
if ctx.IsSet(disableGRPCConnectionLogging.Name) {
logDisabled(disableGRPCConnectionLogging)
cfg.DisableGRPCConnectionLogs = true

View File

@@ -42,6 +42,10 @@ var (
Name: "interop-write-ssz-state-transitions",
Usage: "Writes SSZ states to disk after attempted state transitio.",
}
saveInvalidBlockTempFlag = &cli.BoolFlag{
Name: "save-invalid-block-temp",
Usage: "Writes invalid blocks to temp directory.",
}
disableGRPCConnectionLogging = &cli.BoolFlag{
Name: "disable-grpc-connection-logging",
Usage: "Disables displaying logs for newly connected grpc clients.",
@@ -196,6 +200,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
devModeFlag,
enableExperimentalState,
writeSSZStateTransitionsFlag,
saveInvalidBlockTempFlag,
disableGRPCConnectionLogging,
HoleskyTestnet,
PraterTestnet,