Skip to content

Remove (frozen) slotsPerArchivedPoint field in favor of config read - #17343

Open
syjn99 wants to merge 2 commits into
developfrom
refactor/frozen-archived-point
Open

Remove (frozen) slotsPerArchivedPoint field in favor of config read#17343
syjn99 wants to merge 2 commits into
developfrom
refactor/frozen-archived-point

Conversation

@syjn99

@syjn99 syjn99 commented Aug 13, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

Other

What does this PR do? Why is it needed?

Small refactor. StateManager holds slotsPerArchivedPoint which is fixed in the runtime as params.BeaconConfig().SlotsPerArchivedPoint, and there's no mutation on this field. Rather than holding it and passing it as arguments, just read the global configuration value.

For the testing side, like what we have been doing, mutate the config like:

	slotsPerArchivedPoint := primitives.Slot(128)
	params.SetupTestConfigCleanup(t)
	cfg := params.BeaconConfig().Copy()
	cfg.SlotsPerArchivedPoint = slotsPerArchivedPoint
	params.OverrideBeaconConfig(cfg)

Which issue(s) does this PR fix?

N/A

Other notes for review

No functional behavior changes.

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • I have added a description with sufficient context for reviewers to understand this PR.
  • I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).

@syjn99 syjn99 added the cleanup PR improving code health label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup PR improving code health

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant