diff --git a/config/features/config.go b/config/features/config.go index 3dca3c76f7c8..4961736bba9c 100644 --- a/config/features/config.go +++ b/config/features/config.go @@ -74,6 +74,8 @@ 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 + // EnablePeerDAS enables running the node with the experimental data availability sampling scheme. + EnablePeerDAS bool SaveInvalidBlock bool // SaveInvalidBlock saves invalid block to temp. SaveInvalidBlob bool // SaveInvalidBlob saves invalid blob to temp. @@ -266,6 +268,12 @@ func ConfigureBeaconChain(ctx *cli.Context) error { logEnabled(EnableDiscoveryReboot) cfg.EnableDiscoveryReboot = true } + // For the p.o.c we enable it by default. + cfg.EnablePeerDAS = true + if ctx.IsSet(EnablePeerDAS.Name) { + logEnabled(EnablePeerDAS) + cfg.EnablePeerDAS = true + } cfg.AggregateIntervals = [3]time.Duration{aggregateFirstInterval.Value, aggregateSecondInterval.Value, aggregateThirdInterval.Value} Init(cfg) diff --git a/config/features/flags.go b/config/features/flags.go index 2b263eb17317..41c6bc8f4768 100644 --- a/config/features/flags.go +++ b/config/features/flags.go @@ -174,6 +174,10 @@ var ( Name: "enable-discovery-reboot", Usage: "Experimental: Enables the discovery listener to rebooted in the event of connectivity issues.", } + EnablePeerDAS = &cli.BoolFlag{ + Name: "peer-das", + Usage: "Enables Prysm to run with the experimental peer data availability sampling scheme.", + } ) // devModeFlags holds list of flags that are set when development mode is on. @@ -232,6 +236,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c EnableQUIC, DisableCommitteeAwarePacking, EnableDiscoveryReboot, + EnablePeerDAS, }...)...) // E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.