Skip to content

Make the multi-value slice permanent #15414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Jun 16, 2025

What type of PR is this?

Feature Graduation

What does this PR do? Why is it needed?

This makes our usage of multivalue slices permanent in the state and removes all the old state paths. This PR also deprecates the flag disabling the usage of the experimental state.

Other notes for review

Supersedes #15292 as I can't push to @nisdas 's repo

Acknowledgements

@@ -562,17 +562,6 @@ func TestActiveValidatorIndices(t *testing.T) {
},
want: []primitives.ValidatorIndex{0, 2, 3},
},*/
{
name: "impossible_zero_validators", // Regression test for issue #13051
Copy link
Contributor Author

@rkapka rkapka Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is impossible to test. Validators are a multi-value slice and a non-nil value is created in InitializeFromProto even if you have a nil value in the proto state. I added a test in the mvslice package that shows initializing the mvslice with a nil value is also not a problem as it will work in the same way as initializing with an empty slice.

@@ -9,16 +9,6 @@ import (
"github.com/OffchainLabs/prysm/v6/testing/util"
)

func TestReportEpochMetrics_BadHeadState(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/OffchainLabs/prysm/pull/15414/files#r2151969948. SetValidators(nil) is not an issue because the mvslice can handle it.

@rkapka rkapka force-pushed the make-mvslice-permanent branch from ae67a0c to 000cbde Compare June 17, 2025 15:49
@@ -119,6 +119,7 @@ func TestFuzzEth1DataHasEnoughSupport_10000(t *testing.T) {
require.NoError(t, err)
_, err = Eth1DataHasEnoughSupport(s, eth1data)
_ = err
fuzz.FreeMemory(i)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this one and the ones below in #15395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants