-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: develop
Are you sure you want to change the base?
Conversation
@@ -562,17 +562,6 @@ func TestActiveValidatorIndices(t *testing.T) { | |||
}, | |||
want: []primitives.ValidatorIndex{0, 2, 3}, | |||
},*/ | |||
{ | |||
name: "impossible_zero_validators", // Regression test for issue #13051 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
ae67a0c
to
000cbde
Compare
@@ -119,6 +119,7 @@ func TestFuzzEth1DataHasEnoughSupport_10000(t *testing.T) { | |||
require.NoError(t, err) | |||
_, err = Eth1DataHasEnoughSupport(s, eth1data) | |||
_ = err | |||
fuzz.FreeMemory(i) |
There was a problem hiding this comment.
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
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