Skip to content
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

Hardcoded genesisValidator Root instead of computing #14392

Closed
wants to merge 6 commits into from

Conversation

Redidacove
Copy link
Contributor

@Redidacove Redidacove commented Aug 28, 2024

What type of PR is this?

What does this PR do? Why is it needed ?
Replaced hardcoded value everywhere where fn was called to compute it from state calling st.GenesisValidatorRoot()
Which issues(s) does this PR fix ?
Fixes
Issue #14364

Other notes for review
I have removed st.GenesisValidator() function and replaced it with hardcoded value whenever its needed in this PR

@Redidacove Redidacove requested a review from a team as a code owner August 28, 2024 11:14
@Redidacove Redidacove changed the title removed genesisValidator from state WIP :removed genesisValidator from state Aug 28, 2024
@Redidacove Redidacove closed this Aug 28, 2024
@Redidacove Redidacove reopened this Aug 28, 2024
@Redidacove Redidacove changed the title WIP :removed genesisValidator from state Hardcoded genesisValidator Root instead of computing Aug 28, 2024
@@ -19,7 +19,6 @@ func TestUpgradeToBellatrix(t *testing.T) {
require.NoError(t, err)

require.Equal(t, preForkState.GenesisTime(), mSt.GenesisTime())
require.DeepSSZEqual(t, preForkState.GenesisValidatorsRoot(), mSt.GenesisValidatorsRoot())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't need this because GenesisValidator fn is removed

@@ -19,14 +19,6 @@ func (b *BeaconState) GenesisTime() uint64 {
return b.genesisTime
}

// GenesisValidatorsRoot of the beacon state.
func (b *BeaconState) GenesisValidatorsRoot() []byte {
b.lock.RLock()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this one

Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

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

Please do not modify the state package, the genesis validator root is still a valid field in the state

@Redidacove Redidacove closed this Aug 30, 2024
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