diff --git a/cmd/beacon-chain/main.go b/cmd/beacon-chain/main.go index df25adde48..24bcdb1b49 100644 --- a/cmd/beacon-chain/main.go +++ b/cmd/beacon-chain/main.go @@ -156,6 +156,7 @@ var appFlags = []cli.Flag{ dasFlags.BackfillOldestSlot, dasFlags.BlobRetentionEpochFlag, flags.BatchVerifierLimit, + flags.StateDiffExponents, } func init() { diff --git a/config/features/flags.go b/config/features/flags.go index e4723ff6db..a3b66743fc 100644 --- a/config/features/flags.go +++ b/config/features/flags.go @@ -270,6 +270,7 @@ var BeaconChainFlags = combinedFlags([]cli.Flag{ DisableQUIC, EnableDiscoveryReboot, enableExperimentalAttestationPool, + EnableStateDiff, forceHeadFlag, blacklistRoots, }, deprecatedBeaconFlags, deprecatedFlags, upcomingDeprecation) diff --git a/testing/endtoend/BUILD.bazel b/testing/endtoend/BUILD.bazel index ab15472fe5..4058159e4d 100644 --- a/testing/endtoend/BUILD.bazel +++ b/testing/endtoend/BUILD.bazel @@ -95,6 +95,7 @@ go_test( "endtoend_setup_test.go", "endtoend_test.go", "minimal_e2e_test.go", + "minimal_hdiff_e2e_test.go", "minimal_slashing_e2e_test.go", "slasher_simulator_e2e_test.go", ], diff --git a/testing/endtoend/minimal_hdiff_e2e_test.go b/testing/endtoend/minimal_hdiff_e2e_test.go new file mode 100644 index 0000000000..4ddd2f15b7 --- /dev/null +++ b/testing/endtoend/minimal_hdiff_e2e_test.go @@ -0,0 +1,16 @@ +package endtoend + +import ( + "testing" + + "github.com/OffchainLabs/prysm/v7/config/params" + "github.com/OffchainLabs/prysm/v7/runtime/version" + "github.com/OffchainLabs/prysm/v7/testing/endtoend/types" +) + +func TestEndToEnd_MinimalConfig_WithStateDiff(t *testing.T) { + r := e2eMinimal(t, types.InitForkCfg(version.Bellatrix, version.Electra, params.E2ETestConfig()), + types.WithStateDiff(), + ) + r.run() +} diff --git a/testing/endtoend/types/types.go b/testing/endtoend/types/types.go index 8de400bc58..3468356e93 100644 --- a/testing/endtoend/types/types.go +++ b/testing/endtoend/types/types.go @@ -67,6 +67,15 @@ func WithSSZOnly() E2EConfigOpt { } } +func WithStateDiff() E2EConfigOpt { + return func(cfg *E2EConfig) { + cfg.BeaconFlags = append(cfg.BeaconFlags, + "--enable-state-diff", + "--state-diff-exponents=6,5", // Small exponents for quick testing + ) + } +} + // E2EConfig defines the struct for all configurations needed for E2E testing. type E2EConfig struct { TestCheckpointSync bool